private void lstPlayer_SelectedIndexChanged(object sender, EventArgs e) { if (lstPlayer.SelectedIndex != -1) { clsProfile profile = new clsProfile(lstPlayer.SelectedItem.ToString()); profile.LoadProfile(); pictureBox1.Image = profile.Avatar.Avatar; } }
private void frmManageProfile_Load(object sender, EventArgs e) { clsProfile profile = new clsProfile(strPlayerName); profile.LoadProfile(); picAvatar.Image = profile.Avatar.Avatar; lblPlayerName.Text = profile.PlayerName; lblTotalGames.Text = profile.TotalGames.ToString(); lblTotalWin.Text = profile.TotalWin.ToString(); lblTotalLose.Text = profile.TotalLose.ToString(); lblTotalDraw.Text = profile.TotalDraw.ToString(); lblRating.Text = profile.Rating.ToString(); }
public void LoadProfile(string ProfileName) { clsProfile profile = new clsProfile(ProfileName); profile.LoadProfile(); this._profile = profile; clsImage Avatar = profile.Avatar; picAvatar.Image = Avatar.Avatar; lblPlayerName.Text = profile.PlayerName; lblTotalWin.Text = profile.TotalWin.ToString(); lblTotalDraw.Text = profile.TotalDraw.ToString(); lblTotalLose.Text = profile.TotalLose.ToString(); lblRating.Text = profile.Rating.ToString(); }