예제 #1
0
        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);
        }
예제 #2
0
        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);
        }
예제 #3
0
        public void DeleteCamera(CamViewerController controller, CameraConnection connection)
        {
            controller.Model.Settings.Connections.Remove(connection);

            controller.SaveSettings();
        }