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

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

?? menucontrol.cs

?? Magic Library 1.7,有說明文檔
?? CS
?? 第 1 頁 / 共 5 頁
字號:
// *****************************************************************************
// 
//  (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.IO;
using System.Drawing;
using System.Reflection;
using System.Collections;
using System.Drawing.Text;
using System.Windows.Forms;
using System.ComponentModel;
using System.Drawing.Imaging;
using System.Drawing.Drawing2D;
using Microsoft.Win32;
using Crownwood.Magic.Win32;
using Crownwood.Magic.Menus;
using Crownwood.Magic.Common;
using Crownwood.Magic.Controls;
using Crownwood.Magic.Collections;

namespace Crownwood.Magic.Menus
{
    [ToolboxBitmap(typeof(MenuControl))]
    [DefaultProperty("MenuCommands")]
    [DefaultEvent("PopupSelected")]
    [Designer(typeof(Crownwood.Magic.Menus.MenuControlDesigner))]
    public class MenuControl : ContainerControl, IMessageFilter
    {
        internal class MdiClientSubclass : NativeWindow
        {
            protected override void WndProc(ref Message m)
            {
                switch(m.Msg)
                {
                    case (int)Win32.Msgs.WM_MDISETMENU:
                    case (int)Win32.Msgs.WM_MDIREFRESHMENU:
                        return;
                }

                base.WndProc(ref m);
            }			
        }

        // Class constants
        protected const int _lengthGap = 3;
        protected const int _boxExpandUpper = 1;
        protected const int _boxExpandSides = 2;
        protected const int _shadowGap = 4;
        protected const int _shadowYOffset = 4;
        protected const int _separatorWidth = 15;
        protected const int _subMenuBorderAdjust = 2;
        protected const int _minIndex = 0;
        protected const int _restoreIndex = 1;
        protected const int _closeIndex = 2;
        protected const int _chevronIndex = 3;
        protected const int _buttonLength = 16;
        protected const int _chevronLength = 12;
        protected const int _pendantLength = 48;
        protected const int _pendantOffset = 3;

        // Class constant is marked as 'readonly' to allow non constant initialization
        protected readonly int WM_OPERATEMENU = (int)Win32.Msgs.WM_USER + 1;

        // Class fields
        protected static ImageList _menuImages = null;
        protected static bool _supportsLayered = false;

        // Instance fields
        protected int _rowWidth;
        protected int _rowHeight;
        protected int _trackItem;
        protected int _breadthGap;
        protected int _animateTime;
        protected IntPtr _oldFocus;
        protected Pen _controlLPen;
        protected bool _animateFirst;
        protected bool _selected;
        protected bool _multiLine;
        protected bool _mouseOver;
        protected bool _manualFocus;
        protected bool _drawUpwards;
		protected bool _defaultFont;
        protected bool _defaultBackColor;
        protected bool _defaultTextColor;
        protected bool _defaultHighlightBackColor;
        protected bool _defaultHighlightTextColor;
        protected bool _defaultSelectedBackColor;
        protected bool _defaultSelectedTextColor;
        protected bool _defaultPlainSelectedTextColor;
        protected bool _plainAsBlock;
        protected bool _dismissTransfer;
        protected bool _ignoreMouseMove;
        protected bool _expandAllTogether;
        protected bool _rememberExpansion;
        protected bool _deselectReset;
        protected bool _highlightInfrequent;
		protected bool _exitLoop;
        protected Color _textColor;
        protected Color _highlightBackColor;
        protected Color _useHighlightBackColor;
        protected Color _highlightTextColor;
        protected Color _highlightBackDark;
        protected Color _highlightBackLight;
        protected Color _selectedBackColor;
        protected Color _selectedTextColor;
        protected Color _plainSelectedTextColor;
        protected Form _activeChild;
        protected Form _mdiContainer;
        protected VisualStyle _style;
        protected Direction _direction;
        protected PopupMenu _popupMenu;
        protected ArrayList _drawCommands;
        protected SolidBrush _controlLBrush;
        protected SolidBrush _backBrush;
        protected Animate _animate;
        protected Animation _animateStyle;
        internal MdiClientSubclass _clientSubclass;
        protected MenuCommand _chevronStartCommand;
        protected MenuCommandCollection _menuCommands;

        // Instance fields - pendant buttons
        protected InertButton _minButton;
        protected InertButton _restoreButton;
        protected InertButton _closeButton;

        // Instance fields - events
        public event CommandHandler Selected;
        public event CommandHandler Deselected;

        static MenuControl()
        {
            // Create a strip of images by loading an embedded bitmap resource
            _menuImages = ResourceHelper.LoadBitmapStrip(Type.GetType("Crownwood.Magic.Menus.MenuControl"),
                                                         "Crownwood.Magic.Resources.ImagesMenuControl.bmp",
                                                         new Size(_buttonLength, _buttonLength),
                                                         new Point(0,0));

            // We need to know if the OS supports layered windows
            _supportsLayered = (OSFeature.Feature.GetVersionPresent(OSFeature.LayeredWindows) != null);
        }

        public MenuControl()
        {
            // Set default values
            _trackItem = -1;
            _oldFocus = IntPtr.Zero;
            _minButton = null;
            _popupMenu = null;
            _activeChild = null;
            _closeButton = null;
            _controlLPen = null;
            _mdiContainer = null;
            _restoreButton = null;
            _controlLBrush = null;
            _chevronStartCommand = null;
            _animateFirst = true;
			_exitLoop = false;
            _selected = false;
            _multiLine = false;
            _mouseOver = false;
			_defaultFont = true;
            _manualFocus = false;
            _drawUpwards = false;
            _plainAsBlock = false;
            _clientSubclass = null;
            _ignoreMouseMove = false;
            _deselectReset = true;
            _expandAllTogether = true;
            _rememberExpansion = true;
            _highlightInfrequent = true;
            _dismissTransfer = false;
            _style = VisualStyle.IDE;
            _direction = Direction.Horizontal;
            _menuCommands = new MenuCommandCollection();
            this.Dock = DockStyle.Top;
			this.Cursor = System.Windows.Forms.Cursors.Arrow;
			
            // Animation details
            _animateTime = 100;
            _animate = Animate.System;
            _animateStyle = Animation.System;

            // Prevent flicker with double buffering and all painting inside WM_PAINT
            SetStyle(ControlStyles.DoubleBuffer, true);
            SetStyle(ControlStyles.AllPaintingInWmPaint, true);

            // Should not be allowed to select this control
            SetStyle(ControlStyles.Selectable, false);

            // Hookup to collection events
            _menuCommands.Cleared += new CollectionClear(OnCollectionCleared);
            _menuCommands.Inserted += new CollectionChange(OnCollectionInserted);
            _menuCommands.Removed += new CollectionChange(OnCollectionRemoved);

			// Need notification when the MenuFont is changed
			Microsoft.Win32.SystemEvents.UserPreferenceChanged += 
			    new UserPreferenceChangedEventHandler(OnPreferenceChanged);

            DefineColors();
            
            // Set the starting Font
            DefineFont(SystemInformation.MenuFont);

            // Do not allow tab key to select this control
            this.TabStop = false;

            // Default to one line of items
            this.Height = _rowHeight;

            // Add ourself to the application filtering list
            Application.AddMessageFilter(this);
        }

        protected override void Dispose(bool disposing)
        {
            if( disposing )
            {
                // Remove notifications
                Microsoft.Win32.SystemEvents.UserPreferenceChanged -= 
                    new UserPreferenceChangedEventHandler(OnPreferenceChanged);
            }
            base.Dispose( disposing );
        }

        [Category("Behaviour")]
        [DesignerSerializationVisibility(DesignerSerializationVisibility.Content)]
        public MenuCommandCollection MenuCommands
        {
            get { return _menuCommands; }
        } 

        [Category("Appearance")]
        public VisualStyle Style
        {
            get { return _style; }
			
            set
            {
                if (_style != value)
                {
                    _style = value;

                    Recalculate();
                    Invalidate();
                }
            }
        }

        public override Font Font
        {
            get { return base.Font; }
			
            set
            {
				if (value != base.Font)
				{
					_defaultFont = (value == SystemInformation.MenuFont);

					DefineFont(value);

					Recalculate();
					Invalidate();
				}
            }
        }

		public override Color BackColor
		{
			get { return base.BackColor; }

			set
			{
				if (value != base.BackColor)
				{
					_defaultBackColor = (value == SystemColors.Control);
                    base.BackColor = value;
                    _backBrush = new SolidBrush(base.BackColor);
                    
					Recalculate();
					Invalidate();
				}
			}
		}

        private bool ShouldSerializeBackColor()
        {
            return this.BackColor != SystemColors.Control;
        }

        [Category("Appearance")]
        public Color TextColor
        {
            get { return _textColor; }

            set
            {
                if (value != _textColor)
                {
                    _textColor = value;
                    _defaultTextColor = (value == SystemColors.MenuText);

                    Recalculate();
                    Invalidate();
                }
            }
        }

        private bool ShouldSerializeTextColor()
        {
            return _textColor != SystemColors.MenuText;
        }

        [Category("Appearance")]
        public Color HighlightBackColor
        {
            get { return _highlightBackColor; }

            set
            {
                if (value != _highlightBackColor)
                {
                    _defaultHighlightBackColor = (value == SystemColors.Highlight);
                    DefineHighlightBackColors(value);                    

                    Recalculate();
                    Invalidate();
                }
            }
        }

        private bool ShouldSerializeHighlightBackColor()
        {
            return _highlightBackColor != SystemColors.Highlight;
        }

        [Category("Appearance")]
        public Color HighlightTextColor
        {
            get { return _highlightTextColor; }

            set
            {

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品福利影院| 精品亚洲porn| 91麻豆精东视频| 亚洲人亚洲人成电影网站色| 成人高清免费观看| 国产精品久久久久影院亚瑟| 色一情一伦一子一伦一区| 亚洲综合在线第一页| 91麻豆精品91久久久久久清纯| 日韩激情av在线| 久久久国际精品| 97se亚洲国产综合自在线| 一区二区三区成人| 91精品黄色片免费大全| 国产一区二区电影| 日韩毛片视频在线看| 欧美男同性恋视频网站| 国产一区二区三区日韩| 日韩一区日韩二区| 3d动漫精品啪啪一区二区竹菊| 韩国在线一区二区| 亚洲欧美激情视频在线观看一区二区三区 | 国产麻豆精品一区二区| 国产精品久久久久aaaa樱花| 欧美日韩国产美| 国产美女主播视频一区| 1024亚洲合集| 日韩精品一区二区三区视频| 91在线码无精品| 日本亚洲电影天堂| 中文字幕人成不卡一区| 欧美一级片在线看| av日韩在线网站| 男女性色大片免费观看一区二区| 国产亚洲精品资源在线26u| 欧美日韩一二三| 国产成人精品免费视频网站| 亚洲国产乱码最新视频| 精品国产亚洲一区二区三区在线观看| 成人av网址在线| 激情小说欧美图片| 亚洲国产精品一区二区www在线| 国产亚洲欧美色| 欧美日本一道本| 91免费国产在线观看| 国产一区二区三区日韩| 首页亚洲欧美制服丝腿| 亚洲摸摸操操av| 国产清纯白嫩初高生在线观看91| 欧美福利一区二区| 在线亚洲免费视频| eeuss影院一区二区三区| 国产一区二区三区久久悠悠色av| 亚洲不卡一区二区三区| 亚洲美女在线一区| 中文字幕二三区不卡| 精品国产一二三| 日韩一级在线观看| 欧美日韩国产一级片| 99久久久久免费精品国产| 国产黄色精品视频| 久久国产精品色婷婷| 男人的j进女人的j一区| 午夜久久久久久电影| 亚洲一二三四久久| 亚洲精选一二三| 亚洲精品日韩综合观看成人91| 欧美高清在线视频| 久久久高清一区二区三区| 精品999久久久| 欧美不卡在线视频| 精品第一国产综合精品aⅴ| 日韩一区二区三区在线观看 | 国产成人精品亚洲777人妖| 麻豆91精品91久久久的内涵| 日韩av中文字幕一区二区三区| 亚洲精品大片www| 一区二区日韩av| 亚洲一区二区三区视频在线 | 美女尤物国产一区| 蜜臀精品一区二区三区在线观看 | 国产日韩欧美亚洲| 欧美经典三级视频一区二区三区| 国产婷婷色一区二区三区在线| 国产日韩欧美精品综合| 国产精品第一页第二页第三页| 国产精品久久久久三级| 国产精品成人免费| 亚洲男人的天堂av| 日日夜夜免费精品视频| 青青草原综合久久大伊人精品优势| 日韩精品免费视频人成| 奇米影视在线99精品| 国产综合色产在线精品| 成人的网站免费观看| 91麻豆国产福利精品| 欧美日本一区二区在线观看| 欧美r级在线观看| 久久久久国产精品麻豆| 亚洲欧美自拍偷拍色图| 亚洲国产视频一区| 久久国产成人午夜av影院| 国产精品夜夜嗨| 色哦色哦哦色天天综合| 欧美一区二区三区喷汁尤物| 国产色综合一区| 一区二区三区中文在线| 蜜臀av一区二区| 成人动漫中文字幕| 3d动漫精品啪啪1区2区免费| 久久女同互慰一区二区三区| 亚洲免费伊人电影| 性做久久久久久| 国产一区二区在线视频| 成人免费视频视频在线观看免费 | 91精品久久久久久久91蜜桃| 国产欧美日韩麻豆91| 亚洲综合小说图片| 久草这里只有精品视频| 99re热这里只有精品视频| 欧美一级高清片| 亚洲美女视频在线| 老司机免费视频一区二区| 91亚洲永久精品| 精品区一区二区| 亚洲另类在线视频| 国产激情精品久久久第一区二区 | 日韩精品一区二区三区在线观看 | a亚洲天堂av| 日韩欧美电影一区| 一区二区三区中文在线观看| 国产激情精品久久久第一区二区 | 成人免费一区二区三区在线观看| 亚洲二区在线观看| 国产成+人+日韩+欧美+亚洲| 在线播放国产精品二区一二区四区 | 成人免费看片app下载| 欧美精品久久久久久久久老牛影院| 亚洲国产精品成人综合| 免费视频一区二区| 欧美性色综合网| 亚洲图片欧美激情| 国产99精品国产| 欧美v国产在线一区二区三区| 一区二区三区欧美| 99视频精品全部免费在线| 精品美女一区二区三区| 日韩专区一卡二卡| 欧美亚洲综合一区| 亚洲与欧洲av电影| 成人av在线资源网站| 久久久久久电影| 美女视频黄久久| 欧美精品乱码久久久久久按摩| 亚洲激情av在线| 在线视频一区二区三区| 亚洲柠檬福利资源导航| 91蜜桃视频在线| 成人欧美一区二区三区| 成人av网站在线观看| 国产精品麻豆一区二区| 丰满白嫩尤物一区二区| 国产欧美一区二区三区在线看蜜臀 | 91麻豆精品国产自产在线观看一区| 亚洲自拍偷拍图区| 欧洲生活片亚洲生活在线观看| 亚洲欧美自拍偷拍色图| 国产精品久久久久一区| 国产成人啪午夜精品网站男同| 日韩视频中午一区| 高清不卡在线观看| 国产专区欧美精品| 精品国产三级a在线观看| 丰满岳乱妇一区二区三区 | 7777精品伊人久久久大香线蕉最新版| 一区二区三区高清| 国产精品日日摸夜夜摸av| 欧美日韩亚洲综合| 久久久久国产成人精品亚洲午夜 | 成人性视频网站| 国产女主播视频一区二区| 成人午夜私人影院| 亚洲人成影院在线观看| 欧美性猛片aaaaaaa做受| 日韩精品欧美成人高清一区二区| 欧美电影免费提供在线观看| 国产精品一区在线观看乱码| 国产精品久久久久久妇女6080| 色婷婷av一区二区三区软件| 午夜激情久久久| 欧美成人猛片aaaaaaa| 国产不卡视频在线观看| 亚洲天堂av老司机| 666欧美在线视频| 国产精品一区一区| 亚洲一区在线视频| 欧美第一区第二区| 91丨九色porny丨蝌蚪| 日韩成人av影视| 中文字幕久久午夜不卡|