| 12345678910111213141516171819202122232425262728293031323334353637383940 |
- using Newtonsoft.Json.Linq;
- using System;
- using System.Collections.Generic;
- using System.Text;
- namespace InABox.Core
- {
- public class DFLayoutMultiSignaturePadProperties : DFLayoutFieldProperties<Dictionary<string, byte[]>, Dictionary<string, byte[]>?>
- {
- private Dictionary<string, byte[]> _default = new Dictionary<string, byte[]>();
- [EditorSequence(-995)]
- [NullEditor]
- public override Dictionary<string, byte[]> Default
- {
- get => _default;
- set => _default = value ?? new Dictionary<string, byte[]>();
- }
- public override string FormatValue(Dictionary<string, byte[]>? value)
- {
- return value != null ? "Yes" : "";
- }
- public override Dictionary<string, byte[]>? DeserializeValue(DFLoadStorageEntry entry)
- {
- return entry.GetValue<Dictionary<string, byte[]>>();
- }
- public override void SerializeValue(DFSaveStorageEntry entry, Dictionary<string, byte[]>? value)
- {
- entry.SetValue(value);
- }
- public override Dictionary<string, byte[]> GetValue(Dictionary<string, byte[]>? value)
- {
- return value ?? Default;
- }
- }
- }
|