| | |
| | | private Action<string> infoWriter = null; |
| | | private Action<Int64> remainTimeWriter = null; |
| | | private Func<Int64,bool> cancelConfirm = null; |
| | | private Action<Int32, string> updateState = null; |
| | | private Action stopTaskUI = null; |
| | | internal void EnableWriter(Action<string> debugWriter,Action<string> infoWriter, Action<Int64> remainWriter, Func< Int64, bool> cancelConfirm,Action stopTaskUI) |
| | | internal void EnableWriter(Action<string> debugWriter,Action<string> infoWriter, Action<Int64> remainWriter, Func< Int64, bool> cancelConfirm,Action stopTaskUI,Action<Int32,string> updateState) |
| | | { |
| | | this.debugWriter = debugWriter; |
| | | this.infoWriter = infoWriter; |
| | | this.remainTimeWriter = remainWriter; |
| | | this.cancelConfirm = cancelConfirm; |
| | | this.stopTaskUI = stopTaskUI; |
| | | this.updateState = updateState; |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 更新状态 |
| | | /// </summary> |
| | | /// <param name="index"></param> |
| | | /// <param name="text"></param> |
| | | public void UpdateState(Int32 index, string text) |
| | | { |
| | | this.updateState(index, text); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 停止任务 |
| | | /// </summary> |
| | | public void StopTaskUI() |