Exemplo n.º 1
0
        private void StartStopButtonClick(object sender, RoutedEventArgs e)
        {
            // Dump or stop the dump
            if ((string)StartStopButton.Content == Constants.StartDumping)
            {
                StartDumping();
            }
            else if ((string)StartStopButton.Content == Constants.StopDumping)
            {
                ViewModels.LoggerViewModel.VerboseLogLn("Canceling dumping process...");
                _env.CancelDumping();
                CopyProtectScanButton.IsEnabled = true;

                if (EjectWhenDoneCheckBox.IsChecked == true)
                {
                    ViewModels.LoggerViewModel.VerboseLogLn($"Ejecting disc in drive {_env.Drive.Letter}");
                    _env.EjectDisc();
                }

                if (_options.ResetDriveAfterDump)
                {
                    ViewModels.LoggerViewModel.VerboseLogLn($"Resetting drive {_env.Drive.Letter}");
                    _env.ResetDrive();
                }
            }
        }