Преглед на файлове

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

Kenric Nugteren преди 8 месеца
родител
ревизия
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;
         }