示例#1
0
        private void EventSupportChanged(object sender, EventArgs e)
        {
            bool layout = false;

            SplitContainer.BackColor = iViewSupport.BackColour;
            SplitContainer.Invalidate();

            PanelBrowser.BackColor = iViewSupport.BackColour;
            PanelBrowser.Invalidate();

            PanelPlaylist.BackColor = iViewSupport.BackColour;
            PanelPlaylist.ForeColor = iViewSupport.ForeColour;
            PanelPlaylist.Font      = iViewSupport.FontMedium;
            PanelPlaylist.Invalidate();

            TabControl.BackColor        = iViewSupport.BackColour;
            TabControl.ForeColor        = iViewSupport.ForeColour;
            TabControl.ForeColourMuted  = iViewSupport.ForeColourMuted;
            TabControl.ForeColourBright = iViewSupport.ForeColourBright;
            TabControl.HighlightColour  = iViewSupport.HighlightForeColour;
            if (TabControl.Font.Size != iViewSupport.FontSmall.Size)
            {
                doubleBufferedTableLayoutPanel1.SuspendLayout();
                doubleBufferedTableLayoutPanel1.ColumnStyles[0].Width = iViewSupport.FontSmall.Height + 2;
                doubleBufferedTableLayoutPanel1.ResumeLayout(false);

                TabControl.Font = iViewSupport.FontSmall;
            }
            TabControl.Invalidate();

            //ButtonRoomSelector.BackColor = iViewSupport.BackColour;
            ButtonRoomSelector.ForeColor      = iViewSupport.ForeColourMuted;
            ButtonRoomSelector.ForeColorMuted = iViewSupport.ForeColourMuted;
            if (ButtonRoomSelector.Font.Size != iViewSupport.FontSmall.Size)
            {
                ButtonRoomSelector.Font = iViewSupport.FontSmall;
                //ButtonRoomSelector.Height = iViewSupport.FontSmall.Height + 4;
                layout = true;
            }
            ButtonRoomSelector.Invalidate();

            //ButtonSourceSelector.BackColor = iViewSupport.BackColour;
            ButtonSourceSelector.ForeColor      = iViewSupport.ForeColourMuted;
            ButtonSourceSelector.ForeColorMuted = iViewSupport.ForeColourMuted;
            if (ButtonSourceSelector.Font.Size != iViewSupport.FontSmall.Size)
            {
                ButtonSourceSelector.Font = iViewSupport.FontSmall;
                //ButtonSourceSelector.Height = iViewSupport.FontSmall.Height + 4;
                layout = true;
            }
            ButtonSourceSelector.Invalidate();

            if (layout)
            {
                LayoutFormKinskyDesktop();
            }
        }
示例#2
0
        private void ShowOptionsDialog(bool aStartOnNetwork)
        {
            // add a new stack status change handler while the options page  is visible
            // leave the default one so the balloon tips still appear
            iHelper.Stack.EventStatusChanged += iHelper.Stack.StatusHandler.StackStatusOptionsChanged;

            // show the dialog
            FormUserOptions form = new FormUserOptions(iHelper.OptionPages);

            if (aStartOnNetwork)
            {
                form.SetPageByName("Network");
            }
            form.ShowDialog(this);

            // cleanup
            form.Dispose();
            PanelBrowser.Invalidate();
            iHelper.Stack.EventStatusChanged -= iHelper.Stack.StatusHandler.StackStatusOptionsChanged;
        }