public static void Setup() { bool manual = false; if (MessageBox.Show("Run auto-setup? If you choose not to, you must setup manually.", "Setup", MessageBoxButtons.YesNo, MessageBoxIcon.Question) != DialogResult.Yes) { manual = true; } if (manual) { PromptForm p = new PromptForm("Minecraft Launcher", "The location of \"Minecraft.exe\" (the launcher):", Settings.LauncherFile, true, PromptForm.AllFilesFilter); DialogResult dr = p.ShowDialog(); if (dr == DialogResult.OK) { Settings.LauncherFile = p.Value; if (MessageBox.Show("Would you like to have the old Minecraft launcher as an option?", "Use old MC launcher?", MessageBoxButtons.YesNo, MessageBoxIcon.Question) != System.Windows.Forms.DialogResult.Yes) { Settings.SpecifiedOldLauncher = false; } else { p = new PromptForm("Old Minecraft Launcher", "The location of the old \"Minecraft.exe\":", Settings.OldLauncherFile, true, PromptForm.AllFilesFilter); if (p.ShowDialog() != DialogResult.Cancel) { Settings.SpecifiedOldLauncher = false; } else { Settings.OldLauncherFile = p.Value; Settings.SpecifiedOldLauncher = true; } } } else { Setup(); } } else { ProgressForm.DownloadFile("http://www.minecraft.net/download/Minecraft.exe"); Settings.LauncherFile = System.IO.Path.GetDirectoryName(Application.ExecutablePath) + "\\Minecraft.exe"; Settings.OldLauncherFile = "N/A"; Settings.SpecifiedOldLauncher = false; Settings.UseOldLauncher = false; } Settings.Save(); }
public static void Setup() { bool manual = false; if (MessageBox.Show("Run auto-setup? If you choose not to, you must setup manually.", "Setup", MessageBoxButtons.YesNo, MessageBoxIcon.Question) != DialogResult.Yes) { manual = true; } if (manual) { PromptForm p = new PromptForm("Minecraft Launcher", "The location of \"Minecraft.exe\" (the launcher):", Settings.LauncherFile, true, PromptForm.AllFilesFilter); DialogResult dr = p.ShowDialog(); if (dr == DialogResult.OK) { Settings.LauncherFile = p.Value; if (MessageBox.Show("Would you like to have the old Minecraft launcher as an option?", "Use old MC launcher?", MessageBoxButtons.YesNo, MessageBoxIcon.Question) != System.Windows.Forms.DialogResult.Yes) { Settings.SpecifiedOldLauncher = false; } else { p = new PromptForm("Old Minecraft Launcher", "The location of the old \"Minecraft.exe\":", Settings.OldLauncherFile, true, PromptForm.AllFilesFilter); if (p.ShowDialog() != DialogResult.Cancel) { Settings.SpecifiedOldLauncher = false; } else { Settings.OldLauncherFile = p.Value; Settings.SpecifiedOldLauncher = true; } } } else { Setup(); } } else { ProgressForm.DownloadFile("http://www.minecraft.net/download/Minecraft.exe"); Settings.LauncherFile = System.IO.Path.GetDirectoryName(Application.ExecutablePath) + "\\Minecraft.exe"; Settings.OldLauncherFile = "N/A"; Settings.SpecifiedOldLauncher = false; Settings.UseOldLauncher = false; } Settings.Save(); }