static void Main() { Application app = new Application(); RestoreWindow win = new RestoreWindow(); app.Run(win); }
protected void beginRestore(List<ArchiveHandler> archives) { this.Visibility = System.Windows.Visibility.Hidden; if(archives.Count>1&&this.askQuestion("Convenience?","You're restoring more than one archive,\nwould you like MASGAU to not prompt you for input unless absolutely necessary?")) { Restore.RestoreProgramHandler.use_defaults = true; } foreach(ArchiveHandler archive in archives) { if(Restore.RestoreProgramHandler.overall_stop) { break; } Restore.RestoreWindow restore = new Restore.RestoreWindow(archive,this); if(restore.ShowDialog()) Core.redetect_games = true; } Restore.RestoreProgramHandler.use_defaults = false; Restore.RestoreProgramHandler.overall_stop = false; // Restore.RestoreProgramHandler.default_user = null; if(Restore.RestoreProgramHandler.unsuccesfull_restores.Count>0) { StringBuilder fail_list = new StringBuilder(); foreach(string failed in Restore.RestoreProgramHandler.unsuccesfull_restores) { fail_list.AppendLine(failed); } this.showError("Some archives did not restore",fail_list.ToString()); } this.Visibility = System.Windows.Visibility.Visible; }