public ICameraNewFrameEventArgs( ICameraDriver driver, byte[] frame) { this.driver = driver; this.frame = frame; }
protected void OnDriverChanged(object sender, EventArgs a) { if (dontchange || currentEditDevice == null) { return; } Console.WriteLine("Changed"); TreeIter iter; if (driverListBox.GetActiveIter(out iter)) { if (driverlistStore.GetValue(iter, 0) != null) { ICameraDriver driver = (ICameraDriver)driverlistStore.GetValue(iter, 1); if (currentEditDevice.driver != driver) { if (driver != null) { currentEditDevice.driver = driver.Clone(); currentEditDevice.driver.device = currentEditDevice; } else { currentEditDevice.driver = null; } } } else { currentEditDevice.driver = null; } } else { currentEditDevice.driver = null; } if (currentEditDevice.driver != null && !currentEditDevice.driver.isEmptyDriver) { uriBox.Sensitive = currentEditDevice.driver.isNetworkCamera; loginBox.Sensitive = currentEditDevice.driver.isLoginReqired; passwordBox.Sensitive = currentEditDevice.driver.isPasswordRequired; hardwareBox.Sensitive = currentEditDevice.driver.isAutoDiscover; if (currentEditDevice.driver.isNetworkCamera) { currentEditDevice.driver.URI = uriField.Text; } if (currentEditDevice.driver.isLoginReqired) { currentEditDevice.driver.Login = loginField.Text; } if (currentEditDevice.driver.isPasswordRequired) { currentEditDevice.driver.Password = passwordField.Text; } testButton.Sensitive = saveButton.Sensitive = true; } else { hardwareBox.Sensitive = uriBox.Sensitive = loginBox.Sensitive = passwordBox.Sensitive = testButton.Sensitive = saveButton.Sensitive = false; } Console.WriteLine(sender.GetType().ToString()); }
public ICameraNewFrameEventArgs(ICameraDriver driver, byte[] frame) { this.driver = driver; this.frame = frame; }