예제 #1
0
 /// <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;
     }
 }
예제 #2
0
 /// <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();
     }
 }
예제 #3
0
 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();
     }
 }
예제 #4
0
        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());
            }
        }