/// <summary> /// If the program has errored it will run this.. It's to get a new path. /// </summary> private void GetPath() { MafiaIIBrowser.SelectedPath = ""; if (MafiaIIBrowser.ShowDialog() == DialogResult.OK) { ToolkitSettings.M2Directory = MafiaIIBrowser.SelectedPath; ToolkitSettings.WriteKey("MafiaII", "Directories", MafiaIIBrowser.SelectedPath); } else { return; } }
/// <summary> /// If the program has errored it will run this.. It's to get a new path. /// </summary> private void GetPath() { MafiaIIBrowser.SelectedPath = ""; if (MafiaIIBrowser.ShowDialog() == DialogResult.OK) { ToolkitSettings.M2Directory = MafiaIIBrowser.SelectedPath; ToolkitSettings.WriteKey("MafiaII", "Directories", MafiaIIBrowser.SelectedPath); InitTreeView(); } else { Application.Exit(); } }
private void GetPath() { MafiaIIBrowser.SelectedPath = ""; if (MafiaIIBrowser.ShowDialog() == DialogResult.OK) { ToolkitSettings.M2Directory = MafiaIIBrowser.SelectedPath; ToolkitSettings.WriteKey("MafiaII", "Directories", MafiaIIBrowser.SelectedPath); originalPath = new DirectoryInfo(ToolkitSettings.M2Directory); InitTreeView(); } else { ExitProgram(); } }
private static void CheckIfNewUpdate() { if (ToolkitSettings.CurrentVersion != ToolkitSettings.Version) { string UpdateMessage = string.Format("Welcome to update {0}! \nPress 'Ok' to visit the changelist on the wiki. \nPress 'Cancel' to continue.", ToolkitSettings.Version); if (MessageBox.Show(UpdateMessage, "Toolkit", MessageBoxButtons.OKCancel, MessageBoxIcon.Information) == DialogResult.OK) { ProcessStartInfo StartInfo = new ProcessStartInfo(); StartInfo.UseShellExecute = true; StartInfo.FileName = "https://github.com/Greavesy1899/MafiaToolkit/wiki/Toolkit-Changelist"; Process.Start(StartInfo); } // Write new version ToolkitSettings.CurrentVersion = ToolkitSettings.Version; ToolkitSettings.WriteKey("CurrentVersion", "Update", ToolkitSettings.CurrentVersion.ToString()); } }