Ejemplo n.º 1
0
 private void HandleInitialized(object sender, EventArgs args)
 {
     if (SingleInstance.AlreadyRunning())
     {
         MessageWindow.ShowError(null, "Already running", "Another instance of disParity is already running");
         Close();
     }
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Removes a drive from the parity set which has already been confirmed to be empty
 /// </summary>
 private void RemoveEmptyDrive(DataDriveViewModel vm)
 {
     try {
         viewModel.ParitySet.RemoveEmptyDrive(vm.DataDrive);
     }
     catch (Exception e) {
         App.LogCrash(e);
         MessageWindow.ShowError(viewModel.Owner, "Error removing drive", e.Message);
         return;
     }
     viewModel.DriveRemoved(vm);
     Status = vm.DataDrive.Root + " removed";
 }
Ejemplo n.º 3
0
 public void ImportOldConfiguration(string path)
 {
     try {
         config.ImportOld(path);
         SetProperties();
         ConfigImported = true;
     }
     catch (Exception e) {
         App.LogCrash(e);
         MessageWindow.ShowError(Owner, "Import error", "Sorry, an error occurred while importing the configuration: " + e.Message);
         return;
     }
 }