Esempio n. 1
0
        private void EditQuestion_Click(object sender, RoutedEventArgs e)
        {
            string[]     q         = (((TextBlock)((StackPanel)((Button)sender).Parent).Children[0]).Text).Split('.');
            questionView questionV = new questionView(db, Convert.ToInt32(q[0]), false);

            questionV.ShowDialog();
            LoadQuestions();
        }
Esempio n. 2
0
 private void listbox_MouseDoubleClick(object sender, RoutedEventArgs e)
 {
     if (((StackPanel)((ListBox)sender).SelectedItem) != null)
     {
         if (((StackPanel)((ListBox)sender).SelectedItem).Name != "addQuestion")
         {
             string[]     q         = (((TextBlock)((StackPanel)((ListBox)sender).SelectedItem).Children[0]).Text).Split('.');
             questionView questionV = new questionView(db, Convert.ToInt32(q[0]), true);
             questionV.ShowDialog();
         }
         else
         {
             db.AddQuestion();
         }
         LoadQuestions();
     }
 }
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.window = ((NePishiteSetiNa100ballov.questionView)(target));

            #line 8 "..\..\questionView.xaml"
                this.window.Closing += new System.ComponentModel.CancelEventHandler(this.window_Closing);

            #line default
            #line hidden
                return;

            case 2:
                this.label1_Copy = ((System.Windows.Controls.Label)(target));
                return;

            case 3:
                this.questionTextBox = ((System.Windows.Controls.TextBox)(target));
                return;

            case 4:
                this.label = ((System.Windows.Controls.Label)(target));
                return;

            case 5:
                this.label1 = ((System.Windows.Controls.Label)(target));
                return;

            case 6:
                this.questionType = ((System.Windows.Controls.ComboBox)(target));

            #line 16 "..\..\questionView.xaml"
                this.questionType.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(this.questionType_SelectionChanged);

            #line default
            #line hidden
                return;

            case 7:
                this.listBox = ((System.Windows.Controls.ListBox)(target));
                return;

            case 8:
                this.template = ((System.Windows.Controls.StackPanel)(target));
                return;

            case 9:
                this.answer = ((System.Windows.Controls.TextBox)(target));
                return;

            case 10:
                this.right_answer = ((System.Windows.Controls.CheckBox)(target));
                return;

            case 11:
                this.right_text = ((System.Windows.Controls.TextBox)(target));

            #line 25 "..\..\questionView.xaml"
                this.right_text.TextChanged += new System.Windows.Controls.TextChangedEventHandler(this.right_text_TextChanged);

            #line default
            #line hidden
                return;

            case 12:
                this.delete_button = ((System.Windows.Controls.Button)(target));

            #line 26 "..\..\questionView.xaml"
                this.delete_button.Click += new System.Windows.RoutedEventHandler(this.delete_button_Click);

            #line default
            #line hidden
                return;

            case 13:
                this.addTemplate = ((System.Windows.Controls.StackPanel)(target));
                return;

            case 14:
                this.AddAnswer = ((System.Windows.Controls.Button)(target));

            #line 31 "..\..\questionView.xaml"
                this.AddAnswer.Click += new System.Windows.RoutedEventHandler(this.AddAnswer_Click);

            #line default
            #line hidden
                return;

            case 15:
                this.dopPanel = ((System.Windows.Controls.StackPanel)(target));
                return;

            case 16:
                this.dopParam = ((System.Windows.Controls.Label)(target));
                return;

            case 17:
                this.dopParamBox = ((System.Windows.Controls.CheckBox)(target));

            #line 38 "..\..\questionView.xaml"
                this.dopParamBox.Checked += new System.Windows.RoutedEventHandler(this.dopParamBox_Check);

            #line default
            #line hidden

            #line 38 "..\..\questionView.xaml"
                this.dopParamBox.Unchecked += new System.Windows.RoutedEventHandler(this.dopParamBox_Check);

            #line default
            #line hidden
                return;

            case 18:
                this.label2 = ((System.Windows.Controls.Label)(target));
                return;

            case 19:
                this.removeBut = ((System.Windows.Controls.Button)(target));

            #line 41 "..\..\questionView.xaml"
                this.removeBut.Click += new System.Windows.RoutedEventHandler(this.removeBut_Click);

            #line default
            #line hidden
                return;

            case 20:
                this.saveBut = ((System.Windows.Controls.Button)(target));

            #line 44 "..\..\questionView.xaml"
                this.saveBut.Click += new System.Windows.RoutedEventHandler(this.saveBut_Click);

            #line default
            #line hidden
                return;
            }
            this._contentLoaded = true;
        }