Options dialog. In this dialog, global program options can be configured.
Inheritance: System.Windows.Forms.Form
示例#1
0
        private void OnToolsOptions(object sender, EventArgs e)
        {
            OptionsForm ofDlg = new OptionsForm();
            ofDlg.InitEx(m_ilCurrentIcons);

            Program.Config.Application.MostRecentlyUsed.MaxItemCount = m_mruList.MaxItemCount;

            if(ofDlg.ShowDialog() == DialogResult.OK)
            {
                m_nLockTimerMax = (int)Program.Config.Security.WorkspaceLocking.LockAfterTime;
                m_nClipClearMax = Program.Config.Security.ClipboardClearAfterSeconds;

                // m_lvEntries.GridLines = Program.Config.MainWindow.ShowGridLines;

                UIUtil.SetAlternatingBgColors(m_lvEntries, m_clrAlternateItemBgColor,
                    Program.Config.MainWindow.EntryListAlternatingBgColors);

                m_mruList.MaxItemCount = Program.Config.Application.MostRecentlyUsed.MaxItemCount;
                SetListFont(Program.Config.UI.StandardFont);

                AssignMenuShortcutsOpt();

                if(ofDlg.RequiresUIReinitialize) UIUtil.Initialize(true);

                AppConfigSerializer.Save(Program.Config);
                UpdateTrayIcon();
            }
            UIUtil.DestroyForm(ofDlg);

            UpdateUI(false, null, true, null, true, null, false); // Fonts changed
        }
示例#2
0
        private void OnToolsOptions(object sender, EventArgs e)
        {
            OptionsForm ofDlg = new OptionsForm();
            ofDlg.InitEx(m_ilCurrentIcons);

            if(ofDlg.ShowDialog() == DialogResult.OK)
            {
                m_nLockTimerMax = (int)Program.Config.Security.WorkspaceLocking.LockAfterTime;
                m_nClipClearMax = Program.Config.Security.ClipboardClearAfterSeconds;

                m_lvEntries.GridLines = Program.Config.MainWindow.ShowGridLines;

                SetListFont(Program.Config.UI.StandardFont);

                AppConfigSerializer.Save(Program.Config);
                UpdateTrayIcon();
            }

            UpdateUIState(false);
        }