public App() { TargetDevice.Initialize(); this.Startup += this.Application_Startup; this.Exit += this.Application_Exit; this.UnhandledException += this.Application_UnhandledException; InitializeComponent(); }
static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); TargetDevice.Initialize <MyGame>(); Application.Run(new Form1()); Process.GetCurrentProcess().Kill(); }
private void Initialize() { Balder.Silverlight.Services.Display.RootElement = this; TargetDevice.Initialize <BalderDisplayInternalGame>(g => { if (null != g && g is BalderDisplayInternalGame) { Game = g; SetupEvents(g as BalderDisplayInternalGame); } }); }
public RenderPanel() { Invalidate(); SetStyle(ControlStyles.OptimizedDoubleBuffer, true); SetStyle(ControlStyles.DoubleBuffer, true); if (DesignMode) { TargetDevice.Initialize(); } if (!DesignMode) { var display = EngineRuntime.Instance.TargetDevice.Display; display.Draw += display_Draw; } }
private void Application_Startup(object sender, StartupEventArgs e) { this.RootVisual = new MainPage(); TargetDevice.Initialize <MyGame>(); }