Exemplo n.º 1
0
        private static void core_GameLog(LaunchHandle handle, string line)
        {
            Console.WriteLine(line);
            _tw.WriteLine(line);

            handle.SetTitle("啦啦啦");
        }
Exemplo n.º 2
0
		private static void core_GameLog(LaunchHandle handle, string line)
		{
			Console.WriteLine(line);
			_tw.WriteLine(line);

			handle.SetTitle("啦啦啦");
		}
Exemplo n.º 3
0
        private void OnGameLaunch(LaunchHandle handle)
        {
            if (!string.IsNullOrWhiteSpace(App.Config.WindowTitle))
            {
                handle.SetTitle(App.Config.WindowTitle);
            }

            switch (App.Config.AfterLaunchBehavior)
            {
            case 0:
                Dispatcher.Invoke(() =>
                {
                    Application.Current.MainWindow.Hide();
                });
                break;

            case 1:
                Dispatcher.Invoke(() =>
                {
                    Application.Current.Shutdown();
                });
                break;

            case 2:
                Dispatcher.Invoke(() =>
                {
                    if (string.IsNullOrWhiteSpace(App.Config.UserName))
                    {
                        tb.Text = Excited[rand.Next(Excited.Length)];
                    }
                    else
                    {
                        tb.Text = "Hello " + App.Config.UserName;
                    }

                    LaunchButton.IsEnabled = true;
                    LaunchButton.Content   = "启动";
                    Launching = false;
                });
                break;
            }
        }
Exemplo n.º 4
0
        private void OnGameLaunch(LaunchHandle handle)
        {
            if (!string.IsNullOrWhiteSpace(Config.Args.GameWinTitle))
            {
                handle.SetTitle(Config.Args.GameWinTitle);
            }

            switch (Config.Args.AfterLaunchBehavior)
            {
            case 0:
                Dispatcher.Invoke(() =>
                {
                    Application.Current.MainWindow.Hide();
                });
                break;

            case 1:
                Dispatcher.Invoke(() =>
                {
                    Application.Current.Shutdown();
                });
                break;

            case 2:
                Dispatcher.Invoke(() =>
                {
                    if (string.IsNullOrWhiteSpace(Config.Args.UserName))
                    {
                        _titleBox.Text = KaomojiHelper.GetKaomoji();
                    }
                    else
                    {
                        _titleBox.Text = "Hello " + Config.Args.UserName;
                    }

                    _launchButton.IsEnabled = true;
                    _isLaunching            = false;
                });
                break;
            }
        }