public CameraConnection AddCamera(CamViewerController controller) { var form = controller.CreateView <IAddCameraForm>(); CameraConnection connection = null; if (form.Process()) { connection = form.Connection; controller.Model.Settings.Connections.Add(connection); controller.SaveSettings(); } return(connection); }
public CameraConnection EditCameraSettings(CamViewerController controller, CameraConnection cameraSettings) { var form = controller.CreateView <IAddCameraForm>(); CameraConnection connection = null; form.Connection = cameraSettings; if (form.Process()) { connection = form.Connection; controller.Model.Settings.Connections.Remove(cameraSettings); controller.Model.Settings.Connections.Add(connection); controller.SaveSettings(); } return(connection); }
public void DeleteCamera(CamViewerController controller, CameraConnection connection) { controller.Model.Settings.Connections.Remove(connection); controller.SaveSettings(); }