コード例 #1
0
        void StartLoatWindow()
        {
            account.Content = GlobalParams.MyAccount;
            UserQuestionEntry userQuestionEntry = new UserQuestionEntry();

            questionEntry.Content = userQuestionEntry;
            UserQuestionAdmin userQuestionAdmin = new UserQuestionAdmin();

            questionAdmin.Content = userQuestionAdmin;

            UserCreateExam userCreateExam = new UserCreateExam();

            questionExam.Content = userCreateExam;
            UserAlterPassword userAlterPassword = new UserAlterPassword();

            questionAlter.Content = userAlterPassword;
        }
コード例 #2
0
        //判断选择的TabControl
        private void TabControl_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            switch (this.tabControl.SelectedIndex)
            {
            case 0:
            {
                if (GlobalParams.TypeRefresh)
                {
                    SelectSubject();
                    GlobalParams.TypeRefresh = false;
                }
                if (GlobalParams.DataRefresh)
                {
                    UserQuestionAdmin userQuestionAdmin = new UserQuestionAdmin();
                    questionAdmin.Content    = userQuestionAdmin;
                    GlobalParams.DataRefresh = false;
                }
                showShare.Visibility = Visibility.Visible;
                //Refresh.Visibility = Visibility.Visible;
                labNtype.Visibility = Visibility.Visible;
                Ntype.Visibility    = Visibility.Visible;
                break;
            }

            case 1:
            {
                showShare.Visibility = Visibility.Collapsed;
                //Refresh.Visibility = Visibility.Collapsed;
                labNtype.Visibility = Visibility.Collapsed;
                Ntype.Visibility    = Visibility.Collapsed;
                if (StartClick1 == 0)
                {
                    UserQuestionEntry userQuestionEntry = new UserQuestionEntry();
                    questionEntry.Content = userQuestionEntry;
                }
                StartClick1++;
                break;
            }

            case 2:
            {
                showShare.Visibility = Visibility.Collapsed;
                //Refresh.Visibility = Visibility.Collapsed;
                labNtype.Visibility = Visibility.Collapsed;
                Ntype.Visibility    = Visibility.Collapsed;
                if (StartClick2 == 0)
                {
                    UserCreateExam userCreateExam = new UserCreateExam();
                    questionExam.Content = userCreateExam;
                }
                StartClick2++;
                break;
            }

            case 3:
            {
                showShare.Visibility = Visibility.Collapsed;
                //Refresh.Visibility = Visibility.Collapsed;
                labNtype.Visibility = Visibility.Collapsed;
                Ntype.Visibility    = Visibility.Collapsed;
                break;
            }

            //case 4:
            //    {
            //        labNtype.Visibility = Visibility.Collapsed;
            //        Ntype.Visibility = Visibility.Collapsed;
            //        break;
            //    }
            //case 5:
            //    {
            //        labNtype.Visibility = Visibility.Collapsed;
            //        Ntype.Visibility = Visibility.Collapsed;
            //        break;
            //    }
            default:
                break;
            }
        }