public Settings(DASettings settings) { SettingsValue = settings; InitializeComponent(); chkIgCust.Checked = SettingsValue.IgnoreCustom; }
private void settingsToolStripMenuItem_Click(object sender, EventArgs e) { Settings setDlg = new Settings(_mysettings); setDlg.StartPosition = FormStartPosition.CenterParent; if (setDlg.ShowDialog(this) == DialogResult.OK) { _mysettings = setDlg.SettingsValue; Rebuild(); } }
private void LoadSettings() { _mysettings = DASettings.Load(); // No existing settings. Use default. if (_mysettings.Fake) { StartPosition = FormStartPosition.CenterScreen; } else { // restore windows position StartPosition = FormStartPosition.Manual; Top = _mysettings.WinTop; Left = _mysettings.WinLeft; Height = _mysettings.WinHigh; Width = _mysettings.WinWide; _fileHistory = _mysettings.PathHistory ?? new List <string>(); _fileHistory.Remove(null); mnuMRU.SetFiles(_fileHistory.ToArray()); LastFile = _mysettings.LastPath; } }