コード例 #1
0
ファイル: WinFormsHost.cs プロジェクト: ARLM-Attic/xna-xen
 internal void SetApplication(Application app, XNAWinFormsHostAppWrapper formsWrapper, WinFormsHostGraphicsDeviceService device)
 {
     this.device                  = device;
     this.application             = app;
     this.winFormWrapper          = formsWrapper;
     this.winFormWrapper.Exiting += new EventHandler(winFormWrapper_Exiting);
 }
コード例 #2
0
		internal void SetApplication(Application app, XNAWinFormsHostAppWrapper formsWrapper, WinFormsHostGraphicsDeviceService device)
		{
			this.device = device;
			this.application = app;
			this.winFormWrapper = formsWrapper;
			this.winFormWrapper.Exiting += new EventHandler(winFormWrapper_Exiting);
		}
コード例 #3
0
		void winFormWrapper_Exiting(object sender, EventArgs e)
		{
			if (this.winFormWrapper != null)
				this.winFormWrapper.Exiting -= new EventHandler(winFormWrapper_Exiting);
			this.device = null;
			this.application = null;
			this.winFormWrapper = null;
		}
コード例 #4
0
ファイル: WinFormsHost.cs プロジェクト: ARLM-Attic/xna-xen
 void winFormWrapper_Exiting(object sender, EventArgs e)
 {
     if (this.winFormWrapper != null)
     {
         this.winFormWrapper.Exiting -= new EventHandler(winFormWrapper_Exiting);
     }
     this.device         = null;
     this.application    = null;
     this.winFormWrapper = null;
 }
コード例 #5
0
		/// <summary>
		/// Disposes the control.
		/// </summary>
		protected override void Dispose(bool disposing)
		{
			if (application != null)
				application.Shutdown();

			application = null;
			device = null;
			winFormWrapper = null;

			base.Dispose(disposing);
		}
コード例 #6
0
ファイル: WinFormsHost.cs プロジェクト: ARLM-Attic/xna-xen
        /// <summary>
        /// Disposes the control.
        /// </summary>
        protected override void Dispose(bool disposing)
        {
            if (application != null)
            {
                application.Shutdown();
            }

            application    = null;
            device         = null;
            winFormWrapper = null;

            base.Dispose(disposing);
        }
コード例 #7
0
ファイル: WinFormsHost.cs プロジェクト: ARLM-Attic/xna-xen
        public WinFormsHostGraphicsDeviceService(XNAWinFormsHostAppWrapper winForms, int width, int height)
        {
            this.winFormsHost = winForms;

            parameters = new PresentationParameters();

            parameters.BackBufferWidth  = Math.Max(width, 1);
            parameters.BackBufferHeight = Math.Max(height, 1);
            parameters.BackBufferFormat = SurfaceFormat.Color;

            parameters.EnableAutoDepthStencil = true;
            parameters.AutoDepthStencilFormat = DepthFormat.Depth24Stencil8;
        }
コード例 #8
0
		public WinFormsHostGraphicsDeviceService(XNAWinFormsHostAppWrapper winForms, int width, int height)
		{
			this.winFormsHost = winForms;

			parameters = new PresentationParameters();

			parameters.BackBufferWidth = Math.Max(width, 1);
			parameters.BackBufferHeight = Math.Max(height, 1);
			parameters.BackBufferFormat = SurfaceFormat.Color;

			parameters.EnableAutoDepthStencil = true;
			parameters.AutoDepthStencilFormat = DepthFormat.Depth24Stencil8;
		}