?? slidertest.xml
字號:
<application> <window caption="Slider Test" width="300" height="200"/> <resources> <script><![CDATA[function SliderTest() { var win = application.getWindow(); var s = new BiSlider("vertical"); var s2 = new BiSlider(); var t = new BiTimer; var startButton = new BiButton("Start"); var stopButton = new BiButton("Stop"); s.setTabIndex(1); s2.setTabIndex(2); startButton.setTabIndex(3); stopButton.setTabIndex(4); s.setLocation(5, 5); s.setBottom(5); win.add(s); s2.setLocation(s.getLeft() + s.getWidth() + 5, 5); s2.setRight(5); win.add(s2); stopButton.setRight(5); stopButton.setBottom(5); stopButton.setWidth(70); win.add(stopButton); startButton.setRight(stopButton.getWidth() + 10); startButton.setBottom(5); startButton.setWidth(70); win.add(startButton); var steps = 100; var time = 5000; var interval = time /steps; //s.setMinimum(50); //s2.setMinimum(50); s.setMaximum(steps); s2.setMaximum(steps); t.setInterval(interval); t.addEventListener("tick" , function () { if (s.getValue() >= steps) { t.stop(); startButton.setText("Start"); stopButton.setEnabled(false); } s.setValue(s.getValue() + 1); }); startButton.addEventListener("action", function () { if (t.getEnabled()) { // running t.stop(); startButton.setText("Resume"); } else { if (s.getValue() == s.getMaximum()) { s.setValue(0); } t.start(); startButton.setText("Pause"); stopButton.setEnabled(true); } }); stopButton.addEventListener("action", function () { t.stop(); s.setValue(0) stopButton.setEnabled(false); startButton.setText("Start"); }); s.addEventListener("change", function () { s2.setValue(s.getValue()); win.setCaption(s.getValue()); }); s2.addEventListener("change", function () { s.setValue(s2.getValue()); win.setCaption(s.getValue()); }); //t.start();}SliderTest.main = function () { new SliderTest(); }; ]]></script> </resources></application>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -