private void btnNewPlayer_Click(object sender, EventArgs e) { playerForm = new PlayerForm(); playerForm.excelManager = excelManager; playerForm.manager = Manager; playerForm.Show(); }
public MainForm() { Manager = new PlayerManager(); InitializeComponent(); Manager.LoadPlayers(); RefreshRanking(); excelManager = new ExcelManager(); playerForm = new PlayerForm(); playerForm.excelManager = excelManager; host = new Host(); host.excelManager = excelManager; }
private void btnLoadPlayer_Click(object sender, EventArgs e) { Player player = Manager.FindPlayer(tbPlayer.Text); if (player != null) { playerForm = new PlayerForm(); playerForm.excelManager = excelManager; playerForm.manager = Manager; playerForm.LoadPlayer(player); playerForm.Show(); } else { MessageBox.Show("can't find player"); } }