コード例 #1
0
        public Settings(DASettings settings)
        {
            SettingsValue = settings;
            InitializeComponent();

            chkIgCust.Checked = SettingsValue.IgnoreCustom;
        }
コード例 #2
0
        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();
            }
        }
コード例 #3
0
        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;
            }
        }