/// <summary> /// mnuInputChannelChild_Click /// /// If the video capture device supports input channels, submenus /// for the input channel selection are created. This is the handler /// sub for the input channel submenus. /// The menu text if the clicked submenu item is retrieved and assigned /// to the InputChannel property of IC15Control. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void mnuInputChannelChild_Click(object sender, System.EventArgs e) { System.Windows.Forms.ToolStripMenuItem mitem = null; mitem = ((System.Windows.Forms.ToolStripMenuItem)(sender)); foreach (System.Windows.Forms.ToolStripMenuItem Item in inputChannelsToolStripMenuItem.DropDownItems) { if (Item.Text == mitem.Text) { Item.Checked = true; } else { Item.Checked = false; } } foreach (System.Windows.Forms.ToolStripMenuItem Item in ToolBarInputChannel.DropDown.Items) { if (Item.Text == mitem.Text) { Item.Checked = true; } else { Item.Checked = false; } } icImagingControl1.InputChannel = mitem.Text; // Save the new input channel to the registry. DeviceSettings.SaveSelectedDevice(icImagingControl1); }
/// <summary> /// SelectDevice /// /// Show the device selection dialog. /// </summary> private void SelectDevice() { if (icImagingControl1.LiveVideoRunning) { icImagingControl1.LiveStop(); icImagingControl1.ShowDeviceSettingsDialog(); if (icImagingControl1.DeviceValid) { icImagingControl1.LiveStart(); } } else { icImagingControl1.ShowDeviceSettingsDialog(); } UpdateControls(); SetWindowSizeToImagesize(); DeviceSettings.SaveSelectedDevice(icImagingControl1); }