1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- using System;
- namespace InABox.Core
- {
- public class DFLayoutDocumentFieldProperties : DFLayoutFieldProperties<Guid>
- {
- public string? FileMask { get; set; }
- public override string FormatValue(object? value)
- {
- return value != null ? "Yes" : "";
- }
- public override object? ParseValue(object? value)
- {
- if (value is Guid)
- return value;
- if (value is string)
- try
- {
- return Guid.Parse(value as string);
- }
- catch (Exception)
- {
- return null;
- }
- return null;
- }
- protected override void LoadProperties()
- {
- base.LoadProperties();
- FileMask = GetProperty("FileMask", FileMask);
- }
- protected override void SaveProperties()
- {
- base.SaveProperties();
- SetProperty("FileMask", FileMask);
- }
- }
- }
|