public static void Main(string[] args) { Console.Title = "ITOS EMULATOR [Verison 4.0]"; Console.BackgroundColor = ConsoleColor.Black; Console.ForegroundColor = ConsoleColor.White; Console.Clear(); Console.Clear(); Window Hello = new HelloWorldWindow(); Hello.Execute(); Render.Color(ConsoleColor.Black, ConsoleColor.Yellow); Console.Clear(); Render.CenterText("ITOS has shut down. Press a key to turn off your computer.", Console.WindowHeight / 2, ConsoleColor.Black, ConsoleColor.DarkYellow); Render.Pause(); }
private void Button_OnClick(object sender, RoutedEventArgs e) { if (rb == null) { MessageBox.Show("请先选择一个例子", "提示", MessageBoxButton.OK, MessageBoxImage.Information); return; } string content = rb.Content.ToString(); Window w = null; switch (content) { case "HelloWorld": w = new HelloWorldWindow(); break; } if (w == null) { return; } w.Owner = this; w.ShowDialog(); }