public void showPathDialog(bool exitOnCancel) { string path = ""; try { path = settings.GetStringArray("Hud Paths")[0]; } catch { } var dialog = new SelectHudPathForm(settings.GetBool("Use Installed Hud"), settings.GetString("Custom Path"), path); if (dialog.ShowDialog() == DialogResult.OK) { if (dialog.UseCustomFolder) { settings.Set("Use Installed Hud", true); settings.Set("Custom Path", dialog.CustomPath); } else { settings.Set("Use Installed Hud", false); settings.Set("Hud Paths", dialog.HudPath); } } else { if (exitOnCancel) { Environment.Exit(0); } } }
public void showPathDialog(bool exitOnCancel) { string path = ""; try { path = settings.GetStringArray("Hud Paths")[0]; } catch { } var dialog = new SelectHudPathForm(settings.GetBool("Use Installed Hud"), settings.GetString("Custom Path"), path); if (dialog.ShowDialog() == DialogResult.OK) { if (dialog.UseCustomFolder) { settings.Set("Use Installed Hud", true); settings.Set("Custom Path", dialog.CustomPath); } else { settings.Set("Use Installed Hud", false); settings.Set("Hud Paths", dialog.HudPath); } } else { if (exitOnCancel) Environment.Exit(0); } }