Beispiel #1
0
        /// <summary>
        /// Updates the content.
        /// </summary>
        private void UpdateContent()
        {
            int topDamageDone = m_killLog.Attackers.Max(y => y.DamageDone);
            SerializableKillLogAttackersListItem finalBlowAttacker = m_killLog.Attackers.Single(x => x.FinalBlow);
            SerializableKillLogAttackersListItem topDamageAttacker = m_killLog.Attackers.Single(x => x.DamageDone == topDamageDone);

            FinalBlowAttacker.KillLog  = m_killLog;
            FinalBlowAttacker.Attacker = finalBlowAttacker;
            TopDamageAttacker.KillLog  = m_killLog;
            TopDamageAttacker.Attacker = topDamageAttacker;

            InvolvedPartiesLabel.Text = string.Format(CultureConstants.DefaultCulture, InvolvedPartiesLabel.Text,
                                                      m_killLog.Attackers.Count());
            TotalDamageTakenLabel.Text = string.Format(CultureConstants.DefaultCulture, TotalDamageTakenLabel.Text,
                                                       m_killLog.Victim.DamageTaken);

            // Add the rest of the gang
            IList <SerializableKillLogAttackersListItem> remainingAttackers = m_killLog.Attackers
                                                                              .Except(new[] { finalBlowAttacker, topDamageAttacker }).ToList();

            if (remainingAttackers.Any())
            {
                InvolvedPartiesPanel.BorderStyle = BorderStyle.Fixed3D;
            }

            foreach (SerializableKillLogAttackersListItem attacker in remainingAttackers.OrderBy(x => x.DamageDone))
            {
                KillReportAttacker attackerControl = new KillReportAttacker();
                InvolvedPartiesPanel.Controls.Add(attackerControl);
                attackerControl.Dock     = DockStyle.Top;
                attackerControl.KillLog  = m_killLog;
                attackerControl.Attacker = attacker;
            }
        }
        /// <summary>
        /// Updates the content.
        /// </summary>
        private void UpdateContent()
        {
            int topDamageDone = m_killLog.Attackers.Max(y => y.DamageDone);
            SerializableKillLogAttackersListItem finalBlowAttacker = m_killLog.Attackers.Single(x => x.FinalBlow);
            SerializableKillLogAttackersListItem topDamageAttacker = m_killLog.Attackers.Single(x => x.DamageDone == topDamageDone);

            FinalBlowAttacker.KillLog = m_killLog;
            FinalBlowAttacker.Attacker = finalBlowAttacker;
            TopDamageAttacker.KillLog = m_killLog;
            TopDamageAttacker.Attacker = topDamageAttacker;

            InvolvedPartiesLabel.Text = String.Format(CultureConstants.DefaultCulture, InvolvedPartiesLabel.Text,
                                                      m_killLog.Attackers.Count());
            TotalDamageTakenLabel.Text = String.Format(CultureConstants.DefaultCulture, TotalDamageTakenLabel.Text,
                                                       m_killLog.Victim.DamageTaken);

            // Add the rest of the gang
            IList<SerializableKillLogAttackersListItem> remainingAttackers = m_killLog.Attackers
                .Except(new[] { finalBlowAttacker, topDamageAttacker }).ToList();

            if (remainingAttackers.Any())
                InvolvedPartiesPanel.BorderStyle = BorderStyle.Fixed3D;

            foreach (SerializableKillLogAttackersListItem attacker in remainingAttackers.OrderBy(x => x.DamageDone))
            {
                KillReportAttacker attackerControl = new KillReportAttacker();
                InvolvedPartiesPanel.Controls.Add(attackerControl);
                attackerControl.Dock = DockStyle.Top;
                attackerControl.KillLog = m_killLog;
                attackerControl.Attacker = attacker;
            }
        }