Ejemplo n.º 1
0
        public DetailedAttackInfoVM(GraphPlayerTabVM parentVM, PSO2Player.AttackInfo attackInfo)
        {
            this.parent     = parentVM;
            this.attackInfo = attackInfo;

            Update();
        }
Ejemplo n.º 2
0
 private void resetAllTabs()
 {
     lock (tabManipulationLock)
     {
         AllTabs.Clear();
         allPlayersTab.ClearPlayers();
         playerTabDict.Clear();
         AllTabs.Add(allPlayersTab);
         selfPlayerTab = null;
     }
     SelectedTab = allPlayersTab;
 }
Ejemplo n.º 3
0
        private void synchronizeTabState()
        {
            lock (tabManipulationLock)
            {
                if (selfPlayerTab == null && CurrentDamageParser.SelfPlayer != null)
                {
                    selfPlayerTab = new GraphPlayerTabVM(this, DetailedDamageVisibleSettings, CurrentDamageParser.SelfPlayer);
                    AllTabs.Insert(1, selfPlayerTab);
                    playerTabDict.Add(CurrentDamageParser.SelfPlayer, selfPlayerTab);
                    selfPlayerTab.SetEnabledLineSeries(LineSeriesSettings.GetEnumValue());

                    if (OpenGraphForSelfAutomatically)
                    {
                        SelectedTab = selfPlayerTab;
                    }
                }

                foreach (var player in CurrentDamageParser.Players) //add
                {
                    if (DamageParser.IsBlacklistedUsername(player.Name))
                    {
                        continue;                                                  //skip blacklisted
                    }
                    if (!playerTabDict.ContainsKey(player))
                    {
                        var newTab = new GraphPlayerTabVM(this, DetailedDamageVisibleSettings, player);
                        AllTabs.Add(newTab);
                        playerTabDict.Add(player, newTab);
                        newTab.SetEnabledLineSeries(LineSeriesSettings.GetEnumValue());
                    }
                }

                List <GraphPlayerTabVM> toRemove = new List <GraphPlayerTabVM>(); //remove
                foreach (var tab in AllTabs.Where(t => t is GraphPlayerTabVM).Cast <GraphPlayerTabVM>())
                {
                    if (!CurrentDamageParser.DoesPlayerIdExist(tab.Player.ID))
                    {
                        toRemove.Add(tab);
                    }
                }
                foreach (var rem in toRemove)
                {
                    AllTabs.Remove(rem);
                    playerTabDict.Remove(rem.Player);
                }
            }
        }