private void BtnIni() { // close box closeBtn = new WLButton(_owner); closeBtn.Visible = true; closeBtn.Bounds = _owner.CloseBoxRect; closeBtn.Click += new EventHandler(CloseBtnClick); closeBtn.ForePathGetter = new ButtonForePathGetter( GraphicsPathHelper.CreateCloseFlagPath); // max res box if (_owner.MaximizeBox) { maxBtn = new WLButton(_owner); resBtn = new WLButton(_owner); if (_owner.WindowState == FormWindowState.Normal) { maxBtn.Visible = true; resBtn.Visible = false; } else { maxBtn.Visible = false; resBtn.Visible = true; } maxBtn.Bounds = _owner.MaxBoxRect; resBtn.Bounds = _owner.MaxBoxRect; maxBtn.Click += new EventHandler(MaxBtnClick); maxBtn.ForePathGetter = new ButtonForePathGetter( GraphicsPathHelper.CreateMaximizeFlagPath); resBtn.Click += new EventHandler(ResBtnClick); resBtn.ForePathGetter = new ButtonForePathGetter( GraphicsPathHelper.CreateRestoreFlagPath); } // min box if (_owner.MinimizeBox) { minBtn = new WLButton(_owner); minBtn.Visible = true; minBtn.Bounds = _owner.MinBoxRect; minBtn.Click += new EventHandler(MinBtnClick); minBtn.ForePathGetter = new ButtonForePathGetter( GraphicsPathHelper.CreateMinimizeFlagPath); } SetControlBoxColor(); }
private void ButtonsIni() { wlSideButton1 = new WLButton(this); wlSideButton2 = new WLButton(this); wlMiddleButton = new WLButton(this); wlSideButton1.RotateDirection = SideButton1RotateInfo; wlSideButton2.RotateDirection = SideButton2RotateInfo; wlSideButton1.RoundedType = wlSideButton2.RoundedType = MyGraphics.RoundStyle.All; wlMiddleButton.RoundedType = MyGraphics.RoundStyle.All; SetSideMdlBtnInfo(); wlMiddleButton.Paint += new PaintEventHandler(MiddleButtonExtraPaint); }
public MdiBarController(GMForm owner) { _owner = owner; _listTabItems = new List <MdiGMTabItem>(); _newTabBtn = new WLButton(owner); _listAllBtn = new WLButton(owner); // ini _newtabbtn _newTabBtn.ColorTable = NewTabBtnColor; _newTabBtn.Click += new EventHandler(OnNewTabBtnClick); _newTabBtn.ForePathGetter = new ButtonForePathGetter( Gdu.WinFormUI.MyGraphics.GraphicsPathHelper.CreatePlusFlag); _listAllBtn.ColorTable = ListAllBtnColor; _listAllBtn.Click += new EventHandler(OnListAllBtnClick); _listAllBtn.ForePathGetter = new ButtonForePathGetter( Gdu.WinFormUI.MyGraphics.GraphicsPathHelper.CreateDownTriangleFlag); _listAllBtn.ForePathSize = new Size(10, 9); _listAllBtn.ForeFont = new Font("微软雅黑", 8); _menuPopup = new ContextMenuStrip(); }
private void ThumeButtonIni() { thumbButton = new WLButton(this); thumbButton.RestrictedBounds = false; SetThumbButtonInfo(); }