52 lines
1.2 KiB
C#
52 lines
1.2 KiB
C#
using LibW4M.Data.Highscores;
|
|
using LibW4M.Data.Stats;
|
|
using LibW4M.Data.Teams;
|
|
using LibW4M.Data.WeaponFactory;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.ComponentModel;
|
|
using System.Data;
|
|
using System.Drawing;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using System.Windows.Forms;
|
|
using W4Gui.Dialogs;
|
|
|
|
namespace W4Gui.Components
|
|
{
|
|
public partial class StatisticsPanel : UserControl
|
|
{
|
|
public StatisticsPanel()
|
|
{
|
|
InitializeComponent();
|
|
}
|
|
|
|
|
|
public void SaveStatsData(ref StatsContainerData stats)
|
|
{
|
|
// Save general
|
|
stats.Values = selStatValues.Values;
|
|
if (stats.IsRenamable) stats.ChangeName(selTeamName.Text);
|
|
}
|
|
|
|
public void LoadStatsData(StatsContainerData stats)
|
|
{
|
|
// Load general
|
|
selStatValues.LoadItems(stats.Values);
|
|
|
|
if (stats.IsRenamable)
|
|
{
|
|
selTeamName.Text = stats.FriendlyName;
|
|
selTeamName.ReadOnly = false;
|
|
}
|
|
else
|
|
{
|
|
selTeamName.Text = "(GLOBAL)";
|
|
selTeamName.ReadOnly = true;
|
|
}
|
|
}
|
|
|
|
}
|
|
}
|