亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? windowdetailcaption.cs

?? Magic Library 1.7,有說明文檔
?? CS
?? 第 1 頁 / 共 4 頁
字號(hào):
// *****************************************************************************
// 
//  (c) Crownwood Consulting Limited 2002 
//  All rights reserved. The software and associated documentation 
//  supplied hereunder are the proprietary information of Crownwood Consulting 
//	Limited, Haxey, North Lincolnshire, England and are supplied subject to 
//	licence terms.
// 
//  Magic Version 1.7 	www.dotnetmagic.com
// *****************************************************************************

using System;
using System.Drawing;
using System.Windows.Forms;
using System.ComponentModel;
using System.Drawing.Imaging;
using Microsoft.Win32;
using Crownwood.Magic.Common;
using Crownwood.Magic.Controls;

namespace Crownwood.Magic.Docking
{
    [ToolboxItem(false)]
    public class WindowDetailCaption : WindowDetail, IMessageFilter
    {
        // Class fields
        protected static ImageList _images;

        // Instance events
        public event EventHandler Close;
		public event EventHandler Restore;
		public event EventHandler InvertAutoHide;
        public event ContextHandler Context;

        // Instance fields
        protected InertButton _maxButton;
        protected InertButton _closeButton;
        protected InertButton _hideButton;
        protected RedockerContent _redocker;
        protected IZoneMaximizeWindow _maxInterface;
        protected bool _showCloseButton;
        protected bool _showHideButton;
        protected bool _ignoreHideButton;
        protected bool _pinnedImage;

        // Class fields
        protected static ImageAttributes _activeAttr = new ImageAttributes();
        protected static ImageAttributes _inactiveAttr = new ImageAttributes();

        public WindowDetailCaption(DockingManager manager, 
                                   Size fixedSize, 
                                   EventHandler closeHandler, 
                                   EventHandler restoreHandler, 
                                   EventHandler invertAutoHideHandler, 
                                   ContextHandler contextHandler)
            : base(manager)
        {
            // Setup correct color remapping depending on initial colors
            DefineButtonRemapping();

            // Default state
            _maxButton = null;
            _hideButton = null;
            _maxInterface = null;
            _redocker = null;
            _showCloseButton = true;
            _showHideButton = true;
            _ignoreHideButton = false;
            _pinnedImage = false;
            
            // Prevent flicker with double buffering and all painting inside WM_PAINT
            SetStyle(ControlStyles.DoubleBuffer, true);
            SetStyle(ControlStyles.AllPaintingInWmPaint, true);

            // Our size is always fixed at the required length in both directions
            // as one of the sizes will be provided for us because of our docking
            this.Size = fixedSize;

            if (closeHandler != null)
                this.Close += closeHandler;	

            if (restoreHandler != null)
                this.Restore += restoreHandler;	

            if (invertAutoHideHandler != null)
                this.InvertAutoHide += invertAutoHideHandler;
    
            if (contextHandler != null)
                this.Context += contextHandler;	

            // Let derived classes override the button creation
            CreateButtons();

            // Need to hook into message pump so that the ESCAPE key can be 
            // intercepted when in redocking mode
            Application.AddMessageFilter(this);
        }

        public override Zone ParentZone
        {
            set
            {
                base.ParentZone = value;

                RecalculateMaximizeButton();
                RecalculateButtons();
            }
        }

        public virtual void OnClose()
        {
            // Any attached event handlers?
            if (Close != null)
                Close(this, EventArgs.Empty);
        }

        public virtual void OnInvertAutoHide()
        {
            // Any attached event handlers?
            if (InvertAutoHide != null)
                InvertAutoHide(this, EventArgs.Empty);
        }
        
        public virtual void OnRestore()
        {
            // Any attached event handlers?
            if (Restore != null)
                Restore(this, EventArgs.Empty);
        }

        public virtual void OnContext(Point screenPos)
        {
            // Any attached event handlers?
            if (Context != null)
                Context(screenPos);
        }

        protected override void Dispose( bool disposing )
        {
            if( disposing )
            {
				if (_closeButton != null)
				{
					_closeButton.Click -= new EventHandler(OnButtonClose);
					_closeButton.GotFocus -= new EventHandler(OnButtonGotFocus);
				}

                if (_hideButton != null)
                {
                    _hideButton.Click -= new EventHandler(OnButtonHide);
                    _hideButton.GotFocus -= new EventHandler(OnButtonGotFocus);
                }
                
                if (_maxButton != null)
				{
					_maxButton.Click -= new EventHandler(OnButtonMax);
					_maxButton.GotFocus -= new EventHandler(OnButtonGotFocus);
				}
            }
            base.Dispose( disposing );
        }

        public override void NotifyAutoHideImage(bool autoHidden)
        {
            _pinnedImage = autoHidden;
            UpdateAutoHideImage();
        }

        public override void NotifyCloseButton(bool show)
        {
            _showCloseButton = show;
            RecalculateButtons();
        }

        public override void NotifyHideButton(bool show)
        {
            // Ignore the AutoHide feature when in floating form
            _ignoreHideButton = (_parentWindow.State == State.Floating);
            
            _showHideButton = show;
            RecalculateButtons();
        }

        public override void NotifyShowCaptionBar(bool show)
        {
            this.Visible = show;
        }
        
        protected void RecalculateMaximizeButton()
        {
            // Are we inside a Zone?
            if (this.ParentZone != null)
            {
                // Does the Zone support the maximizing of a Window?
                IZoneMaximizeWindow zmw = this.ParentZone as IZoneMaximizeWindow;

                if (zmw != null)
                {
                    AddMaximizeInterface(zmw);
                    return;
                }
            }

            RemoveMaximizeInterface();
        }

        protected void AddMaximizeInterface(IZoneMaximizeWindow zmw)
        {
            // Has the maximize button already been created?
            if (_maxInterface == null)
            {
                // Create the InertButton
                _maxButton = new InertButton(_images, 0);

                // Hook into button events
                _maxButton.Click += new EventHandler(OnButtonMax);
                _maxButton.GotFocus += new EventHandler(OnButtonGotFocus);

                // Define the default remapping
                _maxButton.ImageAttributes = _inactiveAttr;

                OnAddMaximizeInterface();

                Controls.Add(_maxButton);

                // Remember the interface reference
                _maxInterface = zmw;

                // Hook into the interface change events
                _maxInterface.RefreshMaximize += new EventHandler(OnRefreshMaximize);

                RecalculateButtons();
            }
        }

        protected void RemoveMaximizeInterface()
        {
            if (_maxInterface != null)
            {
                // Unhook from the interface change events
                _maxInterface.RefreshMaximize -= new EventHandler(OnRefreshMaximize);

                // Remove the interface reference
                _maxInterface = null;

				// Use helper method to circumvent form Close bug
				ControlHelper.Remove(this.Controls, _maxButton);

                OnRemoveMaximizeInterface();

                // Unhook into button events
                _maxButton.Click -= new EventHandler(OnButtonMax);
                _maxButton.GotFocus -= new EventHandler(OnButtonGotFocus);

                // Kill the button which is no longer needed
                _maxButton.Dispose();
                _maxButton = null;

                RecalculateButtons();
            }
        }

        protected void OnRefreshMaximize(object sender, EventArgs e)
        {
            UpdateMaximizeImage();
        }
	
        protected void OnButtonMax(object sender, EventArgs e)
        {
            if (this.ParentWindow != null)
            {
                if (_maxInterface.IsMaximizeAvailable())
                {
                    // Are we already maximized?
                    if (_maxInterface.IsWindowMaximized(this.ParentWindow))
                        _maxInterface.RestoreWindow();
                    else
                        _maxInterface.MaximizeWindow(this.ParentWindow);
                }
            }			
        }

        protected void OnButtonClose(Object sender, EventArgs e)
        {
            if (_showCloseButton)
                OnClose();
        }

        protected void OnButtonHide(Object sender, EventArgs e)
        {
            // Plain button can still be pressed when disabled, so double check 
            // that an event should actually be generated
            if (_showHideButton && !_ignoreHideButton)
                OnInvertAutoHide();
        }

        protected void OnButtonGotFocus(Object sender, EventArgs e)
        {
            // Inform parent window we have now got the focus
            if (this.ParentWindow != null)
                this.ParentWindow.WindowDetailGotFocus(this);
        }

		protected override void OnDoubleClick(EventArgs e)
		{
            // The double click event will cause the control to be destroyed as 
            // the Contents are restored to their alternative positions, so need to
            // double check the control is not already dead
            if (!IsDisposed)
            {
                // Are we currently in a redocking state?
                if (_redocker != null)
                {
                    // No longer need the object
                    _redocker = null;
                }
            }

			// Fire attached event handlers
			OnRestore();
		}

        protected override void OnMouseDown(MouseEventArgs e)
        {
            // The double click event will cause the control to be destroyed as 
            // the Contents are restored to their alternative positions, so need to
            // double check the control is not already dead

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩一区二区高清| 成人视屏免费看| 懂色av一区二区夜夜嗨| 精品久久久三级丝袜| 91国产丝袜在线播放| 亚洲精品国产一区二区三区四区在线 | 国产精品初高中害羞小美女文| 韩国av一区二区| 久久久.com| 丁香激情综合国产| 日韩**一区毛片| 2022国产精品视频| 国产98色在线|日韩| 婷婷成人激情在线网| 亚洲欧美一区二区三区孕妇| 久久久精品人体av艺术| 欧美日韩电影一区| 裸体一区二区三区| 亚洲国产一区视频| 日韩一区国产二区欧美三区| 在线观看国产精品网站| 蜜桃视频在线观看一区| 国产网红主播福利一区二区| 欧美一级午夜免费电影| 欧美三级视频在线播放| 蜜臀99久久精品久久久久久软件 | 亚洲免费av高清| 欧美日韩一级二级| 91视频xxxx| 99久久久无码国产精品| 大白屁股一区二区视频| 一区二区三区日韩欧美精品| 国产精品美女久久久久久2018| 精品成人佐山爱一区二区| 不卡av免费在线观看| 国产凹凸在线观看一区二区| 亚洲精品福利视频网站| 日韩视频在线一区二区| 337p亚洲精品色噜噜| 欧美肥妇毛茸茸| 国产精品夜夜嗨| 国产乱人伦偷精品视频不卡| 国产一区啦啦啦在线观看| 亚洲视频在线一区观看| 综合色中文字幕| 亚洲男人的天堂av| 26uuu亚洲综合色欧美| 色哟哟精品一区| 欧美丝袜第三区| 欧美老年两性高潮| 97se亚洲国产综合自在线观| 色天天综合久久久久综合片| 色婷婷激情一区二区三区| 欧美视频你懂的| 欧美精品 国产精品| 欧美一区二区国产| 久久综合色天天久久综合图片| 色综合亚洲欧洲| 国产成人精品1024| 日本成人超碰在线观看| 一区二区三区不卡视频在线观看| 国产蜜臀av在线一区二区三区| 国产婷婷一区二区| 亚洲日本va午夜在线影院| 亚洲成人在线网站| 蜜桃视频一区二区| 国产露脸91国语对白| 久久精品国产色蜜蜜麻豆| 亚洲国产精品久久人人爱| 国产精品毛片a∨一区二区三区 | 日本欧美加勒比视频| 久久成人麻豆午夜电影| 成人动漫一区二区在线| 欧美性极品少妇| 精品久久久久香蕉网| 国产精品久久久久一区二区三区| 精品国产乱码久久| 3d动漫精品啪啪一区二区竹菊| 欧美午夜精品一区| 在线观看中文字幕不卡| 日韩午夜小视频| 日韩欧美一区二区免费| 国产精品久久久久一区二区三区| 午夜天堂影视香蕉久久| 国产一区二区三区四区五区美女| 91无套直看片红桃| 97国产一区二区| 日韩亚洲电影在线| 精品国产成人系列| 久久综合资源网| 久久理论电影网| 亚洲成人一区在线| 国产福利精品导航| 正在播放一区二区| 亚洲三级在线免费观看| 国产一区亚洲一区| 欧美日韩国产综合视频在线观看| 欧美日韩日日摸| 欧美日韩一级二级| 中文字幕在线不卡视频| 久久精品99国产精品| 在线亚洲精品福利网址导航| 久久精品亚洲国产奇米99| 亚洲不卡av一区二区三区| 成人av影院在线| 精品sm在线观看| 国产欧美日韩三级| 中文字幕中文在线不卡住| 久久精品国产免费| 国产a区久久久| 日韩精品一区在线| 午夜精品一区二区三区电影天堂 | 欧美大胆人体bbbb| 亚洲高清三级视频| 裸体歌舞表演一区二区| 欧美久久久久中文字幕| 久久色成人在线| 亚洲免费观看视频| 蜜臀久久99精品久久久久久9 | 欧美日韩综合一区| 2020日本不卡一区二区视频| 日韩国产欧美一区二区三区| 国产99久久久国产精品潘金 | 国产欧美日本一区二区三区| 蜜桃精品在线观看| 日韩一级免费观看| 日韩中文字幕一区二区三区| 美女视频黄 久久| 成人午夜激情片| 欧美一区午夜精品| 国产精品色呦呦| 国产高清不卡一区二区| 欧美亚洲一区二区在线观看| 亚洲欧洲日韩综合一区二区| 日本不卡的三区四区五区| 欧美视频在线播放| 亚洲一区二区三区四区在线免费观看 | 91麻豆精品国产91久久久资源速度 | 日韩亚洲电影在线| 麻豆传媒一区二区三区| 日韩免费电影一区| 韩国精品在线观看| 欧美激情综合在线| 首页欧美精品中文字幕| 666欧美在线视频| 久久机这里只有精品| 色婷婷综合五月| 国产三级精品在线| 成人精品一区二区三区四区 | 五月天久久比比资源色| 欧日韩精品视频| 三级亚洲高清视频| 日韩欧美亚洲另类制服综合在线| 久久精品99国产精品日本| 一本一道波多野结衣一区二区| 亚洲五码中文字幕| 日韩一区二区免费在线观看| 国产一区二区在线看| 国产精品久久精品日日| 色天天综合色天天久久| 天天影视色香欲综合网老头| 精品国产乱码久久久久久闺蜜| 亚洲国产wwwccc36天堂| 日韩欧美国产综合| 日韩精品亚洲一区| 欧美丝袜丝交足nylons| 久草中文综合在线| 欧美经典一区二区三区| 欧洲亚洲精品在线| 久久成人免费日本黄色| 制服丝袜中文字幕一区| 国产电影一区在线| 久久久99精品免费观看| 色综合久久久久综合99| 蜜桃91丨九色丨蝌蚪91桃色| 国产精品网站导航| 5566中文字幕一区二区电影| 亚洲国产成人高清精品| 久久久精品一品道一区| 欧美日韩国产综合一区二区三区| 国产河南妇女毛片精品久久久| 亚洲精品中文在线观看| 精品国产亚洲在线| 国内外成人在线视频| 亚洲精品在线观| 在线视频亚洲一区| 亚洲尤物在线视频观看| 欧美亚一区二区| 国产91丝袜在线观看| 日本少妇一区二区| 亚洲精品日产精品乱码不卡| 精品日韩成人av| 欧美综合久久久| 五月激情丁香一区二区三区| 欧美日韩一区二区三区高清| 国产精品影视在线观看| 日韩精品1区2区3区| 国产精品国产精品国产专区不蜜 | 国产一区福利在线| 丝袜亚洲另类欧美|