Exemple #1
0
        public App()
        {
            TargetDevice.Initialize();
            this.Startup            += this.Application_Startup;
            this.Exit               += this.Application_Exit;
            this.UnhandledException += this.Application_UnhandledException;

            InitializeComponent();
        }
Exemple #2
0
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            TargetDevice.Initialize <MyGame>();

            Application.Run(new Form1());

            Process.GetCurrentProcess().Kill();
        }
Exemple #3
0
 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);
         }
     });
 }
Exemple #4
0
        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;
            }
        }
Exemple #5
0
 private void Application_Startup(object sender, StartupEventArgs e)
 {
     this.RootVisual = new MainPage();
     TargetDevice.Initialize <MyGame>();
 }