From 2aeab450471cb80b59002da7da80faf251a0c4f4 Mon Sep 17 00:00:00 2001
From: asmrobot <asmrobot@hotmail.com>
Date: Mon, 25 Nov 2019 15:02:53 +0000
Subject: [PATCH] sigle computer

---
 src/RichCreator/G.cs |   14 +++++++++++++-
 1 files changed, 13 insertions(+), 1 deletions(-)

diff --git a/src/RichCreator/G.cs b/src/RichCreator/G.cs
index 64fc297..d976210 100644
--- a/src/RichCreator/G.cs
+++ b/src/RichCreator/G.cs
@@ -47,14 +47,16 @@
         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>
@@ -101,6 +103,16 @@
         }
 
         /// <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()

--
Gitblit v1.9.3