示例#1
0
        private void Insert_Click(object sender, RoutedEventArgs e)
        {
            if (Pages.Content == deletePage)
            {
                InsertQuestionWindow insertQuestionWindow = new InsertQuestionWindow();
                insertQuestionWindow.ShowDialog();
                deletePage.FillDataGrid(); // reintialize the Grid View
            }
            else if (Pages.Content == selectPage)
            {
                InsertQuestionWindow insertQuestionWindow = new InsertQuestionWindow();
                insertQuestionWindow.ShowDialog();
                selectPage.InitializeComBoxes(); // reintialize the combo boxes
            }
            else if (Pages.Content == newGamePage)
            {
                InsertQuestionWindow insertQuestionWindow = new InsertQuestionWindow();
                insertQuestionWindow.ShowDialog();
            }
            else
            {
                /*  if all condtions returned false this means that
                 *  the user was in the (DeletePage) and Clicked the (StartBtn)
                 *  so the current page will not the same page which was declared in line 16
                 *  Cuz the declaration of the DeletePage of this class is in line 92
                 */

                InsertQuestionWindow insertQuestionWindow = new InsertQuestionWindow();
                insertQuestionWindow.ShowDialog();
            }
        }
示例#2
0
        private void InsertBtn_Click(object sender, RoutedEventArgs e)
        {
            InsertQuestionWindow insertQuestionWindow = new InsertQuestionWindow();

            insertQuestionWindow.ShowDialog(); // open InsertQuestionWindow
        }