Exemplo n.º 1
0
        public static FormLauncher Start(DeepCore.Properties argp)
        {
            string b_name  = argp.Get("name");
            string b_count = argp.Get("count");

            if (argp.TryGetAsBool("noView", out var noView))
            {
                NoBattleView = noView;
            }
            if (b_name != null && b_count != null)
            {
                BotLauncher.IsAuto           = true;
                BotLauncher.DefaultBotPrefix = b_name;
                BotLauncher.DefaultBotCount  = int.Parse(b_count);
            }
            else
            {
                BotLauncher.IsAuto = false;
            }
            var launcher = new FormLauncher();

            launcher.Shown   += Launcher_Shown;
            launcher.OnStart += Launcher_OnStart;
            return(launcher);
        }
Exemplo n.º 2
0
        private static void Launcher_OnStart(FormLauncher sender, BotConfig config)
        {
            var bot = new FormBotTest(config);

            bot.FormClosed += new FormClosedEventHandler((object sender2, FormClosedEventArgs e2) =>
            {
                sender.Show();
            });
            bot.Show();
        }