示例#1
0
        public ThExam(TBL_TH_EXAM thExam)
        {
            InitializeComponent();

            this.SetViewModelValue("ThExamInfo", thExam);
            //传入闹钟实体:用于操作闹钟
            this.SetViewModelValue("ExamClock", ExamClock);

            /*
             * IsPause.Visibility = Visibility.Collapsed;
             * //传入考试信息
             * this.SetViewModelValue("CurrentExam", exam);
             * //传入闹钟实体:用于操作闹钟
             * this.SetViewModelValue("ExamClock", ExamClock);
             * //考试状态监听
             * //Messenger.Default.Register<Visibility>(this, MessageToken.ExamIsPauseToken,
             * //                                       (state) => IsPause.Visibility = state);
             *
             * Messenger.Default.Register<Visibility>(this, MessageToken.PaperVisibilityToken,
             *                                     (state) => Dispatcher.BeginInvoke(new Action(() =>
             *                                                                                  Visibility = state)));
             */
        }
示例#2
0
 public ThExamEdit(TBL_TH_EXAM thExam, ModifyState flag)
 {
     InitializeComponent();
     this.SetViewModelValue("ThExamInfo", thExam);
     this.SetViewModelValue("OperateFlag", flag);
 }