protected virtual void OnClearRunStepChange(ClearRunStepChangeEventArgs arg) { GlobalStep = arg.Step; switch (GlobalStep.ClearState) { case EnumClearState.AllComplete: this.IsChecked = true; break; case EnumClearState.Error: if (GlobalStep.ClearStep == this.Step) { this.State = EnumClearState.Error; } break; case EnumClearState.Finished: if (GlobalStep.ClearStep == this.Step || this.Order < GlobalStep.GetOrder()) { this.State = EnumClearState.Finished; } break; default: break; } }
void IHandle <ClearRunStepChangeEventArgs> .Handle(ClearRunStepChangeEventArgs arg) { var step = arg.Step; Application.Current.Dispatcher.Invoke(() => { if (step.ClearState == EnumClearState.Clearing) { this.Info = "当前正在清算中!"; } else if (step.ClearState == EnumClearState.AllComplete) { this.Info = "当前日期清算完毕!"; } else if (step.ClearState == EnumClearState.Finished) { this.Info = step.ClearStep == ClearStepNames.STEP_5? "当前自然日已经清算完毕!" : "请继续清算下一步!"; } else if (step.ClearState == EnumClearState.NotBegin) { this.Info = "清算未开始。"; } else if (step.ClearState == EnumClearState.AllComplete) { this.Info = "当前日期清算完毕!"; } else if (step.ClearState == EnumClearState.Error) { this.Info = "清算异常结束!"; } }); }
void IHandle <ClearRunStepChangeEventArgs> .Handle(ClearRunStepChangeEventArgs arg) { this.OnClearRunStepChange(arg); }