Esempio n. 1
0
        private void TeacherWelcomeForm_Load(object sender, EventArgs e)
        {
            ViewHelper.MdiChildrenAutoSize(this);
            this.Dock = DockStyle.Fill;
            cboMajorsInit();
            lblName.Text = UserHelper.user.name;
            switch (UserHelper.currentMajorId)
            {
            case 1: upDownSplitContainer.Panel1.BackgroundImage = VirtualTrain.Properties.Resources.车教;
                break;

            case 2: upDownSplitContainer.Panel1.BackgroundImage = VirtualTrain.Properties.Resources.电教;
                break;

            case 3: upDownSplitContainer.Panel1.BackgroundImage = VirtualTrain.Properties.Resources.工教;
                break;

            case 4: upDownSplitContainer.Panel1.BackgroundImage = VirtualTrain.Properties.Resources.调教;
                break;

            case 5: upDownSplitContainer.Panel1.BackgroundImage = VirtualTrain.Properties.Resources.供教;
                break;

            default:
                break;
            }
        }
Esempio n. 2
0
        private void StudentWelcomeForm_Load(object sender, EventArgs e)
        {
            ViewHelper.MdiChildrenAutoSize(this);
            this.Dock = DockStyle.Fill;
            cboMajorsInit();
            lblName.Text = UserHelper.user.name;
            //switch (UserHelper.currentMajorId)
            //{
            //    case 1: upDownSplitContainer.Panel1.BackgroundImage = VirtualTrain.Properties.Resources.车学;
            //        break;
            //    case 2: upDownSplitContainer.Panel1.BackgroundImage = VirtualTrain.Properties.Resources.电学;
            //        break;
            //    case 3: upDownSplitContainer.Panel1.BackgroundImage = VirtualTrain.Properties.Resources.工学;
            //        break;
            //    case 4: upDownSplitContainer.Panel1.BackgroundImage = VirtualTrain.Properties.Resources.调学;
            //        break;
            //    case 5: upDownSplitContainer.Panel1.BackgroundImage = VirtualTrain.Properties.Resources.供学;
            //        break;
            //    default:
            //        break;
            //}

            //解决窗体闪烁
            this.SetStyle(ControlStyles.UserPaint | ControlStyles.AllPaintingInWmPaint | ControlStyles.OptimizedDoubleBuffer | ControlStyles.ResizeRedraw | ControlStyles.AllPaintingInWmPaint, true);
        }
Esempio n. 3
0
        private void TeacherFunctionForm_Load(object sender, EventArgs e)
        {
            ViewHelper.MdiChildrenAutoSize(this);
            this.Dock = DockStyle.Fill;
            CommonPanel.Show();
            autoSetQuestionPanel.Hide();
            setQuestionConfirmPanel.Hide();
            setQuestionPanel.Hide();
            paperInfoPanel.Hide();
            scoreInfoPanel.Hide();
            //给tlpMark中的button的tag赋值,必须在 ViewHelper.MdiChildrenAutoSize(this)之后
            btnSelect1.Tag      = "1,1";
            btnSelect2.Tag      = "1,2";
            btnSelect3.Tag      = "1,3";
            btnSelect4.Tag      = "1,4";
            btnSelect5.Tag      = "1,5";
            btnBlank1.Tag       = "2,1";
            btnBlank2.Tag       = "2,2";
            btnBlank3.Tag       = "2,3";
            btnBlank4.Tag       = "2,4";
            btnBlank5.Tag       = "2,5";
            btnJudge1.Tag       = "4,1";
            btnJudge2.Tag       = "4,2";
            btnJudge3.Tag       = "4,3";
            btnJudge4.Tag       = "4,4";
            btnJudge5.Tag       = "4,5";
            btnShortAnswer1.Tag = "3,3";
            btnShortAnswer2.Tag = "3,5";
            btnShortAnswer3.Tag = "3,7";
            btnShortAnswer4.Tag = "3,10";
            btnShortAnswer5.Tag = "3,15";
            //给自动出题题目个数选择框的tag赋值,必须在 ViewHelper.MdiChildrenAutoSize(this)之后
            nudSelectNum.Tag      = "1";
            nudBlankNum.Tag       = "2";
            nudJudgeNum.Tag       = "4";
            nudShortAnswerNum.Tag = "3";
            nudSelectMark.Tag     = nudBlankMark.Tag = nudJudgeMark.Tag = nudShortAnswerMark.Tag = null;
            //按下NumericUpDown控件的上或下箭头2s后,数值变化将以10为单位
            NumericUpDownAcceleration acceleration = new NumericUpDownAcceleration(2, 10);

            nudMark.Accelerations.Add(acceleration);
            nudSelectNum.Accelerations.Add(acceleration);
            nudSelectMark.Accelerations.Add(acceleration);
            nudBlankNum.Accelerations.Add(acceleration);
            nudBlankMark.Accelerations.Add(acceleration);
            nudJudgeNum.Accelerations.Add(acceleration);
            nudJudgeMark.Accelerations.Add(acceleration);
            nudShortAnswerNum.Accelerations.Add(acceleration);
            nudShortAnswerMark.Accelerations.Add(acceleration);
            //创建一个试卷名称对话框的实例
            pNameDialog       = new PaperNameDialog();
            pNameDialog.Owner = this;
            ////创建一个评分对话框的实例
            //dialog = new PaperDialog();
            //dialog.Owner = this;
        }
Esempio n. 4
0
 private void StudentFunctionForm_Load(object sender, EventArgs e)
 {
     ViewHelper.MdiChildrenAutoSize(this);
     this.Dock = DockStyle.Fill;
     CommonPanel.Show();
     paperPanel.Hide();
     ScorePanel.Hide();
     ////创建一个答题对话框的实例
     //dialog = new AnswerDialog();
     //dialog.Owner = this;
 }
Esempio n. 5
0
 private void QuestionInfoForm_Load(object sender, EventArgs e)
 {
     ViewHelper.MdiChildrenAutoSize(this);
     this.Dock = DockStyle.Fill;
     //创建一个题目信息对话框的实例
     dialog       = new QuestionDialog();
     dialog.Owner = this;
     ////创建一个批量导入题目对话框的实例
     //batchDialog = new BatchDialog();
     //batchDialog.Owner = this;
     showAllQuestions();
 }
Esempio n. 6
0
 private void StudentWelcomeForm_Load(object sender, EventArgs e)
 {
     ViewHelper.MdiChildrenAutoSize(this);
     this.Dock = DockStyle.Fill;
     cboMajorsInit();
     lblName.Text = UserHelper.user.name;
     //switch (UserHelper.currentMajorId)
     //{
     //    case 1: upDownSplitContainer.Panel1.BackgroundImage = VirtualTrain.Properties.Resources.车学;
     //        break;
     //    case 2: upDownSplitContainer.Panel1.BackgroundImage = VirtualTrain.Properties.Resources.电学;
     //        break;
     //    case 3: upDownSplitContainer.Panel1.BackgroundImage = VirtualTrain.Properties.Resources.工学;
     //        break;
     //    case 4: upDownSplitContainer.Panel1.BackgroundImage = VirtualTrain.Properties.Resources.调学;
     //        break;
     //    case 5: upDownSplitContainer.Panel1.BackgroundImage = VirtualTrain.Properties.Resources.供学;
     //        break;
     //    default:
     //        break;
     //}
 }
Esempio n. 7
0
 private void UserInfoForm_Load(object sender, EventArgs e)
 {
     ViewHelper.MdiChildrenAutoSize(this);
     this.Dock = DockStyle.Fill;
     //设置ListView为详细视图,并添加5列
     //listView1.View = View.Details;
     //listView1.Columns.Add("", 80);
     //listView1.Columns.Add("", 100);
     //listView1.Columns.Add("", 100);
     //listView1.Columns.Add("", 100);
     //listView1.Columns.Add("", 150);
     //listView1.Columns.Add("", 100);
     //设置ListView选中一项时选中整行
     listView1.FullRowSelect = true;
     //设置ListView失去焦点时选中内容可见
     listView1.HideSelection = false;
     //设置ListView只能选中一行
     listView1.MultiSelect = false;
     //创建一个联系人对话框的实例
     dialog       = new UserDialog();
     dialog.Owner = this;
     showAllUsers();
 }
Esempio n. 8
0
        private void StudentWelcomeForm_Load(object sender, EventArgs e)
        {
            int top  = 45;
            int toop = 30;
            int sen  = this.Height - (top + toop);
            int heit = this.Size.Height;
            int with = this.Size.Width;

            this.panel2.Location = new Point(0, 0);
            this.panel2.Size     = new Size(this.Width, top);

            this.panel1.Location = new Point(0, this.panel2.Height);
            this.panel1.Size     = new Size(this.Width, sen);

            this.panel3.Location = new Point(0, this.panel1.Location.Y + this.panel1.Height);
            this.panel3.Size     = new Size(this.Width, toop);

            ViewHelper.MdiChildrenAutoSize(this);
            this.Dock = DockStyle.Fill;
            cboMajorsInit();
            lblName.Text = UserHelper.user.name;
            //switch (UserHelper.currentMajorId)
            //{
            //    case 1: upDownSplitContainer.Panel1.BackgroundImage = VirtualTrain.Properties.Resources.车学;
            //        break;
            //    case 2: upDownSplitContainer.Panel1.BackgroundImage = VirtualTrain.Properties.Resources.电学;
            //        break;
            //    case 3: upDownSplitContainer.Panel1.BackgroundImage = VirtualTrain.Properties.Resources.工学;
            //        break;
            //    case 4: upDownSplitContainer.Panel1.BackgroundImage = VirtualTrain.Properties.Resources.调学;
            //        break;
            //    case 5: upDownSplitContainer.Panel1.BackgroundImage = VirtualTrain.Properties.Resources.供学;
            //        break;
            //    default:
            //        break;
            //}
        }