public TypeCountCashSinglePage(SkillExamTotalInfo exam, List <string> childrenInfo) { InitializeComponent(); //Loaded += My_Loaded; this.SetViewModelValue("Exam", exam); this.SetViewModelValue("ChildrenInfo", childrenInfo); }
public override void Loaded() { base.Loaded(); IsInputEnabled = false; OriDoc = new FlowDocument(); InputDoc = new FlowDocument(); OriRange = new TextRange(OriDoc.ContentStart, OriDoc.ContentEnd); OriDoc.FontSize = 18; InputDoc.FontSize = 18; OriDoc.LineHeight = 30; InputDoc.LineHeight = 30; if (timer.Interval != new TimeSpan(0, 0, 1)) { timer.Interval = TimeSpan.FromMilliseconds(1000); timer.Tick += timer_Tick; //你的事件 } if (App.Model == TestModel.Test) { try { ExerciseTestTime = Convert.ToInt32(ConfigManager.GetInstance().GetConfigValue("FullTextCnCharactersTypingDuration", ConfigType.Client)); ExerciseCriteria = Convert.ToInt32(ConfigManager.GetInstance().GetConfigValue("FullTextCnCharactersTypingCriteria", ConfigType.Client)); ExerciseAbatementCount = Convert.ToInt32(ConfigManager.GetInstance().GetConfigValue("FullTextCnCharactersTypingAbatementProportion", ConfigType.Client)); } catch (Exception) { } IsBaseInfoVis = Visibility.Hidden; IsExerciseModel = Visibility.Visible; time = ExerciseTestTime * 60; Exam = new SkillExamTotalInfo(); doc.Load(@".\Source\CharacterSingle.xml"); ChangeArticlesSelection(true); } else { IsBaseInfoVis = Visibility.Visible; IsExerciseModel = Visibility.Hidden; var str = Exam.CS_F_ARTICLE; OriDoc.Blocks.Clear(); OriDoc.Blocks.Add(new Paragraph(new Run(str))); time = Exam.CS_F_TESTTIME * 60; } TimeSpan ts = new TimeSpan(0, 0, time); CountDown = String.Format("{0:00}:{1:00}:{2:00}", ts.Hours, ts.Minutes, ts.Seconds); }
public SkillExamReport(SkillExamTotalInfo exam) { InitializeComponent(); this.SetViewModelValue("Exam", exam); }