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

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

?? dxmut.cs

?? VC中使用C#作為腳本引擎編程
?? CS
?? 第 1 頁 / 共 5 頁
字號:
//--------------------------------------------------------------------------------------
// File: DXMUT.cs
//
// DirectX SDK Managed Direct3D sample framework
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//--------------------------------------------------------------------------------------
using System;
using System.Collections;
using Microsoft.DirectX;
using Microsoft.DirectX.Direct3D;

namespace Microsoft.Samples.DirectX.UtilityToolkit
{
    /// <summary>
    /// Managed Utility Framework Class
    /// </summary>
    public sealed class Framework : IDisposable
    {

        #region Class Data
        // Constants for command line arguments
        private const string CmdAdapter = "adapter";
        private const string CmdWindowed = "windowed";
        private const string CmdFullscreen = "fullscreen";
        private const string CmdForceHardware = "forcehal";
        private const string CmdForceRef = "forceref";
        private const string CmdPureHwVp = "forcepurehwvp";
        private const string CmdForceHwVp = "forcehwvp";
        private const string CmdForceSwVp = "forceswvp";
        private const string CmdWidth = "width";
        private const string CmdHeight = "height";
        private const string CmdStartx = "startx";
        private const string CmdStarty = "starty";
        private const string CmdConstantFrame = "constantframetime";
        private const string CmdQuitAfterFrame = "quitafterframe";
        private const string CmdNoErrorBoxes = "noerrormsgboxes";

        // Delegate used for disposing application
        private delegate void DisposeDelegate();

        // Constants for minimum window size
        private const int MinimumWindowSizeX = 200;
        private const int MinimumWindowSizeY = 200;
        public const int DefaultSizeWidth = 640;
        public const int DefaultSizeHeight = 480;
        // Default starting size
        private static readonly System.Drawing.Size DefaultStartingSize = new System.Drawing.Size(DefaultSizeWidth, DefaultSizeHeight);
        internal static readonly System.Drawing.Size MinWindowSize = new System.Drawing.Size(MinimumWindowSizeX, MinimumWindowSizeY);
        public static readonly IntPtr TrueIntPtr = new IntPtr(1);
        private const string WindowClassName = "ManagedDirect3DWindowClass";

        // What about the stored data?
        private FrameworkData State;
        // Last shown error
        private Exception lastDisplayedMessage = null;
        // Has the framework been disposed already
        private bool isDisposed = false;
        // Did the toggle fullscreen happen when maximized?
        private bool toggleMaximized = false;
        #endregion

        #region Creation 
        /// <summary>
        /// Constructor, init data here
        /// </summary>
        public Framework()
        {
            State = new FrameworkData();
        }
        #endregion

        #region Setting up callbacks
        // Interface 'callbacks'
        public void SetCallbackInterface(IFrameworkCallback callback) { State.CallbackInterface = callback; }
        public void SetDeviceCreationInterface(IDeviceCreation callback) { State.DeviceCreationInterface = callback; }

        // Event 'callbacks'

        /// <summary>The event fired for disposing of the device</summary>
        public event EventHandler Disposing; 
        /// <summary>The event fired for when the device is lost</summary>
        public event EventHandler DeviceLost; 
        /// <summary>The event fired for when the device is created</summary>
        public event DeviceEventHandler DeviceCreated; 
        /// <summary>The event fired for when the device is reset</summary>
        public event DeviceEventHandler DeviceReset; 

        public void SetWndProcCallback(WndProcCallback callback) { State.WndProcFunction = callback; }
        #endregion

        /// <summary>
        /// Optionally parses the command line and sets if default hotkeys are handled
        /// Possible command line parameters are:
        /// -adapter:#              forces app to use this adapter # (fails if the adapter doesn't exist)
        /// -windowed               forces app to start windowed
        /// -fullscreen             forces app to start full screen
        /// -forceHardware          forces app to use Hardware (fails if Hardware doesn't exist)
        /// -forceReference         forces app to use Reference (fails if Reference doesn't exist)
        /// -forcepurehwvp          forces app to use pure HWVP (fails if device doesn't support it)
        /// -forcehwvp              forces app to use HWVP (fails if device doesn't support it)
        /// -forceswvp              forces app to use SWVP 
        /// -width:#                forces app to use # for width. for full screen, it will pick the closest possible supported mode
        /// -height:#               forces app to use # for height. for full screen, it will pick the closest possible supported mode
        /// -startx:#               forces app to use # for the x coord of the window position for windowed mode
        /// -starty:#               forces app to use # for the y coord of the window position for windowed mode
        /// -constantframetime:#    forces app to use constant frame time, where # is the time/frame in seconds
        /// -quitafterframe:x       forces app to quit after # frames
        /// -noerrormsgboxes        prevents the display of message boxes generated by the framework so the application can be run without user interaction
        /// 
        /// Hotkeys handled by default are:
        /// ESC                 app exits
        /// Alt-Enter           toggle between full screen & windowed
        /// F2 			        device selection dialog
        /// F3 			        toggle Hardware/Reference
        /// F8                  toggle wire-frame mode
        /// Pause               pauses time
        /// </summary>
        public void Initialize(bool isParsingCommandLine, bool handleDefaultKeys, bool showMessageBoxOnError)
        {
            State.WasInitCalled = true;

            // Turn off event handling for the MDX runtime, this will
            // increase performance and remove potential working set issues
            Device.IsUsingEventHandlers = false;

            // Increase

            // Store this data
            State.IsShowingMsgBoxOnError = showMessageBoxOnError;
            State.IsHandlingDefaultHotkeys = handleDefaultKeys;

            // Reset the timer period (ignore any failures)
            try
            { NativeMethods.timeBeginPeriod(1); }
            catch { System.Diagnostics.Debugger.Log(9, string.Empty, "Could not set time period.\r\n" ); }

            if (isParsingCommandLine)
            {
                ParseCommandLine();
            }

            // Reset the timer
            FrameworkTimer.Reset();
            State.IsInited = true;

        }

        /// <summary>
        /// Parses the command line for parameters.  See Initialize() for list 
        /// </summary>
        private void ParseCommandLine()
        {
            string[] args = System.Environment.GetCommandLineArgs(); // Ignore the first one since that's the executable name

            // Go through each argument, skipping the first one
            for (int i = 1; i < args.Length; i++)
            {
                string argument = string.Empty;
                if ((args[i].StartsWith("-")) || (args[i].StartsWith("-")))
                {
                    argument = args[i].Substring(1, args[i].Length - 1);
                }
                else
                    continue;

                if (argument.ToLower().StartsWith(CmdAdapter + ":"))
                {
                    try
                    { State.OverrideAdapterOrdinal = int.Parse(argument.Substring(CmdAdapter.Length + 1, argument.Length - (CmdAdapter.Length + 1))); }
                    catch (FormatException){}
                }
                else if (string.Compare(argument, CmdWindowed, true) == 0)
                {
                    State.IsOverridingWindowed = true;
                }
                else if (string.Compare(argument, CmdFullscreen, true) == 0)
                {
                    State.IsOverridingFullScreen = true;
                }
                else if (string.Compare(argument, CmdForceHardware, true) == 0)
                {
                    State.IsOverridingForceHardware = true;
                }
                else if (string.Compare(argument, CmdForceRef, true) == 0)
                {
                    State.IsOverridingForceReference = true;
                }
                else if (string.Compare(argument, CmdPureHwVp, true) == 0)
                {
                    State.IsOverridingForcePureHardwareVertexProcessing = true;
                }
                else if (string.Compare(argument, CmdForceHwVp, true) == 0)
                {
                    State.IsOverridingForceHardwareVertexProcessing = true;
                }
                else if (string.Compare(argument, CmdForceSwVp, true) == 0)
                {
                    State.IsOverridingForceSoftwareVertexProcessing = true;
                }
                else if (argument.ToLower().StartsWith(CmdWidth + ":"))
                {
                    try
                    { State.OverrideWidth = int.Parse(argument.Substring(CmdWidth.Length + 1, argument.Length - (CmdWidth.Length + 1))); }
                    catch (FormatException){}
                }
                else if (argument.ToLower().StartsWith(CmdHeight + ":"))
                {
                    try
                    { State.OverrideHeight = int.Parse(argument.Substring(CmdHeight.Length + 1, argument.Length - (CmdHeight.Length + 1))); }
                    catch (FormatException){}
                }
                else if (argument.ToLower().StartsWith(CmdStartx + ":"))
                {
                    try
                    { State.OverrideStartX = int.Parse(argument.Substring(CmdStartx.Length + 1, argument.Length - (CmdStartx.Length + 1))); }
                    catch (FormatException){}
                }
                else if (argument.ToLower().StartsWith(CmdStarty + ":"))
                {
                    try
                    { State.OverrideStartY = int.Parse(argument.Substring(CmdStarty.Length + 1, argument.Length - (CmdStarty.Length + 1))); }
                    catch (FormatException){}
                }
                else if (argument.ToLower().StartsWith(CmdConstantFrame + ":"))
                {
                    float timePerFrame = 0.033f; // Default to this time
                    try
                    { 
                        timePerFrame = float.Parse(argument.Substring(CmdConstantFrame.Length + 1, argument.Length - (CmdConstantFrame.Length + 1))); 
                    }
                    catch (FormatException){}
                    State.OverrideConstantTimePerFrame = timePerFrame;
                    State.IsOverridingConstantFrameTime = true;
                }
                else if (argument.ToLower().StartsWith(CmdQuitAfterFrame + ":"))
                {
                    try
                    { State.OverrideQuitAfterFrame = int.Parse(argument.Substring(CmdQuitAfterFrame.Length + 1, argument.Length - (CmdQuitAfterFrame.Length + 1))); }
                    catch (FormatException){}
                }
                else if (string.Compare(argument, CmdNoErrorBoxes, true) == 0)
                {
                    State.IsShowingMsgBoxOnError = false;
                }
                else
                    System.Diagnostics.Debugger.Log(9, string.Empty, string.Format("Unrecognized flag: {0}\r\n", argument));
            }
        }

        /// <summary>
        /// Creates a window with the specified title, icon, menu, and starting position.  If Init hasn't been
        /// called, this will call with default params.  Instead of calling this, you can call SetWindow
        /// to use an existing window
        /// </summary>
        public void CreateWindow(string windowTitle, System.Drawing.Icon icon, 
            System.Windows.Forms.MainMenu menu, int x, int y)
        {
            if (State.IsInsideDeviceCallback)
                throw new InvalidOperationException("You cannot create a window from inside a callback.");

            State.WasWindowCreateCalled = true;
            // Are we inited?
            if (!State.IsInited)
            {
                // If Init was already called and failed, fail again
                if (State.WasInitCalled)
                {
                    throw new InvalidOperationException("Initialize was already called and failed.");
                }

                // Call initialize with default params
                Initialize(true, true, true);
            }

            // Is there already a window created?
            if (State.WindowFocus == null)
            {

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品888| 国产精品每日更新| 国产精品网站一区| 亚洲成人av一区二区三区| 国产91清纯白嫩初高中在线观看| 欧美人妇做爰xxxⅹ性高电影| 中文字幕 久热精品 视频在线| 免费观看一级特黄欧美大片| 色综合色狠狠综合色| 中文字幕+乱码+中文字幕一区| 久久国产剧场电影| 7777精品伊人久久久大香线蕉的 | 99综合电影在线视频| 精品国产91洋老外米糕| 日韩精品乱码av一区二区| 色94色欧美sute亚洲线路一ni| 国产欧美一区二区三区沐欲| 久久99久久精品欧美| 欧美一区二区免费视频| 亚洲bt欧美bt精品777| av色综合久久天堂av综合| 久久精品视频网| 韩国欧美国产一区| 精品粉嫩超白一线天av| 麻豆成人91精品二区三区| 欧美日韩精品是欧美日韩精品| 亚洲激情图片小说视频| 97久久超碰国产精品电影| 国产精品美女视频| 国产伦精品一区二区三区在线观看| 日韩天堂在线观看| 男女激情视频一区| 日韩欧美激情四射| 国产一区二区三区免费观看| 精品裸体舞一区二区三区| 麻豆精品视频在线观看免费| 日韩免费看网站| 国产乱码精品一品二品| 中文字幕乱码久久午夜不卡| 99精品久久只有精品| 一区二区日韩av| 欧美日韩一区二区三区四区| 日韩精品亚洲专区| 精品精品国产高清一毛片一天堂| 理论电影国产精品| 久久久久国色av免费看影院| 播五月开心婷婷综合| 亚洲免费观看高清完整版在线| 欧美三级三级三级爽爽爽| 日日摸夜夜添夜夜添精品视频 | 精品一区二区三区久久| 26uuu另类欧美| 成人性生交大片免费看视频在线| 亚洲九九爱视频| 欧美精品第1页| 国产一区二区在线观看免费| 国产精品无码永久免费888| av资源站一区| 亚洲在线免费播放| 日韩女优制服丝袜电影| 成人的网站免费观看| 天堂va蜜桃一区二区三区漫画版| 精品国产欧美一区二区| 成人在线一区二区三区| 亚洲一区二区三区四区在线观看| 欧美一个色资源| 99re在线视频这里只有精品| 午夜欧美电影在线观看| 亚洲国产精品精华液ab| 91精品在线免费观看| 成人av电影在线网| 久久99精品一区二区三区| 亚洲情趣在线观看| 欧美精品一区二区在线播放| 色综合久久久久综合| 久久成人免费电影| 一区二区三区不卡视频| 国产日产欧美一区二区视频| 欧美日韩在线精品一区二区三区激情 | 日本伊人精品一区二区三区观看方式| 久久久久久久久久美女| 欧美制服丝袜第一页| 成人视屏免费看| 免费黄网站欧美| 亚洲自拍偷拍九九九| 国产日韩精品一区二区三区在线| 91精品国产一区二区三区香蕉| 成人免费视频app| 国产一区欧美二区| 久久精品久久综合| 五月婷婷久久综合| 亚洲精品免费电影| 国产精品久久久久久久久免费樱桃| 欧美一区二区三区在线视频| 色综合视频在线观看| 波多野结衣在线一区| 激情另类小说区图片区视频区| 亚洲国产sm捆绑调教视频| 最近日韩中文字幕| 国产拍揄自揄精品视频麻豆| 久久久久久一二三区| 欧美视频精品在线| 91行情网站电视在线观看高清版| 91亚洲男人天堂| 国产二区国产一区在线观看| 国内精品伊人久久久久av影院| 蜜桃视频一区二区三区| 日本不卡一二三区黄网| 丝袜美腿高跟呻吟高潮一区| 亚洲大片在线观看| 艳妇臀荡乳欲伦亚洲一区| 亚洲三级在线观看| 亚洲精品日日夜夜| 悠悠色在线精品| 亚洲综合无码一区二区| 亚洲一卡二卡三卡四卡五卡| 亚洲一二三区视频在线观看| 亚洲综合另类小说| 污片在线观看一区二区| 五月天丁香久久| 免费黄网站欧美| 麻豆国产精品视频| 国产在线一区观看| 国产91丝袜在线播放九色| 成人av在线一区二区三区| 99视频一区二区| 欧美日韩在线不卡| 欧美成人女星排行榜| 久久午夜老司机| 国产精品热久久久久夜色精品三区 | 欧美性猛交一区二区三区精品| 欧美午夜在线一二页| 91精品免费在线观看| 久久一区二区三区四区| 国产欧美一区二区在线| 亚洲免费在线看| 爽好久久久欧美精品| 国产剧情一区二区| 色综合欧美在线| 日韩一区二区精品在线观看| 国产网站一区二区| 亚洲黄色片在线观看| 免费人成精品欧美精品| 粗大黑人巨茎大战欧美成人| 在线亚洲免费视频| 欧美不卡视频一区| 亚洲视频在线观看三级| 图片区小说区区亚洲影院| 国产aⅴ综合色| 欧美日韩精品一区二区天天拍小说| 日韩三级中文字幕| 专区另类欧美日韩| 久久99精品久久只有精品| 99久久精品国产一区二区三区| 51精品国自产在线| 亚洲视频在线一区观看| 狠狠色丁香久久婷婷综| 欧美在线观看视频在线| 国产香蕉久久精品综合网| 丝袜美腿亚洲一区二区图片| 99视频有精品| 久久久久久久久岛国免费| 亚洲国产成人va在线观看天堂 | 久久精品噜噜噜成人88aⅴ| 91在线小视频| 国产视频视频一区| 日本中文字幕一区二区视频| 99久久er热在这里只有精品15| 欧美一区二区不卡视频| 亚洲一区二区三区视频在线播放 | 欧美日韩欧美一区二区| 国产精品二三区| 国产精品亚洲视频| 欧美一区二区三区视频| 亚洲乱码一区二区三区在线观看| 国产精品亚洲一区二区三区在线| 在线观看91av| 亚洲成a人v欧美综合天堂| 色综合中文字幕国产| 久久综合精品国产一区二区三区| 日韩和欧美一区二区| 91福利在线观看| 亚洲柠檬福利资源导航| 国产98色在线|日韩| 久久久久久久综合日本| 日韩va亚洲va欧美va久久| 色久综合一二码| 伊人夜夜躁av伊人久久| 99久久99久久精品免费看蜜桃 | 欧美一区二区在线免费观看| 亚洲一区二区在线视频| 日本韩国视频一区二区| 有坂深雪av一区二区精品| 91久久精品日日躁夜夜躁欧美| 国产精品久久精品日日| 99视频超级精品| 亚洲精品日产精品乱码不卡| 97国产精品videossex| 狠狠色2019综合网| 久久99蜜桃精品|