Пример #1
0
        public Toolbox(Focuser f)
        {
            MyFocuser = f;
            InitializeComponent();

            t           = new System.Timers.Timer(500);                      //500毫秒执行一次;
            t.Elapsed  += new System.Timers.ElapsedEventHandler(TimerEvent); //到达时间的时候执行事件;
            t.AutoReset = true;                                              //设置是执行一次(false)还是一直执行(true);
            t.Enabled   = true;                                              //是否执行System.Timers.Timer.Elapsed事件;
        }
Пример #2
0
 private void textBoxStepSize_KeyPress(object sender, KeyPressEventArgs e)
 {
     Focuser.OnlyEnterPlusNumber(sender, e);
 }
Пример #3
0
 private void textBoxMaxStep_KeyPress(object sender, KeyPressEventArgs e)
 {
     Focuser.OnlyEnterPlusInt(sender, e);
 }
Пример #4
0
 private void textBoxStepPerDeg_KeyPress(object sender, KeyPressEventArgs e)
 {
     Focuser.OnlyEnterNumber(sender, e);
 }
Пример #5
0
 private void textBoxPosition_KeyPress(object sender, KeyPressEventArgs e)
 {
     Focuser.OnlyEnterInt(sender, e);
 }