Exemple #1
0
 private void HW_OnDisconnectRequested(object sender, EventArgs e)
 {
     DataPort.Disconnect();
     HW = new LoggerHardware();
     HW.OnSignatureUpdate     += HW_OnSignatureUpdate;
     HW.OnDisconnectRequested += HW_OnDisconnectRequested;
 }
Exemple #2
0
 /// <summary>
 /// Initializes the control with a fixed number of maximum supported channels.
 /// The channels can later be disabled but NOT removed.
 /// </summary>
 public CompleteLogControl()
 {
     InitializeComponent();
     HW = new LoggerHardware();
     HW.OnSignatureUpdate     += HW_OnSignatureUpdate;
     HW.OnDisconnectRequested += HW_OnDisconnectRequested;
     ChannelEditors            = new ChannelEditor[NoS];
     for (int i = 0; i < NoS; i++)
     {
         ChannelEditor ecb = new ChannelEditor(i);
         // Do one time setup
         ecb.Anchor                 = AnchorStyles.Right | AnchorStyles.Top;
         ecb.Width                  = Width - logControl.Width - 5;
         ecb.Height                 = 80;
         ecb.Left                   = Width - ecb.Width;
         ecb.Top                    = 5 + i * 100;
         ecb.TextUpdated           += Ecb_TextUpdated;
         ecb.EnableChanged         += Ecb_EnableChanged;
         ecb.GetContextMenuRequest += Ecb_GetContextMenuRequest;
         ecb.MouseEntered          += Ecb_MouseEntered;
         ecb.MouseLeft             += Ecb_MouseLeft;
         ChannelEditors[i]          = ecb;
         this.Controls.Add(ecb);
     }
     dsCollection = new TimeSeriesCollection(NoS);
     // enable only the first two channels by default
     for (int i = 0; i < NoS; i++)
     {
         dsCollection[i].Enabled = i < 2;
     }
     ChannelOptions = new ChannelOptionsCollection[NoS];
     for (int i = 0; i < NoS; i++)
     {
         ChannelOptions[i] = new ChannelOptionsCollection(i);
     }
 }