Beispiel #1
0
 private void TimerToggle_Tick(object sender, EventArgs e)
 {
     if (this.Size.Width < 1105 && !Flag)
     {
         this.Size     = new Size(this.Size.Width + 5, this.Size.Height);
         this.Location = new Point(this.Location.X - 3, this.Location.Y);
         if (this.Size.Width >= 1105)
         {
             Flag = true;
             btnToggleGIF.Text = "<<";
             TimerToggle.Stop();
         }
     }
     if (Flag)
     {
         this.Size     = new Size(this.Size.Width - 5, this.Size.Height);
         this.Location = new Point(this.Location.X + 3, this.Location.Y);
         if (this.Size.Width <= 853)
         {
             Flag = false;
             btnToggleGIF.Text = ">>";
             TimerToggle.Stop();
         }
     }
 }
 protected virtual void PinChangedEvent(object sender, SerialPinChangedEventArgs e)
 {
     if (IsOpen)
     {
         try
         {
             SnapTime?.Invoke(this, new SerialTimerEventArgs {
                 High = DsrHolding
             });
             TimerToggle?.Invoke(this, new SerialTimerEventArgs {
                 High = CtsHolding
             });
         }
         catch (IOException ex)
         {
             MessageBox.Show(ex.Message, ex.Source, MessageBoxButton.OK, MessageBoxImage.Error);
         }
     }
 }
Beispiel #3
0
 private void btnToggleGIF_Click(object sender, EventArgs e)
 {
     TimerToggle.Start();
 }