예제 #1
0
        public FRM_Main(string[] args)
        {
            InitializeComponent();

            STRIP_Menu.Renderer = new GlassToolstripRenderer();
            STRIP_Status.Renderer = new GlassToolstripRenderer();
            STRIP_Settings.Renderer = new GlassToolstripRenderer();
            STRIP_Tools.Renderer = new GlassToolstripRenderer();

            LoadSettings();

            if (Win32API.Dwm.DwmIsCompositionEnabled())
            {
                Win32API.Dwm.MARGINS margin = new Win32API.Dwm.MARGINS(0, PANEL_Header.Height, 0, (Settings.ViewStatusBar ? 23 : 0));
                Win32API.Dwm.DwmExtendFrameIntoClientArea(this.Handle, margin);
            }
            BTN_Settings_Color.Image = GraphicsHelper.CreateColorImage(color);
        }
예제 #2
0
        private void FRM_Main_Paint(object sender, PaintEventArgs e)
        {
            Checks.Theme theme = Checks.CheckTheme();

            if (theme == Checks.Theme.Aero)
            {
                Win32API.Dwm.MARGINS margin = new Win32API.Dwm.MARGINS(0, PANEL_Header.Height, 0, (Settings.ViewStatusBar ? 23 : 0));
                Win32API.Dwm.DwmExtendFrameIntoClientArea(this.Handle, margin);
                PANEL_Header.BackColor = Color.Black;
                PANEL_Status.BackColor = Color.Black;
                PANEL_Main.BorderStyle = BorderStyle.None;
            }
            else if (theme == Checks.Theme.Basic)
            {
                if (Checks.isActive(this.Handle))
                {
                    PANEL_Header.BackColor = Color.FromArgb(185, 209, 234);
                    PANEL_Status.BackColor = Color.FromArgb(185, 209, 234);
                }
                else
                {
                    PANEL_Header.BackColor = Color.FromArgb(215, 228, 242);
                    PANEL_Status.BackColor = Color.FromArgb(215, 228, 242);
                }
                PANEL_Main.BorderStyle = BorderStyle.Fixed3D;
            }
            else
            {
                PANEL_Header.BackColor = SystemColors.Control;
                PANEL_Status.BackColor = SystemColors.Control;
                PANEL_Main.BorderStyle = BorderStyle.Fixed3D;
            }
        }