public Form1() { InitializeComponent(); ConfigurationComboBox.SelectedIndex = 0; SelectedFolderText.Text = Properties.Settings.Default.DefaultPath; lastExportPath = Properties.Settings.Default.LastUsedExportPath; if (File.Exists(configurationFileName) == true) { string fileContent = File.ReadAllText(configurationFileName); configurations = new Configurations(fileContent); ParseConfigs(); } else { MakeNew(); } try { ConfigurationComboBox.SelectedIndex = Properties.Settings.Default.LastUsedComboIndex; } catch (Exception) { ConfigurationComboBox.SelectedIndex = 0; } ClampComboBox(); FolderPathTip.SetToolTip(SelectedFolderText, SelectedFolderText.Text); ParseConfigs(); IgnoreListTextBox.Text = "WIP"; }
private void SelectFolderButton_Click(object sender, EventArgs e) { FolderBrowserDialog dialog = new FolderBrowserDialog(); dialog.SelectedPath = SelectedFolderText.Text; if (dialog.ShowDialog() == DialogResult.OK) { string target = dialog.SelectedPath; SelectedFolderText.Text = target; FolderPathTip.SetToolTip(SelectedFolderText, SelectedFolderText.Text); Properties.Settings.Default.DefaultPath = target; Properties.Settings.Default.Save(); } }