Exemple #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);
        }
Exemple #2
0
 public static DeepCore.Properties ToProperteis(ExpandoObject prop)
 {
     DeepCore.Properties ret = new DeepCore.Properties();
     foreach (var e in prop)
     {
         ret.Add(e.Key, e.Value + "");
     }
     return(ret);
 }
Exemple #3
0
        public static ExpandoObject FromProperteis(DeepCore.Properties prop)
        {
            ExpandoObject ret = new ExpandoObject();

            foreach (var e in prop)
            {
                ((IDictionary <string, object>)ret).Add(e.Key, e.Value);
            }
            return(ret);
        }