예제 #1
0
        public override void DrawMaximizedButtons(object sender, PaintEventArgs pe)
        {
            Size_        bs      = ThemeEngine.Current.ManagedWindowGetMenuButtonSize(this);
            Point_       pnt     = XplatUI.GetMenuOrigin(mdi_container.ParentForm.Handle);
            int          bw      = ThemeEngine.Current.ManagedWindowBorderWidth(this);
            TitleButtons buttons = MaximizedTitleButtons;

            buttons.Visible      = true;
            TitleButtons.Visible = false;

            buttons.CloseButton.Rectangle = new Rectangle_(mdi_container.ParentForm.Size.Width - 1 - bw - bs.Width - 2,
                                                           pnt.Y + 2, bs.Width, bs.Height);

            buttons.RestoreButton.Rectangle = new Rectangle_(buttons.CloseButton.Rectangle.Left - 2 - bs.Width,
                                                             pnt.Y + 2, bs.Width, bs.Height);

            buttons.MinimizeButton.Rectangle = new Rectangle_(buttons.RestoreButton.Rectangle.Left - bs.Width,
                                                              pnt.Y + 2, bs.Width, bs.Height);

            DrawTitleButton(pe.Graphics, buttons.MinimizeButton, pe.ClipRectangle);
            DrawTitleButton(pe.Graphics, buttons.RestoreButton, pe.ClipRectangle);
            DrawTitleButton(pe.Graphics, buttons.CloseButton, pe.ClipRectangle);

            buttons.MinimizeButton.Rectangle.Y -= pnt.Y;
            buttons.RestoreButton.Rectangle.Y  -= pnt.Y;
            buttons.CloseButton.Rectangle.Y    -= pnt.Y;
        }
예제 #2
0
		public InternalWindowManager (Form form)
		{
			this.form = form;

			form.SizeChanged += new EventHandler (FormSizeChangedHandler);

			title_buttons = new TitleButtons (form);
			ThemeEngine.Current.ManagedWindowSetButtonLocations (this);
		}
예제 #3
0
        public InternalWindowManager(Form form)
        {
            this.form = form;

            form.SizeChanged += new EventHandler(FormSizeChangedHandler);

            title_buttons = new TitleButtons(form);
            ThemeEngine.Current.ManagedWindowSetButtonLocations(this);
        }