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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? windowdetailcaption.cs

?? Magic Library 1.7,有說明文檔
?? CS
?? 第 1 頁 / 共 4 頁
字號:
// *****************************************************************************
// 
//  (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

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产一区二区精品在线观看| 精品乱人伦一区二区三区| 成人综合在线网站| 精品亚洲porn| 蜜桃精品视频在线观看| 免费在线欧美视频| 久久99最新地址| 国模套图日韩精品一区二区| 国产在线麻豆精品观看| 国产麻豆精品一区二区| 国产一区二区三区黄视频 | 美女视频黄a大片欧美| 亚洲成人av电影在线| 午夜视频一区在线观看| 五月激情综合色| 老司机精品视频线观看86| 国精产品一区一区三区mba视频| 黄色小说综合网站| 国产91精品露脸国语对白| av在线这里只有精品| 91麻豆精品视频| 欧美日韩日日骚| 日韩欧美成人激情| 欧美国产视频在线| 亚洲精品日日夜夜| 日韩精品成人一区二区在线| 久久97超碰色| 成人久久久精品乱码一区二区三区 | 老司机午夜精品| 国产夫妻精品视频| 91小视频在线| 欧美美女一区二区三区| ww久久中文字幕| 国产精品成人免费| 亚洲不卡在线观看| 国产在线视频精品一区| 91免费在线视频观看| 3atv一区二区三区| 久久婷婷国产综合国色天香| 国产精品久久久久久久久免费桃花| 自拍偷拍欧美激情| 蜜桃精品视频在线| 9久草视频在线视频精品| 欧美高清你懂得| 中文字幕欧美日本乱码一线二线 | 国产成人高清视频| 色婷婷久久久久swag精品 | 一区二区视频在线看| 天天做天天摸天天爽国产一区 | 精品无码三级在线观看视频| 国产·精品毛片| 欧美精品 国产精品| 国产欧美一区二区在线| 午夜精品一区二区三区三上悠亚| 国产一区二区三区蝌蚪| 欧美三级电影一区| 国产欧美精品一区二区色综合朱莉| 一区二区三区在线影院| 激情综合色综合久久| 在线看日韩精品电影| 国产日产欧美一区| 日韩精品免费视频人成| 91在线观看下载| 久久综合精品国产一区二区三区| 亚洲精品欧美二区三区中文字幕| 经典三级视频一区| 欧美视频第二页| 国产精品久久三区| 免费成人av在线| 在线观看免费视频综合| 国产精品亲子乱子伦xxxx裸| 日本午夜一区二区| 91官网在线观看| 欧美激情在线一区二区| 久久99精品国产.久久久久久| 在线区一区二视频| 亚洲欧洲av另类| 国产美女视频91| 日韩欧美不卡在线观看视频| 亚洲最新在线观看| 成人av在线看| 久久久不卡影院| 精品一区二区在线视频| 欧美一区二区三区性视频| 亚洲线精品一区二区三区八戒| www.欧美亚洲| 欧美激情在线免费观看| 国产福利视频一区二区三区| 精品福利在线导航| 免费不卡在线视频| 欧美一区二区在线视频| 亚洲高清视频的网址| 欧美在线不卡一区| 亚洲激情五月婷婷| 91在线云播放| 亚洲人精品午夜| 91日韩精品一区| 成人欧美一区二区三区白人| 不卡的av中国片| 国产精品高清亚洲| 不卡av电影在线播放| 国产精品久久久久精k8| 成人午夜av在线| 国产精品久久久一区麻豆最新章节| 国产乱码精品一区二区三| 日韩欧美一级精品久久| 麻豆成人在线观看| 精品久久国产字幕高潮| 国产在线一区二区| 日本一区二区三区久久久久久久久不| 国产麻豆精品视频| 国产女人18毛片水真多成人如厕| 国产高清在线精品| 国产精品入口麻豆原神| 91麻豆蜜桃一区二区三区| 亚洲一区免费观看| 欧美老肥妇做.爰bbww视频| 日韩电影在线一区二区三区| 日韩三级精品电影久久久| 久久av资源网| 亚洲国产精品二十页| 91网址在线看| 丝袜国产日韩另类美女| 欧美成人猛片aaaaaaa| 国产寡妇亲子伦一区二区| 1024成人网| 欧美日韩精品一区二区| 麻豆精品在线播放| 国产日韩欧美精品在线| 色香蕉成人二区免费| 中文字幕一区二区三区在线不卡| 欧美日韩一级黄| 欧美色倩网站大全免费| 久久九九国产精品| 成人免费毛片嘿嘿连载视频| 亚洲视频在线一区观看| 欧美性猛交一区二区三区精品| 日本sm残虐另类| 亚洲国产成人自拍| 在线一区二区观看| 毛片av一区二区| 国产精品免费视频观看| 精品视频在线免费| 狠狠色丁香婷婷综合| 亚洲色图清纯唯美| 3d成人动漫网站| 成人污污视频在线观看| 一区二区三区不卡在线观看| 欧美放荡的少妇| 成人18精品视频| 日本人妖一区二区| 国产精品免费免费| 91精品国模一区二区三区| 风间由美中文字幕在线看视频国产欧美| 一区二区三区中文在线| 亚洲精品一区二区精华| 欧美伊人久久久久久午夜久久久久| 美女任你摸久久| 一区二区三区高清| 国产日韩影视精品| 欧美一区二区二区| 91色视频在线| 国产黄色成人av| 日韩av成人高清| 亚洲婷婷综合色高清在线| 久久综合成人精品亚洲另类欧美| 色诱亚洲精品久久久久久| 国产在线观看一区二区| 日韩精品久久理论片| 中文字幕在线观看不卡视频| 欧美v日韩v国产v| 欧美色成人综合| eeuss鲁片一区二区三区在线观看| 日本色综合中文字幕| 亚洲自拍偷拍图区| 国产精品毛片高清在线完整版| 欧美一区二区三区日韩视频| 色乱码一区二区三区88| 丁香天五香天堂综合| 久久国产乱子精品免费女| 亚洲国产成人精品视频| 亚洲丝袜自拍清纯另类| 久久精子c满五个校花| 欧美一区二区久久久| 欧美美女一区二区在线观看| 色老汉一区二区三区| 不卡的av网站| 成人av中文字幕| 国产成人99久久亚洲综合精品| 久久国产精品99久久久久久老狼| 亚洲国产一区二区三区| 亚洲男人电影天堂| 综合久久国产九一剧情麻豆| 日本一区二区三区国色天香| 26uuu国产电影一区二区| 精品女同一区二区| 日韩欧美成人激情| 日韩欧美久久一区| 日韩欧美资源站| 日韩欧美的一区|