/// <summary> /// The restore window is recreated every time the user /// clicks on the "restore" menu item, so the GUI references /// need to be updated. /// </summary> public void update_restore_GUI(Restore_Window restore_window, TextBlock RestoreInfo_text, TextBlock RestoreStatus_text) { this.restore_window = restore_window; this.RestoreInfo_text = RestoreInfo_text; this.RestoreStatus_text = RestoreStatus_text; }
public void leave_restore_mode() { if (app_mode == AppMode.ERROR) { return; } app_mode = AppMode.BACKUP; restore_window = null; RestoreInfo_text = null; RestoreStatus_text = null; }
private void Restore_menuItem_Click(object sender, RoutedEventArgs e) { app.backup_manager.stop_live_backup(); bool success = app.enter_restore_mode(); if (success) { var restore = new Restore_Window(app); restore.Height = 300; restore.ShowDialog(); app.leave_restore_mode(); } else { MyMessageBox.show("Software stuck in error mode. Cannot start " + "\"restore\" window. Restart this software to clear error mode.", "Error"); } }