static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); using (MainWindow mainWindow = new MainWindow()) { Application.Run(mainWindow); } }
static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); System.DateTime lastTime; MainWindow mainWindow = new MainWindow(); mainWindow.Show(); lastTime = DateTime.Now; while (mainWindow.Created) { mainWindow.Update((DateTime.Now-lastTime).TotalSeconds); lastTime = DateTime.Now; mainWindow.Render(); Application.DoEvents(); } }