void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.title = ((PLWPF.title)(target));
                return;

            case 2:
                this.details = ((System.Windows.Controls.Grid)(target));
                return;

            case 3:
                this.testers = ((System.Windows.Controls.TabItem)(target));
                return;

            case 4:
                this.ViewTests_uc = ((PLWPF.ViewTests)(target));
                return;

            case 5:
                this.UpdateTester_uc = ((PLWPF.UpdateTester)(target));
                return;

            case 6:
                this.finishTest_uc = ((PLWPF.finishTest)(target));
                return;
            }
            this._contentLoaded = true;
        }
        //UPDATE DETAILS
        private void ButtonUpdateTester_Click(object sender, RoutedEventArgs e)
        {
            this.Close();
            UpdateTester upTester = new UpdateTester();

            upTester.receiveTester(currentTester);
            upTester.Show();
        }
Exemple #3
0
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                //This is special to the password box, because it not depency property
                //And I dont have to worry about htis because password we just do one time.
                tester._password = passwordBox.Password;

                bl.addTester(tester);

                //The continue if there isnt excemption
                this.Close();

                UpdateTester upTester = new UpdateTester();
                upTester.receiveTester(tester);
                upTester.Show();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
        /// <summary>
        /// This function updates a tester when we press on the button "Update Tester"
        /// This is a sighnup function for a click event
        /// </summary>
        /// <param name="sender">Who is sensing the event</param>
        /// <param name="e">Details of the event occurred</param>
        private void TesterUpdateButton_Click(object sender, RoutedEventArgs e)
        {
            UpdateTester UpdateTesterWind = new UpdateTester();

            UpdateTesterWind.ShowDialog();
        }
        private void Update_button2_Click(object sender, RoutedEventArgs e)
        {
            var window = new UpdateTester();

            window.ShowDialog();
        }
Exemple #6
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.title = ((PLWPF.title)(target));
                return;

            case 2:
                this.details = ((System.Windows.Controls.Grid)(target));
                return;

            case 3:
                this.tabControl = ((System.Windows.Controls.TabControl)(target));

            #line 18 "..\..\AdminMainWindow.xaml"
                this.tabControl.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(this.TabControl_SelectionChanged);

            #line default
            #line hidden
                return;

            case 4:
                this.Home = ((System.Windows.Controls.TabItem)(target));

            #line 44 "..\..\AdminMainWindow.xaml"
                this.Home.GotFocus += new System.Windows.RoutedEventHandler(this.Home_GotFocus);

            #line default
            #line hidden
                return;

            case 5:
                this.img = ((System.Windows.Controls.Image)(target));
                return;

            case 6:
                this.Add = ((System.Windows.Controls.TabItem)(target));

            #line 65 "..\..\AdminMainWindow.xaml"
                this.Add.GotFocus += new System.Windows.RoutedEventHandler(this.Add_GotFocus);

            #line default
            #line hidden
                return;

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

            case 8:
                this.AddTest_uc = ((PLWPF.AddTest)(target));
                return;

            case 9:
                this.AddAutoTest_uc = ((PLWPF.AddAutoTest)(target));
                return;

            case 10:
                this.AddUser_uc = ((PLWPF.AddUser)(target));
                return;

            case 11:
                this.AddLessonToTrainee_uc = ((PLWPF.AddLessonToTrainee)(target));
                return;

            case 12:
                this.delete = ((System.Windows.Controls.TabItem)(target));

            #line 96 "..\..\AdminMainWindow.xaml"
                this.delete.GotFocus += new System.Windows.RoutedEventHandler(this.Delete_GotFocus);

            #line default
            #line hidden
                return;

            case 13:
                this.deleteTrainee_uc = ((PLWPF.DeleteTrainee)(target));
                return;

            case 14:
                this.deleteTester_uc = ((PLWPF.DeleteTester)(target));
                return;

            case 15:
                this.deleteTest_uc = ((PLWPF.DeleteTest)(target));
                return;

            case 16:
                this.update = ((System.Windows.Controls.TabItem)(target));

            #line 118 "..\..\AdminMainWindow.xaml"
                this.update.GotFocus += new System.Windows.RoutedEventHandler(this.Update_GotFocus);

            #line default
            #line hidden
                return;

            case 17:
                this.updateTrainee_uc = ((PLWPF.UpdateTrainee)(target));
                return;

            case 18:
                this.UpdateTester_uc = ((PLWPF.UpdateTester)(target));
                return;

            case 19:
                this.finishTest_uc = ((PLWPF.finishTest)(target));
                return;

            case 20:
                this.view = ((System.Windows.Controls.TabItem)(target));

            #line 140 "..\..\AdminMainWindow.xaml"
                this.view.GotFocus += new System.Windows.RoutedEventHandler(this.View_GotFocus);

            #line default
            #line hidden
                return;

            case 21:
                this.viewTraineeUserconrol = ((PLWPF.ViewTrainees)(target));
                return;

            case 22:
                this.viewTestersUsercontrol = ((PLWPF.ViewTesters)(target));
                return;

            case 23:
                this.ViewTest = ((PLWPF.ViewTests)(target));
                return;

            case 24:
                this.loginAs = ((System.Windows.Controls.TabItem)(target));

            #line 162 "..\..\AdminMainWindow.xaml"
                this.loginAs.GotFocus += new System.Windows.RoutedEventHandler(this.LoginAs_GotFocus);

            #line default
            #line hidden
                return;

            case 25:
                this.loginas = ((PLWPF.LoginAs)(target));
                return;

            case 26:
                this.statisticalTab = ((System.Windows.Controls.TabItem)(target));

            #line 172 "..\..\AdminMainWindow.xaml"
                this.statisticalTab.GotFocus += new System.Windows.RoutedEventHandler(this.StatisticalTab_GotFocus);

            #line default
            #line hidden
                return;

            case 27:
                this.statisticalInformation = ((PLWPF.StatisticalInformation)(target));
                return;

            case 28:
                this.game = ((System.Windows.Controls.TabItem)(target));

            #line 182 "..\..\AdminMainWindow.xaml"
                this.game.GotFocus += new System.Windows.RoutedEventHandler(this.Game_GotFocus);

            #line default
            #line hidden
                return;

            case 29:

            #line 190 "..\..\AdminMainWindow.xaml"
                ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.StartGameClick);

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