Example #1
0
        private void mnuMainExtrasOptions_Click(object sender, EventArgs e)
        {
            IOptionPanel[] optionPanels =
            {
                new OptionPanelGeneral(),
                new OptionPanelFontColor(),
                new OptionPanelScriptEditor()
            };

            using (FrmOptions optionsDlg = new FrmOptions(optionPanels))
            {
                if (optionsDlg.ShowDialog(this) == DialogResult.OK)
                {
                    using (new WaitCursor(Cursors.Default, Settings.Default.WaitCursorTimeout))
                    {
                        foreach (IOptionPanel optionPanel in optionPanels)
                        {
                            optionPanel.SaveSettings();
                        }

                        foreach (IDockContent dockContent in mainDockPanel.Documents)
                        {
                            ILogContainer currentDocument = dockContent as ILogContainer;

                            if (currentDocument != null)
                            {
                                // Update the UI refresh value for all logging windows.
                                currentDocument.UpdateTimerInterval(
                                    Settings.Default.UiRefreshIntervalMs);
                            }
                        }

                        // Force a repaint of all UI elements.
                        Refresh();
                    }
                }
            }
        }