public void InitComponent()
 {
     dlgCom = new ComSettings();
     sdk2Com = new INEMO2_Device();
     dlgSensorSetting = new frmSensorSettings(sdk2Com);
     DeviceData = new INEMO2_FrameData();
     toolStripTxtSamples.Text = "1000";
     toolStripTxtSamples.AutoSize = false;
     toolStripTxtSamples.Width = 15;
     TCPMessages = new List<string>();
     m_Server = null;
     dbgTrace = null;
     availableModules = INEMO2_MODULES.INEMO2_MODULES_NONE;
     Settings.Click += new EventHandler(Settings_Click);
     toolStripCmbMode.SelectedIndexChanged += new EventHandler(toolStripCmbMode_SelectedIndexChanged);
     toolStripBtnConnect.Click += new EventHandler(toolStripBtnConnect_Click);
     toolStripBtnSensorSetting.Click += new EventHandler(toolStripBtnSensorSetting_Click);
     toolStripBtnStart.Click += new EventHandler(toolStripBtnStart_Click);
     toolStripBtnStop.Click += new EventHandler(toolStripBtnStop_Click);
     Connect.Click += new EventHandler(toolStripBtnConnect_Click);
     SensorSetting.Click += new EventHandler(toolStripBtnSensorSetting_Click);
     Start.Click += new EventHandler(toolStripBtnStart_Click);
     Stop.Click += new EventHandler(toolStripBtnStop_Click);
     ResetDevice.Click += new EventHandler(ResetDevice_Click);
     Enter_DFU_Mode.Click += new EventHandler(Enter_DFU_Mode_Click);
     Trace.Click += new EventHandler(Trace_Click);
     Identify.Click += new EventHandler(Identify_Click);
     toolStripTxtSamples.TextChanged += new EventHandler(toolStripTxtSamples_TextChanged);
     Samples.Click += new EventHandler(Samples_Click);
     Continous.Click += new EventHandler(Continous_Click);
     dlgSensorSetting.OnMessageToLogSettings = (MessageToLog) Delegate.Combine(dlgSensorSetting.OnMessageToLogSettings, new MessageToLog(MessageToLogFromSetting));
     TimerGetSamples.Interval = 30;
     TimerGetSamples.Enabled = false;
     base.DeviceConnected = false;
     toolStripBtnStart.Enabled = false;
     toolStripBtnStop.Enabled = false;
     toolStripLblNumSamples.Visible = false;
     toolStripBtnSensorSetting.Enabled = false;
     SensorSetting.Enabled = false;
     Start.Enabled = false;
     Stop.Enabled = false;
     toolStripProgressBarAcqSample.Visible = true;
     toolStripCmbMode.SelectedIndex = 1;
     Clear();
 }
 public void InitComponent()
 {
     dlgCom = new ComSettings();
     sdkCom = new iNEMO_SDK_Wrapper();
     toolStripTextBox2.Text = "1000";
     Settings.Click += new EventHandler(Settings_Click);
     toolStripComboBox1.SelectedIndexChanged += new EventHandler(toolStripComboBox1_SelectedIndexChanged);
     toolStripComboBox2.SelectedIndexChanged += new EventHandler(toolStripComboBox2_SelectedIndexChanged);
     toolStripButton10.Click += new EventHandler(toolStripButton10_Click);
     toolStripButton11.Click += new EventHandler(toolStripButton11_Click);
     toolStripButton13.Click += new EventHandler(toolStripButton13_Click);
     Connect.Click += new EventHandler(toolStripButton10_Click);
     Start.Click += new EventHandler(toolStripButton11_Click);
     Stop.Click += new EventHandler(toolStripButton13_Click);
     toolStripTextBox2.TextChanged += new EventHandler(toolStripTextBox2_TextChanged);
     Samples.Click += new EventHandler(Samples_Click);
     Continous.Click += new EventHandler(Continous_Click);
     timer1.Interval = 30;
     timer1.Enabled = false;
     base.DeviceConnected = false;
     Settings.Enabled = false;
     toolStripButton11.Enabled = false;
     toolStripButton13.Enabled = false;
     toolStripLabel1.Visible = false;
     Start.Enabled = false;
     Stop.Enabled = false;
     toolStripProgressBar1.Visible = true;
     toolStripComboBox2.SelectedIndex = 0;
     toolStripComboBox1.SelectedIndex = toolStripComboBox1.Items.Count - 1;
     Clear();
 }