/// <summary> /// 设置模式 /// </summary> void settingPattern() { SetPatternWindow window = new SetPatternWindow(); window.Closed += (s, arg) => { if (window.DialogResult.Value) { this._patternType = window.PatternType; this.RaisePropertyChanged(() => PatternName); if (this._patternType != Models.Enums.PatternTypeEnum.None) { this.HasPattern = true; } else { this.HasPattern = false; } this.refreshPattern(); } }; window.ShowDialog(); }
public void Initilize() { var local = CommonDataManager.GetLocalCase(base.LocalID); if (local.Pattern != Models.Enums.PatternTypeEnum.None) { this._patternType = local.Pattern; this.RaisePropertyChanged(() => PatternName); this.HasPattern = true; } this.ClassVM = CacheManager.Instance.UnityContainer.Resolve <ClassViewModel>(); this.CourseVM = CacheManager.Instance.UnityContainer.Resolve <CourseViewModel>(); this.RuleVM = CacheManager.Instance.UnityContainer.Resolve <RuleViewModel>(); this.StudentVM = CacheManager.Instance.UnityContainer.Resolve <StudentViewModel>(); this.TagVM = CacheManager.Instance.UnityContainer.Resolve <TagViewModel>(); this.TeacherVM = CacheManager.Instance.UnityContainer.Resolve <TeacherViewModel>(); this.TimeVM = CacheManager.Instance.UnityContainer.Resolve <TimeViewModel>(); }