public bool CheckBackuptPathForMonitor() { if (!Core.settings.IsBackupPathSet) { RequestReply reply = RequestHandler.Request(RequestType.BackupFolder, false); if (reply.Cancelled) { TranslatingMessageHandler.SendWarning("MonitorNeedsBackupPath"); return(false); //throw new TranslateableException("BackupPathNotSet"); } } return(true); }
public void start() { while (!Core.settings.IsBackupPathSet && !backuppathwarned) { RequestReply reply = RequestHandler.Request(RequestType.BackupFolder, false); if (reply.Cancelled) { TranslatingMessageHandler.SendWarning("MonitorNeedsBackupPath"); backuppathwarned = true; //throw new TranslateableException("BackupPathNotSet"); } } this.EnableRaisingEvents = true; }
private static void addGame(GameEntry game) { bool dont_add = false; if (model.containsId(game.id)) { GameEntry current = model.get(game.id); string file_used = null; if (game.SourceFile == "new.xml") { file_used = game.SourceFile; model.Remove(current); } else if (current.SourceFile == "new.xml") { file_used = current.SourceFile; } else { file_used = current.SourceFile; dont_add = true; if (!supress_duplicate_game_warnings) { supress_duplicate_game_warnings = TranslatingMessageHandler.SendWarning("DuplicateGame", true, game.id.ToString(), game.SourceFile, current.SourceFile, file_used) >= ResponseType.Suppressed; } } } if (game.id.OS == "PS1") { // GameVersion psp_game = // GameXML psp_game = game_profile; // psp_game = new GameXML(new GameID(psp_game.id.name, "PSP", psp_game.id.region), psp_game.xml); // createGameObject(psp_game); } if (!dont_add) { model.AddWithSort(game); } }
//public static void addShield(Button button) { // button.FlatStyle = FlatStyle.System; // SendMessage(button.Handle, BCM_SETSHIELD, 0, 0xFFFFFFFF); //} public static ElevationResult elevation(string app_name, string new_args, bool wait_for_exit) { StringBuilder arg_string = new StringBuilder(); if (new_args != null) { arg_string.Append(new_args); } string[] args = Environment.GetCommandLineArgs(); for (int j = 1; j < args.Length; j++) { if (args[j].Contains(" ")) { arg_string.Append(" \"" + args[j] + "\""); } else { arg_string.Append(" " + args[j]); } } if (!Core.settings.SuppressElevationWarnings) { ResponseType response = ResponseType.OK; if (Environment.OSVersion.Version < new Version(6, 0)) { response = TranslatingMessageHandler.SendWarning("ElevationXPWarning", true); } if (response >= ResponseType.Suppressed) { Core.settings.SuppressElevationWarnings = true; } } return(runExe(app_name, arg_string.ToString(), true, wait_for_exit)); }