Exemplo n.º 1
0
 private void userDoubleClicked(AllPlayersTabPlayerVM playerVM)
 {
     if (playerVM != null)
     {
         UserDoubleClickedEvent?.Invoke(this, new UserDoubleClickedEventArgs(playerVM.AssociatedPlayer));
     }
 }
Exemplo n.º 2
0
        /// <summary>
        /// again, descriptive name
        /// Ensures that AllPlayers variable contains the same number of players as parser.Players does
        /// </summary>
        private void ensureParserState()
        {
            //Add missing players to AllPlayers
            foreach (var curItem in parser.Players)
            {
                if (!AllPlayers.Select(p => p.AssociatedPlayer).Contains(curItem))
                {
                    if (DamageParser.IsBlacklistedUsername(curItem.Name))
                    {
                        continue;
                    }
                    AllPlayers.Add(new AllPlayersTabPlayerVM(parent, curItem));
                }
            }

            if (parent.IsZanverseSplit)
            {
                if (zanversePlayerVM == null && parser.ZanversePlayer != null) //can be null if zanverse is hidden
                {
                    zanversePlayerVM = new AllPlayersTabPlayerVM(parent, parser.ZanversePlayer);
                    AllPlayers.Add(zanversePlayerVM);
                }
            }
            else if (zanversePlayerVM != null)
            {
                if (AllPlayers.Contains(zanversePlayerVM))
                {
                    AllPlayers.Remove(zanversePlayerVM);
                }
                zanversePlayerVM = null;
            }
        }
Exemplo n.º 3
0
 public void ClearPlayers()
 {
     AllPlayers.Clear();
     zanversePlayerVM = null; //whoops : v)
 }