SND\AstrorEnales_cp 5505f7dcbf - Added PlatformSystem Plugins layer
- Started Windows, Metro and Linux Platform-Plugins
- Moved the RecordingSample to the Samples folder
- Started two samples for using the graphics device in a WinForms and Wpf Editor
- Refactorings in the AddIn-System
- Moved the Window initialization-code to the Platform modules
- Changed the License text in all code files which is now way smaller
- Started ProjectConverter tool which converts all the projects and solution to the target configuration
- Changed the SupportedPlatform names in the Resource files
- Changed the WIN8 define to WINDOWSMETRO which is actually meant
- Removed NLog and started our own Logger class
- Many more stuff...
2012-08-09 09:45:04 +00:00

140 lines
2.6 KiB
C#

using System;
using System.Windows.Forms;
using ANX.Framework;
// This file is part of the ANX.Framework created by the
// "ANX.Framework developer group" and released under the Ms-PL license.
// For details see: http://anxframework.codeplex.com/license
namespace ANX.PlatformSystem.Windows
{
internal class WindowsGameWindow : GameWindow
{
#region Public
#region Form
internal static Form Form
{
get;
private set;
}
#endregion
#region Handle
public override IntPtr Handle
{
get
{
return Form.Handle;
}
}
#endregion
#region IsMinimized
public override bool IsMinimized
{
get
{
return Form.WindowState == FormWindowState.Minimized;
}
}
#endregion
#region ScreenDeviceName
public override string ScreenDeviceName
{
get
{
throw new NotImplementedException();
}
}
#endregion
#region AllowUserResizing
public override bool AllowUserResizing
{
get
{
return Form.FormBorderStyle == FormBorderStyle.Sizable;
}
set
{
Form.FormBorderStyle = value ?
FormBorderStyle.Sizable :
FormBorderStyle.Fixed3D;
}
}
#endregion
#region ClientBounds
public override Rectangle ClientBounds
{
get
{
System.Drawing.Rectangle rect = Form.ClientRectangle;
return new Rectangle(rect.X, rect.Y, rect.Width, rect.Height);
}
}
#endregion
#region CurrentOrientation
public override DisplayOrientation CurrentOrientation
{
get
{
return DisplayOrientation.Default;
}
}
#endregion
#endregion
#region Constructor
internal WindowsGameWindow()
{
Form = new Form()
{
Text = "ANX Framework",
MaximizeBox = false,
FormBorderStyle = FormBorderStyle.Fixed3D,
ClientSize = new System.Drawing.Size(
GraphicsDeviceManager.DefaultBackBufferWidth,
GraphicsDeviceManager.DefaultBackBufferHeight),
};
}
#endregion
#region Close
public void Close()
{
if (Form != null)
{
Form.Close();
Form.Dispose();
Form = null;
}
}
#endregion
#region SetTitle
protected override void SetTitle(string title)
{
Form.Text = title;
}
#endregion
#region BeginScreenDeviceChange
public override void BeginScreenDeviceChange(bool willBeFullScreen)
{
throw new NotImplementedException();
}
#endregion
#region EndScreenDeviceChange
public override void EndScreenDeviceChange(string screenDeviceName,
int clientWidth, int clientHeight)
{
throw new NotImplementedException();
}
#endregion
}
}