private void btnViewLeaderBoard_Click(object sender, EventArgs e)
        {
            Form LeaderBoardForm;

            if (isParent)
            {
                LeaderBoardForm = new LeaderBoardForm(connection, exerciseTopic, "All", currentUser);
            }
            else
            {
                LeaderBoardForm = new LeaderBoardForm(connection, exerciseTopic, "All");
            }
            LeaderBoardForm.Show();
        }
コード例 #2
0
        private void btnViewLeaderboard_Click(object sender, EventArgs e)
        {
            int index = cbxTopicList.SelectedItem.ToString().IndexOf('-');

            topic = cbxTopicList.SelectedItem.ToString().Substring(0, index).Trim();
            try
            {
                if (userType == "Parent")
                {
                    Form LeaderBoardForm = new LeaderBoardForm(connection, topic, "All", user);
                    LeaderBoardForm.Show();
                }
                else
                {
                    Form LeaderBoardForm = new LeaderBoardForm(connection, topic, "All");
                    LeaderBoardForm.Show();
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString());
            }
        }