|
|
@@ -44,6 +44,8 @@ public interface IDigitalFormsHostViewModel : INotifyPropertyChanged
|
|
|
|
|
|
DFLayout Layout { get; }
|
|
|
|
|
|
+ bool ReadOnly { get; }
|
|
|
+
|
|
|
Action<DFLoadStorage> LoadValues { set; }
|
|
|
|
|
|
Func<DFSaveStorage> SaveValues { set; }
|
|
|
@@ -227,6 +229,9 @@ public partial class DigitalFormsHostViewModel<TModel, TShell, TParent, TParentL
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ NewForm = Form.FormData.IsNullOrWhiteSpace();
|
|
|
+ ReadOnly = Form.FormCompleted != DateTime.MinValue;
|
|
|
+
|
|
|
var layout = new DFLayout();
|
|
|
layout.LoadLayout(DigitalFormLayout.Layout);
|
|
|
layout.LoadVariables(Variables);
|
|
|
@@ -238,8 +243,6 @@ public partial class DigitalFormsHostViewModel<TModel, TShell, TParent, TParentL
|
|
|
LoadValues(DigitalForm.DeserializeFormData(Form) ?? new());
|
|
|
});
|
|
|
|
|
|
- NewForm = Form.FormData.IsNullOrWhiteSpace();
|
|
|
- ReadOnly = Form.FormCompleted != DateTime.MinValue;
|
|
|
_isChanged = NewForm;
|
|
|
|
|
|
TimeStarted = DateTime.Now;
|