23 #if SILICONSTUDIO_PLATFORM_WINDOWS_DESKTOP && SILICONSTUDIO_PARADOX_GRAPHICS_API_DIRECT3D
25 using System.Windows.Forms;
26 using SiliconStudio.Paradox.Games.Resources;
28 using SharpDX.Windows;
30 namespace SiliconStudio.
Paradox.Games
35 public partial class GameContext
40 public GameContext() : this((
Control)null)
49 public GameContext(
Control control,
bool isUserManagingRun)
51 Control = control ?? CreateForm();
52 IsUserManagingRun = isUserManagingRun;
53 ContextType = AppContextType.Desktop;
62 public GameContext(
Control control,
int requestedWidth = 0,
int requestedHeight = 0)
64 Control = control ?? CreateForm();
65 RequestedWidth = requestedWidth;
66 RequestedHeight = requestedHeight;
67 ContextType = AppContextType.Desktop;
78 public readonly
bool IsUserManagingRun;
84 public Action RunCallback {
get;
internal set; }
90 public Action ExitCallback {
get;
internal set; }
97 public static implicit
operator GameContext(
Control control)
99 return new GameContext(control);
102 private static Form CreateForm()
104 return new GameForm();