瀏覽代碼

Added timestamp and user name to first note to be saved.

Kenric Nugteren 6 月之前
父節點
當前提交
9e9c6641a7
共有 1 個文件被更改,包括 4 次插入0 次删除
  1. 4 0
      inabox.wpf/DynamicGrid/Editors/NotesEditor/NotesEditorControl.cs

+ 4 - 0
inabox.wpf/DynamicGrid/Editors/NotesEditor/NotesEditorControl.cs

@@ -207,6 +207,10 @@ namespace InABox.DynamicGrid
 
         protected override string[] RetrieveValue()
         {
+            if(_value is null || _value.Length == 0 && !History.Text.IsNullOrWhiteSpace())
+            {
+                return [$"{DateTime.Now:yyyy-MM-dd HH:mm:ss} {ClientFactory.UserID}: {History.Text}"];
+            }
             return _value;
         }