예제 #1
0
 private void OnSendObjectExecute(object obj)
 {
     //MyMessages.Add(new MyMessage { Name = AgeText.ToString(), Message = MollyText });
     _signalRHubSync.SendHelloObject(new MyMessage {
         Name = AgeText.ToString(), Message = MollyText
     });
     MollyText = "";
     AgeText   = 0;
 }
예제 #2
0
        public static string Age(List <string> strings)
        {
            if (CampaignCheats.CheckParameters(strings, 0) || CampaignCheats.CheckHelp(strings))
            {
                return($"{FormatMsgHeader.ToString()} \"dcc.age [{AgeText.ToString()}]\".");
            }
            int num = 1;

            if (!int.TryParse(strings[0], out num))
            {
                return(EnterAgeMsg.ToString());
            }
            Hero.MainHero.BirthDay = HeroHelper.GetRandomBirthDayForAge((float)num);
            return(SuccessMsg.ToString());
        }
예제 #3
0
        public static string AgeHero(List <string> strings)
        {
            if (!CampaignCheats.CheckParameters(strings, 2) || CampaignCheats.CheckHelp(strings))
            {
                return($"{FormatMsgHeader.ToString()} \"dcc.age_hero [{HeroNameText.ToString()}] [{AgeText.ToString()}]\".");
            }
            Hero hero = CampaignCheats.GetHero(strings[0].Replace('_', ' '));

            if (hero == null)
            {
                return(HeroNotFoundMsg.ToString());
            }
            if (!int.TryParse(strings[1], out int num))
            {
                return(EnterAgeMsg.ToString());
            }
            hero.BirthDay = HeroHelper.GetRandomBirthDayForAge(num);
            return(SuccessMsg.ToString());
        }