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

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

?? dxmutgui.cs

?? 運用directX完成的坦克游戲雛形
?? CS
?? 第 1 頁 / 共 5 頁
字號:
                            case System.Windows.Forms.Keys.Left:
                            case System.Windows.Forms.Keys.Up:
                                if (controlFocus != null)
                                {
                                    OnCycleFocus(false);
                                    return true;
                                }
                                break;
                            case System.Windows.Forms.Keys.Tab:
                                if (controlFocus == null)
                                {
                                    FocusDefaultControl();
                                }
                                else
                                {
                                    bool shiftDown = NativeMethods.IsKeyDown(System.Windows.Forms.Keys.ShiftKey);

                                    OnCycleFocus(!shiftDown);
                                }
                                return true;
                        }
                    }
                }
                    break;

                // Mouse messages
                case NativeMethods.WindowMessage.MouseMove:
                case NativeMethods.WindowMessage.MouseWheel:
                case NativeMethods.WindowMessage.LeftButtonUp:
                case NativeMethods.WindowMessage.LeftButtonDown:
                case NativeMethods.WindowMessage.LeftButtonDoubleClick:
                case NativeMethods.WindowMessage.RightButtonUp:
                case NativeMethods.WindowMessage.RightButtonDown:
                case NativeMethods.WindowMessage.RightButtonDoubleClick:
                case NativeMethods.WindowMessage.MiddleButtonUp:
                case NativeMethods.WindowMessage.MiddleButtonDown:
                case NativeMethods.WindowMessage.MiddleButtonDoubleClick:
                case NativeMethods.WindowMessage.XButtonUp:
                case NativeMethods.WindowMessage.XButtonDown:
                case NativeMethods.WindowMessage.XButtonDoubleClick:
                {
                    // If not accepting mouse input, return false to indicate the message should still 
                    // be handled by the application (usually to move the camera).
                    if (!usingMouseInput)
                        return false;

                    // Current mouse position
                    short mouseX = NativeMethods.LoWord((uint)lParam.ToInt32());
                    short mouseY = NativeMethods.HiWord((uint)lParam.ToInt32());
                    System.Drawing.Point mousePoint = new System.Drawing.Point(mouseX, mouseY);
                    // Offset mouse point
                    mousePoint.X -= dialogX;
                    mousePoint.Y -= dialogY;

                    // If caption is enabled, offset the Y coordinate by the negative of its height.
                    if (hasCaption)
                        mousePoint.Y -= captionHeight;

                    // If a control is in focus, it belongs to this dialog, and it's enabled, then give
                    // it the first chance at handling the message.
                    if (controlFocus != null && 
                        controlFocus.Parent == this && 
                        controlFocus.IsEnabled)
                    {
                        // If the control MsgProc handles it, then we don't.
                        if (controlFocus.HandleMouse(msg, mousePoint, wParam, lParam))
                            return true;
                    }

                    // Not yet handled, see if the mouse is over any controls
                    Control control = GetControlAtPoint(mousePoint);
                    if ((control != null) && (control.IsEnabled))
                    {
                        // Let the control handle the mouse if it wants (and return true if it handles it)
                        if (control.HandleMouse(msg, mousePoint, wParam, lParam))
                            return true;
                    }
                    else
                    {
                        // Mouse not over any controls in this dialog, if there was a control
                        // which had focus it just lost it
                        if (msg == NativeMethods.WindowMessage.LeftButtonDown &&
                            controlFocus != null &&
                            controlFocus.Parent == this)
                        {
                            controlFocus.OnFocusOut();
                            controlFocus = null;
                        }
                    }

                    // Still not handled, hand this off to the dialog. Return false to indicate the
                    // message should still be handled by the application (usually to move the camera).
                    switch(msg)
                    {
                        case NativeMethods.WindowMessage.MouseMove:
                            OnMouseMove(mousePoint);
                            return false;
                    }


                }
                    break;
            }

            // Didn't handle this message
            return false;
        }

        /// <summary>
        /// Handle mouse moves
        /// </summary>
        private void OnMouseMove(System.Drawing.Point pt)
        {
            // If the mouse was previously hovering over a control, it's either
            // still over the control or has left
            if (controlMouseDown != null)
            {
                // If another dialog owns this control then let that dialog handle it
                if (controlMouseDown.Parent != this )
                    return;

                // If the same control is still under the mouse, nothing needs to be done
                if (controlMouseDown.ContainsPoint(pt))
                    return;
           
                // Mouse has moved outside the control, notify the control and continue
                controlMouseDown.OnMouseExit();
                controlMouseDown = null;
            }

            // Figure out which control the mouse is over now
            Control control = GetControlAtPoint(pt);
            if (control != null)
            {
                controlMouseDown = control;
                controlMouseDown.OnMouseEnter();
            }
        }
        #endregion
        
        #region Focus
        /// <summary>
        /// Request that this control has focus
        /// </summary>
        public static void RequestFocus(Control control)
        {
            if (controlFocus == control)
                return; // Already does

            if (!control.CanHaveFocus)
                return; // Can't have focus

            if (controlFocus != null)
                controlFocus.OnFocusOut();

            // Set the control focus now
            control.OnFocusIn();
            controlFocus = control;
        }

        /// <summary>
        /// Clears focus of the dialog
        /// </summary>
        public static void ClearFocus()
        {
            if (controlFocus != null)
            {
                controlFocus.OnFocusOut();
                controlFocus = null;
            }
        }
        /// <summary>
        /// Cycles focus to the next available control
        /// </summary>
        private void OnCycleFocus(bool forward)
        {
            // This should only be handled by the dialog which owns the focused control, and 
            // only if a control currently has focus
            if (controlFocus == null || controlFocus.Parent != this )
                return;

            Control control = controlFocus;
            // Go through a bunch of controls
            for (int i = 0; i < 0xffff; i++)
            {
                control = (forward) ? GetNextControl(control) : GetPreviousControl(control);

                // If we've gone in a full circle, focus won't change
                if (control == controlFocus)
                    return;

                // If the dialog accepts keybord input and the control can have focus then
                // move focus
                if (control.Parent.IsUsingKeyboardInput && control.CanHaveFocus)
                {
                    controlFocus.OnFocusOut();
                    controlFocus = control;
                    controlFocus.OnFocusIn();
                    return;
                }
            }

            throw new InvalidOperationException("Multiple dialogs are improperly chained together.");
        }

        /// <summary>
        /// Gets the next control
        /// </summary>
        private static Control GetNextControl(Control control)
        {
            int index = (int)control.index + 1;

            Dialog dialog = control.Parent;
            
            // Cycle through dialogs in the loop to find the next control. Note
            // that if only one control exists in all looped dialogs it will
            // be the returned 'next' control.
            while (index >= (int)dialog.controlList.Count)
            {
                dialog = dialog.nextDialog;
                index = 0;
            }

            return dialog.controlList[index] as Control;
        }
        /// <summary>
        /// Gets the previous control
        /// </summary>
        private static Control GetPreviousControl(Control control)
        {
            int index = (int)control.index - 1;

            Dialog dialog = control.Parent;
            
            // Cycle through dialogs in the loop to find the next control. Note
            // that if only one control exists in all looped dialogs it will
            // be the returned 'previous' control.
            while (index < 0)
            {
                dialog = dialog.prevDialog;
                if (dialog == null)
                    dialog = control.Parent;

                index = dialog.controlList.Count - 1;
            }

            return dialog.controlList[index] as Control;
        }
        /// <summary>
        /// Sets focus to the default control of a dialog
        /// </summary>
        private void FocusDefaultControl()
        {
            // Check for a default control in this dialog
            foreach(Control c in controlList)
            {
                if (c.isDefault)
                {
                    // Remove focus from the current control
                    ClearFocus();

                    // Give focus to the default control
                    controlFocus = c;
                    controlFocus.OnFocusIn();
                    return;
                }
            }
        }
        #endregion

        #region Controls Methods/Properties
        /// <summary>Sets the control enabled property</summary>
        public void SetControlEnable(int id, bool isenabled)
        {
            Control c = GetControl(id);
            if (c == null)
                return; // No control to set

            c.IsEnabled = isenabled;
        }
        /// <summary>Gets the control enabled property</summary>
        public bool GetControlEnable(int id)
        {
            Control c = GetControl(id);
            if (c == null)
                return false; // No control to get

            return c.IsEnabled;
        }

        /// <summary>Returns the control located at a point (if one exists)</summary>
        public Control GetControlAtPoint(System.Drawing.Point pt)
        {
            foreach(Control c in controlList)
            {
                if (c == null)
                    continue;

                if (c.IsEnabled && c.IsVisible && c.ContainsPoint(pt))
                    return c;
            }

            return null;
        }
        /// <summary>Returns the control located at this index(if one exists)</summary>
        public Control GetControl(int id)
        {
            foreach(Control c in controlList)
            {
                if (c == null)
                    continue;

                if (c.ID == id)

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美一区二区视频免费观看| 亚洲女同女同女同女同女同69| 欧美精品高清视频| 91精品福利视频| 91香蕉视频污| 色婷婷综合久久久久中文一区二区 | 在线观看亚洲成人| 91亚洲国产成人精品一区二三| 99久久夜色精品国产网站| 成人免费观看av| 99久久精品国产麻豆演员表| 97精品久久久午夜一区二区三区| 91丨porny丨首页| 91亚洲精华国产精华精华液| 色综合久久综合网| 欧美在线综合视频| 91精品婷婷国产综合久久性色| 日韩一区二区影院| 26uuu色噜噜精品一区| 久久久国际精品| 国产午夜精品一区二区三区嫩草| 欧美激情中文字幕一区二区| 国产精品国产三级国产aⅴ无密码| 亚洲欧美一区二区在线观看| 亚洲黄色小视频| 亚洲成av人影院在线观看网| 欧美aaaaaa午夜精品| 精品亚洲国产成人av制服丝袜 | 91激情五月电影| 欧美亚洲国产怡红院影院| 制服丝袜中文字幕亚洲| 精品福利在线导航| 国产精品久线在线观看| 一区二区三区四区五区视频在线观看| 午夜精品久久久久影视| 国内精品视频666| 91在线视频免费91| 欧美日韩日日骚| www国产精品av| 亚洲免费观看在线视频| 日本女人一区二区三区| 福利电影一区二区三区| 欧美日韩亚洲高清一区二区| 精品欧美乱码久久久久久| 国产精品欧美经典| 天堂午夜影视日韩欧美一区二区| 极品少妇xxxx精品少妇| 99久久国产综合色|国产精品| 欧美日韩一区二区电影| 久久精品欧美一区二区三区不卡 | 风间由美性色一区二区三区| 色哟哟一区二区| 欧美电影免费观看高清完整版在线观看 | 一本久道久久综合中文字幕| 欧美一区二区久久| 中文字幕五月欧美| 久久精品国产亚洲5555| 色婷婷综合久色| 久久五月婷婷丁香社区| 夜夜嗨av一区二区三区网页| 黄色日韩网站视频| 91福利资源站| 久久精品网站免费观看| 石原莉奈在线亚洲二区| 99热在这里有精品免费| 亚洲精品在线电影| 午夜精品aaa| 不卡的av网站| 久久综合久久久久88| 性欧美疯狂xxxxbbbb| 成人免费毛片app| 精品少妇一区二区三区日产乱码| 亚洲另类一区二区| 国产美女av一区二区三区| 欧美日韩成人在线| 亚洲日穴在线视频| 国产精品亚洲一区二区三区在线| 欧美欧美午夜aⅴ在线观看| 日本一区二区高清| 久久99热99| 这里只有精品免费| 亚洲国产成人tv| 99re66热这里只有精品3直播| 久久嫩草精品久久久精品| 五月激情综合色| 一本色道久久加勒比精品| 中文字幕精品—区二区四季| 国产尤物一区二区在线| 日韩三级在线免费观看| 亚洲一区二区免费视频| 日本高清成人免费播放| 国产精品午夜久久| 国产精品亚洲一区二区三区在线 | 亚洲成a人v欧美综合天堂| 色视频成人在线观看免| 亚洲手机成人高清视频| 成人aaaa免费全部观看| 国产精品天美传媒| 成人午夜在线播放| 国产调教视频一区| 国产成人福利片| 久久精品亚洲乱码伦伦中文| 国产美女精品人人做人人爽| 久久综合色婷婷| 国产一区二区三区四区五区入口| 精品国产三级电影在线观看| 蜜桃视频第一区免费观看| 日韩欧美国产成人一区二区| 久久精品国产精品亚洲红杏| 日韩一级高清毛片| 久久国产夜色精品鲁鲁99| 91麻豆精品国产91久久久久久久久| 亚洲国产综合色| 欧美久久久久久久久久| 秋霞影院一区二区| 26uuu久久综合| 国产精品538一区二区在线| 久久久欧美精品sm网站| 成人综合在线观看| 亚洲色图制服丝袜| 91久久奴性调教| 亚洲午夜电影网| 欧美一区二区人人喊爽| 久久精品国产99国产| 欧美精品一区二区三区四区| 风流少妇一区二区| 中文字幕制服丝袜一区二区三区| 91在线观看美女| 日日嗨av一区二区三区四区| 精品嫩草影院久久| 丁香桃色午夜亚洲一区二区三区| 国产精品乱码一区二区三区软件| 色婷婷综合久久久| 日本欧美大码aⅴ在线播放| 久久影音资源网| 99久久久免费精品国产一区二区| 亚洲国产日韩a在线播放| 日韩欧美不卡一区| www.日韩大片| 天堂久久一区二区三区| 久久久国产综合精品女国产盗摄| av午夜一区麻豆| 午夜精品久久久久久久| 久久久久久久久久电影| 色综合 综合色| 日韩精品乱码av一区二区| 久久精子c满五个校花| 99re成人精品视频| 免费观看一级欧美片| 中文字幕一区二区三中文字幕 | 亚洲精品成人悠悠色影视| 日韩一区二区高清| www.欧美精品一二区| 石原莉奈在线亚洲二区| 国产精品蜜臀av| 91精品国产综合久久久蜜臀图片| 国产成人自拍网| 天天色综合成人网| 中文字幕欧美日韩一区| 欧美色大人视频| 国产91色综合久久免费分享| 婷婷综合另类小说色区| 国产精品毛片久久久久久久| 欧美日韩高清一区二区| 懂色av一区二区三区免费看| 亚洲成a人v欧美综合天堂下载| 国产清纯白嫩初高生在线观看91 | 韩国v欧美v亚洲v日本v| 亚洲午夜精品网| 国产精品人妖ts系列视频| 欧美一区二区视频在线观看2022| 972aa.com艺术欧美| 国产综合色视频| 婷婷成人激情在线网| 国产精品视频线看| 精品久久五月天| 欧美日韩一区二区三区四区| 成人av集中营| 国产乱人伦偷精品视频不卡 | 成人免费视频caoporn| 日韩中文欧美在线| 亚洲精品水蜜桃| 国产亚洲一区二区三区| 日韩欧美一级在线播放| 精品视频一区二区三区免费| av动漫一区二区| 国产乱码字幕精品高清av| 日韩 欧美一区二区三区| 亚洲一区二区三区四区在线观看 | 热久久一区二区| 午夜精品福利一区二区蜜股av | 亚洲成人综合在线| 亚洲美女少妇撒尿| 亚洲特级片在线| 中文字幕精品—区二区四季| 久久久久青草大香线综合精品| 日韩欧美国产三级电影视频| 制服丝袜中文字幕一区| 在线不卡a资源高清| 欧美蜜桃一区二区三区|