public void TestXNAGameWpfWindow() { var w = new XNAGameWpf(); var win = w.CreateWindow(); Application.Current.Dispatcher.Invoke(new Action(win.Show)); while (true) { } }
public XNAGame() { #if NCRUNCH AutoShutdown = 1; DefaultInputDisabled = true; #endif lastInstance = this; graphics = new GraphicsDeviceManager(this); graphics.PreparingDeviceSettings += new EventHandler <PreparingDeviceSettingsEventArgs>(graphics_PreparingDeviceSettings); Content.RootDirectory = Application.StartupPath + "\\"; //Content.RootDirectory = "Content"; rootDirectory = System.Windows.Forms.Application.StartupPath + "\\"; keyboard = new TWKeyboard(); mouse = new TWMouse(this); engineFiles = new XNAGameFiles(); engineFiles.LoadDefaults(rootDirectory); spectaterCamera = new SpectaterCamera(this); SetCamera(spectaterCamera); guiService = new GuiServiceXNA(this); averageFPSCalculater = new AverageFPSCalculater(); //cursor = new Cursor( this, EngineFiles.DefaultCursor, new Vector2( 10, 10 ) ); AllowF3InputToggle = true; InputDisabled = DefaultInputDisabled; Wpf = new XNAGameWpf(); AddXNAObject(Wpf); }