private void toolStripButtonRating_Click(object sender, EventArgs e) { if (dataGridView1.RowCount <= 0 || dataGridView1.SelectedRows == null || dataGridView1.SelectedRows.Count == 0) { return; } if (dataGridView1.SelectedRows.Count > 0) { if (!Ap.CurrentUser.IsGuest) { int i = dataGridView1.CurrentRow.Index; if (dataGridView1["Rank", i].Value.ToString() != "Guest") { RatedGameResult frm = new RatedGameResult(); frm.UserID = SelectedUserId; frm.UserName = SelectedUserName; frm.ShowDialog(); } else { MessageForm.Show(this.ParentForm, MsgE.ErrorViewGuestRating); } } else { MessageForm.Show(this.ParentForm, MsgE.ErrorViewUserRating); } } }
private void ratingToolStripMenuItem_Click(object sender, EventArgs e) { RatedGameResult RatedGameResult = new RatedGameResult(); RatedGameResult.ShowInTaskbar = false; RatedGameResult.UserID = Ap.CurrentUserID; RatedGameResult.UserName = Ap.CurrentUser.UserName; RatedGameResult.ShowDialog(); }
private void btnRating_Click(object sender, EventArgs e) { //this.DialogResult = DialogResult.OK; //this.Close(); if (!Ap.CurrentUser.IsGuest) { RatedGameResult frm2 = new RatedGameResult(); frm2.UserID = Convert.ToInt32(this.userID); frm2.UserName = txtUser.Text; frm2.ShowDialog(); } }