コード例 #1
0
ファイル: Program.cs プロジェクト: panhao4812/KMCCC
        private static void core_GameLog(LaunchHandle handle, string line)
        {
            Console.WriteLine(line);
            _tw.WriteLine(line);

            handle.SetTitle("啦啦啦");
        }
コード例 #2
0
ファイル: Program.cs プロジェクト: CodingEric/KMCCC
		private static void core_GameLog(LaunchHandle handle, string line)
		{
			Console.WriteLine(line);
			_tw.WriteLine(line);

			handle.SetTitle("啦啦啦");
		}
コード例 #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;
            }
        }
コード例 #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;
            }
        }