Пример #1
0
        }//end if

        private void bunifuFlatButton1_Click(object sender, EventArgs e)
        {
            try
            {
                if (bunifuCustomDataGrid1.SelectedRows.Count > 0)
                {
                    SqlDataAdapter adapt = new SqlDataAdapter("select quiz_id from quizzes where quiz_title= '" + QuizName + "'", con);
                    DataTable      dt    = new DataTable();
                    adapt.Fill(dt);
                    int ID = Convert.ToInt32(dt.Rows[0][0].ToString());    //Getting the ID of The Quiz
                    SetValueForText1 = ID.ToString();
                    if (GameType == "Quiz Bee")
                    {
                        EditQuizBEE EQB = new EditQuizBEE();
                        EQB.ShowDialog();
                    }
                    else if (GameType == "Picture Puzzle")
                    {
                        EditPuzzle EP = new EditPuzzle();
                        EP.ShowDialog();
                    }
                }

                else
                {
                    Dialogue.Show("Nothing Selected", "", "Ok", "Cancel");
                }
            }//try


            catch (Exception ex)
            {
                //  Dialogue.Show(" ' " + ex.Message.ToString() + "'", "", "Ok", "Cancel");
            }
        }
Пример #2
0
 private void InitPuzzle(string config)
 {
     this.Puzzle = new EditPuzzle(config);
     this.PaletteComponent.InitPalette(new List <MyColor>(this.Puzzle.Config.TagNums.Keys));
     this.RefreshPuzzle();
 }