RecordSwitch() публичный Метод

public RecordSwitch ( bool record ) : string
record bool
Результат string
Пример #1
0
        public void RemoveCamera(CameraWindow cameraControl, bool confirm)
        {
            if (confirm &&
                MessageBox.Show(LocRm.GetString("AreYouSure"), LocRm.GetString("Confirm"), MessageBoxButtons.OKCancel,
                                MessageBoxIcon.Warning) == DialogResult.Cancel)
                return;

            var dr = DialogResult.No;
            if (confirm)
            {
                dr = MessageBox.Show(LocRm.GetString("DeleteAllAssociatedMedia"), LocRm.GetString("Confirm"),
                    MessageBoxButtons.YesNoCancel,
                    MessageBoxIcon.Question);
            }
            if (dr == DialogResult.Cancel)
                return;

            string folder = cameraControl.Dir.Entry + "video\\" + cameraControl.Camobject.directory + "\\";

            cameraControl.ShuttingDown = true;
            cameraControl.MouseDown -= CameraControlMouseDown;
            cameraControl.MouseUp -= CameraControlMouseUp;
            cameraControl.MouseMove -= CameraControlMouseMove;
            cameraControl.DoubleClick -= CameraControlDoubleClick;
            cameraControl.RemoteCommand -= CameraControlRemoteCommand;
            cameraControl.Notification -= ControlNotification;
            if (cameraControl.Recording)
                cameraControl.RecordSwitch(false);

            cameraControl.Disable();
            cameraControl.SaveFileList();

            if (cameraControl.VolumeControl != null)
                RemoveMicrophone(cameraControl.VolumeControl, false);

            if (InvokeRequired)
                Invoke(new Delegates.CameraCommandDelegate(RemoveCameraPanel), cameraControl);
            else
                RemoveCameraPanel(cameraControl);

            if (dr == DialogResult.Yes)
            {
                try
                {
                    Directory.Delete(folder, true);
                }
                catch (Exception ex)
                {
                    LogExceptionToFile(ex);
                }
            }
        }
Пример #2
0
        public void RemoveCamera(CameraWindow cameraControl, bool confirm)
        {
            if (confirm &&
                MessageBox.Show(LocRm.GetString("AreYouSure"), LocRm.GetString("Confirm"), MessageBoxButtons.OKCancel,
                                MessageBoxIcon.Warning) == DialogResult.Cancel)
                return;
            cameraControl.ShuttingDown = true;
            cameraControl.MouseDown -= CameraControlMouseDown;
            cameraControl.MouseUp -= CameraControlMouseUp;
            cameraControl.MouseMove -= CameraControlMouseMove;
            cameraControl.DoubleClick -= CameraControlDoubleClick;
            cameraControl.RemoteCommand -= CameraControlRemoteCommand;
            cameraControl.Notification -= ControlNotificationHandler;
            if (cameraControl.Recording)
                cameraControl.RecordSwitch(false);

            cameraControl.Disable();
            cameraControl.SaveFileList();

            if (cameraControl.VolumeControl != null)
                RemoveMicrophone(cameraControl.VolumeControl, false);

            if (InvokeRequired)
                Invoke(new CameraCommandDelegate(RemoveCameraPanel), cameraControl);
            else
                RemoveCameraPanel(cameraControl);
        }