private void StartMonoGameWindow_Click(object sender, RoutedEventArgs e) { new Thread(() => { Win = new Example(); Console.WriteLine("Creating window {0}", Win.Window.Handle); Win.Run(); Win.Dispose(); }).Start(); }
private void Button_Click(object sender, RoutedEventArgs e) { using (var win = new Example()) win.Run(); }
static void Main() { using (var game = new Example()) game.Run(); }
static void Main() { using (var win = new Example()) win.Run(); }