Example #1
0
 static void Main(string[] args)
 {
     Emulator emul8 = new Emulator();
     MainForm form = new MainForm(emul8);
     form.Show();
     Main game = new Main(form,emul8);
     game.Run();
 }
Example #2
0
        public Main(MainForm form, Emulator emul8)
        {
            graphics = new GraphicsDeviceManager(this);
            this.IsFixedTimeStep = true;
            Content.RootDirectory = "Content";

            mainForm = form;
            regForm = form.regs;
            code = form.code;
            this.drawSurface = form.getDrawSurface();

            graphics.PreparingDeviceSettings +=
            new EventHandler<PreparingDeviceSettingsEventArgs>(graphics_PreparingDeviceSettings);
            System.Windows.Forms.Control.FromHandle((this.Window.Handle)).VisibleChanged +=
            new EventHandler(Game1_VisibleChanged);

            this.emul8 = emul8;
        }