示例#1
0
        public override void Reset()
        {
            Name    = "Chat";
            Summary = "";
            Token   = UID.ToString(CultureInfo.InvariantCulture);

            Available = true;

            ProfanityAction = ProfanityAction.None;
            TextColor       = KnownColor.LawnGreen;
            TextHue         = 85;
            UserLimit       = 500;
            SpamDelay       = TimeSpan.FromSeconds(5.0);

            History.Clear();
            Bans.Clear();
        }
 private void ReInit()
 {
     AvailableAllies.Clear();
     AvailableEnemies.Clear();
     PickedAllies.Clear();
     PickedEnemies.Clear();
     Bans.Clear();
     if (_stats == null)
     {
         AvailableMaps = Array.Empty <Map>();
         SelectedMap   = null;
         TheoWinRate   = null;
         return;
     }
     AvailableMaps = new [] { new Map(-1, "") }.Concat(_stats.Maps.Values).ToList();
     foreach (var hero in _stats.Heroes.Values)
     {
         AvailableAllies.Add(new HeroSelectionViewModel(hero));
         AvailableEnemies.Add(new HeroSelectionViewModel(hero));
     }
     Refresh();
 }