CSLA Config cleanup

This commit is contained in:
2026-08-28 11:15:35 -04:00
parent d0587706a2
commit f88f8a1c75
27 changed files with 566 additions and 2412 deletions
@@ -1,9 +1,5 @@
using System;
using System.Collections.Generic;
using System.Text;
using System.ComponentModel;
using System.Drawing;
using System.Text.RegularExpressions;
namespace VEPROMS.CSLA.Library
{
@@ -12,15 +8,11 @@ namespace VEPROMS.CSLA.Library
public class DocumentConfig : ConfigDynamicTypeDescriptor, INotifyPropertyChanged
{
#region XML
private XMLProperties _Xp;
private XMLProperties Xp
{
get { return _Xp; }
}
private readonly XMLProperties _Xp;
#endregion
#region Constructors
public Document _Document;
private DocumentInfo _DocumentInfo;
private readonly DocumentInfo _DocumentInfo;
public DocumentConfig(Document document)
{
_Document = document;
@@ -35,13 +27,10 @@ namespace VEPROMS.CSLA.Library
if (xml == string.Empty) xml = "<Config/>";
_Xp = new XMLProperties(xml);
}
internal string GetValue(string group, string item)
{
return _Xp[group, item];
}
#endregion
#region Properties
[Category("General")]
internal string GetValue(string group, string item) => _Xp[group, item];
#endregion
#region Properties
[Category("General")]
[DisplayName("Name")]
[Description("Name")]
public string Name
@@ -100,48 +89,13 @@ namespace VEPROMS.CSLA.Library
OnPropertyChanged("History_OriginalFileName");
}
}
// RHM 20110415 - These are now stored in the PDF table.
//[Category("Printing")]
//[DisplayName("Length")]
//[Description("Length of Document in Full and Partial Pages")]
//public float Printing_Length
//{
// get
// {
// string s = _Xp["Printing", "Length"];// get the saved value
// return float.Parse(s);
// }
// set
// {
// _Xp["Printing", "Length"] = string.Format("{0:0.0000}", value);
// OnPropertyChanged("Printing_Length");
// }
//}
//[Category("Printing")]
//[DisplayName("Color")]
//[Description("Color of Document Text")]
//public Color Printing_Color
//{
// get
// {
// string sColor = _Xp["Printing", "Color"];
// return ColorConfig.ColorFromString(sColor);
// }
// set
// {
// _Xp["Printing", "Color"] = value.ToString();
// OnPropertyChanged("Printing_Color");
// }
//}
#endregion
#region ToString
public override string ToString()
{
string s = _Xp.ToString();
if (s == "<Config/>" || s == "<Config></Config>") return string.Empty;
return s;
}
#endregion
}
return s == "<Config/>" || s == "<Config></Config>" ? string.Empty : s;
}
#endregion
}
}