Beispiel #1
0
 private void MakePanelSwicth_IsSelect(MoUI_Panel p, bool isSwitched = false, bool AndMakeVisable = true, bool visable = false)
 {
     foreach (var ctl in p.Controls)
     {
         if (ctl is MoUI_Switch)
         {
             MoUI_Switch c = (MoUI_Switch)ctl;
             c.IsSwitched = isSwitched;
             if (AndMakeVisable)
             {
                 c.Visible = visable;
             }
         }
     }
 }
Beispiel #2
0
 private void LoadTeacherAnswerMod()
 {
     try
     {
         Invoke((EventHandler) delegate
         {
             //Enabled = false;
         });
         if (CurrentSelectTeacherInfo.StudentList.Count <= 1)
         {
             return;
         }
         QuestionControler.Reset(CurrentSelectTeacherInfo);
         Invoke((EventHandler) delegate
         {
             moUI_Button3.Text                 = "下一个";
             CurrentSocre                      = 0;
             var temp                          = QuestionControler.GetMod_0Question();
             TextCover_1_Name._Text            = temp.Name;
             TextCover_1_Gender._Text          = temp.Gender;
             TextCover_1_Class._Text           = temp.Class;
             TextCover_1_Major._Text           = temp.Major;
             TextCover_1_PoliticalStatus._Text = temp.PoliticalStatus;
             TextCover_1_Nation._Text          = temp.Nation;
             TextCover_1_Post._Text            = temp.Post;
             TextCover_1_Address._Text         = temp.Address;
             TextCover_1_Dorm._Text            = temp.Dorm;
             TextCover_1_DormMember._Text      = temp.DormMember;
             TextCover_1_Economic._Text        = temp.Economic;
             TextCover_1_BonusAndPenalty._Text = temp.BonusAndPenalty;
             TextCover_1_Study._Text           = temp.Study;
             TextCover_1_Habby._Text           = temp.Habby;
             TextCover_1_Job._Text             = temp.Job;
             TextCover_1_Number._Text          = temp.Number;
             PictureBox1._Image                = GetStudentPhoto(temp.PhotoPath);
             moUI_Label1.IsSelected            = true;
             moUI_Button1._Text                = "下一个";
             foreach (var ctl in moUI_Panel1.Controls)
             {
                 if (ctl is MoUI_TextCover)
                 {
                     MoUI_TextCover c = (MoUI_TextCover)ctl;
                     c._IsShow        = false;
                     c.Invalidate();
                 }
                 if (ctl is MoUI_Switch)
                 {
                     MoUI_Switch c = (MoUI_Switch)ctl;
                     c.IsSwitched  = false;
                     c.Visible     = false;
                     c.Invalidate();
                 }
             }
             moUI_Panel1.Visible     = true;
             moUI_Panel2.Visible     = false;
             moUI_Panel3.Visible     = false;
             TotalTime               = 8 * 60;
             Timer_TotalTime.Enabled = true;
         });
     }
     catch
     { }
     finally
     {
         Invoke((EventHandler) delegate
         {
             //Enabled = true;
         });
     }
 }