diff --git a/PROMS/VEPROMS.CSLA.Library/ClassDiagram1.cd b/PROMS/VEPROMS.CSLA.Library/ClassDiagram1.cd
new file mode 100644
index 00000000..0519ecba
--- /dev/null
+++ b/PROMS/VEPROMS.CSLA.Library/ClassDiagram1.cd
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/PROMS/VEPROMS.CSLA.Library/Config/DocVersionConfig.cs b/PROMS/VEPROMS.CSLA.Library/Config/DocVersionConfig.cs
new file mode 100644
index 00000000..ed2bb15d
--- /dev/null
+++ b/PROMS/VEPROMS.CSLA.Library/Config/DocVersionConfig.cs
@@ -0,0 +1,1054 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+using System.ComponentModel;
+using System.Drawing;
+using DescriptiveEnum;
+
+namespace VEPROMS.CSLA.Library
+{
+ [Serializable]
+ [TypeConverter(typeof(ExpandableObjectConverter))]
+ public class DocVersionConfig : DynamicTypeDescriptor, INotifyPropertyChanged
+ {
+ public event PropertyChangedEventHandler PropertyChanged;
+ private void OnPropertyChanged(String info)
+ {
+ if (PropertyChanged != null)
+ PropertyChanged(this, new PropertyChangedEventArgs(info));
+ }
+ internal override bool IsReadOnly
+ {
+ get { return _DocVersion == null; }
+ }
+ private XMLProperties _Xp;
+ private XMLProperties Xp
+ {
+ get { return _Xp; }
+ }
+ public bool ParentLookup
+ {
+ get { return _Xp.ParentLookup; }
+ set { _Xp.ParentLookup = value; }
+ }
+ private bool _AncestorLookup;
+ public bool AncestorLookup
+ {
+ get { return _AncestorLookup; }
+ set { _AncestorLookup = value; }
+ }
+ private DocVersion _DocVersion;
+ public DocVersionConfig(DocVersion docVersion)
+ {
+ _DocVersion = docVersion;
+ string xml = docVersion.Config;
+ if (xml == string.Empty) xml = "";
+ _Xp = new XMLProperties(xml);
+ if (docVersion.MyFolder != null) _Xp.LookInAncestor += new XMLPropertiesEvent(Xp_LookInAncestorFolder);
+ }
+ private string Xp_LookInAncestorFolder(object sender, XMLPropertiesArgs args)
+ {
+ if (_AncestorLookup || ParentLookup)
+ {
+ for (Folder folder = _DocVersion.MyFolder; folder != null; folder = folder.MyParent)
+ {
+ string retval = folder.FolderConfig.GetValue(args.Group, args.Item);
+ if (retval != string.Empty) return retval;
+ }
+ }
+ return string.Empty;
+ }
+ private string Xp_LookInAncestorFolderInfo(object sender, XMLPropertiesArgs args)
+ {
+ if (_AncestorLookup || ParentLookup)
+ {
+ for (FolderInfo folder = _DocVersionInfo.MyFolder; folder != null; folder = folder.MyParent)
+ {
+ string retval = folder.FolderConfig.GetValue(args.Group, args.Item);
+ if (retval != string.Empty) return retval;
+ }
+ }
+ return string.Empty;
+ }
+ private DocVersionInfo _DocVersionInfo;
+ public DocVersionConfig(DocVersionInfo docVersionInfo)
+ {
+ _DocVersionInfo = docVersionInfo;
+ string xml = docVersionInfo.Config;
+ if (xml == string.Empty) xml = "";
+ _Xp = new XMLProperties(xml);
+ }
+ public DocVersionConfig(string xml)
+ {
+ _Xp = new XMLProperties(xml);
+ }
+ public DocVersionConfig()
+ {
+ string xml = "";
+ _Xp = new XMLProperties(xml);
+ }
+ internal string GetValue(string group, string item)
+ {
+ return _Xp[group, item];
+ }
+ //[Category("Identification")]
+ [Category("General")]
+ [DisplayName("Name")]
+ [Description("Name")]
+ public string Name
+ {
+ get { return (_DocVersion != null ? _DocVersion.Name : _DocVersionInfo.Name); }
+ set { if (_DocVersion != null) _DocVersion.Name = value; }
+ }
+ //[Category("Identification")]
+ [Category("General")]
+ [DisplayName("Title")]
+ [Description("Title")]
+ public string Title
+ {
+ get { return (_DocVersion != null ? _DocVersion.Title : _DocVersionInfo.Title); }
+ set { if (_DocVersion != null) _DocVersion.Title = value; }
+ }
+ //[Category("Format")]
+ [Category("Format Settings")]
+ [DisplayName("Format")]
+ [Description("Format")]
+ [TypeConverter(typeof(FormatList))]
+ public string FormatSelection
+ {
+ get
+ {
+ //if (_DocVersion != null) return FormatList.ToString(_DocVersion.FormatID);
+ //if (_DocVersionInfo != null) return FormatList.ToString(_DocVersionInfo.FormatID);
+ if (_DocVersion != null && _DocVersion.MyFormat != null) return _DocVersion.MyFormat.PlantFormat.FormatData.Name;
+ if (_DocVersionInfo != null && _DocVersionInfo.MyFormat != null) return _DocVersionInfo.MyFormat.PlantFormat.FormatData.Name;
+ return null;
+ }
+ set
+ {
+ if (_DocVersion != null) _DocVersion.MyFormat = FormatList.ToFormat(value); // Can only be set if _DocVersion is set
+ }
+ }
+ //[Category("Format")]
+ [Category("Format Settings")]
+ [DisplayName("Default Format")]
+ [Description("Format")]
+ [TypeConverter(typeof(FormatList))]
+ public string DefaultFormatSelection
+ {
+ get
+ {
+ //if (_DocVersion != null) return FormatList.ToString(_DocVersion.FormatID);
+ //if (_DocVersionInfo != null) return FormatList.ToString(_DocVersionInfo.FormatID);
+ if (_DocVersion != null && _DocVersion.MyFolder != null && _DocVersion.MyFolder.ActiveParent != null) return _DocVersion.MyFolder.ActiveFormat.PlantFormat.FormatData.Name;
+ if (_DocVersionInfo != null && _DocVersionInfo.MyFolder != null && _DocVersionInfo.MyFolder.ActiveParent != null) return _DocVersionInfo.MyFolder.ActiveFormat.PlantFormat.FormatData.Name;
+ return null;
+ }
+ }
+ public override string ToString()
+ {
+ string s = _Xp.ToString();
+ if (s == "" || s == "") return string.Empty;
+ return s;
+ }
+
+ //
+
+ #region RODefaults // From proc.ini
+ //[Category("RODefaults")]
+ [Category("Referenced Objects")]
+ //[DisplayName("Setpoint Prefix")]
+ [DisplayName("Default RO Prefix")]
+ [RefreshProperties(RefreshProperties.All)]
+ [Description("Setpoint Prefix")]
+ public string RODefaults_setpointprefix
+ {
+ get
+ {
+ return _Xp["RODefaults", "Setpoint"];
+ }
+ set
+ {
+ _Xp["RODefaults", "Setpoint"] = value;
+ OnPropertyChanged("RODefaults_setpointprefix");
+ }
+ }
+ //[Category("RODefaults")]
+ [Category("Referenced Objects")]
+ //[DisplayName("Graphics Prefix")]
+ [DisplayName("Default Graphics Prefix")]
+ [RefreshProperties(RefreshProperties.All)]
+ [Description("Graphics Prefix")]
+ public string RODefaults_graphicsprefix
+ {
+ get
+ {
+ return _Xp["RODefaults", "Graphics"];
+ }
+ set
+ {
+ _Xp["RODefaults", "Graphics"] = value;
+ OnPropertyChanged("RODefaults_graphicsprefix");
+ }
+ }
+ //[Category("Graphics")]
+ [Category("Referenced Objects")]
+ //[DisplayName("Default File Extension")]
+ [DisplayName("Graphic File Extension")]
+ [RefreshProperties(RefreshProperties.All)]
+ [Description("Default File Extension")]
+ public string Graphics_defaultext
+ {
+ get
+ {
+ return _Xp["Graphics", "defaultext"];
+ }
+ set
+ {
+ _Xp["Graphics", "defaultext"] = value;
+ OnPropertyChanged("Graphics_defaultext");
+ }
+ }
+ #endregion
+ #region PrintSettingsCategory // From curset.dat
+ [Category("Print Settings")]
+ [DisplayName("Number of Copies")]
+ [RefreshProperties(RefreshProperties.All)]
+ [Description("Number of Copies")]
+ public int Print_NumCopies
+ {
+ get
+ {
+ string s = _Xp["PrintSettings", "numcopies"];
+ if (s == string.Empty) return 1;
+ return int.Parse(_Xp["PrintSettings", "numcopies"]);
+ }
+ set
+ {
+ _Xp["PrintSettings", "numcopies"] = value.ToString();
+ OnPropertyChanged("Print_NumCopies");
+ }
+ }
+ [Category("Print Settings")]
+ [DisplayName("Printer")]
+ [RefreshProperties(RefreshProperties.All)]
+ [Description("Printer")]
+ public string Print_Printer
+ {
+ get
+ {
+ string s = _Xp["PrintSettings", "Printer"];
+ return s;
+ }
+ set
+ {
+ _Xp["PrintSettings", "Printer"] = value.ToString();
+ OnPropertyChanged("Print_Printer");
+ }
+ }
+ //public enum PrintWatermark : int
+ //{
+ // None = 0, Reference, Draft, Master, Sample,
+ // [Description("Information Only")]
+ // InformationOnly
+ //}
+ [TypeConverter(typeof(EnumDescConverter))]
+ public enum PrintWatermark : int
+ {
+ None = 0, Reference, Draft, Master, Sample,
+ [Description("Information Only")]
+ InformationOnly
+ }
+ //[TypeConverter(typeof(EnumDescConverter))]
+
+ [Category("Print Settings")]
+ [DisplayName("Watermark")]
+ [RefreshProperties(RefreshProperties.All)]
+ [Description("Watermark")]
+ public PrintWatermark Print_Watermark
+ {
+ get
+ {
+ string s = _Xp["PrintSettings", "Watermark"];
+ if (s == string.Empty || s.Equals("-1")) return PrintWatermark.Draft;
+ return (PrintWatermark)int.Parse(_Xp["PrintSettings", "Watermark"]);
+ }
+ set
+ {
+ if (value == PrintWatermark.Draft) _Xp["PrintSettings", "Watermark"] = string.Empty;
+ else _Xp["PrintSettings", "Watermark"] = ((int)value).ToString();
+ OnPropertyChanged("Print_Watermark");
+ }
+ }
+ [Category("Print Settings")]
+ //[DisplayName("Disable Duplex Printing")]
+ [DisplayName("Disable Automatic Duplexing")]
+ [RefreshProperties(RefreshProperties.All)]
+ [Description("Disable Duplex Printing")]
+ public bool Print_DisableDuplex
+ {
+ get
+ {
+ string s = _Xp["PrintSettings", "disableduplex"];
+ if (s == string.Empty) return false;
+ return bool.Parse(_Xp["PrintSettings", "disableduplex"]);
+ }
+ set
+ {
+ _Xp["PrintSettings", "disableduplex"] = value.ToString();
+ OnPropertyChanged("Print_DisableDuplex");
+ }
+ }
+ // Change Bar Use from 16-bit code:
+ // No Default
+ // Without Change Bars
+ // With Default Change Bars
+ // With User Specified Change Bars
+ //public enum PrintChangeBar : int
+ //{
+ // NoDefault = 0, Without, WithDefault, WithUserSpecified
+ //}
+ [TypeConverter(typeof(EnumDescConverter))]
+ public enum PrintChangeBar : int
+ {
+ [Description("Select Before Printing")]
+ SelectBeforePrinting = 0,
+ [Description("Without Change Bars")]
+ Without,
+ [Description("With Default Change Bars")]
+ WithDefault,
+ [Description("Use Custom Change Bars")]
+ WithUserSpecified
+ }
+
+ //[Category("Print Settings")]
+ [Category("Format Settings")]
+ //[DisplayName("Change Bar")]
+ [DisplayName("Change Bars")]
+ [RefreshProperties(RefreshProperties.All)]
+ [Description("Change Bar Use")]
+ public PrintChangeBar Print_ChangeBar
+ {
+ get
+ {
+ string s = _Xp["PrintSettings", "ChangeBar"];
+ if (s == string.Empty || s.Equals("-1")) return PrintChangeBar.SelectBeforePrinting;//PrintChangeBar.NoDefault;
+ return (PrintChangeBar)int.Parse(_Xp["PrintSettings", "ChangeBar"]);
+ }
+ set
+ {
+ //if (value == PrintChangeBar.NoDefault) _Xp["PrintSettings", "ChangeBar"] = string.Empty;
+ if (value == PrintChangeBar.SelectBeforePrinting) _Xp["PrintSettings", "ChangeBar"] = string.Empty;
+ else _Xp["PrintSettings", "ChangeBar"] = ((int)value).ToString();
+ OnPropertyChanged("Print_ChangeBar");
+ }
+ }
+ //public string Print_ChangeBarstr
+ //{
+ // get
+ // {
+ // return EnumDescConverter.GetEnumDescription(
+ // string s = _Xp["PrintSettings", "ChangeBar"];
+ // if (s == string.Empty) return PrintChangeBar.SelectBeforePrinting;//PrintChangeBar.NoDefault;
+ // return (PrintChangeBar)int.Parse(_Xp["PrintSettings", "ChangeBar"]);
+
+ // }
+ //}
+ // User Specified Change Bar Location from16-bit code:
+ // With Text
+ // Outside Box
+ // AER on LEFT, RNO on Right
+ // To the Left of Text
+ [TypeConverter(typeof(EnumDescConverter))]
+ public enum PrintChangeBarLoc : int
+ {
+ [Description("With Text")]
+ WithText = 0,
+ [Description("Outside Box")]
+ OutsideBox,
+ [Description("AER on Left RNO on Right")]
+ AERleftRNOright,
+ [Description("To the Left of the Text")]
+ LeftOfText
+ }
+ //[Category("Print Settings")]
+ [Category("Format Settings")]
+ //[DisplayName("Change Bar Location")]
+ [DisplayName("Change Bar Position")]
+ [RefreshProperties(RefreshProperties.All)]
+ [Description("User Specified Change Bar Location")]
+ public PrintChangeBarLoc Print_ChangeBarLoc
+ {
+ get
+ {
+ string s = _Xp["PrintSettings", "ChangeBarLoc"];
+ if (s == string.Empty || s.Equals("-1")) return PrintChangeBarLoc.WithText;
+ return (PrintChangeBarLoc)int.Parse(_Xp["PrintSettings", "ChangeBarLoc"]);
+ }
+ set
+ {
+ if (value == PrintChangeBarLoc.WithText) _Xp["PrintSettings", "ChangeBarLoc"] = string.Empty;
+ else _Xp["PrintSettings", "ChangeBarLoc"] = ((int)value).ToString();
+ OnPropertyChanged("Print_ChangeBarLoc");
+ }
+ }
+
+ // Change Bar Text from16-bit code:
+ // Date and Change ID
+ // Revision Number
+ // Change ID
+ // No Change Bar Message
+ // User Defined Message
+ //public enum PrintChangeBarText : int
+ //{
+ // DateChgID = 0, RevNum, ChgID, None, UserDef
+ //}
+ [TypeConverter(typeof(EnumDescConverter))]
+ public enum PrintChangeBarText : int
+ {
+ [Description("Date and Change ID")]
+ DateChgID = 0,
+ [Description("Revision Number")]
+ RevNum,
+ [Description("Change ID")]
+ ChgID,
+ [Description("No Change Bar Text")]
+ None,
+ [Description("Custom Change Bar Text")]
+ UserDef
+ }
+ //[Category("Print Settings")]
+ [Category("Format Settings")]
+ //[DisplayName("Change Bar Text")]
+ [DisplayName("Change Bar Text Type")]
+ [Description("Change Bar Text")]
+ public PrintChangeBarText Print_ChangeBarText
+ {
+ get
+ {
+ string s = _Xp["PrintSettings", "ChangeBarText"];
+ if (s == string.Empty || s.Equals("-1")) return PrintChangeBarText.DateChgID;
+ return (PrintChangeBarText)int.Parse(_Xp["PrintSettings", "ChangeBarText"]);
+ }
+ set
+ {
+ if (value == PrintChangeBarText.DateChgID) _Xp["PrintSettings", "ChangeBarText"] = string.Empty;
+ else _Xp["PrintSettings", "ChangeBarText"] = ((int)value).ToString();
+ OnPropertyChanged("Print_ChangeBarText");
+ }
+ }
+ //[Category("Print Settings")]
+ [Category("Format Settings")]
+ //[DisplayName("User Change Bar Message1")]
+ [DisplayName("Custom Change Bar Message Line One")]
+ [RefreshProperties(RefreshProperties.All)]
+ [Description("User Change Bar Message1")]
+ public string Print_UserCBMess1
+ {
+ get
+ {
+ return _Xp["PrintSettings", "usercbmess1"];
+ }
+ set
+ {
+ _Xp["PrintSettings", "usercbmess1"] = value;
+ OnPropertyChanged("Print_UserCBMess1");
+ }
+ }
+ //[Category("Print Settings")]
+ [Category("Format Settings")]
+ //[DisplayName("User Change Bar Message2")]
+ [DisplayName("Custom Change Bar Message Line Two")]
+ [RefreshProperties(RefreshProperties.All)]
+ [Description("User Change Bar Message2")]
+ public string Print_UserCBMess2
+ {
+ get
+ {
+ return _Xp["PrintSettings", "usercbmess2"];
+ }
+ set
+ {
+ _Xp["PrintSettings", "usercbmess2"] = value;
+ OnPropertyChanged("Print_UserCBMess2");
+ }
+ }
+ [Category("Print Settings")]
+ [DisplayName("User Format")]
+ [RefreshProperties(RefreshProperties.All)]
+ [Description("User Format")]
+ public string Print_UserFormat
+ {
+ get
+ {
+ return _Xp["PrintSettings", "userformat"];
+ }
+ set
+ {
+ _Xp["PrintSettings", "userformat"] = value;
+ OnPropertyChanged("Print_UserFormat");
+ }
+ }
+ public enum PrintPagination : int
+ {
+ Free = 0, Fixed, Auto
+ }
+ [Category("Print Settings")]
+ [DisplayName("Pagination")]
+ [RefreshProperties(RefreshProperties.All)]
+ [Description("Pagination")]
+ public PrintPagination Print_Pagination
+ {
+ get
+ {
+ string s = _Xp["PrintSettings", "Pagination"];
+ if (s == string.Empty || s.Equals("-1")) return PrintPagination.Auto;
+ return (PrintPagination)int.Parse(_Xp["PrintSettings", "Pagination"]);
+ }
+ set
+ {
+ if (value == PrintPagination.Auto) _Xp["PrintSettings", "Pagination"] = string.Empty;
+ else _Xp["PrintSettings", "Pagination"] = ((int)value).ToString();
+ OnPropertyChanged("Print_Pagination");
+ }
+ }
+ #endregion
+ /*
+ #region ColorCategory // From veproms.ini
+ // Note that not all possibilities from 16-bit will be added here, until
+ // it is determined how these will be used
+ [Category("Color")]
+ [DisplayName("ro")]
+ [RefreshProperties(RefreshProperties.All)]
+ [Description("ro")]
+ public string Color_ro
+ {
+ get
+ {
+ return _Xp["Color", "ro"];
+ }
+ set
+ {
+ _Xp["Color", "ro"] = value;
+ OnPropertyChanged("Color_ro");
+ }
+ }
+ [Category("Color")]
+ [DisplayName("editbackground")]
+ [RefreshProperties(RefreshProperties.All)]
+ [Description("editbackground")]
+ public string Color_editbackground
+ {
+ get
+ {
+ return _Xp["Color", "editbackground"];
+ }
+ set
+ {
+ _Xp["Color", "editbackground"] = value;
+ OnPropertyChanged("Color_editbackground");
+ }
+ }
+ [Category("Color")]
+ [DisplayName("black")]
+ [RefreshProperties(RefreshProperties.All)]
+ [Description("black")]
+ public string Color_black
+ {
+ get
+ {
+ return _Xp["Color", "black"];
+ }
+ set
+ {
+ _Xp["Color", "black"] = value;
+ OnPropertyChanged("Color_black");
+ }
+ }
+ [Category("Color")]
+ [DisplayName("blue")]
+ [RefreshProperties(RefreshProperties.All)]
+ [Description("blue")]
+ public string Color_blue
+ {
+ get
+ {
+ return _Xp["Color", "blue"];
+ }
+ set
+ {
+ _Xp["Color", "blue"] = value;
+ OnPropertyChanged("Color_blue");
+ }
+ }
+ #endregion // From veproms.ini
+ #region SystemPrintCategory // From veproms.ini
+ [Category("System Print")]
+ [DisplayName("Underline Width")]
+ [RefreshProperties(RefreshProperties.All)]
+ [Description("Underline Width")]
+ public int SysPrint_UWidth
+ {
+ get
+ {
+ string s = _Xp["SystemPrint", "UnderlineWidth"];
+ if (s == string.Empty) return 10;
+ return int.Parse(_Xp["SystemPrint", "UnderlineWidth"]);
+ }
+ set
+ {
+ _Xp["SystemPrint", "UnderlineWidth"] = value.ToString();
+ OnPropertyChanged("SysPrint_UWidth");
+ }
+ }
+ [Category("System Print")]
+ [DisplayName("Vertical Offset")]
+ [RefreshProperties(RefreshProperties.All)]
+ [Description("Vertical Offset")]
+ public int SysPrint_VOffset
+ {
+ get
+ {
+ string s = _Xp["SystemPrint", "VerticalOffset"];
+ if (s == string.Empty) return 0;
+ return int.Parse(_Xp["SystemPrint", "VerticalOffset"]);
+ }
+ set
+ {
+ _Xp["SystemPrint", "VerticalOffset"] = value.ToString();
+ OnPropertyChanged("SysPrint_VOffset");
+ }
+ }
+ [Category("System Print")]
+ [DisplayName("Stroke Width")]
+ [RefreshProperties(RefreshProperties.All)]
+ [Description("Stroke Width")]
+ public int SysPrint_StrokeWidth
+ {
+ get
+ {
+ string s = _Xp["SystemPrint", "StrokeWidth"];
+ if (s == string.Empty) return 0;
+ return int.Parse(_Xp["SystemPrint", "StrokeWidth"]);
+ }
+ set
+ {
+ _Xp["SystemPrint", "StrokeWidth"] = value.ToString();
+ OnPropertyChanged("SysPrint_StrokeWidth");
+ }
+ }
+ [Category("System Print")]
+ [DisplayName("Stroke Width Bold")]
+ [RefreshProperties(RefreshProperties.All)]
+ [Description("Stroke Width Bold")]
+ public int SysPrint_StrokeWidthBold
+ {
+ get
+ {
+ string s = _Xp["SystemPrint", "StrokeWidthBold"];
+ if (s == string.Empty) return 0;
+ return int.Parse(_Xp["SystemPrint", "StrokeWidthBold"]);
+ }
+ set
+ {
+ _Xp["SystemPrint", "StrokeWidthBold"] = value.ToString();
+ OnPropertyChanged("SysPrint_StrokeWidthBold");
+ }
+ }
+ #endregion
+ #region StartupCategory // From veproms.ini
+ [Category("Startup")]
+ [DisplayName("Startup MessageBox Title")]
+ [RefreshProperties(RefreshProperties.All)]
+ [Description("Startup MessageBox Title")]
+ public string Startup_MsgTitle
+ {
+ get
+ {
+ return _Xp["Startup", "MessageBoxTitle"];
+ }
+ set
+ {
+ _Xp["Startup", "MessageBoxTitle"] = value;
+ OnPropertyChanged("Startup_MsgTitle");
+ }
+ }
+ [Category("Startup")]
+ [DisplayName("Startup Message File")]
+ [RefreshProperties(RefreshProperties.All)]
+ [Description("Startup Message File")]
+ public string Startup_MsgFile
+ {
+ get
+ {
+ return _Xp["Startup", "MessageFile"];
+ }
+ set
+ {
+ _Xp["Startup", "MessageFile"] = value;
+ OnPropertyChanged("Startup_MsgFile");
+ }
+ }
+ #endregion
+ #region ProcedureListTabStopsCategory // From veproms.ini
+ [Category("ProcedureListTabStops")]
+ [DisplayName("Procedure Number Tab")]
+ [RefreshProperties(RefreshProperties.All)]
+ [Description("Procedure Number Tab")]
+ public int ProcListTab_Number
+ {
+ get
+ {
+ string s = _Xp["ProcedureListTabStops", "ProcedureNumberTab"];
+ if (s == string.Empty) return 75;
+ return int.Parse(_Xp["ProcedureListTabStops", "ProcedureNumberTab"]);
+ }
+ set
+ {
+ _Xp["ProcedureListTabStops", "ProcedureNumberTab"] = value.ToString();
+ OnPropertyChanged("ProcListTab_Number");
+ }
+ }
+ [Category("ProcedureListTabStops")]
+ [DisplayName("Procedure Title Tab")]
+ [RefreshProperties(RefreshProperties.All)]
+ [Description("Procedure Title Tab")]
+ public int ProcListTab_Title
+ {
+ get
+ {
+ string s = _Xp["ProcedureListTabStops", "ProcedureTitleTab"];
+ if (s == string.Empty) return 175;
+ return int.Parse(_Xp["ProcedureListTabStops", "ProcedureTitleTab"]);
+ }
+ set
+ {
+ _Xp["ProcedureListTabStops", "ProcedureTitleTab"] = value.ToString();
+ OnPropertyChanged("ProcListTab_Title");
+ }
+ }
+ #endregion
+ #region FormatCategory
+ public enum FormatColumns : int
+ {
+ Default=0,OneColumn,TwoColumn,ThreeColumn,FourColumns
+ }
+ [Category("Format")]
+ [DisplayName("Column Layout")]
+ [RefreshProperties(RefreshProperties.All)]
+ [Description("Column Layout")]
+ public FormatColumns Format_Columns
+ {
+ get
+ {
+ string s = _Xp["format", "columns"];
+ if (s == string.Empty) return (FormatColumns)0;
+ return (FormatColumns)int.Parse(_Xp["format", "columns"]);
+ //return Enum.Parse(typeof(FormatColumns),_Xp["format", "columns"]);
+ }
+ set
+ {
+ if (value == 0) _Xp["format", "columns"] = string.Empty;
+ else _Xp["format", "columns"] = ((int)value).ToString();
+ OnPropertyChanged("Format_Columns");
+ }
+ }
+ [Category("Format")]
+ [DisplayName("Plant Format Name")]
+ [RefreshProperties(RefreshProperties.All)]
+ [Description("Default Plant Format")]
+ public string Format_Plant
+ {
+ get
+ { return _Xp["format", "plant"];
+ }
+ set
+ {
+ _Xp["format", "plant"] = value;
+ OnPropertyChanged("Format_Plant");
+ }
+ }
+ #endregion
+ #region DefaultsCategory // from proc.ini
+ [Category("Defaults")]
+ [DisplayName("Default Setpoint Prefix")]
+ [RefreshProperties(RefreshProperties.All)]
+ [Description("Default Setpoint Prefix")]
+ public string Default_SPPrefix
+ {
+ get { return _Xp["default", "spprefix"]; }
+ set
+ {
+ _Xp["default", "spprefix"] = value;
+ OnPropertyChanged("Default_SPPrefix");
+ }
+ }
+ [Category("Defaults")]
+ [DisplayName("Default Image Prefix")]
+ [RefreshProperties(RefreshProperties.All)]
+ [Description("Default Image Prefix")]
+ public string Default_IMPrefix
+ {
+ get { return _Xp["default", "imprefix"]; }
+ set
+ {
+ _Xp["default", "imprefix"] = value;
+ OnPropertyChanged("RO_IMPrefix");
+ }
+ }
+ #endregion
+ #region PrintSettingsCategory // From curset.dat
+ [Category("Print Settings")]
+ [DisplayName("Number of Copies")]
+ [RefreshProperties(RefreshProperties.All)]
+ [Description("Number of Copies")]
+ public int Print_NumCopies
+ {
+ get
+ {
+ string s = _Xp["PrintSettings", "numcopies"];
+ if (s == string.Empty) return 1;
+ return int.Parse(_Xp["PrintSettings", "numcopies"]);
+ }
+ set
+ {
+ _Xp["PrintSettings", "numcopies"] = value.ToString();
+ OnPropertyChanged("Print_NumCopies");
+ }
+ }
+ public enum PrintPagination : int
+ {
+ Free = 0, Fixed, Auto
+ }
+ [Category("Print Settings")]
+ [DisplayName("Pagination")]
+ [RefreshProperties(RefreshProperties.All)]
+ [Description("Pagination")]
+ public PrintPagination Print_Pagination
+ {
+ get
+ {
+ string s = _Xp["PrintSettings", "Pagination"];
+ if (s == string.Empty) return PrintPagination.Auto;
+ return (PrintPagination)int.Parse(_Xp["PrintSettings", "Pagination"]);
+ }
+ set
+ {
+ if (value == PrintPagination.Auto) _Xp["PrintSettings", "Pagination"] = string.Empty;
+ else _Xp["PrintSettings", "Pagination"] = ((int)value).ToString();
+ OnPropertyChanged("Print_Pagination");
+ }
+ }
+ public enum PrintWatermark : int
+ {
+ None = 0, Reference, Draft, Master, Sample, InformationOnly
+ }
+ [Category("Print Settings")]
+ [DisplayName("Watermark")]
+ [RefreshProperties(RefreshProperties.All)]
+ [Description("Watermark")]
+ public PrintWatermark Print_Watermark
+ {
+ get
+ {
+ string s = _Xp["PrintSettings", "Watermark"];
+ if (s == string.Empty) return PrintWatermark.Draft;
+ return (PrintWatermark)int.Parse(_Xp["PrintSettings", "Watermark"]);
+ }
+ set
+ {
+ if (value == PrintWatermark.Draft) _Xp["PrintSettings", "Watermark"] = string.Empty;
+ else _Xp["PrintSettings", "Watermark"] = ((int)value).ToString();
+ OnPropertyChanged("Print_Watermark");
+ }
+ }
+ [Category("Print Settings")]
+ [DisplayName("Disable Duplex Printing")]
+ [RefreshProperties(RefreshProperties.All)]
+ [Description("Disable Duplex Printing")]
+ public bool Print_DisableDuplex
+ {
+ get
+ {
+ string s = _Xp["PrintSettings", "disableduplex"];
+ if (s == string.Empty) return false;
+ return bool.Parse(_Xp["PrintSettings", "disableduplex"]);
+ }
+ set
+ {
+ _Xp["PrintSettings", "disableduplex"] = value.ToString();
+ OnPropertyChanged("Print_DisableDuplex");
+ }
+ }
+ // Change Bar Use from 16-bit code:
+ // No Default
+ // Without Change Bars
+ // With Default Change Bars
+ // With User Specified Change Bars
+ public enum PrintChangeBar : int
+ {
+ NoDefault=0, Without, WithDefault, WithUserSpecified
+ }
+ [Category("Print Settings")]
+ [DisplayName("Change Bar")]
+ [RefreshProperties(RefreshProperties.All)]
+ [Description("Change Bar Use")]
+ public PrintChangeBar Print_ChangeBar
+ {
+ get
+ {
+ string s = _Xp["PrintSettings", "ChangeBar"];
+ if (s == string.Empty) return PrintChangeBar.NoDefault;
+ return (PrintChangeBar)int.Parse(_Xp["PrintSettings", "ChangeBar"]);
+ }
+ set
+ {
+ if (value == PrintChangeBar.NoDefault) _Xp["PrintSettings", "ChangeBar"] = string.Empty;
+ else _Xp["PrintSettings", "ChangeBar"] = ((int)value).ToString();
+ OnPropertyChanged("Print_ChangeBar");
+ }
+ }
+ // User Specified Change Bar Location from16-bit code:
+ // With Text
+ // Outside Box
+ // AER on LEFT, RNO on Right
+ // To the Left of Text
+ public enum PrintChangeBarLoc : int
+ {
+ WithText = 0, OutsideBox, AERleftRNOright, LeftOfText
+ }
+ [Category("Print Settings")]
+ [DisplayName("Change Bar Location")]
+ [RefreshProperties(RefreshProperties.All)]
+ [Description("User Specified Change Bar Location")]
+ public PrintChangeBarLoc Print_ChangeBarLoc
+ {
+ get
+ {
+ string s = _Xp["PrintSettings", "ChangeBarLoc"];
+ if (s == string.Empty) return PrintChangeBarLoc.WithText;
+ return (PrintChangeBarLoc)int.Parse(_Xp["PrintSettings", "ChangeBarLoc"]);
+ }
+ set
+ {
+ if (value == PrintChangeBarLoc.WithText) _Xp["PrintSettings", "ChangeBarLoc"] = string.Empty;
+ else _Xp["PrintSettings", "ChangeBarLoc"] = ((int)value).ToString();
+ OnPropertyChanged("Print_ChangeBarLoc");
+ }
+ }
+
+ // Change Bar Text from16-bit code:
+ // Date and Change ID
+ // Revision Number
+ // Change ID
+ // No Change Bar Message
+ // User Defined Message
+ public enum PrintChangeBarText : int
+ {
+ DateChgID = 0, RevNum, ChgID, None, UserDef
+ }
+ [Category("Print Settings")]
+ [DisplayName("Change Bar Text")]
+ [RefreshProperties(RefreshProperties.All)]
+ [Description("Change Bar Text")]
+ public PrintChangeBarText Print_ChangeBarText
+ {
+ get
+ {
+ string s = _Xp["PrintSettings", "ChangeBarText"];
+ if (s == string.Empty) return PrintChangeBarText.DateChgID;
+ return (PrintChangeBarText)int.Parse(_Xp["PrintSettings", "ChangeBarText"]);
+ }
+ set
+ {
+ if (value == PrintChangeBarText.DateChgID) _Xp["PrintSettings", "ChangeBarText"] = string.Empty;
+ else _Xp["PrintSettings", "ChangeBarText"] = ((int)value).ToString();
+ OnPropertyChanged("Print_ChangeBarText");
+ }
+ }
+
+ [Category("Print Settings")]
+ [DisplayName("User Format")]
+ [RefreshProperties(RefreshProperties.All)]
+ [Description("User Format")]
+ public string Print_UserFormat
+ {
+ get
+ {
+ return _Xp["PrintSettings", "userformat"];
+ }
+ set
+ {
+ _Xp["PrintSettings", "userformat"] = value;
+ OnPropertyChanged("Print_UserFormat");
+ }
+ }
+
+ [Category("Print Settings")]
+ [DisplayName("User Change Bar Message1")]
+ [RefreshProperties(RefreshProperties.All)]
+ [Description("User Change Bar Message1")]
+ public string Print_UserCBMess1
+ {
+ get
+ {
+ return _Xp["PrintSettings", "usercbmess1"];
+ }
+ set
+ {
+ _Xp["PrintSettings", "usercbmess1"] = value;
+ OnPropertyChanged("Print_UserCBMess1");
+ }
+ }
+
+ [Category("Print Settings")]
+ [DisplayName("User Change Bar Message2")]
+ [RefreshProperties(RefreshProperties.All)]
+ [Description("User Change Bar Message2")]
+ public string Print_UserCBMess2
+ {
+ get
+ {
+ return _Xp["PrintSettings", "usercbmess2"];
+ }
+ set
+ {
+ _Xp["PrintSettings", "usercbmess2"] = value;
+ OnPropertyChanged("Print_UserCBMess2");
+ }
+ }
+ #endregion
+[Category("Defaults")]
+[DisplayName("Default BackColor")]
+[RefreshProperties(RefreshProperties.All)]
+[Description("Default Background Color")]
+public Color Default_BkColor
+{
+get
+{
+//return _Xp["default", "BkColor"];
+string sColor = _Xp["default", "BkColor"];
+if (sColor == string.Empty) sColor = "White";
+if (sColor[0] == '[')
+{
+string[] parts = sColor.Substring(1, sColor.Length - 2).Split(",".ToCharArray());
+return Color.FromArgb(Int32.Parse(parts[0]), Int32.Parse(parts[1]), Int32.Parse(parts[2]));
+}
+else return Color.FromName(sColor);
+}
+set
+{
+if (value.IsNamedColor) _Xp["default", "BkColor"] = value.Name;
+else
+{
+_Xp["default", "BkColor"] = string.Format("[{0},{1},{2}]", value.R, value.G, value.B);
+}
+OnPropertyChanged("Default_BkColor");
+
+}
+}
+}
+}
+*/
+ }
+}
\ No newline at end of file
diff --git a/PROMS/VEPROMS.CSLA.Library/Config/DynamicProperties.cs b/PROMS/VEPROMS.CSLA.Library/Config/DynamicProperties.cs
new file mode 100644
index 00000000..0237c94e
--- /dev/null
+++ b/PROMS/VEPROMS.CSLA.Library/Config/DynamicProperties.cs
@@ -0,0 +1,89 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+using System.ComponentModel;
+
+namespace VEPROMS.CSLA.Library
+{
+ public class DynamicPropertyDescriptor : PropertyDescriptor
+ {
+ private PropertyDescriptor _BasePropertyDescriptor;
+ private DynamicTypeDescriptor _Instance;
+
+ public DynamicPropertyDescriptor(DynamicTypeDescriptor instance, PropertyDescriptor basePropertyDescriptor)
+ : base(basePropertyDescriptor)
+ {
+ _Instance = instance;
+ _BasePropertyDescriptor = basePropertyDescriptor;
+ }
+ public override bool CanResetValue(object component)
+ { return _BasePropertyDescriptor.CanResetValue(component); }
+ public override Type ComponentType
+ { get { return _BasePropertyDescriptor.ComponentType; } }
+ public override object GetValue(object component)
+ { return _BasePropertyDescriptor.GetValue(component); }
+ public override bool IsReadOnly
+ { get { return _Instance.IsReadOnly; } }
+ public override Type PropertyType
+ { get { return _BasePropertyDescriptor.PropertyType; } }
+ public override void ResetValue(object component)
+ { _BasePropertyDescriptor.ResetValue(component); }
+ public override bool ShouldSerializeValue(object component)
+ { return _BasePropertyDescriptor.ShouldSerializeValue(component); }
+ public override void SetValue(object component, object value)
+ { _BasePropertyDescriptor.SetValue(component, value); }
+ }
+ [Serializable()]
+ public class DynamicTypeDescriptor //: ICustomTypeDescriptor//, ISupportInitialize
+ {
+ [NonSerialized]
+ private PropertyDescriptorCollection dynamicProps;
+ private bool _IsReadOnly = false;
+ internal virtual bool IsReadOnly
+ {
+ get { return _IsReadOnly; }
+ set { _IsReadOnly = value; }
+ }
+ public DynamicTypeDescriptor() { }
+ #region "TypeDescriptor Implementation"
+ public String GetClassName()
+ { return TypeDescriptor.GetClassName(this, true); }
+ public AttributeCollection GetAttributes()
+ { return TypeDescriptor.GetAttributes(this, true); }
+ public String GetComponentName()
+ { return TypeDescriptor.GetComponentName(this, true); }
+ public TypeConverter GetConverter()
+ { return TypeDescriptor.GetConverter(this, true); }
+ public EventDescriptor GetDefaultEvent()
+ { return TypeDescriptor.GetDefaultEvent(this, true); }
+ public PropertyDescriptor GetDefaultProperty()
+ { return TypeDescriptor.GetDefaultProperty(this, true); }
+ public object GetEditor(Type editorBaseType)
+ { return TypeDescriptor.GetEditor(this, editorBaseType, true); }
+ public EventDescriptorCollection GetEvents(Attribute[] attributes)
+ { return TypeDescriptor.GetEvents(this, attributes, true); }
+ public EventDescriptorCollection GetEvents()
+ { return TypeDescriptor.GetEvents(this, true); }
+ public PropertyDescriptorCollection GetProperties(Attribute[] attributes)
+ {
+ return GetProperties();
+ }
+ public PropertyDescriptorCollection GetProperties()
+ {
+ if (dynamicProps == null)
+ {
+ PropertyDescriptorCollection baseProps = TypeDescriptor.GetProperties(this, true);
+ dynamicProps = new PropertyDescriptorCollection(null);
+
+ foreach (PropertyDescriptor oProp in baseProps)
+ {
+ dynamicProps.Add(new DynamicPropertyDescriptor(this, oProp));
+ }
+ }
+ return dynamicProps;
+ }
+ public object GetPropertyOwner(PropertyDescriptor pd)
+ { return this; }
+ #endregion
+ }
+}
diff --git a/PROMS/VEPROMS.CSLA.Library/Config/EnumDescConverter.cs b/PROMS/VEPROMS.CSLA.Library/Config/EnumDescConverter.cs
new file mode 100644
index 00000000..468807a5
--- /dev/null
+++ b/PROMS/VEPROMS.CSLA.Library/Config/EnumDescConverter.cs
@@ -0,0 +1,164 @@
+/*****************************************************************
+ * Module: EnumDescConverter.cs
+ * Type: C# Source Code
+ * Version: 1.0
+ * Description: Enum Converter using Description Attributes
+ *
+ * Revisions
+ * ------------------------------------------------
+ * [F] 24/02/2004, Jcl - Shaping up
+ * [B] 25/02/2004, Jcl - Made it much easier :-)
+ *
+ *****************************************************************/
+
+using System;
+using System.ComponentModel;
+using System.Drawing;
+using System.Drawing.Design;
+using System.Reflection;
+using System.Collections;
+using System.Data;
+
+namespace DescriptiveEnum
+{
+ ///
+ /// EnumConverter supporting System.ComponentModel.DescriptionAttribute
+ ///
+ public class EnumDescConverter : System.ComponentModel.EnumConverter
+ {
+ protected System.Type myVal;
+
+ ///
+ /// Gets Enum Value's Description Attribute
+ ///
+ /// The value you want the description attribute for
+ /// The description, if any, else it's .ToString()
+ public static string GetEnumDescription(Enum value)
+ {
+ Console.WriteLine("{0}", value);
+ FieldInfo fi = value.GetType().GetField(value.ToString());
+ DescriptionAttribute[] attributes =
+ (DescriptionAttribute[])fi.GetCustomAttributes(
+ typeof(DescriptionAttribute), false);
+ //Console.WriteLine("{0},{1},{2}", value.ToString(), attributes.Length, (attributes.Length > 0) ? attributes[0].Description : value.ToString());
+ return (attributes.Length>0)?attributes[0].Description:value.ToString();
+ }
+
+ ///
+ /// Gets the description for certaing named value in an Enumeration
+ ///
+ /// The type of the Enumeration
+ /// The name of the Enumeration value
+ /// The description, if any, else the passed name
+ public static string GetEnumDescription(System.Type value, string name)
+ {
+ FieldInfo fi= value.GetField(name);
+ DescriptionAttribute[] attributes =
+ (DescriptionAttribute[])fi.GetCustomAttributes(
+ typeof(DescriptionAttribute), false);
+ return (attributes.Length>0)?attributes[0].Description:name;
+ }
+
+ ///
+ /// Gets the value of an Enum, based on it's Description Attribute or named value
+ ///
+ /// The Enum type
+ /// The description or name of the element
+ /// The value, or the passed in description, if it was not found
+ public static object GetEnumValue(System.Type value, string description)
+ {
+ FieldInfo [] fis = value.GetFields();
+ foreach(FieldInfo fi in fis)
+ {
+ DescriptionAttribute[] attributes =
+ (DescriptionAttribute[])fi.GetCustomAttributes(
+ typeof(DescriptionAttribute), false);
+ if(attributes.Length>0)
+ {
+ if(attributes[0].Description == description)
+ {
+ return fi.GetValue(fi.Name);
+ }
+ }
+ if(fi.Name == description)
+ {
+ return fi.GetValue(fi.Name);
+ }
+ }
+ return description;
+ }
+
+ public EnumDescConverter(System.Type type) : base(type.GetType())
+ {
+ myVal = type;
+ }
+
+ public override object ConvertTo(ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, Type destinationType)
+ {
+ if(value is Enum && destinationType == typeof(string))
+ {
+ return EnumDescConverter.GetEnumDescription((Enum)value);
+ }
+ if(value is string && destinationType == typeof(string))
+ {
+ return EnumDescConverter.GetEnumDescription(myVal, (string)value);
+ }
+ return base.ConvertTo (context, culture, value, destinationType);
+ }
+
+ public override object ConvertFrom(ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value)
+ {
+ if(value is string)
+ {
+ return EnumDescConverter.GetEnumValue(myVal, (string)value);
+ }
+ if(value is Enum)
+ {
+ return EnumDescConverter.GetEnumDescription((Enum)value);
+ }
+ return base.ConvertFrom (context, culture, value);
+ }
+ public override bool GetPropertiesSupported(ITypeDescriptorContext context)
+ {
+ return true;
+ }
+
+ public override TypeConverter.StandardValuesCollection GetStandardValues(ITypeDescriptorContext context)
+ {
+ ArrayList values = new ArrayList();
+ FieldInfo[] fis = myVal.GetFields();
+ foreach (FieldInfo fi in fis)
+ {
+ DescriptionAttribute[] attributes =(DescriptionAttribute[])fi.GetCustomAttributes(
+ typeof(DescriptionAttribute), false);
+ //if (attributes.Length > 0)
+ if (fi.Name != "value__")
+ values.Add(fi.GetValue(fi.Name));
+ }
+ return new TypeConverter.StandardValuesCollection(values);
+ }
+ public static string GetEnumKeyDescription(Enum value)
+ {
+ FieldInfo fi = value.GetType().GetField(value.ToString());
+ DescriptionAttribute[] attributes =
+ (DescriptionAttribute[])fi.GetCustomAttributes(
+ typeof(DescriptionAttribute), false);
+ return (attributes.Length > 0) ? attributes[0].Description : value.ToString();
+ }
+
+ public static DataTable GetEnumAsDataTable(System.Type EnumType)
+ {
+ DataTable DTEnum = new DataTable();
+ DTEnum.Columns.Add(new DataColumn("EnumID", typeof(Int32)));
+ DTEnum.Columns.Add(new DataColumn("Enum", typeof(string)));
+ DTEnum.Columns.Add(new DataColumn("Description", typeof(string)));
+ foreach (int i in Enum.GetValues(EnumType))
+ {
+ System.Enum fooItem = (System.Enum)Enum.ToObject(EnumType, i);
+ DTEnum.Rows.Add(new object[] { i, fooItem.ToString(), GetEnumKeyDescription(fooItem) });
+ }
+ return DTEnum;
+ }
+ }
+
+}
\ No newline at end of file
diff --git a/PROMS/VEPROMS.CSLA.Library/Config/EnumDetail.cs b/PROMS/VEPROMS.CSLA.Library/Config/EnumDetail.cs
new file mode 100644
index 00000000..d983be55
--- /dev/null
+++ b/PROMS/VEPROMS.CSLA.Library/Config/EnumDetail.cs
@@ -0,0 +1,44 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+using System.Reflection;
+using System.ComponentModel;
+
+namespace VEPROMS.CSLA.Library
+{
+ public class EnumDetail
+ {
+ private T _EValue;
+ public T EValue
+ {
+ get { return _EValue; }
+ set { _EValue = value; }
+ }
+ private string _Name;
+
+ public string Name
+ {
+ get { return _Name; }
+ set { _Name = value; }
+ }
+ public EnumDetail(string name, T eValue)
+ {
+ _Name = name;
+ _EValue = eValue;
+ }
+ public static EnumDetail[] Details()
+ {
+ string[] names = Enum.GetNames(typeof(T));
+ Array values = Enum.GetValues(typeof(T));
+ EnumDetail[] retval = new EnumDetail[values.Length];
+ for (int i = 0; i < values.Length; i++)
+ {
+ T val = (T)values.GetValue(i);
+ FieldInfo fi = val.GetType().GetField(val.ToString());
+ DescriptionAttribute[] attributes = (DescriptionAttribute[])fi.GetCustomAttributes(typeof(DescriptionAttribute), false);
+ retval[i] = new EnumDetail(((attributes.Length > 0) ? attributes[0].Description : names[i]), (T)values.GetValue(i));
+ }
+ return retval;
+ }
+ }
+}
diff --git a/PROMS/VEPROMS.CSLA.Library/Config/FolderConfig.cs b/PROMS/VEPROMS.CSLA.Library/Config/FolderConfig.cs
new file mode 100644
index 00000000..ef9e74e5
--- /dev/null
+++ b/PROMS/VEPROMS.CSLA.Library/Config/FolderConfig.cs
@@ -0,0 +1,804 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+using System.ComponentModel;
+using System.Drawing;
+using DescriptiveEnum;
+
+namespace VEPROMS.CSLA.Library
+{
+ [Serializable]
+ [TypeConverter(typeof(ExpandableObjectConverter))]
+ //public class FolderConfig : INotifyPropertyChanged
+ public class FolderConfig : DynamicTypeDescriptor, INotifyPropertyChanged
+ {
+ public event PropertyChangedEventHandler PropertyChanged;
+ private void OnPropertyChanged(String info)
+ {
+ if (PropertyChanged != null)
+ PropertyChanged(this, new PropertyChangedEventArgs(info));
+ }
+ internal override bool IsReadOnly
+ {
+ get { return _Folder == null; }
+ }
+ private XMLProperties _Xp;
+ private XMLProperties Xp
+ {
+ get { return _Xp; }
+ }
+ public bool ParentLookup
+ {
+ get { return _Xp.ParentLookup; }
+ set { _Xp.ParentLookup = value; }
+ }
+ [NonSerialized]
+ private bool _AncestorLookup;
+ public bool AncestorLookup
+ {
+ get { return _AncestorLookup; }
+ set { _AncestorLookup = value; }
+ }
+ private Folder _Folder;
+ private FolderInfo _FolderInfo;
+ public FolderConfig(Folder folder)
+ {
+ _Folder = folder;
+ string xml = _Folder.Config;
+ if (xml == string.Empty) xml = "";
+ _Xp = new XMLProperties(xml);
+ if(folder.MyParent != null) _Xp.LookInAncestor += new XMLPropertiesEvent(Xp_LookInAncestorFolder);
+ }
+ private string Xp_LookInAncestorFolder(object sender, XMLPropertiesArgs args)
+ {
+ if (_AncestorLookup || ParentLookup)
+ {
+ for (Folder folder = _Folder.MyParent; folder != null; folder = folder.MyParent)
+ {
+ string retval = folder.FolderConfig.GetValue( args.Group, args.Item);
+ if (retval != string.Empty) return retval;
+ }
+ }
+ return string.Empty;
+ }
+ private string Xp_LookInAncestorFolderInfo(object sender, XMLPropertiesArgs args)
+ {
+ if (_AncestorLookup || ParentLookup)
+ {
+ for (FolderInfo folder = _FolderInfo.MyParent; folder != null; folder = folder.MyParent)
+ {
+ string retval = folder.FolderConfig.GetValue(args.Group, args.Item);
+ if (retval != string.Empty) return retval;
+ }
+ }
+ return string.Empty;
+ }
+ public FolderConfig(FolderInfo folderInfo)
+ {
+ _FolderInfo = folderInfo;
+ string xml = _FolderInfo.Config;
+ if (xml == string.Empty) xml = "";
+ _Xp = new XMLProperties(xml);
+ }
+ public FolderConfig(string xml)
+ {
+ if (xml == string.Empty) xml = "";
+ _Xp = new XMLProperties(xml);
+ }
+ public FolderConfig()
+ {
+ _Xp = new XMLProperties("");
+ }
+ internal string GetValue(string group, string item)
+ {
+ return _Xp[group, item];
+ }
+ //[Category("Identification")]
+ [Category("General")]
+ [DisplayName("Name")]
+ [Description("Name")]
+ public string Name
+ {
+ get { return (_Folder != null ? _Folder.Name : _FolderInfo.Name); }
+ set { if (_Folder != null)_Folder.Name = value; }
+ }
+ //[Category("Identification")]
+ [Category("General")]
+ [DisplayName("Title")]
+ [Description("Title")]
+ public string Title
+ {
+ get { return (_Folder != null ? _Folder.Title : _FolderInfo.Title); }
+ set { _Folder.Title = value; }
+ }
+ //[Category("Identification")]
+ [Category("General")]
+ [DisplayName("Short Name")]
+ [Description("Short Name")]
+ public string ShortName
+ {
+ get { return (_Folder != null ? _Folder.ShortName : _FolderInfo.ShortName); }
+ set { if (_Folder != null)_Folder.ShortName = value; }
+ }
+ //[Category("Format")]
+ [Category("Format Settings")]
+ [DisplayName("Format")]
+ [Description("Format")]
+ [TypeConverter(typeof(FormatList))]
+ public string FormatSelection
+ {
+ get
+ {
+ //if (_Folder != null) return FormatList.ToString(_Folder.FormatID);
+ //if (_FolderInfo != null) return FormatList.ToString(_FolderInfo.FormatID);
+ if (_Folder != null && _Folder.MyFormat != null) return _Folder.MyFormat.PlantFormat.FormatData.Name;
+ if (_FolderInfo != null && _FolderInfo.MyFormat != null) return _FolderInfo.MyFormat.PlantFormat.FormatData.Name;
+ return null;
+ }
+ set
+ {
+ if (_Folder != null)_Folder.MyFormat = FormatList.ToFormat(value);
+ }
+ }
+ //[Category("Format")]
+ [Category("Format Settings")]
+ [DisplayName("Default Format")]
+ //[DisplayName("Format")]
+ [Description("Format")]
+ [TypeConverter(typeof(FormatList))]
+ public string DefaultFormatSelection
+ {
+ get
+ {
+ //if (_Folder != null) return FormatList.ToString(_Folder.FormatID);
+ //if (_FolderInfo != null) return FormatList.ToString(_FolderInfo.FormatID);
+ if (_Folder != null && _Folder.MyParent!= null && _Folder.MyParent.ActiveFormat != null) return _Folder.MyParent.ActiveFormat.PlantFormat.FormatData.Name;
+ if (_FolderInfo != null && _FolderInfo.MyParent != null && _FolderInfo.MyParent.ActiveFormat != null) return _FolderInfo.MyParent.ActiveFormat.PlantFormat.FormatData.Name;
+ return null;
+ }
+ }
+ public override string ToString()
+ {
+ string s = _Xp.ToString();
+ if (s == "" || s == "") return string.Empty;
+ return s;
+ }
+ #region GraphicsCategory // From veproms.ini
+ public bool CanWrite(string str)
+ {
+ return true;
+ }
+ //[Category("Graphics")]
+ [Category("Referenced Objects")]
+ [DisplayName("Graphic File Extension")]
+ //[DisplayName("Default File Extension")]
+ [RefreshProperties(RefreshProperties.All)]
+ [Description("Default File Extension")]
+ public string Graphics_defaultext
+ {
+ get
+ {
+ return _Xp["Graphics", "defaultext"];
+ }
+ set
+ {
+ _Xp["Graphics", "defaultext"] = value;
+ OnPropertyChanged("Graphics_defaultext");
+ }
+ }
+ #endregion
+ #region ColorCategory // From veproms.ini
+ // Note that not all possibilities from 16-bit will be added here, until
+ // it is determined how these will be used
+ //[Category("Color")]
+ [Category("Editor Settings")]
+ //[DisplayName("Referenced Object Highlight")]
+ [DisplayName("Step Editor Colors - Referenced Objects")]
+ [RefreshProperties(RefreshProperties.All)]
+ [Description("Color used to highlight an RO in procedure text")]
+ public string Color_ro
+ {
+ get
+ {
+ return _Xp["Color", "ro"];
+ }
+ set
+ {
+ _Xp["Color", "ro"] = value;
+ OnPropertyChanged("Color_ro");
+ }
+ }
+ //[Category("Color")]
+ [Category("Editor Settings")]
+ //[DisplayName("Transition Highlight")]
+ [DisplayName("Step Editor Colors - Transitions")]
+ [RefreshProperties(RefreshProperties.All)]
+ [Description("Color used to highlight a Transition in procedure text")]
+ public string Color_transition
+ {
+ get
+ {
+ return _Xp["Color", "transition"];
+ }
+ set
+ {
+ _Xp["Color", "transition"] = value;
+ OnPropertyChanged("Color_transition");
+ }
+ }
+ //[Category("Color")]
+ [Category("Editor Settings")]
+ //[DisplayName("editbackground")]
+ [DisplayName("Step Editor Colors - Active Background")]
+ [RefreshProperties(RefreshProperties.All)]
+ [Description("editbackground")]
+ public string Color_editbackground
+ {
+ get
+ {
+ return _Xp["Color", "editbackground"];
+ }
+ set
+ {
+ _Xp["Color", "editbackground"] = value;
+ OnPropertyChanged("Color_editbackground");
+ }
+ }
+ [Category("Color")]
+ [DisplayName("black")]
+ [RefreshProperties(RefreshProperties.All)]
+ [Description("black")]
+ public string Color_black
+ {
+ get
+ {
+ return _Xp["Color", "black"];
+ }
+ set
+ {
+ _Xp["Color", "black"] = value;
+ OnPropertyChanged("Color_black");
+ }
+ }
+ [Category("Color")]
+ [DisplayName("blue")]
+ [RefreshProperties(RefreshProperties.All)]
+ [Description("blue")]
+ public string Color_blue
+ {
+ get
+ {
+ return _Xp["Color", "blue"];
+ }
+ set
+ {
+ _Xp["Color", "blue"] = value;
+ OnPropertyChanged("Color_blue");
+ }
+ }
+ #endregion // From veproms.ini
+ #region SystemPrintCategory // From veproms.ini
+ //[Category("System Print")]
+ [Category("Print Settings")]
+ [DisplayName("Override Underline Thickness (dots)")]
+ //[DisplayName("Underline Width")]
+ [RefreshProperties(RefreshProperties.All)]
+ [Description("Underline Width")]
+ public int SysPrint_UWidth
+ {
+ get
+ {
+ string s = _Xp["SystemPrint", "UnderlineWidth"];
+ if (s == string.Empty) return 10;
+ return int.Parse(_Xp["SystemPrint", "UnderlineWidth"]);
+ }
+ set
+ {
+ _Xp["SystemPrint", "UnderlineWidth"] = value.ToString();
+ OnPropertyChanged("SysPrint_UWidth");
+ }
+ }
+ //[Category("System Print")]
+ [Category("Print Settings")]
+ [DisplayName("Adjust Starting Print Position (dots)")]
+ //[DisplayName("Vertical Offset")]
+ [RefreshProperties(RefreshProperties.All)]
+ [Description("Vertical Offset")]
+ public int SysPrint_VOffset
+ {
+ get
+ {
+ string s = _Xp["SystemPrint", "VerticalOffset"];
+ if (s == string.Empty) return 0;
+ return int.Parse(_Xp["SystemPrint", "VerticalOffset"]);
+ }
+ set
+ {
+ _Xp["SystemPrint", "VerticalOffset"] = value.ToString();
+ OnPropertyChanged("SysPrint_VOffset");
+ }
+ }
+ //[Category("System Print")]
+ [Category("Print Settings")]
+ [DisplayName("Override Normal Pen Width (dots)")]
+ //[DisplayName("Stroke Width")]
+ [RefreshProperties(RefreshProperties.All)]
+ [Description("Stroke Width")]
+ public int SysPrint_StrokeWidth
+ {
+ get
+ {
+ string s = _Xp["SystemPrint", "StrokeWidth"];
+ if (s == string.Empty) return 0;
+ return int.Parse(_Xp["SystemPrint", "StrokeWidth"]);
+ }
+ set
+ {
+ _Xp["SystemPrint", "StrokeWidth"] = value.ToString();
+ OnPropertyChanged("SysPrint_StrokeWidth");
+ }
+ }
+ //[Category("System Print")]
+ [Category("Print Settings")]
+ [DisplayName("Override Bold Pen Width (dots)")]
+ //[DisplayName("Stroke Width Bold")]
+ [RefreshProperties(RefreshProperties.All)]
+ [Description("Stroke Width Bold")]
+ public int SysPrint_StrokeWidthBold
+ {
+ get
+ {
+ string s = _Xp["SystemPrint", "StrokeWidthBold"];
+ if (s == string.Empty) return 0;
+ return int.Parse(_Xp["SystemPrint", "StrokeWidthBold"]);
+ }
+ set
+ {
+ _Xp["SystemPrint", "StrokeWidthBold"] = value.ToString();
+ OnPropertyChanged("SysPrint_StrokeWidthBold");
+ }
+ }
+ #endregion
+ #region StartupCategory // From veproms.ini
+ //[Category("Startup")]
+ [Category("Startup Message")]
+ [DisplayName("Startup MessageBox Title")]
+ [RefreshProperties(RefreshProperties.All)]
+ [Description("Startup MessageBox Title")]
+ public string Startup_MsgTitle
+ {
+ get
+ {
+ return _Xp["Startup", "MessageBoxTitle"];
+ }
+ set
+ {
+ _Xp["Startup", "MessageBoxTitle"] = value;
+ OnPropertyChanged("Startup_MsgTitle");
+ }
+ }
+ //[Category("Startup")]
+ [Category("Startup Message")]
+ [DisplayName("Startup Message File")]
+ [RefreshProperties(RefreshProperties.All)]
+ [Description("Startup Message File")]
+ public string Startup_MsgFile
+ {
+ get
+ {
+ return _Xp["Startup", "MessageFile"];
+ }
+ set
+ {
+ _Xp["Startup", "MessageFile"] = value;
+ OnPropertyChanged("Startup_MsgFile");
+ }
+ }
+ #endregion
+ #region ProcedureListTabStopsCategory // From veproms.ini
+ [Category("ProcedureListTabStops")]
+ [DisplayName("Procedure Number Tab")]
+ [RefreshProperties(RefreshProperties.All)]
+ [Description("Procedure Number Tab")]
+ public int ProcListTab_Number
+ {
+ get
+ {
+ string s = _Xp["ProcedureListTabStops", "ProcedureNumberTab"];
+ if (s == string.Empty) return 75;
+ return int.Parse(_Xp["ProcedureListTabStops", "ProcedureNumberTab"]);
+ }
+ set
+ {
+ _Xp["ProcedureListTabStops", "ProcedureNumberTab"] = value.ToString();
+ OnPropertyChanged("ProcListTab_Number");
+ }
+ }
+ [Category("ProcedureListTabStops")]
+ [DisplayName("Procedure Title Tab")]
+ [RefreshProperties(RefreshProperties.All)]
+ [Description("Procedure Title Tab")]
+ public int ProcListTab_Title
+ {
+ get
+ {
+ string s = _Xp["ProcedureListTabStops", "ProcedureTitleTab"];
+ if (s == string.Empty) return 175;
+ return int.Parse(_Xp["ProcedureListTabStops", "ProcedureTitleTab"]);
+ }
+ set
+ {
+ _Xp["ProcedureListTabStops", "ProcedureTitleTab"] = value.ToString();
+ OnPropertyChanged("ProcListTab_Title");
+ }
+ }
+ #endregion
+ #region FormatCategory
+ [TypeConverter(typeof(EnumDescConverter))]
+ public enum FormatColumns : int
+ {
+ Default = 0,
+ [Description("Single Column")]OneColumn,
+ [Description("Duel Column")]TwoColumn,
+ [Description("Triple Column")]ThreeColumn,
+ [Description("Quad Column")]FourColumns
+ }
+ //[Category("Format")]
+ //[DisplayName("Column Layout")]
+ [Category("Editor Settings")]
+ [DisplayName("Step Editor Columns")]
+ [RefreshProperties(RefreshProperties.All)]
+ [Description("Column Layout")]
+ public FormatColumns Format_Columns
+ {
+ get
+ {
+ string s = _Xp["format", "columns"];
+ if (s == string.Empty || s.Equals("-1")) return FormatColumns.Default;//return (FormatColumns)0;
+ return (FormatColumns)int.Parse(_Xp["format", "columns"]);
+ //return Enum.Parse(typeof(FormatColumns),_Xp["format", "columns"]);
+ }
+ set
+ {
+ if (value == 0) _Xp["format", "columns"] = string.Empty;
+ else _Xp["format", "columns"] = ((int)value).ToString();
+ OnPropertyChanged("Format_Columns");
+ }
+ }
+ //[Category("Format")]
+ //[DisplayName("Plant Format Name")]
+ [Category("Format Settings")]
+ [DisplayName("Format")]
+ [RefreshProperties(RefreshProperties.All)]
+ [Description("Default Plant Format")]
+ public string Format_Plant
+ {
+ get
+ {
+ return _Xp["format", "plant"];
+ }
+ set
+ {
+ _Xp["format", "plant"] = value;
+ OnPropertyChanged("Format_Plant");
+ }
+ }
+ #endregion
+ #region DefaultsCategory // from proc.ini
+ //[Category("Defaults")]
+ [Category("Referenced Objects")]
+ //[DisplayName("Default Setpoint Prefix")]
+ [DisplayName("Default RO Prefix")]
+ [RefreshProperties(RefreshProperties.All)]
+ [Description("Default Setpoint Prefix")]
+ public string Default_SPPrefix
+ {
+ get { return _Xp["default", "spprefix"]; }
+ set
+ {
+ _Xp["default", "spprefix"] = value;
+ OnPropertyChanged("Default_SPPrefix");
+ }
+ }
+ //[Category("Defaults")]
+ [Category("Referenced Objects")]
+ [DisplayName("Default Image Prefix")]
+ [RefreshProperties(RefreshProperties.All)]
+ [Description("Default Image Prefix")]
+ public string Default_IMPrefix
+ {
+ get { return _Xp["default", "imprefix"]; }
+ set
+ {
+ _Xp["default", "imprefix"] = value;
+ OnPropertyChanged("RO_IMPrefix");
+ }
+ }
+ #endregion
+ #region PrintSettingsCategory // From curset.dat
+ [Category("Print Settings")]
+ [DisplayName("Number of Copies")]
+ [RefreshProperties(RefreshProperties.All)]
+ [Description("Number of Copies")]
+ public int Print_NumCopies
+ {
+ get
+ {
+ string s = _Xp["PrintSettings", "numcopies"];
+ if (s == string.Empty) return 1;
+ return int.Parse(_Xp["PrintSettings", "numcopies"]);
+ }
+ set
+ {
+ _Xp["PrintSettings", "numcopies"] = value.ToString();
+ OnPropertyChanged("Print_NumCopies");
+ }
+ }
+ public enum PrintPagination : int
+ {
+ Free = 0, Fixed, Auto
+ }
+ [Category("Print Settings")]
+ [DisplayName("Pagination")]
+ [RefreshProperties(RefreshProperties.All)]
+ [Description("Pagination")]
+ public PrintPagination Print_Pagination
+ {
+ get
+ {
+ string s = _Xp["PrintSettings", "Pagination"];
+ if (s == string.Empty || s.Equals("-1")) return PrintPagination.Auto;
+ return (PrintPagination)int.Parse(_Xp["PrintSettings", "Pagination"]);
+ }
+ set
+ {
+ if (value == PrintPagination.Auto) _Xp["PrintSettings", "Pagination"] = string.Empty;
+ else _Xp["PrintSettings", "Pagination"] = ((int)value).ToString();
+ OnPropertyChanged("Print_Pagination");
+ }
+ }
+ [TypeConverter(typeof(EnumDescConverter))]
+ public enum PrintWatermark : int
+ {
+ None = 0, Reference, Draft, Master, Sample,
+ [Description("Information Only")]InformationOnly
+ }
+
+ [Category("Print Settings")]
+ [DisplayName("Watermark")]
+ [RefreshProperties(RefreshProperties.All)]
+ [Description("Watermark")]
+ public PrintWatermark Print_Watermark
+ {
+ get
+ {
+ string s = _Xp["PrintSettings", "Watermark"];
+ if (s == string.Empty || s.Equals("-1")) return PrintWatermark.Draft;
+ return (PrintWatermark)int.Parse(_Xp["PrintSettings", "Watermark"]);
+ }
+ set
+ {
+ if (value == PrintWatermark.Draft) _Xp["PrintSettings", "Watermark"] = string.Empty;
+ else _Xp["PrintSettings", "Watermark"] = ((int)value).ToString();
+ OnPropertyChanged("Print_Watermark");
+ }
+ }
+ [Category("Print Settings")]
+ [DisplayName("Disable Automatic Duplexing")]
+ //[DisplayName("Disable Duplex Printing")]
+ [RefreshProperties(RefreshProperties.All)]
+ [Description("Disable Duplex Printing")]
+ public bool Print_DisableDuplex
+ {
+ get
+ {
+ string s = _Xp["PrintSettings", "disableduplex"];
+ if (s == string.Empty) return false;
+ return bool.Parse(_Xp["PrintSettings", "disableduplex"]);
+ }
+ set
+ {
+ _Xp["PrintSettings", "disableduplex"] = value.ToString();
+ OnPropertyChanged("Print_DisableDuplex");
+ }
+ }
+ // Change Bar Use from 16-bit code:
+ // No Default
+ // Without Change Bars
+ // With Default Change Bars
+ // With User Specified Change Bars
+ [TypeConverter(typeof(EnumDescConverter))]
+ public enum PrintChangeBar : int
+ {
+ [Description("Select Before Printing")]SelectBeforePrinting = 0,
+ [Description("Without Change Bars")]Without,
+ [Description("With Default Change Bars")]WithDefault,
+ [Description("Use Custom Change Bars")]WithUserSpecified
+ }
+ //{
+ // [Description("Select When Printed")]NoDefault = 0,
+ // [Description("None")]Without,
+ // [Description("Default")]WithDefault,
+ // [Description("User Specified")]WithUserSpecified
+ //}
+ //[Category("Print Settings")]
+ [Category("Format Settings")]
+ [DisplayName("Change Bar")]
+ [RefreshProperties(RefreshProperties.All)]
+ [Description("Change Bar Use")]
+ public PrintChangeBar Print_ChangeBar
+ {
+ get
+ {
+ string s = _Xp["PrintSettings", "ChangeBar"];
+ if (s == string.Empty || s.Equals("-1")) return PrintChangeBar.SelectBeforePrinting;//PrintChangeBar.NoDefault;
+ return (PrintChangeBar)int.Parse(_Xp["PrintSettings", "ChangeBar"]);
+ }
+ set
+ {
+ // if (value == PrintChangeBar.NoDefault) _Xp["PrintSettings", "ChangeBar"] = string.Empty;
+ if (value == PrintChangeBar.SelectBeforePrinting) _Xp["PrintSettings", "ChangeBar"] = string.Empty;
+ else _Xp["PrintSettings", "ChangeBar"] = ((int)value).ToString();
+ OnPropertyChanged("Print_ChangeBar");
+ }
+ }
+ // User Specified Change Bar Location from16-bit code:
+ // With Text
+ // Outside Box
+ // AER on LEFT, RNO on Right
+ // To the Left of Text
+ [TypeConverter(typeof(EnumDescConverter))]
+ public enum PrintChangeBarLoc : int
+ {
+ [Description("With Text")]WithText = 0,
+ [Description("Outside Box")]OutsideBox,
+ [Description("AER on Left RNO on Right")]AERleftRNOright,
+ [Description("To the Left of the Text")]LeftOfText
+ }
+
+ //[Category("Print Settings")]
+ [Category("Format Settings")]
+ //[DisplayName("Change Bar Location")]
+ [DisplayName("Change Bar Position")]
+ [RefreshProperties(RefreshProperties.All)]
+ [Description("User Specified Change Bar Location")]
+ public PrintChangeBarLoc Print_ChangeBarLoc
+ {
+ get
+ {
+ string s = _Xp["PrintSettings", "ChangeBarLoc"];
+ if (s == string.Empty || s.Equals("-1")) return PrintChangeBarLoc.WithText;
+ return (PrintChangeBarLoc)int.Parse(_Xp["PrintSettings", "ChangeBarLoc"]);
+ }
+ set
+ {
+ if (value == PrintChangeBarLoc.WithText) _Xp["PrintSettings", "ChangeBarLoc"] = string.Empty;
+ else _Xp["PrintSettings", "ChangeBarLoc"] = ((int)value).ToString();
+ OnPropertyChanged("Print_ChangeBarLoc");
+ }
+ }
+
+ // Change Bar Text from16-bit code:
+ // Date and Change ID
+ // Revision Number
+ // Change ID
+ // No Change Bar Message
+ // User Defined Message
+ [TypeConverter(typeof(EnumDescConverter))]
+ public enum PrintChangeBarText : int
+ {
+ [Description("Date and Change ID")]DateChgID = 0,
+ [Description("Revision Number")]RevNum,
+ [Description("Change ID")]ChgID,
+ [Description("No Change Bar Text")]None,
+ [Description("Custom Change Bar Text")]UserDef
+ }
+ //[Category("Print Settings")]
+ [Category("Format Settings")]
+ //[DisplayName("Change Bar Text")]
+ [DisplayName("Change bar Text Type")]
+ [RefreshProperties(RefreshProperties.All)]
+ [Description("Change Bar Text")]
+ public PrintChangeBarText Print_ChangeBarText
+ {
+ get
+ {
+ string s = _Xp["PrintSettings", "ChangeBarText"];
+ if (s == string.Empty || s.Equals("-1")) return PrintChangeBarText.DateChgID;
+ return (PrintChangeBarText)int.Parse(_Xp["PrintSettings", "ChangeBarText"]);
+ }
+ set
+ {
+ if (value == PrintChangeBarText.DateChgID) _Xp["PrintSettings", "ChangeBarText"] = string.Empty;
+ else _Xp["PrintSettings", "ChangeBarText"] = ((int)value).ToString();
+ OnPropertyChanged("Print_ChangeBarText");
+ }
+ }
+
+ [Category("Print Settings")]
+ [DisplayName("User Format")]
+ [RefreshProperties(RefreshProperties.All)]
+ [Description("User Format")]
+ public string Print_UserFormat
+ {
+ get
+ {
+ return _Xp["PrintSettings", "userformat"];
+ }
+ set
+ {
+ _Xp["PrintSettings", "userformat"] = value;
+ OnPropertyChanged("Print_UserFormat");
+ }
+ }
+
+ //[Category("Print Settings")]
+ [Category("Format Settings")]
+ //[DisplayName("User Change Bar Message1")]
+ [DisplayName("Custom Change Bar Message Line One")]
+ [RefreshProperties(RefreshProperties.All)]
+ [Description("User Change Bar Message1")]
+ public string Print_UserCBMess1
+ {
+ get
+ {
+ return _Xp["PrintSettings", "usercbmess1"];
+ }
+ set
+ {
+ _Xp["PrintSettings", "usercbmess1"] = value;
+ OnPropertyChanged("Print_UserCBMess1");
+ }
+ }
+
+ //[Category("Print Settings")]
+ [Category("Format Settings")]
+ //[DisplayName("User Change Bar Message2")]
+ [DisplayName("Custom Change Bar Message Line Two")]
+ [RefreshProperties(RefreshProperties.All)]
+ [Description("User Change Bar Message2")]
+ public string Print_UserCBMess2
+ {
+ get
+ {
+ return _Xp["PrintSettings", "usercbmess2"];
+ }
+ set
+ {
+ _Xp["PrintSettings", "usercbmess2"] = value;
+ OnPropertyChanged("Print_UserCBMess2");
+ }
+ }
+ #endregion
+ //[Category("Defaults")]
+ [Category("Editor Settings")]
+ //[DisplayName("Default BackColor")]
+ [DisplayName("Step Editor Colors - Non Active Background")]
+ [RefreshProperties(RefreshProperties.All)]
+ [Description("Default Background Color")]
+ public Color Default_BkColor
+ {
+ get
+ {
+ //return _Xp["default", "BkColor"];
+ string sColor = _Xp["default", "BkColor"];
+ if (sColor == string.Empty) sColor = "White";
+ if (sColor[0] == '[')
+ {
+ string[] parts = sColor.Substring(1, sColor.Length - 2).Split(",".ToCharArray());
+ return Color.FromArgb(Int32.Parse(parts[0]), Int32.Parse(parts[1]), Int32.Parse(parts[2]));
+ }
+ else return Color.FromName(sColor);
+ }
+ set
+ {
+ if (value.IsNamedColor) _Xp["default", "BkColor"] = value.Name;
+ else
+ {
+ _Xp["default", "BkColor"] = string.Format("[{0},{1},{2}]", value.R, value.G, value.B);
+ }
+ OnPropertyChanged("Default_BkColor");
+ }
+ }
+ }
+}
diff --git a/PROMS/VEPROMS.CSLA.Library/Config/ProcConfig.cs b/PROMS/VEPROMS.CSLA.Library/Config/ProcConfig.cs
new file mode 100644
index 00000000..5185c38c
--- /dev/null
+++ b/PROMS/VEPROMS.CSLA.Library/Config/ProcConfig.cs
@@ -0,0 +1,520 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+using System.ComponentModel;
+using DescriptiveEnum;
+
+namespace VEPROMS.CSLA.Library
+{
+ [Serializable]
+ [TypeConverter(typeof(ExpandableObjectConverter))]
+ public class ProcedureConfig : DynamicTypeDescriptor, INotifyPropertyChanged
+ {
+ #region Events
+ public event PropertyChangedEventHandler PropertyChanged;
+ private void OnPropertyChanged(String info)
+ {
+ if (PropertyChanged != null)
+ PropertyChanged(this, new PropertyChangedEventArgs(info));
+ }
+ #endregion
+ #region DynamicTypeDescriptor
+ internal override bool IsReadOnly
+ {
+ get { return _Procedure == null; }
+ }
+ #endregion
+ #region XML
+ private XMLProperties _Xp;
+ private XMLProperties Xp
+ {
+ get { return _Xp; }
+ }
+ #endregion
+ #region Constructors
+ public bool ParentLookup
+ {
+ get { return _Xp.ParentLookup; }
+ set { _Xp.ParentLookup = value; }
+ }
+ [NonSerialized]
+ private bool _AncestorLookup;
+ public bool AncestorLookup
+ {
+ get { return _AncestorLookup; }
+ set { _AncestorLookup = value; }
+ }
+ private Procedure _Procedure;
+ private ProcedureInfo _ProcedureInfo;
+ public ProcedureConfig(Procedure procedure)
+ {
+ _Procedure = procedure;
+ string xml = procedure.MyContent.Config;
+ if (xml == string.Empty) xml = "";
+ _Xp = new XMLProperties(xml);
+ if (procedure.ActiveParent != null) _Xp.LookInAncestor += new XMLPropertiesEvent(Xp_LookInAncestorFolder);
+ }
+ private string Xp_LookInAncestorFolder(object sender, XMLPropertiesArgs args)
+ {
+ if (_AncestorLookup || ParentLookup)
+ {
+ string retval;
+ Procedure proc = _Procedure;
+ while (proc.ActiveParent.GetType() == typeof(Procedure))
+ {
+ retval = proc.ProcedureConfig.GetValue(args.Group, args.Item);
+ if (retval != string.Empty) return retval;
+ proc = (Procedure) proc.ActiveParent;
+ }
+ DocVersion docVersion = (DocVersion)proc.ActiveParent;
+ retval = docVersion.DocVersionConfig.GetValue(args.Group, args.Item);
+ if (retval != string.Empty) return retval;
+ for (Folder folder = docVersion.MyFolder; folder != null; folder = folder.MyParent)
+ {
+ retval = folder.FolderConfig.GetValue(args.Group, args.Item);
+ if (retval != string.Empty) return retval;
+ }
+ }
+ return string.Empty;
+ }
+ private string Xp_LookInAncestorFolderInfo(object sender, XMLPropertiesArgs args)
+ {
+ if (_AncestorLookup || ParentLookup)
+ {
+
+ DocVersionInfo docVersion = (DocVersionInfo)_Procedure.ActiveParent;
+ string retval = docVersion.DocVersionConfig.GetValue(args.Group, args.Item);
+ if (retval != string.Empty) return retval;
+ for (FolderInfo folder = docVersion.MyFolder; folder != null; folder = folder.MyParent)
+ {
+ retval = folder.FolderConfig.GetValue(args.Group, args.Item);
+ if (retval != string.Empty) return retval;
+ }
+ }
+ return string.Empty;
+ }
+ public ProcedureConfig(ProcedureInfo procedureInfo)
+ {
+ _ProcedureInfo = procedureInfo;
+ string xml = procedureInfo.MyContent.Config;
+ if (xml == string.Empty) xml = "";
+ _Xp = new XMLProperties(xml);
+ }
+ public ProcedureConfig(string xml)
+ {
+ if (xml == string.Empty) xml = "";
+ _Xp = new XMLProperties(xml);
+ }
+ //public ProcedureConfig()
+ //{
+ // _Xp = new XMLProperties();
+ //}
+ internal string GetValue(string group, string item)
+ {
+ return _Xp[group, item];
+ }
+ #endregion
+ #region Local Properties
+ //[Category("Identification")]
+ [Category("General")]
+ [DisplayName("Number")]
+ [Description("Number")]
+ public string Number
+ {
+ get { return (_Procedure != null ? _Procedure.MyContent.Number : _ProcedureInfo.MyContent.Number); }
+ set { if (_Procedure != null) _Procedure.MyContent.Number = value; }
+ }
+ //[Category("Identification")]
+ [Category("General")]
+ [DisplayName("Title")]
+ [Description("Title")]
+ public string Title
+ {
+ get { return (_Procedure != null ? _Procedure.MyContent.Text : _ProcedureInfo.MyContent.Text); }
+ set { if (_Procedure != null) _Procedure.MyContent.Text = value; }
+ }
+ [Category("Identification")]
+ [DisplayName("Old Sequence")]
+ [Description("Old Sequence")]
+ public string OldSequence
+ {
+ get { return (_Procedure != null ? _Procedure.MyContent.MyZContent.OldStepSequence : (_ProcedureInfo.MyContent.MyZContent == null? null :_ProcedureInfo.MyContent.MyZContent.OldStepSequence)); }
+ set { if (_Procedure != null) _Procedure.MyContent.MyZContent.OldStepSequence = value; }
+ }
+ [Category("Identification")]
+ [DisplayName("Dirty")]
+ [Description("Dirty")]
+ public bool Dirty
+ {
+ get { return (_Procedure != null ? _Procedure.IsDirty : false ); }
+ }
+ //[Category("Format")]
+ [Category("Format Settings")]
+ [DisplayName("Format")]
+ [Description("Format")]
+ [TypeConverter(typeof(FormatList))]
+ public string FormatSelection
+ {
+ get
+ {
+ //if (_DocVersion != null) return FormatList.ToString(_DocVersion.FormatID);
+ //if (_DocVersionInfo != null) return FormatList.ToString(_DocVersionInfo.FormatID);
+ if (_Procedure != null && _Procedure.MyContent.MyFormat != null) return _Procedure.MyContent.MyFormat.PlantFormat.FormatData.Name;
+ if (_ProcedureInfo != null && _ProcedureInfo.MyContent.MyFormat != null) return _ProcedureInfo.MyContent.MyFormat.PlantFormat.FormatData.Name;
+ return null;
+ }
+ set
+ {
+ if (_Procedure != null) _Procedure.MyContent.MyFormat = FormatList.ToFormat(value); // Can only be set if _DocVersion is set
+ }
+ }
+ //[Category("Format")]
+ [Category("Format Settings")]
+ //[DisplayName("Format")]
+ [DisplayName("Default Format")]
+ [Description("Format")]
+ [TypeConverter(typeof(FormatList))]
+ public string DefaultFormatSelection
+ {
+ get
+ {
+ //if (_Folder != null) return FormatList.ToString(_Folder.FormatID);
+ //if (_FolderInfo != null) return FormatList.ToString(_FolderInfo.FormatID);
+ if (_Procedure != null && _Procedure.ActiveParent != null && _Procedure.ActiveParent.ActiveFormat != null) return _Procedure.ActiveParent.ActiveFormat.PlantFormat.FormatData.Name;
+ if (_ProcedureInfo != null && _ProcedureInfo.MyParent != null && _ProcedureInfo.MyParent.ActiveFormat != null) return _ProcedureInfo.MyParent.ActiveFormat.PlantFormat.FormatData.Name;
+ return null;
+ }
+ }
+ #endregion
+ #region ToString
+ public override string ToString()
+ {
+ string s = _Xp.ToString();
+ if (s == "" || s == "") return string.Empty;
+ return s;
+ }
+ #endregion
+ #region FormatCategory
+ [TypeConverter(typeof(EnumDescConverter))]
+ public enum FormatColumns : int
+ {
+ Default = 0,
+ [Description("Single Column")]
+ OneColumn,
+ [Description("Duel Column")]
+ TwoColumn,
+ [Description("Triple Column")]
+ ThreeColumn,
+ [Description("Quad Column")]
+ FourColumns
+ }
+ //[Category("Format")]
+ [Category("General")]
+ //[DisplayName("Column Layout")]
+ [DisplayName("Default Column Mode")]
+ [RefreshProperties(RefreshProperties.All)]
+ [Description("Column Layout")]
+ public FormatColumns Format_Columns
+ {
+ get
+ {
+ string s = _Xp["format", "columns"];
+ if (s == string.Empty || s.Equals("-1")) return FormatColumns.Default;//(FormatColumns)0;
+ return (FormatColumns)int.Parse(_Xp["format", "columns"]);
+ //return Enum.Parse(typeof(FormatColumns),_Xp["format", "columns"]);
+ }
+ set
+ {
+ if (value == 0) _Xp["format", "columns"] = string.Empty;
+ else _Xp["format", "columns"] = ((int)value).ToString();
+ OnPropertyChanged("Format_Columns");
+ }
+ }
+ [Category("Format")]
+ [DisplayName("Plant Format Name")]
+ [RefreshProperties(RefreshProperties.All)]
+ [Description("Default Plant Format")]
+ public string Format_Plant
+ {
+ get
+ {
+ return _Xp["format", "plant"];
+ }
+ set
+ {
+ _Xp["format", "plant"] = value;
+ OnPropertyChanged("Format_Plant");
+ }
+ }
+ #endregion
+ #region PrintSettingsCategory // From curset.dat
+ [Category("Print Settings")]
+ [DisplayName("Number of Copies")]
+ [RefreshProperties(RefreshProperties.All)]
+ [Description("Number of Copies")]
+ public int Print_NumCopies
+ {
+ get
+ {
+ string s = _Xp["PrintSettings", "numcopies"];
+ if (s == string.Empty) return 1;
+ return int.Parse(_Xp["PrintSettings", "numcopies"]);
+ }
+ set
+ {
+ _Xp["PrintSettings", "numcopies"] = value.ToString();
+ OnPropertyChanged("Print_NumCopies");
+ }
+ }
+ public enum PrintPagination : int
+ {
+ Free = 0, Fixed,
+ [Description("Automatic")]
+ Auto
+ }
+ [Category("Print Settings")]
+ [DisplayName("Pagination")]
+ [RefreshProperties(RefreshProperties.All)]
+ [Description("Pagination")]
+ public PrintPagination Print_Pagination
+ {
+ get
+ {
+ string s = _Xp["PrintSettings", "Pagination"];
+ if (s == string.Empty || s.Equals("-1")) return PrintPagination.Auto;
+ return (PrintPagination)int.Parse(_Xp["PrintSettings", "Pagination"]);
+ }
+ set
+ {
+ if (value == PrintPagination.Auto) _Xp["PrintSettings", "Pagination"] = string.Empty;
+ else _Xp["PrintSettings", "Pagination"] = ((int)value).ToString();
+ OnPropertyChanged("Print_Pagination");
+ }
+ }
+ [TypeConverter(typeof(EnumDescConverter))]
+ public enum PrintWatermark : int
+ {
+ None = 0, Reference, Draft, Master, Sample,
+ [Description("Information Only")]
+ InformationOnly
+ }
+ [Category("Print Settings")]
+ [DisplayName("Watermark")]
+ [RefreshProperties(RefreshProperties.All)]
+ [Description("Watermark")]
+ public PrintWatermark Print_Watermark
+ {
+ get
+ {
+ string s = _Xp["PrintSettings", "Watermark"];
+ if (s == string.Empty || s.Equals("-1")) return PrintWatermark.Draft;
+ return (PrintWatermark)int.Parse(_Xp["PrintSettings", "Watermark"]);
+ }
+ set
+ {
+ if (value == PrintWatermark.Draft) _Xp["PrintSettings", "Watermark"] = string.Empty;
+ else _Xp["PrintSettings", "Watermark"] = ((int)value).ToString();
+ OnPropertyChanged("Print_Watermark");
+ }
+ }
+ [Category("Print Settings")]
+ //[DisplayName("Disable Duplex Printing")]
+ [DisplayName("Disable Automatic Duplexing")]
+ [RefreshProperties(RefreshProperties.All)]
+ [Description("Disable Duplex Printing")]
+ public bool Print_DisableDuplex
+ {
+ get
+ {
+ string s = _Xp["PrintSettings", "disableduplex"];
+ if (s == string.Empty) return false;
+ return bool.Parse(_Xp["PrintSettings", "disableduplex"]);
+ }
+ set
+ {
+ _Xp["PrintSettings", "disableduplex"] = value.ToString();
+ OnPropertyChanged("Print_DisableDuplex");
+ }
+ }
+ // Change Bar Use from 16-bit code:
+ // No Default
+ // Without Change Bars
+ // With Default Change Bars
+ // With User Specified Change Bars
+ [TypeConverter(typeof(EnumDescConverter))]
+ public enum PrintChangeBar : int
+ {
+ [Description("Select Before Printing")]
+ SelectBeforePrinting = 0,
+ [Description("Without Change Bars")]
+ Without,
+ [Description("With Default Change Bars")]
+ WithDefault,
+ [Description("Use Custom Change Bars")]
+ WithUserSpecified
+ }
+ //{
+ // [Description("Select When Printed")]NoDefault = 0,
+ // [Description("None")]Without,
+ // [Description("Default")]WithDefault,
+ // [Description("User Specified")]WithUserSpecified
+ //}
+ //[Category("Print Settings")]
+ [Category("Format Settings")]
+ [DisplayName("Change Bar")]
+ [RefreshProperties(RefreshProperties.All)]
+ [Description("Change Bar Use")]
+ public PrintChangeBar Print_ChangeBar
+ {
+ get
+ {
+ string s = _Xp["PrintSettings", "ChangeBar"];
+ if (s == string.Empty || s.Equals("-1")) return PrintChangeBar.SelectBeforePrinting;//PrintChangeBar.NoDefault;
+ return (PrintChangeBar)int.Parse(_Xp["PrintSettings", "ChangeBar"]);
+ }
+ set
+ {
+ //if (value == PrintChangeBar.NoDefault) _Xp["PrintSettings", "ChangeBar"] = string.Empty;
+ if (value == PrintChangeBar.SelectBeforePrinting) _Xp["PrintSettings", "ChangeBar"] = string.Empty;
+ else _Xp["PrintSettings", "ChangeBar"] = ((int)value).ToString();
+ OnPropertyChanged("Print_ChangeBar");
+ }
+ }
+ // User Specified Change Bar Location from16-bit code:
+ // With Text
+ // Outside Box
+ // AER on LEFT, RNO on Right
+ // To the Left of Text
+ [TypeConverter(typeof(EnumDescConverter))]
+ public enum PrintChangeBarLoc : int
+ {
+ [Description("With Text")]
+ WithText = 0,
+ [Description("Outside Box")]
+ OutsideBox,
+ [Description("AER on Left RNO on Right")]
+ AERleftRNOright,
+ [Description("To the Left of the Text")]
+ LeftOfText
+ }
+ //[Category("Print Settings")]
+ [Category("Format Settings")]
+ //[DisplayName("Change Bar Location")]
+ [DisplayName("Change Bar Position")]
+ [RefreshProperties(RefreshProperties.All)]
+ [Description("User Specified Change Bar Location")]
+ public PrintChangeBarLoc Print_ChangeBarLoc
+ {
+ get
+ {
+ string s = _Xp["PrintSettings", "ChangeBarLoc"];
+ if (s == string.Empty || s.Equals("-1")) return PrintChangeBarLoc.WithText;
+ return (PrintChangeBarLoc)int.Parse(_Xp["PrintSettings", "ChangeBarLoc"]);
+ }
+ set
+ {
+ if (value == PrintChangeBarLoc.WithText) _Xp["PrintSettings", "ChangeBarLoc"] = string.Empty;
+ else _Xp["PrintSettings", "ChangeBarLoc"] = ((int)value).ToString();
+ OnPropertyChanged("Print_ChangeBarLoc");
+ }
+ }
+
+ // Change Bar Text from16-bit code:
+ // Date and Change ID
+ // Revision Number
+ // Change ID
+ // No Change Bar Message
+ // User Defined Message
+ [TypeConverter(typeof(EnumDescConverter))]
+ public enum PrintChangeBarText : int
+ {
+ [Description("Date and Change ID")]
+ DateChgID = 0,
+ [Description("Revision Number")]
+ RevNum,
+ [Description("Change ID")]
+ ChgID,
+ [Description("No Change Bar Text")]
+ None,
+ [Description("Custom Change Bar Text")]
+ UserDef
+ }
+ //[Category("Print Settings")]
+ [Category("Format Settings")]
+ //[DisplayName("Change Bar Text")]
+ [DisplayName("Change Bar Text Type")]
+ [RefreshProperties(RefreshProperties.All)]
+ [Description("Change Bar Text")]
+ public PrintChangeBarText Print_ChangeBarText
+ {
+ get
+ {
+ string s = _Xp["PrintSettings", "ChangeBarText"];
+ if (s == string.Empty || s.Equals("-1")) return PrintChangeBarText.DateChgID;
+ return (PrintChangeBarText)int.Parse(_Xp["PrintSettings", "ChangeBarText"]);
+ }
+ set
+ {
+ if (value == PrintChangeBarText.DateChgID) _Xp["PrintSettings", "ChangeBarText"] = string.Empty;
+ else _Xp["PrintSettings", "ChangeBarText"] = ((int)value).ToString();
+ OnPropertyChanged("Print_ChangeBarText");
+ }
+ }
+
+ [Category("Print Settings")]
+ [DisplayName("User Format")]
+ [RefreshProperties(RefreshProperties.All)]
+ [Description("User Format")]
+ public string Print_UserFormat
+ {
+ get
+ {
+ return _Xp["PrintSettings", "userformat"];
+ }
+ set
+ {
+ _Xp["PrintSettings", "userformat"] = value;
+ OnPropertyChanged("Print_UserFormat");
+ }
+ }
+
+ //[Category("Print Settings")]
+ [Category("Format Settings")]
+ //[DisplayName("User Change Bar Message1")]
+ [DisplayName("Custom Change Bar Message Line One")]
+ [RefreshProperties(RefreshProperties.All)]
+ [Description("User Change Bar Message1")]
+ public string Print_UserCBMess1
+ {
+ get
+ {
+ return _Xp["PrintSettings", "usercbmess1"];
+ }
+ set
+ {
+ _Xp["PrintSettings", "usercbmess1"] = value;
+ OnPropertyChanged("Print_UserCBMess1");
+ }
+ }
+
+ //[Category("Print Settings")]
+ [Category("Format Settings")]
+ //[DisplayName("User Change Bar Message2")]
+ [DisplayName("Custom Change Bar Message Line Two")]
+ [RefreshProperties(RefreshProperties.All)]
+ [Description("User Change Bar Message2")]
+ public string Print_UserCBMess2
+ {
+ get
+ {
+ return _Xp["PrintSettings", "usercbmess2"];
+ }
+ set
+ {
+ _Xp["PrintSettings", "usercbmess2"] = value;
+ OnPropertyChanged("Print_UserCBMess2");
+ }
+ }
+ #endregion
+ }
+}
diff --git a/PROMS/VEPROMS.CSLA.Library/Config/SectionConfig.cs b/PROMS/VEPROMS.CSLA.Library/Config/SectionConfig.cs
new file mode 100644
index 00000000..753b40db
--- /dev/null
+++ b/PROMS/VEPROMS.CSLA.Library/Config/SectionConfig.cs
@@ -0,0 +1,441 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+using System.ComponentModel;
+using DescriptiveEnum;
+
+namespace VEPROMS.CSLA.Library
+{
+ [Serializable]
+ [TypeConverter(typeof(ExpandableObjectConverter))]
+ public class SectionConfig : DynamicTypeDescriptor, INotifyPropertyChanged
+ {
+ #region Events
+ public event PropertyChangedEventHandler PropertyChanged;
+ private void OnPropertyChanged(String info)
+ {
+ if (PropertyChanged != null)
+ PropertyChanged(this, new PropertyChangedEventArgs(info));
+ }
+ #endregion
+ #region DynamicTypeDescriptor
+ internal override bool IsReadOnly
+ {
+ get { return false; }//_Section == null; }
+ }
+ #endregion
+ #region XML
+ private XMLProperties _Xp;
+ private XMLProperties Xp
+ {
+ get { return _Xp; }
+ }
+ #endregion
+ #region Constructors
+ public bool ParentLookup
+ {
+ get { return _Xp.ParentLookup; }
+ set { _Xp.ParentLookup = value; }
+ }
+ [NonSerialized]
+ private bool _AncestorLookup;
+ public bool AncestorLookup
+ {
+ get { return _AncestorLookup; }
+ set { _AncestorLookup = value; }
+ }
+ private Section _Section;
+ private SectionInfo _SectionInfo;
+ public SectionConfig(Section section)
+ {
+ _Section = section;
+ string xml = section.MyContent.Config;
+ if (xml == string.Empty) xml = "";
+ _Xp = new XMLProperties(xml);
+ if (section.ActiveParent != null) _Xp.LookInAncestor += new XMLPropertiesEvent(Xp_LookInAncestorFolder);
+ }
+ private string Xp_LookInAncestorFolder(object sender, XMLPropertiesArgs args)
+ {
+ if (_AncestorLookup || ParentLookup)
+ {
+ string retval;
+ Section sect = _Section;
+ while (sect.ActiveParent.GetType() == typeof(Section))
+ {
+ retval = sect.SectionConfig.GetValue(args.Group, args.Item);
+ if (retval != string.Empty) return retval;
+ sect = (Section)sect.ActiveParent;
+ }
+ Procedure proc = (Procedure) sect.ActiveParent;
+ while (proc.ActiveParent.GetType() == typeof(Procedure))
+ {
+ retval = proc.ProcedureConfig.GetValue(args.Group, args.Item);
+ if (retval != string.Empty) return retval;
+ proc = (Procedure)proc.ActiveParent;
+ }
+ DocVersion docVersion = (DocVersion)proc.ActiveParent;
+ retval = docVersion.DocVersionConfig.GetValue(args.Group, args.Item);
+ if (retval != string.Empty) return retval;
+ for (Folder folder = docVersion.MyFolder; folder != null; folder = folder.MyParent)
+ {
+ retval = folder.FolderConfig.GetValue(args.Group, args.Item);
+ if (retval != string.Empty) return retval;
+ }
+ }
+ return string.Empty;
+ }
+ private string Xp_LookInAncestorFolderInfo(object sender, XMLPropertiesArgs args)
+ {
+ if (_AncestorLookup || ParentLookup)
+ {
+ string retval;
+ Section sect = _Section;
+ while (sect.ActiveParent.GetType() == typeof(Section))
+ {
+ //retval = sect.SectionConfig.GetValue(args.Group, args.Item);
+ //if (retval != string.Empty) return retval;
+ sect = (Section)sect.ActiveParent;
+ }
+ Procedure proc = (Procedure)sect.ActiveParent;
+ DocVersionInfo docVersion = (DocVersionInfo) proc.ActiveParent;
+ retval = docVersion.DocVersionConfig.GetValue(args.Group, args.Item);
+ if (retval != string.Empty) return retval;
+ for (FolderInfo folder = docVersion.MyFolder; folder != null; folder = folder.MyParent)
+ {
+ retval = folder.FolderConfig.GetValue(args.Group, args.Item);
+ if (retval != string.Empty) return retval;
+ }
+ }
+ return string.Empty;
+ }
+ public SectionConfig(SectionInfo sectionInfo)
+ {
+ _SectionInfo = sectionInfo;
+ string xml = sectionInfo.MyContent.Config;
+ if (xml == string.Empty) xml = "";
+ _Xp = new XMLProperties(xml);
+ }
+ public SectionConfig(string xml)
+ {
+ if (xml == string.Empty) xml = "";
+ _Xp = new XMLProperties(xml);
+ }
+ public SectionConfig()
+ {
+ _Xp = new XMLProperties();
+ }
+ internal string GetValue(string group, string item)
+ {
+ return _Xp[group, item];
+ }
+ #endregion
+ #region Local Properties
+ //[Category("Identification")]
+ [Category("General")]
+ [DisplayName("Number")]
+ [Description("Number")]
+ public string Number
+ {
+ get { return (_Section != null ? _Section.MyContent.Number : _SectionInfo.MyContent.Number); }
+ set { if (_Section != null) _Section.MyContent.Number = value; }
+ }
+ //[Category("Identification")]
+ [Category("General")]
+ [DisplayName("Title")]
+ [Description("Title")]
+ public string Title
+ {
+ get { return (_Section != null ? _Section.MyContent.Text : _SectionInfo.MyContent.Text); }
+ set { if (_Section != null) _Section.MyContent.Text = value; }
+ }
+ [Category("Identification")]
+ [DisplayName("Old Sequence")]
+ [Description("Old Sequence")]
+ public string OldSequence
+ {
+ get { return (_Section != null ? _Section.MyContent.MyZContent.OldStepSequence : (_SectionInfo.MyContent.MyZContent == null ? null : _SectionInfo.MyContent.MyZContent.OldStepSequence)); }
+ set { if (_Section != null) _Section.MyContent.MyZContent.OldStepSequence = value; }
+ }
+ [Category("Identification")]
+ [DisplayName("Dirty")]
+ [Description("Dirty")]
+ public bool Dirty
+ {
+ get { return (_Section != null ? _Section.IsDirty : false); }
+ }
+ [Category("Format")]
+ [DisplayName("Format")]
+ [Description("Format")]
+ [TypeConverter(typeof(FormatList))]
+ public string FormatSelection
+ {
+ get
+ {
+ //if (_DocVersion != null) return FormatList.ToString(_DocVersion.FormatID);
+ //if (_DocVersionInfo != null) return FormatList.ToString(_DocVersionInfo.FormatID);
+ if (_Section != null && _Section.MyContent.MyFormat != null) return _Section.MyContent.MyFormat.PlantFormat.FormatData.Name;
+ if (_SectionInfo != null && _SectionInfo.MyContent.MyFormat != null) return _SectionInfo.MyContent.MyFormat.PlantFormat.FormatData.Name;
+ return null;
+ }
+ set
+ {
+ if (_Section != null) _Section.MyContent.MyFormat = FormatList.ToFormat(value); // Can only be set if _DocVersion is set
+ }
+ }
+ [Category("Format")]
+ //[DisplayName("DefFormat")]
+ [DisplayName("Default Format")]
+ [Description("Format")]
+ [TypeConverter(typeof(FormatList))]
+ public string DefaultFormatSelection
+ {
+ get
+ {
+ //if (_Folder != null) return FormatList.ToString(_Folder.FormatID);
+ //if (_FolderInfo != null) return FormatList.ToString(_FolderInfo.FormatID);
+ if (_Section != null && _Section.ActiveParent != null && _Section.ActiveParent.ActiveFormat != null) return _Section.ActiveParent.ActiveFormat.PlantFormat.FormatData.Name;
+ if (_SectionInfo != null && _SectionInfo.MyParent != null && _SectionInfo.MyParent.ActiveFormat != null) return _SectionInfo.MyParent.ActiveFormat.PlantFormat.FormatData.Name;
+ return null;
+ }
+ }
+ #endregion
+ #region ToString
+ public override string ToString()
+ {
+ string s = _Xp.ToString();
+ if (s == "" || s == "") return string.Empty;
+ return s;
+ }
+ #endregion
+ #region SectionCategory // from sequence number in 16-bit database.
+ // jsj ...
+ public enum SectionPagination : int
+ {
+ Default = 0, Continuous, Separate
+ }
+ //[Category("Section")]
+ [Category("Format")]
+ [DisplayName("Section Pagination")]
+ [RefreshProperties(RefreshProperties.All)]
+ [Description("Section Pagination")]
+ public SectionPagination Section_Pagination
+ {
+ get
+ {
+ string s = _Xp["Section", "Pagination"];
+ if (s == string.Empty || s.Equals("-1")) return SectionPagination.Default;
+ return (SectionPagination)int.Parse(_Xp["Section", "Pagination"]);
+ }
+ set
+ {
+ if (value == SectionPagination.Default) _Xp["Section", "Pagination"] = string.Empty;
+ else _Xp["Section", "Pagination"] = ((int)value).ToString();
+ OnPropertyChanged("Section_Pagination");
+ }
+ }
+ // ... jsj
+
+ //[Category("Section")]
+ //[DisplayName("Section Pagination")]
+ //[RefreshProperties(RefreshProperties.All)]
+ //[Description("Section Pagination")]
+ //public string Section_Pagination
+ //{
+ // get
+ // {
+ // return _Xp["Section", "Pagination"];
+ // }
+ // set
+ // {
+ // _Xp["Section", "Pagination"] = value;
+ // OnPropertyChanged("Section_Pagination");
+ // }
+ //}
+ //[Category("Section")]
+ [Category("View Settings")]
+ //[DisplayName("Section LinkEnhanced")]
+ [DisplayName("Include in Background/Deviation")]
+ [RefreshProperties(RefreshProperties.All)]
+ [Description("Section LinkEnhanced")]
+ public string Section_LnkEnh
+ {
+ get
+ {
+ return _Xp["Section", "LnkEnh"];
+ }
+ set
+ {
+ _Xp["Section", "LnkEnh"] = value;
+ OnPropertyChanged("Section_LnkEnh");
+ }
+ }
+ //[Category("Section")]
+ [Category("General")]
+ //[DisplayName("Section TOC")]
+ [DisplayName("Include On Table Of Contents")]
+ [RefreshProperties(RefreshProperties.All)]
+ [Description("Section TOC")]
+ public string Section_TOC
+ {
+ get
+ {
+ return _Xp["Section", "TOC"];
+ }
+ set
+ {
+ _Xp["Section", "TOC"] = value;
+ OnPropertyChanged("Section_TOC");
+ }
+ }
+ [Category("Section")]
+ [DisplayName("Section AutoGen")]
+ [RefreshProperties(RefreshProperties.All)]
+ [Description("Section AutoGen")]
+ public string Section_AutoGen
+ {
+ get
+ {
+ return _Xp["Section", "AutoGen"];
+ }
+ set
+ {
+ _Xp["Section", "AutoGen"] = value;
+ OnPropertyChanged("Section_AutoGen");
+ }
+ }
+ [Category("Section")]
+ [DisplayName("Section NumPages")]
+ [RefreshProperties(RefreshProperties.All)]
+ [Description("Section NumPages")]
+ public string Section_NumPages
+ {
+ get
+ {
+ return _Xp["Section", "NumPages"];
+ }
+ set
+ {
+ _Xp["Section", "NumPages"] = value;
+ OnPropertyChanged("Section_NumPages");
+ }
+ }
+ // jsj ...
+ [TypeConverter(typeof(EnumDescConverter))]
+ public enum SectionColumnMode : int
+ {
+ Default = 0,
+ [Description("Single Column")]One,
+ [Description("Duel Column")]Two,
+ [Description("Triple Column")]Three,
+ [Description("Quad Column")]Four
+ }
+ //[Category("Section")]
+ [Category("Format")]
+ //[DisplayName("Section ColumnMode")]
+ [DisplayName("Columns")]
+ [RefreshProperties(RefreshProperties.All)]
+ [Description("Section ColumnMode")]
+ public SectionColumnMode Section_ColumnMode
+ {
+ get
+ {
+ string s = _Xp["Section", "ColumnMode"];
+ if (s == string.Empty || s.Equals("-1")) return SectionColumnMode.Default;
+ return (SectionColumnMode)int.Parse(_Xp["Section", "ColumnMode"]);
+ }
+ set
+ {
+ if (value == SectionColumnMode.Default) _Xp["Section", "ColumnMode"] = string.Empty;
+ else _Xp["Section", "ColumnMode"] = ((int)value).ToString();
+ OnPropertyChanged("Section_ColumnMode");
+ }
+ }
+ // ... jsj
+
+ //[Category("Section")]
+ //[DisplayName("Section ColumnMode")]
+ //[RefreshProperties(RefreshProperties.All)]
+ //[Description("Section ColumnMode")]
+ //public string Section_ColumnMode
+ //{
+ // get
+ // {
+ // return _Xp["Section", "ColumnMode"];
+ // }
+ // set
+ // {
+ // _Xp["Section", "ColumnMode"] = value;
+ // OnPropertyChanged("Section_ColumnMode");
+ // }
+ //}
+ #endregion
+ #region SubSectionCategory // from sequence number in 16-bit database.
+ [Category("SubSection")]
+ [DisplayName("SubSection Edit")]
+ [RefreshProperties(RefreshProperties.All)]
+ [Description("SubSection Edit")]
+ public string SubSection_Edit
+ {
+ get
+ {
+ return _Xp["SubSection", "Edit"];
+ }
+ set
+ {
+ _Xp["SubSection", "Edit"] = value;
+ OnPropertyChanged("SubSection_Edit");
+ }
+ }
+ [Category("SubSection")]
+ [DisplayName("SubSection PH")]
+ [RefreshProperties(RefreshProperties.All)]
+ [Description("SubSection PH")]
+ public string SubSection_PH
+ {
+ get
+ {
+ return _Xp["SubSection", "PH"];
+ }
+ set
+ {
+ _Xp["SubSection", "PH"] = value;
+ OnPropertyChanged("SubSection_PH");
+ }
+ }
+ [Category("SubSection")]
+ [DisplayName("SubSection AutoIndent")]
+ [RefreshProperties(RefreshProperties.All)]
+ [Description("SubSection AutoIndent")]
+ public string SubSection_AutoIndent
+ {
+ get
+ {
+ return _Xp["SubSection", "AutoIndent"];
+ }
+ set
+ {
+ _Xp["SubSection", "AutoIndent"] = value;
+ OnPropertyChanged("SubSection_AutoIndent");
+ }
+ }
+ #endregion
+ #region LibDocCategory // from library document file during migration
+ [Category("LibraryDocument")]
+ [DisplayName("LibraryDocument Comment")]
+ [RefreshProperties(RefreshProperties.All)]
+ [Description("LibraryDocument Comment")]
+ public string LibDoc_Comment
+ {
+ get
+ {
+ return _Xp["LibraryDocument", "Comment"];
+ }
+ set
+ {
+ _Xp["LibraryDocument", "Comment"] = value;
+ OnPropertyChanged("LibDoc_Comment");
+ }
+ }
+ #endregion
+ }
+}
diff --git a/PROMS/VEPROMS.CSLA.Library/Config/UserConfig.cs b/PROMS/VEPROMS.CSLA.Library/Config/UserConfig.cs
new file mode 100644
index 00000000..cd4013ff
--- /dev/null
+++ b/PROMS/VEPROMS.CSLA.Library/Config/UserConfig.cs
@@ -0,0 +1,105 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+using System.ComponentModel;
+
+namespace VEPROMS.CSLA.Library
+{
+ [Serializable]
+ [TypeConverter(typeof(ExpandableObjectConverter))]
+ public class UserConfig:INotifyPropertyChanged
+ {
+ public event PropertyChangedEventHandler PropertyChanged;
+ private void OnPropertyChanged(String info)
+ {
+ if (PropertyChanged != null)
+ PropertyChanged(this, new PropertyChangedEventArgs(info));
+ }
+ private XMLProperties _Xp;
+ private XMLProperties Xp
+ {
+ get { return _Xp; }
+ }
+ public UserConfig(string xml)
+ {
+ if (xml == string.Empty) xml = "";
+ _Xp = new XMLProperties(xml);
+ }
+ public UserConfig()
+ {
+ _Xp = new XMLProperties();
+ }
+ public override string ToString()
+ {
+ string s = _Xp.ToString();
+ if (s == "" || s == "") return string.Empty;
+ return s;
+ }
+ #region UserCategory // from user.cfg
+ [Category("User")]
+ [DisplayName("User Location1")]
+ [RefreshProperties(RefreshProperties.All)]
+ [Description("User Location1")]
+ public string User_UserLoc1
+ {
+ get
+ {
+ return _Xp["user", "UserLoc1"];
+ }
+ set
+ {
+ _Xp["user", "UserLoc1"] = value;
+ OnPropertyChanged("User_UserLoc1");
+ }
+ }
+ [Category("User")]
+ [DisplayName("User Location2")]
+ [RefreshProperties(RefreshProperties.All)]
+ [Description("User Location2")]
+ public string User_UserLoc2
+ {
+ get
+ {
+ return _Xp["user", "UserLoc2"];
+ }
+ set
+ {
+ _Xp["user", "UserLoc2"] = value;
+ OnPropertyChanged("User_UserLoc2");
+ }
+ }
+ [Category("User")]
+ [DisplayName("User Phone1")]
+ [RefreshProperties(RefreshProperties.All)]
+ [Description("User Phone1")]
+ public string User_UserPhone1
+ {
+ get
+ {
+ return _Xp["user", "UserPhone1"];
+ }
+ set
+ {
+ _Xp["user", "UserPhone1"] = value;
+ OnPropertyChanged("User_UserPhone1");
+ }
+ }
+ [Category("User")]
+ [DisplayName("User Phone2")]
+ [RefreshProperties(RefreshProperties.All)]
+ [Description("User Phone2")]
+ public string User_UserPhone2
+ {
+ get
+ {
+ return _Xp["user", "UserPhone2"];
+ }
+ set
+ {
+ _Xp["user", "UserPhone2"] = value;
+ OnPropertyChanged("User_UserPhone2");
+ }
+ }
+ #endregion
+ }
+}
diff --git a/PROMS/VEPROMS.CSLA.Library/Config/XMLProperties.cs b/PROMS/VEPROMS.CSLA.Library/Config/XMLProperties.cs
new file mode 100644
index 00000000..fd473b55
--- /dev/null
+++ b/PROMS/VEPROMS.CSLA.Library/Config/XMLProperties.cs
@@ -0,0 +1,171 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+using System.Runtime.Serialization;
+using System.Xml;
+
+namespace VEPROMS.CSLA.Library
+{
+ public delegate string XMLPropertiesEvent(object sender, XMLPropertiesArgs args);
+ [Serializable()]
+ public class XMLProperties
+ {
+ #region Events
+ public event XMLPropertiesEvent LookInAncestor;
+ private string OnLookInAncestor(object sender, XMLPropertiesArgs args)
+ {
+ if (LookInAncestor != null) return LookInAncestor(sender, args);
+ return string.Empty;
+ }
+ #endregion
+ #region Constructors
+ public XMLProperties()
+ {
+ _XmlContents = new XmlDocument();
+ _XmlContents.LoadXml("");
+ }
+ public XMLProperties(string xml)
+ {
+ _XmlContents = new XmlDocument();
+ _XmlContents.LoadXml(xml);
+ }
+ #endregion
+ #region BusinessMethods
+ [NonSerialized]
+ private bool _ParentLookup=false;
+ public bool ParentLookup
+ {
+ get { return _ParentLookup; }
+ set { _ParentLookup = value; }
+ }
+ [NonSerialized]
+ XmlDocument _XmlContents;
+ public XmlDocument XmlContents
+ {
+ get { return _XmlContents; }
+ }
+ private XmlNode GetGroup(string group)
+ {
+ XmlNodeList xl = _XmlContents.DocumentElement.SelectNodes(string.Format("//{0}", group));
+ switch (xl.Count)
+ {
+ case 0: // No nodes found
+ return null;
+ case 1: // Found the node
+ XmlNode xn = xl[0];
+ if (xn.GetType() == typeof(XmlElement)) return xn;
+ throw new XmlPropertiesException("Retrieved {0} while looking for XmlElement //{1}", xn.GetType().ToString(), group);
+ default: // Found more than 1 node
+ throw new XmlPropertiesException("Found more than one node //{0}", group);
+ }
+ }
+ private XmlAttribute GetItem(XmlNode xx, string item)
+ {
+ XmlNodeList xl = xx.SelectNodes(string.Format("@{0}", item));
+ switch (xl.Count)
+ {
+ case 0: // No nodes found
+ return null;
+ case 1: // Found the node
+ XmlNode xn = xl[0];
+ if (xn.GetType() == typeof(XmlAttribute)) return (XmlAttribute)xn;
+ throw new XmlPropertiesException("Retrieved {0} while looking for XmlAttribute @{1}", xn.GetType().ToString(), item);
+ default: // Found more than 1 node
+ throw new XmlPropertiesException("Found more than one node @{0}", item);
+ }
+ }
+ public string this[string group, string item]
+ {
+ get
+ {
+ if (_ParentLookup)
+ return OnLookInAncestor(this, new XMLPropertiesArgs(group, item));
+ XmlNode xn = GetGroup(group);
+ if (xn == null) return OnLookInAncestor(this,new XMLPropertiesArgs(group,item));
+ XmlNode xa = GetItem(xn, item);
+ if (xa == null) return OnLookInAncestor(this, new XMLPropertiesArgs(group, item));
+ return xa.InnerText;
+ }
+ set
+ {
+ if (value == null) value = string.Empty;
+ XmlNode xn = GetGroup(group);
+ if (xn == null)
+ {
+ if (value != string.Empty)// Add Group and Item
+ {
+ xn = _XmlContents.DocumentElement.AppendChild(_XmlContents.CreateElement(group));
+ XmlAttribute xa = xn.Attributes.Append(_XmlContents.CreateAttribute(item));
+ xa.Value = value;
+ }
+ }
+ else
+ {
+ XmlAttribute xa = GetItem(xn, item);
+ if (xa == null)
+ {
+ if (value != string.Empty) // Add Item
+ {
+ xa = xn.Attributes.Append(_XmlContents.CreateAttribute(item));
+ xa.Value = value;
+ }
+ }
+ else
+ {
+ if (value != string.Empty) // Add Item
+ {
+ xa.Value = value;
+ }
+ else
+ {
+ xn.Attributes.Remove(xa);
+ if (xn.Attributes.Count == 0)
+ _XmlContents.DocumentElement.RemoveChild(xn);
+ }
+ }
+ }
+ }
+ }
+ public override string ToString()
+ {
+ if (XmlContents == null) return null;
+ return XmlContents.OuterXml;
+ }
+ #endregion
+ #region XmlPropertiesException
+ public class XmlPropertiesException : Exception
+ {
+ public XmlPropertiesException() : base() { ;}
+ public XmlPropertiesException(string message) : base(message) { ;}
+ public XmlPropertiesException(string messageFormat,params object [] args) : base(string.Format(messageFormat,args)) { ;}
+ public XmlPropertiesException(SerializationInfo info, StreamingContext context) : base(info, context) { ;}
+ public XmlPropertiesException(string message,Exception innerException) : base(message, innerException) { ;}
+ }
+ #endregion
+ }
+ public partial class XMLPropertiesArgs
+ {
+ #region Business Methods
+ private string _Group;
+ public string Group
+ {
+ get { return _Group; }
+ set { _Group = value; }
+ }
+ private string _Item;
+ public string Item
+ {
+ get { return _Item; }
+ set { _Item = value; }
+ }
+ #endregion
+ #region Factory Methods
+ private XMLPropertiesArgs() { ;}
+ public XMLPropertiesArgs(string group, string item)
+ {
+ _Group=group;
+ _Item=item;
+ }
+ #endregion
+ }
+}
diff --git a/PROMS/VEPROMS.CSLA.Library/Extension/AnnotationExt.cs b/PROMS/VEPROMS.CSLA.Library/Extension/AnnotationExt.cs
new file mode 100644
index 00000000..8b1fd74b
--- /dev/null
+++ b/PROMS/VEPROMS.CSLA.Library/Extension/AnnotationExt.cs
@@ -0,0 +1,29 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace VEPROMS.CSLA.Library
+{
+ public partial class AnnotationInfo
+ {
+ public override string ToString()
+ {
+ return _SearchText;
+ }
+ }
+
+ public partial class AnnotationType
+ {
+ public override string ToString()
+ {
+ return _Name;
+ }
+ }
+ public partial class AnnotationTypeInfo
+ {
+ public override string ToString()
+ {
+ return _Name;
+ }
+ }
+}
diff --git a/PROMS/VEPROMS.CSLA.Library/Extension/ColorTab.cs b/PROMS/VEPROMS.CSLA.Library/Extension/ColorTab.cs
new file mode 100644
index 00000000..8c5bb647
--- /dev/null
+++ b/PROMS/VEPROMS.CSLA.Library/Extension/ColorTab.cs
@@ -0,0 +1,100 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace VEPROMS.CSLA.Library
+{
+ public static class ColorTab
+ {
+ private static Dictionary ColorIndx = null;
+ // This dictionary takes a color name and converts it to the rtf string:
+ private static Dictionary ColorRtf = null;
+ public enum E_Colors : int
+ {
+ black = 1, blue, green, cyan, red, magenta, brown, lightgray, darkgray, lightblue, lightgreen,
+ lightcyan, lightred, lightmagenta, yellow, white, ro, editbackground
+ }
+ #region ColorIndex
+ // Do I need this anymore.... I was using it when entire color table was in the rtf box.
+ public static int GetIndex(string color)
+ {
+ // if the dictionary hasn't been set yet,
+ if (ColorIndx==null)
+ {
+ ColorIndx = new Dictionary();
+ ColorIndx["black"] = 1;
+ ColorIndx["blue"] = 2;
+ ColorIndx["green"] = 3;
+ ColorIndx["cyan"] = 4;
+ ColorIndx["red"] = 5;
+ ColorIndx["magenta"] = 6;
+ ColorIndx["brown"] = 7;
+ ColorIndx["lightgray"] = 8;
+ ColorIndx["darkgray"] = 9;
+ ColorIndx["lightblue"] = 10;
+ ColorIndx["lightgreen"] = 11;
+ ColorIndx["lightcyan"] = 12;
+ ColorIndx["lightred"] = 13;
+ ColorIndx["lightmagenta"] = 14;
+ ColorIndx["yellow"] = 15;
+ ColorIndx["white"] = 16;
+ ColorIndx["ro"] = 17;
+ ColorIndx["trans"] = 18;
+ ColorIndx["editbackground"] = 19;
+ }
+ return ColorIndx[color];
+ }
+ #endregion
+ #region ColorRtf
+ // This gets the rtf color table string for the input color.
+ public static string GetTableString(string color)
+ {
+ Dictionary ColorIndx = new Dictionary();
+ if (ColorRtf == null)
+ {
+ ColorRtf = new Dictionary();
+
+ // color table, from 16-bit code, is defined as (in order):
+ // black=0,0,0
+ // blue=0,0,255
+ // green=0,155,12
+ // cyan=0,136,159
+ // red=255,0,0
+ // magenta=202,28,175
+ // brown=128,64,0
+ // lightgray=0,0,0
+ // darkgray=0,0,0
+ // lightblue=0,0,255
+ // lightgreen=0,255,0
+ // lightcyan=0,0,255
+ // lightred=209,29,183
+ // lightmagenta=255,0,255
+ // yellow=255,0,0
+ // white=128,128,128
+ // ro=255,128,0
+ // editbackground=192,192,192
+ ColorRtf["black"] = "\\red0\\green0\\blue0;";
+ ColorRtf["blue"] = "\\red0\\green0\\blue255;";
+ ColorRtf["green"] = "\\red0\\green155\\blue12;";
+ ColorRtf["cyan"] = "\\red0\\green136\\blue159;";
+ ColorRtf["red"] = "\\red255\\green0\\blue0;";
+ ColorRtf["magenta"] = "\\red202\\green28\\blue175;";
+ ColorRtf["brown"] = "\\red128\\green64\\blue0;";
+ ColorRtf["lightgray"] = "\\red100\\green100\\blue100;";
+ ColorRtf["darkgray"] = "\\red10\\green10\\blue10;";
+ ColorRtf["lightblue"] = "\\red0\\green0\\blue255;";
+ ColorRtf["lightgreen"] = "\\red0\\green255\\blue0;";
+ ColorRtf["lightcyan"] = "\\red0\\green0\\blue255;";
+ ColorRtf["lightred"] = "\\red209\\green29\\blue183;";
+ ColorRtf["lightmagenta"] = "\\red255\\green0\\blue255;";
+ ColorRtf["yellow"] = "\\red255\\green0\\blue0;";
+ ColorRtf["white"] = "\\red128\\green128\\blue128;";
+ ColorRtf["ro"] = "\\red255\\green128\\blue0;";
+ ColorRtf["trans"] = "\\red255\\green128\\blue0;";
+ ColorRtf["editbackground"] = "\\red192\\green192\\blue192;";
+ }
+ return ColorRtf[color];
+ }
+ #endregion
+ }
+}
diff --git a/PROMS/VEPROMS.CSLA.Library/Extension/ContentExt.cs b/PROMS/VEPROMS.CSLA.Library/Extension/ContentExt.cs
new file mode 100644
index 00000000..a77a66c8
--- /dev/null
+++ b/PROMS/VEPROMS.CSLA.Library/Extension/ContentExt.cs
@@ -0,0 +1,108 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+using Csla;
+using Csla.Data;
+using System.Xml;
+using System.Data.SqlClient;
+using System.Data;
+
+namespace VEPROMS.CSLA.Library
+{
+ public partial class Content
+ {
+ public override string ToString()
+ {
+ return string.Format("{0} {1}", Number, Text);
+ }
+ }
+ public partial class ContentInfo
+ {
+ public override string ToString()
+ {
+ return string.Format("{0} {1}", Number, Text);
+ }
+ //public XmlNode ToXml(XmlNode xn)
+ //{
+ // XmlNode nd = xn.OwnerDocument.CreateElement("Content");
+ // xn.AppendChild(nd);
+ // AddAttribute(nd, "Number", _Number);
+ // AddAttribute(nd, "Text", _Text);
+ // AddAttribute(nd, "FormatID", _FormatID);
+ // AddAttribute(nd, "Config", _Config);
+ // return nd;
+ //}
+ //public void AddAttribute(XmlNode xn, string name, object o)
+ //{
+ // if (o != null && o.ToString() != "")
+ // {
+ // XmlAttribute xa = xn.OwnerDocument.CreateAttribute(name);
+ // xa.Value = o.ToString();
+ // xn.Attributes.Append(xa);
+ // }
+ //}
+ }
+ public partial class ContentInfoList
+ {
+ public static ContentInfoList GetList(int? itemID)
+ {
+ try
+ {
+ ContentInfoList tmp = DataPortal.Fetch(new ContentListCriteria(itemID));
+ ContentInfo.AddList(tmp);
+ tmp.AddEvents();
+ return tmp;
+ }
+ catch (Exception ex)
+ {
+ throw new DbCslaException("Error on ItemInfoList.GetChildren", ex);
+ }
+ }
+ [Serializable()]
+ private class ContentListCriteria
+ {
+ public ContentListCriteria(int? itemID)
+ {
+ _ItemID = itemID;
+ }
+ private int? _ItemID;
+ public int? ItemID
+ {
+ get { return _ItemID; }
+ set { _ItemID = value; }
+ }
+ }
+ private void DataPortal_Fetch(ContentListCriteria criteria)
+ {
+ this.RaiseListChangedEvents = false;
+ try
+ {
+ using (SqlConnection cn = Database.VEPROMS_SqlConnection)
+ {
+ using (SqlCommand cm = cn.CreateCommand())
+ {
+ cm.CommandType = CommandType.StoredProcedure;
+ cm.CommandText = "vesp_ListContentsByItemID";
+ cm.Parameters.AddWithValue("@ItemID", criteria.ItemID);
+ using (SafeDataReader dr = new SafeDataReader(cm.ExecuteReader()))
+ {
+ IsReadOnly = false;
+ while (dr.Read())
+ {
+ ContentInfo contentInfo = new ContentInfo(dr);
+ this.Add(contentInfo);
+ }
+ IsReadOnly = true;
+ }
+ }
+ }
+ }
+ catch (Exception ex)
+ {
+ Database.LogException("ContentInfoList.DataPortal_Fetch", ex);
+ throw new DbCslaException("ContentInfoList.DataPortal_Fetch", ex);
+ }
+ this.RaiseListChangedEvents = true;
+ }
+ }
+}
diff --git a/PROMS/VEPROMS.CSLA.Library/Extension/DisplayText.cs b/PROMS/VEPROMS.CSLA.Library/Extension/DisplayText.cs
new file mode 100644
index 00000000..a87ceb1b
--- /dev/null
+++ b/PROMS/VEPROMS.CSLA.Library/Extension/DisplayText.cs
@@ -0,0 +1,735 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+using System.Windows.Forms;
+using System.Text.RegularExpressions;
+using System.Drawing;
+
+namespace VEPROMS.CSLA.Library
+{
+ public class DisplayText
+ {
+ #region Properties
+ private ItemInfo _itemInfo;
+ // list of 'pieces of text' for this item. Pieces include symbols, ros,
+ // transitions & plain text.
+ private List _DisplayTextElementList;
+ public List DisplayTextElementList
+ {
+ get { return _DisplayTextElementList; }
+ set { _DisplayTextElementList = value; }
+ }
+ // dictionary for the font table for this item. Note that this may
+ // go away (it is not really used).
+ private Dictionary _dicRtfFontTable;
+ public Dictionary dicRtfFontTable
+ {
+ get { return _dicRtfFontTable; }
+ set { _dicRtfFontTable = value; }
+ }
+ private VE_Font _textFont; // Font from format for this item
+ public VE_Font TextFont
+ {
+ get { return _textFont; }
+ set { _textFont = value; }
+ }
+ public string OriginalText; // compare for save to see if change.
+ #endregion
+ #region Constructors
+ ///
+ /// DisplayText constructor:
+ /// Creates a DisplayText object that converts the database text into a list of
+ /// displayTextElement elements.
+ /// Arguments are:
+ /// ItemInfo itemInfo - the item whose text will be resolved
+ /// E_EditPrintMode ep_mode - edit or print.
+ /// E_ViewMode vw_mode - view or edit.
+ ///
+ public DisplayText(ItemInfo itemInfo, E_EditPrintMode epMode, E_ViewMode vwMode)
+ {
+ _itemInfo = itemInfo;
+ DisplayTextElementList = new List();
+ OriginalText = itemInfo.MyContent.Text;
+ TextFont = GetItemFont();
+ string text = InsertRtfStyles();
+
+ // if in print mode or view mode, do replace words. Only if in edit mode are replace
+ // words left as is.
+ FormatInfo format = itemInfo.ActiveFormat;
+ if (epMode == E_EditPrintMode.PRINT || vwMode == E_ViewMode.VIEW) text = DoReplaceWords(text, format);
+
+ // displayTextElement List items are created for anything that is handled differently in RTB, i.e.
+ // symbols, ros, trans, text.
+ int startIndex = 0;
+ int index = -1;
+ while ((index = FindTokenChar(text, startIndex))>-1)
+ {
+ // Do any 'plain' text that preceeds the token.
+ if (index > startIndex) DoTextElement(text, startIndex, index);
+
+ // Now do any other types
+ if (text[index] == '\x15')
+ index = DoRO(text, index);
+ else if (text[index] == '\x252C' || text[index]=='\x2566')
+ index = DoTran(text, index);
+ else
+ index = DoSymbol(text, startIndex, index);
+ startIndex = index; // +1;
+ if (startIndex >= text.Length) break;
+ }
+ // Add any remaining text.
+ if (startIndex < text.Length) DoTextElement(text, startIndex, index);
+ }
+ #endregion
+ #region SaveData
+ public bool Save(RichTextBox rtb)
+ {
+ try
+ {
+ List origList = GetLinkList(DisplayTextElementList);
+ // massage string to store in DisplayTextElementList...
+ RtfToDisplayTextElements(rtb);
+ // take the list & convert to data in the format to save to the database.
+ StringBuilder sret = new StringBuilder();
+ foreach (displayTextElement vte in DisplayTextElementList)
+ {
+ if (vte.Type == E_TextElementType.TEXT || vte.Type == E_TextElementType.SYMBOL)
+ sret.Append(vte.Text);
+ else if (vte.Type == E_TextElementType.RO)
+ sret.Append(ToData_RO((displayLinkElement)vte));
+ else if (vte.Type == E_TextElementType.TRANS_Single)
+ sret.Append(ToData_Trans((displayLinkElement)vte));
+ }
+ string modtext = sret.ToString();
+ if (modtext != OriginalText)
+ {
+ Item itm = _itemInfo.Get();
+ // check for different text, i.e. text from this itm doesn't match
+ // original text.
+ if (OriginalText != itm.MyContent.Text)
+ {
+ Console.WriteLine("Save Failed because text changed outside of this edit session.");
+ return false;
+ }
+ // Compare ro/transition lists and delete or add any to the item for any ros/transitions that have been
+ // added/deleted or modified.
+ ProcessRoTranChanges(itm, origList);
+ itm.MyContent.Text = modtext;
+ itm.Save();
+ }
+ else
+ return true; // no text changed, but did not fail so return true.
+ }
+ catch (Exception ex)
+ {
+ Console.WriteLine("Save Failed with error: {0}", ex.Message);
+ return false;
+ }
+ return true;
+ }
+ private void ProcessRoTranChanges(Item itm, List origList)
+ {
+ // go through list. Note that only linked items are in the origList.
+ // 1) delete any that are in origList but not in the DisplayTextElementList
+ // (that represents the current text & links)
+ // 2) add any that are only in DisplayTextElementList
+ // 3) delete/add for modify?
+
+ // delete first - if in original, but not in current list, delete the one
+ // in the original list.
+ foreach (displayLinkElement odte in origList)
+ {
+ bool found = false;
+ foreach (displayTextElement dte in DisplayTextElementList)
+ {
+ if (dte.Type == odte.Type)
+ {
+ displayLinkElement l_dte = (displayLinkElement)dte;
+ if (odte.Link == l_dte.Link)
+ {
+ found = true;
+ break;
+ }
+ }
+ }
+ // remove the link element from the item.
+ if (!found)
+ {
+ // Get record id for ro or trans and then find the associated ro or transition
+ // in the item's list. remove it.
+ int recid = -1;
+ if (odte.Type != E_TextElementType.RO)
+ {
+ int sp = odte.Link.IndexOf(" ") + 1; // get past tran type
+ string srecid = odte.Link.Substring(sp, odte.Link.IndexOf(" ", sp) - sp);
+ recid = System.Convert.ToInt32(srecid);
+ foreach (ContentTransition ct in itm.MyContent.ContentTransitions)
+ {
+ if (ct.TransitionID == recid)
+ {
+ itm.MyContent.ContentTransitions.Remove(ct);
+ break;
+ }
+ }
+ }
+ else
+ {
+ int sp = odte.Link.IndexOf(" ");
+ //rousageid starts after "#Link:ReferencedObject:", i.e. index in link of 23
+ string srecid = odte.Link.Substring(23, sp-23);
+ recid = System.Convert.ToInt32(srecid);
+ foreach (ContentRoUsage cr in itm.MyContent.ContentRoUsages)
+ {
+ if (cr.ROUsageID == recid)
+ {
+ itm.MyContent.ContentRoUsages.Remove(cr);
+ break;
+ }
+ }
+ }
+ }
+ }
+ // now do insert, i.e. in new list, but not in old.
+ foreach (displayTextElement dte in DisplayTextElementList)
+ {
+ bool found = false;
+ if (dte.Type == E_TextElementType.RO || dte.Type == E_TextElementType.TRANS_Single || dte.Type == E_TextElementType.TRANS_Range)
+ {
+ foreach (displayLinkElement odte in origList)
+ {
+ if (dte.Type == odte.Type)
+ {
+ // if the link is the same, it exists, so no action is required.
+ displayLinkElement l_dte = (displayLinkElement)dte;
+ if (odte.Link == l_dte.Link)
+ {
+ found = true;
+ break;
+ }
+ }
+ }
+ // Insert the link (ro or transition) to the item
+ if (!found)
+ {
+ Console.WriteLine("New ro or trans");
+ }
+ }
+ }
+ }
+ private List GetLinkList(List locDisplayTextElementList)
+ {
+ List retList = new List();
+ foreach (displayTextElement vte in locDisplayTextElementList)
+ {
+ if (vte.Type == E_TextElementType.RO || vte.Type == E_TextElementType.TRANS_Range || vte.Type == E_TextElementType.TRANS_Single)
+ {
+ displayLinkElement tmp = (displayLinkElement)vte;
+ displayLinkElement copy_vte = new displayLinkElement();
+ copy_vte.Type = tmp.Type;
+ copy_vte.Link = tmp.Link;
+ copy_vte.Text = tmp.Text;
+ retList.Add(copy_vte);
+ }
+ }
+ return retList;
+ }
+ private void RtfToDisplayTextElements(RichTextBox rtb)
+ {
+ // GetFontTable returns a non-negative number font number in the
+ // font table for the unicode font, if it is used (otherwise -1)
+ //int unicodeFont = GetFontTable(rtb.Rtf);
+
+ // strip off all rtf commands...
+ string noExtraRtfStr = StripRtfCommands(rtb.Rtf);
+ //Console.WriteLine("StripRtf: {0}", noExtraRtfStr);
+
+ DisplayTextElementList.Clear();
+ int startIndex = 0;
+ int index = -1;
+ while ((index = FindRtfChar(noExtraRtfStr, startIndex)) > -1)
+ {
+ int fndindx = -1;
+ // Do any 'plain' text that preceeds the token.
+ if (index > startIndex)
+ index = SaveTextElement(noExtraRtfStr, startIndex, index);
+ if ((fndindx = noExtraRtfStr.IndexOf("\\protect")) == index)
+ index = SaveLink(noExtraRtfStr, index);
+ else
+ index = SaveSymbolTE(noExtraRtfStr, index);
+ startIndex = index + 1;
+ if (startIndex >= noExtraRtfStr.Length) break;
+ }
+ // Add any remaining text.
+ if (startIndex < noExtraRtfStr.Length) DoTextElement(noExtraRtfStr, startIndex, index);
+ //Console.WriteLine(noExtraRtfStr);
+ }
+ private int SaveTextElement(string data, int startIndex, int index)
+ {
+ displayTextElement vte = new displayTextElement();
+ vte.Type = E_TextElementType.TEXT;
+ int len = (index == -1) ? data.Length - startIndex : index - startIndex;
+ vte.Text = data.Substring(startIndex, len);
+ DisplayTextElementList.Add(vte);
+ return index;
+ }
+ private int SaveSymbolTE(string data, int startIndex)
+ {
+ displayLinkElement vte = new displayLinkElement();
+ vte.Type = E_TextElementType.SYMBOL;
+ // symbols are just the unicode/rtf command, no font associated with it
+ // by the time it gets here... A symbol can be represented by \'xy or \uxyz?
+ // if the \'xy is used the length of the symbol number will always be two,
+ // otherwise find the index of the '?' to find the end.
+ int endindx = -1;
+ if (data[startIndex + 1] == '\'') endindx = startIndex + 3;
+ else endindx = data.IndexOf("?", startIndex);
+ if (endindx == -1) return startIndex; // not found - error
+ vte.Text = data.Substring(startIndex, endindx - startIndex + 1);
+ DisplayTextElementList.Add(vte);
+ return endindx + 1;
+ }
+ private int SaveLink(string data, int startIndex)
+ {
+ displayLinkElement vte = new displayLinkElement();
+
+ // first find if RO or trans, the RO has a #R.
+ int istart = data.IndexOf("#Link:", startIndex);
+ if (data[istart + 6] == 'R') return SaveROTE(data, startIndex);
+ else if (data.Substring(istart+6,11) == "TransitionR")
+ return SaveTranTE(data, startIndex, E_TextElementType.TRANS_Range);
+ return SaveTranTE(data, startIndex, E_TextElementType.TRANS_Single);
+ }
+ private int SaveTranTE(string data, int startIndex, E_TextElementType type)
+ {
+ displayLinkElement vte = new displayLinkElement();
+ vte.Type = type;
+ // \protect {transition text} \v #Link:Transition(Range): 1 2 3\protect0\v0 where 1 2 3 are transition type and ids
+ int indx = data.IndexOf("\\v #Link:Transition", startIndex);
+ vte.Text = data.Substring(startIndex + 9, indx - startIndex - 9); // get past \protect
+ int iend = data.IndexOf("\\protect0\\v0", indx);
+ if (iend == -1) iend = data.IndexOf("\\v0\\protect0", indx);
+ // get past \v #Link:Transition or \v #Link:TransitionRange
+ int bindx = indx + 3;
+ //if (type == E_TextElementType.TRANS_Range) bindx += 5;
+ vte.Link = data.Substring(bindx, iend - bindx);
+ DisplayTextElementList.Add(vte);
+ return iend + 11; // get past the \protect0\vo
+ }
+ private int SaveROTE(string data, int startIndex)
+ {
+ displayLinkElement vte = new displayLinkElement();
+ vte.Type = E_TextElementType.RO;
+ // \protect {rovalue} \v #Link:ReferencedObject (RoUsageId) {ROID}\protect0\v0
+ int indx = data.IndexOf("\\v #Link:ReferencedObject", startIndex);
+ vte.Text = data.Substring(startIndex + 9, indx - startIndex - 9); // get past \protect
+ int iend = data.IndexOf("\\protect0\\v0", indx);
+ if (iend == -1) iend = data.IndexOf("\\v0\\protect0", indx);
+ vte.Link = data.Substring(indx + 3, iend - indx - 3); // get past \v #Link:ReferencedObject
+ DisplayTextElementList.Add(vte);
+ return iend + 11; // get past the \protect0\vo
+ }
+ private int FindRtfChar(string text, int startIndex)
+ {
+ int prindx = text.IndexOf("\\protect", startIndex);
+ int symindx1 = text.IndexOf("\\'", startIndex);
+ int symindx2 = text.IndexOf("\\u", startIndex);
+ if (symindx2 > -1)
+ {
+ if (text[symindx2+2] == 'l') symindx2 = -1; // don't process underlines
+ }
+ if (prindx == -1 && symindx1 == -1 && symindx2 == -1) return -1;
+ if (prindx == -1) prindx = text.Length + 1;
+ if (symindx1 == -1) symindx1 = text.Length + 1;
+ if (symindx2 == -1) symindx2 = text.Length + 1;
+
+ // Which token has smallest number, to determine which item is next
+ // in the string. If it is a symbol - see if it has a font specifier
+ // first.
+ int symindx = symindx1 < symindx2 ? symindx1 : symindx2;
+ int smallest = (prindx < symindx ? prindx : symindx);
+ return smallest;
+ }
+ private int GetFontTable(string rtf)
+ {
+ dicRtfFontTable = new Dictionary();
+ // return unicode (symbol) font number, if it exists, to expedite finding
+ // the font for symbols.
+ int unicodeFont = -1;
+ int bindx = rtf.IndexOf(@"{\fonttbl");
+ if (bindx < -1) return -1;
+ int eindx = rtf.IndexOf("}}", bindx);
+ // get font table string and then do regular expressions to get font number
+ // with font name.
+ string tbl = rtf.Substring(bindx + 9, eindx - bindx - 8);
+ tbl = tbl.Replace("{", "<");
+ tbl = tbl.Replace("}", ">");
+ string pat = @"(?:<\\f)([0-9]+)(?:[\S]+ )([\w ]+)";
+ StringBuilder sb = new StringBuilder();
+ foreach (Match m in Regex.Matches(tbl, pat))
+ {
+ int num = Convert.ToInt32(m.Result("${1}"));
+ string nam = m.Result("${2}");
+ dicRtfFontTable.Add(num, nam);
+ if ((unicodeFont == -1) && (nam == "Arial Unicode MS")) unicodeFont = num;
+ }
+ return unicodeFont;
+ }
+ private string RemoveRtfStyles(string rtf)
+ {
+ string retval = rtf;
+ // remove rtf commands for any styles that were added. Note that if
+ // the entire item has a style, and also contains 'pieces' of text with
+ // the same style, the underlying rtf box removes the embedded rtf commands,
+ // for example, if the entire step is bolded, and 'THEN' has bold on/off
+ // surrounding it, the rtf box removes the bold around the 'THEN'
+ // These remove the command with a following space or the command alone,
+ // either case may exist, because if there are rtf commands following the
+ // style command, there will be no space character following the style command.
+ if ((TextFont.Style & E_Style.BOLD) > 0)
+ {
+ retval = Regex.Replace(retval, @"\\b0 ?", "");
+ retval = Regex.Replace(retval, @"\\b ?","");
+ }
+ if ((TextFont.Style & E_Style.UNDERLINE) > 0)
+ {
+ retval = Regex.Replace(retval, @"\\ul0 ?", "");
+ retval = Regex.Replace(retval, @"\\ul ?", "");
+ }
+ if ((TextFont.Style & E_Style.ITALICS) > 0)
+ {
+ retval = Regex.Replace(retval, @"\\i0 ?", "");
+ retval = Regex.Replace(retval, @"\\i ?", "");
+ }
+ return retval;
+ }
+ public string ReplaceRTFClause(Match m)
+ {
+ switch (m.Value[1])
+ {
+ case 'u':
+ if (Regex.IsMatch(m.Value, @"\\u[0-9]+"))
+ return m.Value; // Special Charcaters
+ if (Regex.IsMatch(m.Value, @"\\ulnone"))
+ return m.Value;
+ if (Regex.IsMatch(m.Value, @"\\ul.*"))
+ return m.Value; // Underline
+ break;
+ case '\'': // Special Character
+ return m.Value;
+ case 'b': // Bold
+ return m.Value;
+ case 's': // sub or super....
+ if (m.Value == @"\sub") return m.Value;
+ if (m.Value == @"\super") return m.Value;
+ break;
+ case 'n': // nosubsuper...
+ if (m.Value == @"\nosupersub") return m.Value;
+ break;
+ case 'i': // Italics
+ return m.Value;
+ case 'v': // save link hidden info
+ if (m.Value == @"\v") return m.Value; // part of link
+ if (Regex.IsMatch(m.Value, @"\\v0"))
+ return m.Value; // hidden info off
+ break;
+ case 'p':
+ if (m.Value == @"\par") return "\r\n";
+ if (m.Value == @"\protect")
+ return m.Value;
+ if (m.Value == @"\protect0")
+ return m.Value;
+ break;
+ }
+ return "";//Strip All
+ }
+ private string StripRtfCommands(string rtf)
+ {
+ string retval = Regex.Replace(rtf, @"[\r\n]", "", RegexOptions.Singleline); // Strip Carriage Returns and Newlines
+ retval = Regex.Replace(retval, @"^\{(.*)\}$", "$1", RegexOptions.Singleline); // Strip Opening and Closing Braces
+ retval = Regex.Replace(retval, @"\{[^{]*?\}", "", RegexOptions.Singleline); // Strip Clauses - remove anything from curly braces
+ retval = Regex.Replace(retval, @"\{[^{]*?\}", "", RegexOptions.Singleline); // Strip Clauses - remove anything from curly braces
+ retval = Regex.Replace(retval, @"\\[^ \\?]+", new MatchEvaluator(ReplaceRTFClause)); // take backslash xyz and evaluates them
+ // remove a space if there is one as the first character..
+ if (retval[0]==' ')retval = retval.Remove(0, 1);
+ // remove \r\n at end of string - this was added with the \par at the end of string by the rtf box
+ if (retval.Substring(retval.Length - 2, 2) == "\r\n") retval = retval.Remove(retval.Length - 2, 2);
+ retval = RemoveRtfStyles(retval);
+
+ return retval;
+ }
+ private string ToData_RO(displayLinkElement vte)
+ {
+ // get past the #Link:ReferencedObject part of the link.
+ return String.Format("\x15\\v RO\\v0 {0}\\v #{1}\\v0", vte.Text, vte.Link.Substring(23, vte.Link.Length-23));
+ }
+ private string ToData_Trans(displayLinkElement vte)
+ {
+ char trchar = vte.Type == E_TextElementType.TRANS_Single ? '\x252C' : '\x2566';
+ int indx = vte.Type == E_TextElementType.TRANS_Single ? 16 : 21;
+ return String.Format("{0}\\v TRAN\\v0 {1}\\v {2}\\v0", trchar, vte.Text, vte.Link.Substring(indx, vte.Link.Length-indx));
+ }
+ #endregion
+ #region StyleData
+ private VE_Font GetItemFont()
+ {
+ VE_Font font = null;
+ FormatInfo format = _itemInfo.ActiveFormat;
+ int type = (int)_itemInfo.MyContent.Type;
+ switch (type/10000)
+ {
+ case 0: // procedure
+ font = format.PlantFormat.FormatData.Font;
+ break;
+ case 1: // section
+ font = format.PlantFormat.FormatData.SectData.SectionHeader.Font;
+ break;
+ case 2: // step types
+ int typindx = type - 20000; // what to do for other types rather than steps
+ font = format.PlantFormat.FormatData.StepDataList[typindx].Font;
+ break;
+ }
+ TextFont = font;
+ return font;
+ }
+ private string InsertRtfStyles()
+ {
+ StringBuilder sb = new StringBuilder(_itemInfo.MyContent.Text);
+ if ((TextFont.Style & E_Style.BOLD)>0)
+ {
+ sb.Insert(0, "\\b ");
+ sb.Append("\\b0 ");
+ }
+ if ((TextFont.Style & E_Style.UNDERLINE) > 0)
+ {
+ sb.Insert(0, "\\ul ");
+ sb.Append("\\ul0 ");
+ }
+ if ((TextFont.Style & E_Style.ITALICS) > 0)
+ {
+ sb.Insert(0, "\\i ");
+ sb.Append("\\i0 ");
+ }
+ return sb.ToString();
+ }
+ #endregion
+ #region DoListElements
+ private int FindTokenChar(string txt, int startIndex)
+ {
+ // tokens are ro, transitions and possible symbol
+ char[] tok = { '\x15', '\x252C', '\x2566', '\\' };
+ bool done = false;
+ // If there is only an rtf token from the indexed position on, don't return the
+ // IndexOfAny index value, because it will by one character past the '\' and throw
+ // of the return value of where in the string the text should be saved. For example
+ // for the string '\b text \v somevalue \v0\b0', the first time through the while
+ // loop has the index at the '\b' char of the b0.
+ //int savstartIndex = startIndex;
+ while (!done)
+ {
+ int indx = txt.IndexOfAny(tok, startIndex);
+ if (indx < 0) return indx;
+ if (txt[indx] != '\\') return indx;
+ // see if symbol (but not underline) or another rtf command: has a 'u'
+ // followed by a non-underline or single quote, and if so, return it.
+ // Otherwise, get next index, must have been a slash or other rtf command.
+ if (((txt[indx + 1] == 'u' && txt[indx + 2] != 'l')) || (txt[indx + 1] == '\'')) return indx;
+ startIndex=indx+1;
+ }
+ return -1;
+ }
+ private int DoTextElement(string text, int startIndex, int index)
+ {
+ displayTextElement vte = new displayTextElement();
+ vte.Type = E_TextElementType.TEXT;
+ int len = (index == -1) ? text.Length - startIndex : index - startIndex;
+ vte.Text = text.Substring(startIndex, len);
+ DisplayTextElementList.Add(vte);
+ return index+1;
+ }
+ private string CreateLink(E_TextElementType type, string linktxt)
+ {
+ string retlink = "";
+ if (type == E_TextElementType.RO)
+ retlink = "#Link:ReferencedObject:" + linktxt;
+ else if (type == E_TextElementType.TRANS_Single)
+ retlink = "#Link:Transition:" + linktxt;
+ else
+ retlink = "#Link:TransitionRange:" + linktxt;
+
+ return retlink;
+ }
+ private int DoRO(string text, int index)
+ {
+ displayLinkElement vte = new displayLinkElement();
+ vte.Type = E_TextElementType.RO;
+ // ro has form \v RO\v0 9.5 psig\v #1 0001000000ec0000 \v0 - so find second
+ // \v0 to end the string.
+ int istart = text.IndexOf("\\v0",index) + 4;
+ int iend = text.IndexOf("\\v", istart);
+ vte.Text = text.Substring(istart, iend - istart);
+ istart = text.IndexOf("#", iend) + 1;
+ iend = text.IndexOf("\\v0", istart);
+ vte.Link = CreateLink(vte.Type, text.Substring(istart, iend - istart));
+ DisplayTextElementList.Add(vte);
+ // return the position past the end of the \v0. There is a space after the
+ // \v0 so account for that.
+ return iend + 4;
+ }
+ private string FixTransition(string link, string text)
+ {
+ int transitionID = Convert.ToInt32(link.Split(" ".ToCharArray())[1]);
+ // Find the transition
+ foreach (TransitionInfo ti in _itemInfo.MyContent.ContentTransitions)
+ {
+ if (ti.TransitionID == transitionID)
+ {
+ string path = ti.PathTo.Replace(" Section PROCEDURE STEPS ", ", ");
+ path = path.Replace(" Section PROCEDURE STEPS", "");
+ return path;
+ }
+ }
+ return text;
+ }
+ private int DoTran(string text,int index)
+ {
+ displayLinkElement vte = new displayLinkElement();
+ // transition (not range) has form \v TRAN\v0 (resolved transition text)\v type fromid toid [rangeid, if range]\v0
+ int istart = text.IndexOf("\\v0", index) + 4;
+ int iend = text.IndexOf("\\v", istart);
+ vte.Text = text.Substring(istart, iend - istart); // this stores the resolved transition text
+ istart = iend + 3; // get to transition type.
+ iend = text.IndexOf("\\v0", istart);
+ vte.Text = FixTransition(text.Substring(istart, iend - istart), vte.Text);
+ // Determine whether it is single or range transition. Can tell by number of spaces in
+ // link string.
+ string[] parts = text.Substring(istart, iend - istart).Split(" ".ToCharArray());
+ if (parts.Length == 3) vte.Type = E_TextElementType.TRANS_Single;
+ else vte.Type = E_TextElementType.TRANS_Range;
+ vte.Link = CreateLink(vte.Type, text.Substring(istart, iend - istart));
+ DisplayTextElementList.Add(vte);
+ // return the position past the end of the \v0. There is a space after the
+ // \v0 so account for that.
+ return iend + 4;
+ }
+ private int DoSymbol(string text, int startIndex, int index)
+ {
+ displayTextElement vte = new displayTextElement();
+ vte.Type = E_TextElementType.SYMBOL;
+ // symbols are the unicode/rtf command. A symbol can be represented by \'xy or
+ // in the text from the database \uxyz?. If the \'xy is used the length of the
+ // symbol number will always be two, otherwise find the index of the '?' to
+ // find the end.
+ int endindx = -1;
+ if (text[index + 1] == '\'') endindx = index + 3;
+ else endindx = text.IndexOf("?", index);
+ vte.Text = text.Substring(index, endindx - index + 1);
+ DisplayTextElementList.Add(vte);
+ // return the position just past the symbol.
+ return endindx+1;
+ }
+ #endregion
+ #region ReplaceWords
+ private ReplaceStr _rs;
+ private string ReplaceIt(Match m)
+ {
+ string s = m.ToString();
+ string t = s.Replace(_rs.ReplaceWord, _rs.ReplaceWith);
+ return m.ToString().Replace(_rs.ReplaceWord, _rs.ReplaceWith);
+ }
+ private string DoReplaceWords(string Text, FormatInfo format)
+ {
+ ReplaceStrList rsl = format.PlantFormat.FormatData.SectData.ReplaceStrList;
+ foreach (ReplaceStr rs in rsl)
+ {
+ if (_itemInfo.MyContent.Type < 20000) return Text; // for now only replace in steps.
+ bool replaceit = false;
+
+ // note that the order of this check is important. Check in this order...
+ // background here
+ if (_itemInfo.IsHigh && (rs.Flag & E_ReplaceFlags.HIGH)>0) replaceit = true;
+ else if ((_itemInfo.IsTable || _itemInfo.IsFigure) && (rs.Flag & E_ReplaceFlags.TABLE) > 0) replaceit = true;
+ else if (_itemInfo.IsInRNO && (rs.Flag & E_ReplaceFlags.RNO) > 0) replaceit = true;
+ else if (_itemInfo.IsCaution && (rs.Flag & E_ReplaceFlags.CAUTION) > 0) replaceit = true;
+ else if (_itemInfo.IsNote && (rs.Flag & E_ReplaceFlags.NOTE) > 0) replaceit = true;
+ else if (_itemInfo.IsInFirstLevelSubStep && (rs.Flag & E_ReplaceFlags.SUBSTEP) > 0) replaceit = true;
+ else if (_itemInfo.IsAccPages & (rs.Flag & E_ReplaceFlags.ATTACH) > 0) replaceit = true;
+
+ if (replaceit)
+ {
+ // CASEINSENS: Do ReplaceWords for all words that match, regardless of case, and replace
+ // with the ReplaceWith string as is
+ if ((rs.Flag & E_ReplaceFlags.CASEINSENS) > 0)
+ {
+ string res = "";
+ string fortest = Text.ToUpper();
+ string pat = @"(?<=\W|^)" + rs.ReplaceWord.ToUpper() + @"(?=\W|$)";
+ int cpindx = 0;
+ foreach (Match m in Regex.Matches(fortest, pat))
+ {
+ res += Text.Substring(cpindx, m.Index-cpindx);
+ cpindx += (m.Index - cpindx);
+ res += rs.ReplaceWith;
+ cpindx += rs.ReplaceWord.Length;
+ }
+ if (cpindx < Text.Length) res += Text.Substring(cpindx, Text.Length - cpindx);
+ Text = res;
+ }
+ // CASEINSENSALL: Do ReplaceWords for all words that match the ReplaceWord, regardless of case
+ else if ((rs.Flag & E_ReplaceFlags.CASEINSENSALL) > 0)
+ {
+ // not in hlp
+ }
+ // CASEINSENSFIRST: Do ReplaceWords for all words that exactly match the ReplaceWord,
+ // except the case where the first character may be different
+ else if ((rs.Flag & E_ReplaceFlags.CASEINSENSFIRST) > 0)
+ {
+ // not in hlp
+ }
+ else
+ {
+ string pat = @"(?<=\W|^)" + rs.ReplaceWord + @"(?=\W|$)";
+ Text = Regex.Replace(Text, pat, rs.ReplaceWith);
+ }
+
+ }
+ }
+ return Text;
+ }
+ #endregion
+ }
+ #region displayTextElementClass
+ public enum E_TextElementType : uint
+ {
+ TEXT = 0,
+ SYMBOL = 1,
+ RO = 2,
+ TRANS_Single = 3,
+ TRANS_Range = 4
+ };
+ public class displayTextElement
+ {
+ private E_TextElementType _Type;
+ public E_TextElementType Type
+ {
+ get { return _Type; }
+ set { _Type = value; }
+ }
+ private string _Text;
+ public string Text
+ {
+ get { return _Text; }
+ set { _Text = value; }
+ }
+ }
+ public class displayLinkElement : displayTextElement
+ {
+ private string _Link;
+ public string Link
+ {
+ get { return _Link; }
+ set { _Link = value; }
+ }
+ }
+ #endregion
+
+}
diff --git a/PROMS/VEPROMS.CSLA.Library/Extension/DocVersionExt.cs b/PROMS/VEPROMS.CSLA.Library/Extension/DocVersionExt.cs
new file mode 100644
index 00000000..ac5e75cc
--- /dev/null
+++ b/PROMS/VEPROMS.CSLA.Library/Extension/DocVersionExt.cs
@@ -0,0 +1,155 @@
+// ========================================================================
+// Copyright 2006 - Volian Enterprises, Inc. All rights reserved.
+// Volian Enterprises - Proprietary Information - DO NOT COPY OR DISTRIBUTE
+// ------------------------------------------------------------------------
+// $Workfile: $ $Revision: $
+// $Author: $ $Date: $
+//
+// $History: $
+// ========================================================================
+
+using System;
+using System.Data;
+using System.Data.SqlClient;
+using Csla;
+using Csla.Data;
+using System.Collections.Generic;
+
+namespace VEPROMS.CSLA.Library
+{
+ public partial class DocVersion: IVEDrillDown
+ {
+ #region VersionType
+ public VersionTypeEnum eVersionType
+ {
+ get { return (VersionTypeEnum)_VersionType; }
+ set { _VersionType = (int)value; }
+ }
+ #endregion
+ #region DocVersion Config
+ [NonSerialized]
+ private DocVersionConfig _DocVersionConfig;
+ public DocVersionConfig DocVersionConfig
+ {
+ get
+ {
+ if (_DocVersionConfig == null)
+ {
+ _DocVersionConfig = new DocVersionConfig(this);
+ _DocVersionConfig.PropertyChanged += new System.ComponentModel.PropertyChangedEventHandler(_DocVersionConfig_PropertyChanged);
+ }
+ return _DocVersionConfig;
+ }
+ }
+ private void _DocVersionConfig_PropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e)
+ {
+ Config = _DocVersionConfig.ToString();
+ }
+ #endregion
+ public override string ToString()
+ {
+ return string.Format("{0} - {1}", Name, Title);
+ }
+ #region IVEDrillDown
+ public System.Collections.IList GetChildren()
+ {
+ return null;
+ }
+ public bool HasChildren
+ {
+ get { return _ItemID > 0; }
+ }
+ public IVEDrillDown ActiveParent
+ {
+ get
+ {
+ return MyFolder;
+ }
+ }
+ public Format ActiveFormat
+ {
+ get { return LocalFormat != null ? LocalFormat : ActiveParent.ActiveFormat; }
+ }
+ public Format LocalFormat
+ {
+ get { return MyFormat; }
+ }
+ public DynamicTypeDescriptor MyConfig
+ {
+ get { return DocVersionConfig; }
+ }
+ #endregion
+ }
+ public partial class DocVersionInfo:IVEDrillDownReadOnly
+ {
+ #region DocVersion Config
+ [NonSerialized]
+ private DocVersionConfig _DocVersionConfig;
+ public DocVersionConfig DocVersionConfig
+ { get { return (_DocVersionConfig != null ? _DocVersionConfig : _DocVersionConfig = new DocVersionConfig(this));} }
+ private void DocVersionConfigRefresh()
+ {
+ _DocVersionConfig = null;
+ }
+ #endregion
+ ItemInfoList _iil = null;
+ public ItemInfoList Procedures
+ { get { return (_iil != null ? _iil: _iil = ItemInfoList.GetList(_ItemID,(int)E_FromType.Procedure)); } }
+ #region IVEReadOnlyItem
+ public System.Collections.IList GetChildren()
+ {
+ return Procedures;
+ }
+ //public bool ChildrenAreLoaded
+ //{
+ // get { return _iil == null; }
+ //}
+ public bool HasChildren
+ {
+ get { return _ItemID > 0; }
+ }
+ public IVEDrillDownReadOnly ActiveParent
+ {
+ get
+ {
+ return MyFolder;
+ }
+ }
+ public FormatInfo ActiveFormat
+ {
+ get { return LocalFormat != null ? LocalFormat : ActiveParent.ActiveFormat; }
+ }
+ public FormatInfo LocalFormat
+ {
+ get { return MyFormat; }
+ }
+ public DynamicTypeDescriptor MyConfig
+ {
+ get { return Get().DocVersionConfig; }
+ }
+ //public bool HasStandardSteps()
+ //{ return false; }
+ public override string ToString()
+ {
+ return string.Format("{0} - {1}", Name, Title);
+ }
+ //public string ToString(string str,System.IFormatProvider ifp)
+ //{
+ // return ToString();
+ //}
+ #endregion
+ #region Extension
+ partial class DocVersionInfoExtension : extensionBase
+ {
+ public override void Refresh(DocVersionInfo tmp)
+ {
+ tmp.DocVersionConfigRefresh();
+ }
+ }
+ #endregion
+ }
+ public enum VersionTypeEnum : int
+ {
+ WorkingDraft = 0, Temporary = 1, Revision = 128, Approved = 129
+ }
+}
diff --git a/PROMS/VEPROMS.CSLA.Library/Extension/DocumentExt.cs b/PROMS/VEPROMS.CSLA.Library/Extension/DocumentExt.cs
new file mode 100644
index 00000000..8a8a7587
--- /dev/null
+++ b/PROMS/VEPROMS.CSLA.Library/Extension/DocumentExt.cs
@@ -0,0 +1,138 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+using System.IO;
+
+namespace VEPROMS.CSLA.Library
+{
+ public partial class DocumentInfo
+ {
+ public string DocumentTitle
+ {
+ get
+ {
+ if (_LibTitle == "") return string.Format("Document {0}", _DocID);
+ return _LibTitle;
+ }
+ }
+ }
+ public class DSOFile : IDisposable
+ {
+ private static readonly log4net.ILog _MyLog = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
+ #region Fields
+ private bool _IsDisposed;
+ private static string _TemporaryFolder = null;
+ private DocumentInfo _MyDocument = null;
+ private FileInfo _MyFile = null;
+ private string _Extension = "DOC";
+ #endregion
+ #region Properties
+ public static string TemporaryFolder
+ {
+ get
+ {
+ if (_TemporaryFolder == null)
+ {
+ _TemporaryFolder = string.Format(@"C:\Documents and Settings\{0}\Local Settings\Temp", Environment.UserName);
+ if (!Directory.Exists(TemporaryFolder)) Directory.CreateDirectory(TemporaryFolder);
+ _TemporaryFolder += @"\VE-PROMS";
+ if (!Directory.Exists(TemporaryFolder)) Directory.CreateDirectory(TemporaryFolder);
+ }
+ return _TemporaryFolder;
+ }
+ }
+ public DocumentInfo MyDocument
+ {
+ get { return _MyDocument; }
+ set
+ {
+ TryDelete();
+ _MyDocument = value;
+ CreateFile();
+ }
+ }
+ public FileInfo MyFile
+ {
+ get { return _MyFile; }
+ }
+ public string Extension
+ {
+ get { return _Extension; }
+ set { _Extension = value; }
+ }
+ #endregion
+ #region Private Methods
+ private void TryDelete()
+ {
+ if (_MyDocument == null) return;
+ if (_MyFile == null) return;
+ if (_MyFile.Exists)
+ {
+ try
+ {
+ _MyFile.Delete();
+ }
+ catch (IOException ex)
+ {
+ _MyLog.Error("TryDelete",ex);
+ }
+ finally
+ {
+ _MyFile = null;
+ _MyDocument = null;
+ }
+ }
+ }
+ private void CreateFile()
+ {
+ if (_MyDocument == null) return;
+ _MyFile = new FileInfo(string.Format(@"{0}\tmp_{1}." + Extension , TemporaryFolder, MyDocument.DocID));
+ FileStream fs = _MyFile.Create();
+ fs.Write(MyDocument.DocContent, 0, MyDocument.DocContent.Length);
+ fs.Close();
+ _MyFile.CreationTime = _MyDocument.DTS;
+ _MyFile.LastWriteTime = _MyDocument.DTS;
+ }
+ public void SaveFile()
+ {
+ // TODO: Add Try & Catch logic
+ if (_MyDocument == null) return;
+ Document doc = _MyDocument.Get();
+ FileStream fs = _MyFile.Open(FileMode.Open, FileAccess.Read, FileShare.ReadWrite);
+ Byte[] buf = new byte[_MyFile.Length];
+ fs.Read(buf,0,buf.Length);
+ fs.Close();
+ doc.DocContent = buf;
+ doc.UserID = Environment.UserName;
+ doc.DTS = _MyFile.LastWriteTime;
+ doc.Save();
+ }
+ #endregion
+ #region Constructors
+ public DSOFile(DocumentInfo myDocument)
+ {
+ MyDocument = myDocument;
+ }
+ #endregion
+ #region Destructor
+ ~DSOFile()
+ {
+ Dispose(false);
+ }
+ public void Dispose()
+ {
+ Dispose(false);
+ GC.SuppressFinalize(this);
+ }
+
+ protected void Dispose(bool disposing)
+ {
+ if (!_IsDisposed)
+ {
+ _IsDisposed = true;
+ TryDelete();
+ }
+ }
+ #endregion
+ }
+}
diff --git a/PROMS/VEPROMS.CSLA.Library/Extension/FolderExt.cs b/PROMS/VEPROMS.CSLA.Library/Extension/FolderExt.cs
new file mode 100644
index 00000000..95e22bd7
--- /dev/null
+++ b/PROMS/VEPROMS.CSLA.Library/Extension/FolderExt.cs
@@ -0,0 +1,154 @@
+// ========================================================================
+// Copyright 2006 - Volian Enterprises, Inc. All rights reserved.
+// Volian Enterprises - Proprietary Information - DO NOT COPY OR DISTRIBUTE
+// ------------------------------------------------------------------------
+// $Workfile: $ $Revision: $
+// $Author: $ $Date: $
+//
+// $History: $
+// ========================================================================
+
+using System;
+using System.Data;
+using System.Data.SqlClient;
+using Csla;
+using Csla.Data;
+using System.Configuration;
+using System.IO;
+using System.Drawing;
+using System.Collections.Generic;
+
+namespace VEPROMS.CSLA.Library
+{
+ public partial class Folder : IVEDrillDown
+ {
+ #region Folder Config
+ [NonSerialized]
+ private FolderConfig _FolderConfig;
+ public FolderConfig FolderConfig
+ {
+ get
+ {
+ if (_FolderConfig == null)
+ {
+ _FolderConfig = new FolderConfig(this);
+ _FolderConfig.PropertyChanged += new System.ComponentModel.PropertyChangedEventHandler(_FolderConfig_PropertyChanged);
+ }
+ return _FolderConfig;
+ }
+ }
+ public void FolderConfigRefresh()
+ {
+ _FolderConfig = null;
+ }
+ private void _FolderConfig_PropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e)
+ {
+ Config = _FolderConfig.ToString();
+ }
+ #endregion
+ public override string ToString()
+ {
+ return _Title;
+ }
+ #region IVEReadOnlyItem
+ public System.Collections.IList GetChildren()
+ {
+ if (FolderDocVersionCount != 0) return FolderDocVersions;
+ if (ChildFolderCount != 0) return ChildFolders;
+ return null;
+ }
+ public bool HasChildren
+ {
+ get { return _FolderDocVersionCount > 0 || _ChildFolderCount > 0; }
+ }
+ public IVEDrillDown ActiveParent
+ {
+ get
+ {
+ return MyParent;
+ }
+ }
+ public Format ActiveFormat
+ {
+ get { return LocalFormat != null ? LocalFormat : (ActiveParent != null ? ActiveParent.ActiveFormat : null); }
+ }
+ public Format LocalFormat
+ {
+ get { return MyFormat; }
+ }
+ public DynamicTypeDescriptor MyConfig
+ {
+ get { return FolderConfig; }
+ }
+ #endregion
+ }
+ public partial class FolderInfo:IVEDrillDownReadOnly
+ {
+ #region Folder Config (Read-Only)
+ [NonSerialized]
+ private FolderConfig _FolderConfig;
+ public FolderConfig FolderConfig
+ { get {
+ return (_FolderConfig != null ? _FolderConfig : _FolderConfig = new FolderConfig(this));
+ } }
+ private void FolderConfigRefresh()
+ {
+ _FolderConfig = null;
+ }
+ #endregion
+ #region IVEReadOnlyItem
+ public System.Collections.IList GetChildren()
+ {
+ if(FolderDocVersionCount != 0)return FolderDocVersions;
+ if (ChildFolderCount != 0) return ChildFolders;
+ return null;
+ }
+ //public bool ChildrenAreLoaded
+ //{
+ // get { return _FolderDocVersions != null || _ChildFolders != null; }
+ //}
+ public bool HasChildren
+ {
+ get { return _FolderDocVersionCount > 0 || _ChildFolderCount > 0; }
+ }
+ public IVEDrillDownReadOnly ActiveParent
+ {
+ get
+ {
+ return MyParent;
+ }
+ }
+ public FormatInfo ActiveFormat
+ {
+ get { return LocalFormat != null ? LocalFormat : ( ActiveParent != null ? ActiveParent.ActiveFormat : null); }
+ }
+ public FormatInfo LocalFormat
+ {
+ get { return MyFormat; }
+ }
+ public DynamicTypeDescriptor MyConfig
+ {
+ get { return Get().FolderConfig; }
+ }
+ public override string ToString()
+ {
+ return string.Format("{0} - {1}", Name, Title);
+ }
+ //public string ToString(string str, System.IFormatProvider ifp)
+ //{
+ // return ToString();
+ //}
+ #endregion
+ public Color BackColor
+ { get { return FolderConfig.Default_BkColor; } }
+ #region Extension
+ partial class FolderInfoExtension : extensionBase
+ {
+ public override void Refresh(FolderInfo tmp)
+ {
+ tmp.FolderConfigRefresh();
+ }
+ }
+ #endregion
+ }
+}
diff --git a/PROMS/VEPROMS.CSLA.Library/Extension/FontTab.cs b/PROMS/VEPROMS.CSLA.Library/Extension/FontTab.cs
new file mode 100644
index 00000000..10f70fc8
--- /dev/null
+++ b/PROMS/VEPROMS.CSLA.Library/Extension/FontTab.cs
@@ -0,0 +1,69 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace VEPROMS.CSLA.Library
+{
+ public static class FontTab
+ {
+ private static Dictionary FontIndx = null;
+ // This dictionary takes a color name and converts it to the rtf string:
+ private static Dictionary FontRtf = null;
+ public enum E_Fonts : int
+ {
+ None = 0, PrestigeEliteTall = 64, CourierNew = 2, TimesNewRoman = 0, LetterGothic = 66, Arial = 202, VolianDraw = 70, GothicUltra = 63, LetterGothicTall = 67, VolianScript = 71, ArialUnicode = 35
+ }
+ #region FontIndex
+ ///
+ /// GetIndex - Use this to get the number of the font in the font table based on the input
+ /// string.
+ ///
+ ///
+ ///
+ public static int GetIndex(string font)
+ {
+ // if the dictionary hasn't been set yet,
+ if (FontIndx==null)
+ {
+ FontIndx = new Dictionary();
+ FontIndx["Prestige Elite Tall"] = 64;
+ FontIndx["Courier New"] = 2;
+ FontIndx["Times New Roman"] = 0;
+ FontIndx["Letter Gothic"] = 66;
+ FontIndx["Arial"] = 202;
+ FontIndx["Volian Draw"] = 70;
+ FontIndx["Gothic Ultra"] = 63;
+ FontIndx["Letter Gothic Tall"] = 67;
+ FontIndx["VolianScript"] = 71;
+ FontIndx["Arial Unicode"] = 35;
+
+ }
+ return FontIndx[font];
+ }
+ #endregion
+ #region ColorRtf
+ ///
+ /// GetTableString - Use this to get the string to add to font table based on the input
+ /// string.
+ ///
+ public static string GetTableString(string font)
+ {
+ if (FontRtf == null)
+ {
+ FontRtf = new Dictionary();
+ FontRtf["Prestige Elite Tall"] = "{\\f64\\fmodern\\fcharset2\\fprq1 Prestige Elite Tall;}";
+ FontRtf["Courier New"] = "{\\f2\\fmodern\\fcharset0\\fprq1 Courier New;}";
+ FontRtf["Times New Roman"] = "{\\f0\\froman\\fcharset0\\fprq2 Times New Roman;}";
+ FontRtf["Letter Gothic"] = "{\\f66\\fmodern\\fcharset2\\fprq1 Letter Gothic;}";
+ FontRtf["Arial"] = "{\\f1\\fswiss\\fcharset0\\fprq2 Arial;}";
+ FontRtf["Volian Draw"] = "{\\f70\\fmodern\\fcharset2\\fprq1 VolianDraw;}";
+ FontRtf["Gothic Ultra"] = "{\\f63\\fmodern\\fcharset2\\fprq1 Gothic Ultra;}";
+ FontRtf["Letter Gothic Tall"] = "{\\f67\\fmodern\\fcharset2\\fprq1 Letter Gothic Tall;}";
+ FontRtf["VolianScript"] = "{\\f71\\fswiss\\fcharset2\\fprq2 VolianScript;}";
+ FontRtf["Arial Unicode"] = "{\\f35\\fswiss\\fcharset128\\fprq2 Arial Unicode MS;}";
+ }
+ return FontRtf[font];
+ }
+ #endregion
+ }
+}
diff --git a/PROMS/VEPROMS.CSLA.Library/Extension/FormatExt.cs b/PROMS/VEPROMS.CSLA.Library/Extension/FormatExt.cs
new file mode 100644
index 00000000..6a6ab774
--- /dev/null
+++ b/PROMS/VEPROMS.CSLA.Library/Extension/FormatExt.cs
@@ -0,0 +1,51 @@
+// ========================================================================
+// Copyright 2006 - Volian Enterprises, Inc. All rights reserved.
+// Volian Enterprises - Proprietary Information - DO NOT COPY OR DISTRIBUTE
+// ------------------------------------------------------------------------
+// $Workfile: $ $Revision: $
+// $Author: $ $Date: $
+//
+// $History: $
+// ========================================================================
+
+using System;
+using System.Data;
+using System.Data.SqlClient;
+using Csla;
+using Csla.Data;
+using System.Configuration;
+using System.IO;
+using System.Xml;
+using System.Drawing;
+
+namespace VEPROMS.CSLA.Library
+{
+ public partial class Format
+ {
+ #region PlantFormat
+ //[NonSerialized]
+ private PlantFormat _PlantFormat;
+ public PlantFormat PlantFormat
+ { get { return (_PlantFormat != null ? _PlantFormat : _PlantFormat = new PlantFormat(this)); } }
+ #endregion
+ public override string ToString()
+ {
+ //return Name;
+ return PlantFormat.FormatData.Name;
+ }
+ }
+ public partial class FormatInfo
+ {
+ #region PlantFormat
+ //[NonSerialized]
+ private PlantFormat _PlantFormat;
+ public PlantFormat PlantFormat
+ { get { return (_PlantFormat != null ? _PlantFormat : _PlantFormat = new PlantFormat(this.Get())); } }
+ #endregion
+ public override string ToString()
+ {
+ //return Name;
+ return PlantFormat.FormatData.Name;
+ }
+ }
+}
diff --git a/PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs b/PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs
new file mode 100644
index 00000000..77986496
--- /dev/null
+++ b/PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs
@@ -0,0 +1,785 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+using Csla;
+using Csla.Data;
+using System.Data;
+using System.Data.SqlClient;
+using System.Xml;
+using System.Drawing;
+
+namespace VEPROMS.CSLA.Library
+{
+ #region Item
+ public partial class Item:IVEDrillDown
+ {
+ public override string ToString()
+ {
+ return string.Format("{0} {1}", MyContent.Number, MyContent.Text);
+ }
+ #region IVEDrillDown
+ public System.Collections.IList GetChildren()
+ {
+ return this.MyContent.ContentParts;
+ }
+ public bool HasChildren
+ {
+ get { return this.MyContent.ContentPartCount > 0; }
+ }
+ private IVEDrillDown _ActiveParent=null;
+ public IVEDrillDown ActiveParent
+ {
+ get
+ {
+ if (_ActiveParent == null)
+ {
+ if (MyPrevious != null)
+ _ActiveParent = _MyPrevious.ActiveParent;
+ else
+ {
+ if (ItemDocVersionCount > 0)
+ _ActiveParent = this.ItemDocVersions[0].MyDocVersion;
+ else
+ {
+ if (this.ItemParts == null || this.ItemPartCount == 0)
+ _ActiveParent = this;
+ else
+ _ActiveParent = this.ItemParts[0].MyContent.ContentItems[0].MyItem;
+ }
+ }
+ }
+ return _ActiveParent==this ? null : _ActiveParent;
+ }
+ }
+ private Format _ActiveFormat=null;// Added to cache ActiveFormat
+ public Format ActiveFormat
+ {
+ get
+ {
+ if(_ActiveFormat == null)
+ _ActiveFormat = (LocalFormat != null ? LocalFormat : ActiveParent.ActiveFormat);
+ return _ActiveFormat;
+ }
+ }
+ public Format LocalFormat
+ {
+ get { return MyContent.MyFormat; }
+ }
+ public DynamicTypeDescriptor MyConfig
+ {
+ get { return null; }
+ }
+ #endregion
+ }
+ #endregion
+ #region ItemInfo
+ public partial class ItemInfo:IVEDrillDownReadOnly
+ {
+ public bool IsType(string type)
+ {
+ int stepType = ((int)MyContent.Type) % 10000;
+ StepDataList sdlist = ActiveFormat.PlantFormat.FormatData.StepDataList;
+ StepData sd = sdlist[stepType];
+ // TODO: RHM20071115 while (sd.Index != 0)
+ // TODO: RHM20071115 {
+ // TODO: RHM20071115 if (sd.Type == type) return true;
+ // TODO: RHM20071115 sd = sdlist[sd.ParentType];
+ // TODO: RHM20071115 }
+ return false;
+ }
+ public bool IsCaution
+ {
+ get
+ {
+ return IsType("CAUTION");
+ }
+ }
+ public bool IsNote
+ {
+ get
+ {
+ return IsType("NOTE");
+ }
+ }
+ public bool IsTable
+ {
+ get
+ {
+ return IsType("TABLE");
+ }
+ }
+ public bool IsFigure
+ {
+ get
+ {
+ return IsType("FIGURE");
+ }
+ }
+ public bool IsOr
+ {
+ get
+ {
+ return IsType("OR");
+ }
+ }
+ public bool IsAnd
+ {
+ get
+ {
+ return IsType("AND");
+ }
+ }
+ public bool IsEquipmentList
+ {
+ get
+ {
+ return IsType("EQUIPMENTLIST");
+ }
+ }
+ public bool IsTitle
+ {
+ get
+ {
+ return IsType("TITLE");
+ }
+ }
+ public bool IsAccPages
+ {
+ get
+ {
+ return IsType("ACCPAGES");
+ }
+ }
+ public bool IsParagraph
+ {
+ get
+ {
+ return IsType("PARAGRAPH");
+ }
+ }
+ public bool IsDefault
+ {
+ get
+ {
+ return IsType("DEFAULT");
+ }
+ }
+ public bool IsContAcSequential
+ {
+ get
+ {
+ return IsType("CONTACSEQUENTIAL");
+ }
+ }
+ public bool IsHigh
+ {
+ get
+ {
+ // check to see if ActiveParent is a section, if so it is a high level step
+ if (MyContent.Type / 10000 != 2) return false;
+ ItemInfo parent = (ItemInfo)ActiveParent;
+ if ((parent.MyContent.Type / 10000) == 1)
+ return true;
+ return false;
+ }
+ }
+ public bool IsSequential
+ {
+ get
+ {
+ if (((MyContent.Type / 10000) == 2) && ((((int)MyContent.Type) % 10000) == 0)) return true;
+ return false;
+ }
+ }
+ public bool IsRNO
+ {
+ get
+ {
+ return ((ItemPartCount > 0) && (ItemParts[0].PartType == E_FromType.RNO));
+ }
+ }
+ public bool IsInRNO
+ {
+ get
+ {
+ if (IsHigh) return false;
+ if (IsRNO) return true;
+ return ((ItemInfo)ActiveParent).IsInRNO;
+ }
+ }
+ public ItemInfo FirstSibling
+ {
+ get
+ {
+ ItemInfo temp = this;
+ while (temp.MyPrevious != null) temp = temp.MyPrevious;
+ return temp;
+ }
+ }
+ public bool IsSubStep
+ {
+ get
+ {
+ ItemInfo temp = FirstSibling;
+ return ((temp.ItemPartCount > 0) && (temp.ItemParts[0].PartType == E_FromType.Step));
+ }
+ }
+ public bool IsInSubStep
+ {
+ get
+ {
+ if (IsHigh) return false;
+ if (IsSubStep) return true;
+ return ((ItemInfo)ActiveParent).IsInSubStep;
+ }
+ }
+ public bool IsInFirstLevelSubStep
+ {
+ get
+ {
+ ItemInfo temp = FirstSibling;
+ while (((ItemInfo)temp.ActiveParent).IsHigh == false) temp = ((ItemInfo)temp.ActiveParent).FirstSibling;
+ return temp.IsSubStep;
+ }
+ }
+ private E_FromType ItemType
+ {
+ get
+ {
+ if (MyContent.Type == 0) return E_FromType.Procedure;
+ if (MyContent.Type < 20000) return E_FromType.Section;
+ return E_FromType.Step;
+ }
+ }
+ public Item GetByType()
+ {
+ Item tmp = null;
+ switch (ItemType)
+ {
+ case E_FromType.Procedure:
+ tmp = Procedure.Get(_ItemID);
+ break;
+ //case E_FromType.Section:
+ // itemInfo = new Section(dr);
+ // break;
+ //default:
+ // itemInfo = new Step(dr);
+ // break;
+ }
+ return tmp;
+ }
+ private int? _Ordinal;
+ public int Ordinal
+ {
+ get
+ {
+ //int retval = 1;
+ //for (ItemInfo ii = MyParent; ii != null; ii = ii.MyParent) retval++;
+ //return retval;
+ //if (_Ordinal != null) return (int)_Ordinal; // Cache Ordinal
+ if (MyPrevious != null) return (int)(_Ordinal = MyPrevious.Ordinal + 1);
+ return (int)(_Ordinal = 1);
+ }
+ }
+ public string CslaType
+ { get { return this.GetType().FullName; } }
+ public override string ToString()
+ {
+ //Item editable = Item.GetExistingByPrimaryKey(_ItemID);
+ //return string.Format("{0}{1} {2}", (editable == null ? "" : (editable.IsDirty ? "* " : "")),
+ // (MyContent.Type >= 20000 ? Ordinal.ToString() + "." : MyContent.Number), MyContent.Text);
+ ContentInfo cont = MyContent;
+ string number = cont.Number;
+ if (cont.Type >= 20000) number = Ordinal.ToString() + ".";
+ return string.Format("{0} {1}", number, cont.Text);
+ //return string.Format("{0} {1}", cont.Number, cont.Text);
+ //return "Now is the time for all good men to come to the aid of their country!";
+ }
+ //public string ToString(string str,System.IFormatProvider ifp)
+ //{
+ // return ToString();
+ //}
+ public string nz(string str, string def)
+ {
+ return (str == null ? def : str);
+ }
+ public string Path
+ {
+ get
+ {
+ string number = (MyContent.Type >= 20000 ? Ordinal.ToString() + "." : (nz(MyContent.Number,"")==""? MyContent.Text: MyContent.Number));
+ ItemInfo parent = this;
+ while (parent.MyPrevious != null) parent = parent.MyPrevious;
+ if (parent.ItemPartCount == 0)
+ return number + ", " + MyContent.Text;
+ else
+ {
+ PartInfo partInfo = parent.ItemParts[0];
+ return partInfo.MyContent.ContentItems.Items[0].Path + " " + ((E_FromType)partInfo.FromType).ToString() + " " + number;
+ }
+ }
+ }
+ public ContentInfo ParentContent
+ {
+ get
+ {
+ string number = (MyContent.Type >= 20000 ? Ordinal.ToString() + "." : (nz(MyContent.Number, "") == "" ? MyContent.Text : MyContent.Number));
+ ItemInfo parent = this;
+ while (parent.MyPrevious != null) parent = parent.MyPrevious;
+ if (parent.ItemPartCount == 0)
+ return null;
+ else
+ {
+ return parent.ItemParts[0].MyContent;
+ }
+ }
+ }
+ public ItemInfo MyParent
+ {
+ get
+ {
+ //if (ItemDocVersionCount > 0) return ItemDocVersions[0]; Need to create one interface to support Folders, DocVersions and Items
+ ContentInfo parentContent = ParentContent;
+ if (parentContent == null || parentContent.ContentItemCount == 0) return null;
+ return parentContent.ContentItems[0];
+ }
+ }
+ private ItemInfoList Lookup(int fromType, ref ItemInfoList itemInfoList)
+ {
+ if (itemInfoList != null) return itemInfoList;
+ if (MyContent.ContentPartCount != 0)
+ foreach (PartInfo partInfo in MyContent.ContentParts)
+ if (partInfo.FromType == fromType)
+ {
+ itemInfoList = partInfo._MyItems = ItemInfoList.GetList(partInfo.ItemID,partInfo.FromType);
+ return itemInfoList;
+ }
+ return null;
+ }
+ private ItemInfoList _Procedures;
+ public ItemInfoList Procedures
+ { get { return Lookup(1,ref _Procedures); } }
+ private ItemInfoList _Sections;
+ public ItemInfoList Sections
+ { get { return Lookup(2,ref _Sections); } }
+ private ItemInfoList _Cautions;
+ public ItemInfoList Cautions
+ { get { return Lookup(3,ref _Cautions); } }
+ private ItemInfoList _Notes;
+ public ItemInfoList Notes
+ { get { return Lookup(4,ref _Notes); } }
+ private ItemInfoList _RNOs;
+ public ItemInfoList RNOs
+ { get { return Lookup(5,ref _RNOs); } }
+ private ItemInfoList _Steps;
+ public ItemInfoList Steps
+ { get { return Lookup(6,ref _Steps); } }
+ private ItemInfoList _Tables;
+ public ItemInfoList Tables
+ { get { return Lookup(7,ref _Tables); } }
+ //public XmlDocument ToXml()
+ //{
+ // XmlDocument retval = new XmlDocument();
+ // retval.LoadXml("");
+ // return ToXml(retval.DocumentElement);
+ //}
+ //public void AddList(XmlNode xn,string name, ItemInfoList itemInfoList)
+ //{
+ // if (itemInfoList != null)
+ // {
+ // XmlNode nd = xn.OwnerDocument.CreateElement(name);
+ // xn.AppendChild(nd);
+ // itemInfoList.ToXml(xn);
+ // }
+ //}
+ //public XmlDocument ToXml(XmlNode xn)
+ //{
+ // XmlNode nd = MyContent.ToXml(xn);
+ // // Now add the children
+ // AddList(nd, "Procedures", Procedures);
+ // AddList(nd, "Sections", Sections);
+ // AddList(nd, "Cautions", Cautions);
+ // AddList(nd, "Notes", Notes);
+ // AddList(nd, "RNOs", RNOs);
+ // AddList(nd, "Steps", SubItems);
+ // AddList(nd, "Tables", Tables);
+ // return xn.OwnerDocument;
+ //}
+ #region IVEReadOnlyItem
+ PartInfoList _PartInfoList;
+ public System.Collections.IList GetChildren()
+ {
+ _PartInfoList = this.MyContent.ContentParts;
+ return _PartInfoList;
+ }
+ //public bool ChildrenAreLoaded
+ //{
+ // get { return _PartInfoList == null; }
+ //}
+ public bool HasChildren
+ {
+ get { return this.MyContent.ContentPartCount > 0; }
+ }
+ private IVEDrillDownReadOnly _ActiveParent = null;
+ public IVEDrillDownReadOnly ActiveParent
+ {
+ get
+ {
+ if (_ActiveParent == null)
+ {
+ if (MyPrevious != null)
+ _ActiveParent = _MyPrevious.ActiveParent;
+ else
+ {
+ if (ItemDocVersionCount > 0)
+ _ActiveParent = this.ItemDocVersions[0];
+ else
+ {
+ ContentInfo parentContent = ParentContent;
+ if (parentContent == null || parentContent.ContentItemCount == 0)
+ _ActiveParent = this;
+ else
+ _ActiveParent = parentContent.ContentItems[0];
+ }
+ }
+ }
+ return _ActiveParent==this ? null : _ActiveParent;
+ }
+ //get
+ //{
+ // if (MyPrevious != null) return _MyPrevious.ActiveParent;
+ // if (ItemDocVersionCount > 0) return ItemDocVersions[0];
+ // ContentInfo parentContent = ParentContent;
+ // if (parentContent == null || parentContent.ContentItemCount == 0) return null;
+ // return parentContent.ContentItems[0];
+ //}
+ }
+ private FormatInfo _ActiveFormat = null;
+ public FormatInfo ActiveFormat
+ {
+ get
+ {
+ if(_ActiveFormat == null)
+ _ActiveFormat = (LocalFormat != null ? LocalFormat : ActiveParent.ActiveFormat);
+ return _ActiveFormat;
+ }
+ //get { return LocalFormat != null ? LocalFormat : ActiveParent.ActiveFormat; }
+ }
+ public FormatInfo LocalFormat
+ {
+ get { return MyContent.MyFormat; }
+ }
+ public DynamicTypeDescriptor MyConfig
+ {
+ get { return null; }
+ }
+ //public bool HasStandardSteps()
+ //{ return MyContent.ContentItemCount > 1; }
+ public Color ForeColor
+ { get { return (HasBrokenRules != null ? Color.Red : (MyContent.ContentItemCount > 1 ? Color.Blue : Color.Black)); } }
+ public Color BackColor
+ { get { return (ItemAnnotationCount > 0 ? Color.Yellow : Color.White); } }
+ #endregion
+ }
+ #endregion ItemInfo
+ #region ItemInfoList
+ public partial class ItemInfoList
+ {
+ //public void ToXml(XmlNode xn)
+ //{
+ // foreach (ItemInfo itemInfo in this)
+ // {
+ // itemInfo.ToXml(xn);
+ // }
+ //}
+ public static ItemInfoList GetList(int? itemID,int type)
+ {
+ try
+ {
+ ItemInfoList tmp = DataPortal.Fetch(new ItemListCriteria(itemID,type));
+ ItemInfo.AddList(tmp);
+ tmp.AddEvents();
+ ContentInfoList.GetList(itemID);
+ return tmp;
+ }
+ catch (Exception ex)
+ {
+ throw new DbCslaException("Error on ItemInfoList.GetChildren", ex);
+ }
+ }
+ [Serializable()]
+ private class ItemListCriteria
+ {
+ public ItemListCriteria(int? itemID,int type)
+ {
+ _ItemID = itemID;
+ _Type = type;
+ }
+ private int? _ItemID;
+ public int? ItemID
+ {
+ get { return _ItemID; }
+ set { _ItemID = value; }
+ }
+ private int _Type;
+ public int Type
+ {
+ get { return _Type; }
+ set { _Type = value; }
+ }
+ }
+ private void DataPortal_Fetch(ItemListCriteria criteria)
+ {
+ this.RaiseListChangedEvents = false;
+ try
+ {
+ using (SqlConnection cn = Database.VEPROMS_SqlConnection)
+ {
+ using (SqlCommand cm = cn.CreateCommand())
+ {
+ cm.CommandType = CommandType.StoredProcedure;
+ cm.CommandText = "vesp_ListItems";
+ cm.Parameters.AddWithValue("@ItemID", criteria.ItemID);
+ using (SafeDataReader dr = new SafeDataReader(cm.ExecuteReader()))
+ {
+ IsReadOnly = false;
+ while (dr.Read())
+ {
+ ItemInfo itemInfo = null;
+ switch ((E_FromType)criteria.Type)
+ {
+ case E_FromType.Procedure:
+ itemInfo = new ProcedureInfo(dr);
+ break;
+ case E_FromType.Section:
+ itemInfo = new SectionInfo(dr);
+ break;
+ default:
+ itemInfo = new StepInfo(dr);
+ break;
+ }
+ this.Add(itemInfo);
+ }
+ IsReadOnly = true;
+ }
+ }
+ }
+ }
+ catch (Exception ex)
+ {
+ Database.LogException("ItemInfoList.DataPortal_Fetch", ex);
+ throw new DbCslaException("ItemInfoList.DataPortal_Fetch", ex);
+ }
+ this.RaiseListChangedEvents = true;
+ }
+ }
+ #endregion
+ #region ProcedureInfo
+ [Serializable()]
+ public partial class ProcedureInfo : ItemInfo, IVEDrillDownReadOnly
+ {
+ public ProcedureInfo(SafeDataReader dr) : base(dr) { }
+ public new Procedure Get()
+ {
+ return (Procedure) (_Editable = Procedure.Get(ItemID));
+ }
+ #region ProcedureConfig
+ [NonSerialized]
+ private ProcedureConfig _ProcedureConfig;
+ public ProcedureConfig ProcedureConfig
+ { get { return (_ProcedureConfig != null ? _ProcedureConfig : _ProcedureConfig = new ProcedureConfig(this)); } }
+ #endregion
+ public new DynamicTypeDescriptor MyConfig
+ {
+ get { return ProcedureConfig ; }
+ }
+ }
+ #endregion
+ #region Procedure
+ [Serializable()]
+ public partial class Procedure : Item
+ {
+ public new static Procedure Get(int itemID)
+ {
+ if (!CanGetObject())
+ throw new System.Security.SecurityException("User not authorized to view a Item");
+ try
+ {
+ Procedure tmp = (Procedure)GetExistingByPrimaryKey(itemID);
+ if (tmp == null)
+ {
+ tmp = DataPortal.Fetch(new PKCriteria(itemID));
+ _AllList.Add(tmp);
+ }
+ if (tmp.ErrorMessage == "No Record Found") tmp = null;
+ return tmp;
+ }
+ catch (Exception ex)
+ {
+ throw new DbCslaException("Error on Item.Get", ex);
+ }
+ }
+ public new Procedure Save()
+ {
+ return (Procedure)base.Save();
+ }
+ #region ProcedureConfig
+ [NonSerialized]
+ private ProcedureConfig _ProcedureConfig;
+ public ProcedureConfig ProcedureConfig
+ {
+ get
+ {
+ if (_ProcedureConfig == null)
+ {
+ _ProcedureConfig = new ProcedureConfig(this);
+ _ProcedureConfig.PropertyChanged += new System.ComponentModel.PropertyChangedEventHandler(_ProcedureConfig_PropertyChanged);
+ }
+ return _ProcedureConfig;
+ }
+ }
+ private void _ProcedureConfig_PropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e)
+ {
+ MyContent.Config = _ProcedureConfig.ToString();
+ }
+ #endregion
+ }
+ #endregion
+ #region SectionInfo
+ [Serializable()]
+ public partial class SectionInfo : ItemInfo, IVEDrillDownReadOnly
+ {
+ public SectionInfo(SafeDataReader dr) : base(dr) { }
+ public new Section Get()
+ {
+ return (Section)(_Editable = Section.Get(ItemID));
+ }
+ #region SectionConfig
+ [NonSerialized]
+ private SectionConfig _SectionConfig;
+ public SectionConfig SectionConfig
+ { get { return (_SectionConfig != null ? _SectionConfig : _SectionConfig = new SectionConfig(this)); } }
+ #endregion
+ public new DynamicTypeDescriptor MyConfig
+ {
+ get { return SectionConfig; }
+ }
+ }
+ #endregion
+ #region Section
+ [Serializable()]
+ public partial class Section : Item
+ {
+ public new static Section Get(int itemID)
+ {
+ if (!CanGetObject())
+ throw new System.Security.SecurityException("User not authorized to view a Item");
+ try
+ {
+ Section tmp = (Section)GetExistingByPrimaryKey(itemID);
+ if (tmp == null)
+ {
+ tmp = DataPortal.Fetch(new PKCriteria(itemID));
+ _AllList.Add(tmp);
+ }
+ if (tmp.ErrorMessage == "No Record Found") tmp = null;
+ return tmp;
+ }
+ catch (Exception ex)
+ {
+ throw new DbCslaException("Error on Item.Get", ex);
+ }
+ }
+
+ public new Section Save()
+ {
+ return (Section)base.Save();
+ }
+
+ #region SectionConfig
+ [NonSerialized]
+ private SectionConfig _SectionConfig;
+ public SectionConfig SectionConfig
+ {
+ get
+ {
+ if (_SectionConfig == null)
+ {
+ _SectionConfig = new SectionConfig(this);
+ _SectionConfig.PropertyChanged += new System.ComponentModel.PropertyChangedEventHandler(_SectionConfig_PropertyChanged);
+ }
+ return _SectionConfig;
+ }
+ }
+ private void _SectionConfig_PropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e)
+ {
+ MyContent.Config = _SectionConfig.ToString();
+ }
+ #endregion
+ }
+ #endregion
+ #region StepInfo
+ [Serializable()]
+ public partial class StepInfo : ItemInfo
+ {
+ //public override string ToString()
+ //{
+ // return "Step " + base.ToString();
+ //}
+ public StepInfo(SafeDataReader dr) : base(dr) { }
+ public new Step Get()
+ {
+ return (Step)(_Editable = Step.Get(ItemID));
+ }
+ //public E_FromType FromType
+ //{ get { return E_FromType.Step; } }
+ }
+
+ #endregion
+ #region Step
+ [Serializable()]
+ public partial class Step : Item
+ {
+ public new static Step Get(int itemID)
+ {
+ if (!CanGetObject())
+ throw new System.Security.SecurityException("User not authorized to view a Item");
+ try
+ {
+ Step tmp = (Step)GetExistingByPrimaryKey(itemID);
+ if (tmp == null)
+ {
+ tmp = DataPortal.Fetch(new PKCriteria(itemID));
+ _AllList.Add(tmp);
+ }
+ if (tmp.ErrorMessage == "No Record Found") tmp = null;
+ return tmp;
+ }
+ catch (Exception ex)
+ {
+ throw new DbCslaException("Error on Item.Get", ex);
+ }
+ }
+ //#region StepConfig
+ //[NonSerialized]
+ //private StepConfig _StepConfig;
+ //public StepConfig StepConfig
+ //{
+ // get
+ // {
+ // if (_StepConfig == null)
+ // {
+ // _StepConfig = new StepConfig(this);
+ // _StepConfig.PropertyChanged += new System.ComponentModel.PropertyChangedEventHandler(_StepConfig_PropertyChanged);
+ // }
+ // return _SectionConfig;
+ // }
+ //}
+ //private void _StepConfig_PropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e)
+ //{
+ // MyContent.Config = _StepConfig.ToString();
+ //}
+ //#endregion
+ }
+ #endregion
+}
diff --git a/PROMS/VEPROMS.CSLA.Library/Extension/PartExt.cs b/PROMS/VEPROMS.CSLA.Library/Extension/PartExt.cs
new file mode 100644
index 00000000..38b8abaf
--- /dev/null
+++ b/PROMS/VEPROMS.CSLA.Library/Extension/PartExt.cs
@@ -0,0 +1,93 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+using Csla;
+using Csla.Data;
+
+namespace VEPROMS.CSLA.Library
+{
+ public partial class ContentPart
+ {
+ public override string ToString()
+ {
+ return string.Format("{0} {1}", MyItem.MyContent.Number, MyItem.MyContent.Text);
+ }
+ }
+ public partial class ItemPart
+ {
+ public override string ToString()
+ {
+ return string.Format("{0} {1}", _MyContent.Number, MyContent.Text);
+ }
+ }
+ public partial class Part
+ {
+ public override string ToString()
+ {
+ return string.Format("{0} {1}", MyItem.MyContent.Number, MyItem.MyContent.Text);
+ }
+ }
+ public partial class PartInfo : IVEDrillDownReadOnly
+ {
+ public E_FromType PartType
+ { get { return (E_FromType)_FromType; } }
+ public E_FromTypes PartTypes
+ { get { return (E_FromTypes)_FromType; } }
+ public override string ToString()
+ {
+ return string.Format("{0}", PartTypes);
+ }
+ //public string ToString(string str, System.IFormatProvider ifp)
+ //{
+ // return ToString();
+ //}
+ #region IVEDrillDownReadOnly
+ public ItemInfoList _MyItems;
+ public ItemInfoList MyItems
+ { get { return (_MyItems != null? _MyItems : _MyItems = ItemInfoList.GetList(_ItemID,_FromType)); } }
+ public System.Collections.IList GetChildren()
+ {
+ return (_MyItems != null ? _MyItems : _MyItems = ItemInfoList.GetList(_ItemID, _FromType));
+ }
+ //public bool ChildrenAreLoaded
+ //{
+ // get { return _MyItems == null; }
+ //}
+ public bool HasChildren
+ {
+ get { return this.MyContent.ContentPartCount > 0; }
+ }
+ public IVEDrillDownReadOnly ActiveParent
+ {
+ get
+ {
+ ContentInfo parentContent = MyContent;
+ if (parentContent == null || parentContent.ContentItemCount == 0) return null;
+ return parentContent.ContentItems[0];
+ }
+ }
+ public FormatInfo ActiveFormat
+ {
+ get { return ActiveParent.ActiveFormat; }
+ }
+ public FormatInfo LocalFormat
+ {
+ get { return null; }
+ }
+ public DynamicTypeDescriptor MyConfig
+ {
+ get { return null; }
+ }
+ //public bool HasStandardSteps()
+ //{ return false; }
+ #endregion
+ }
+ public enum E_FromType : int
+ {
+ Procedure = 1, Section = 2, Caution = 3, Note = 4, RNO = 5, Step = 6, Table = 7
+ }
+ public enum E_FromTypes : int
+ {
+ Procedures = 1, Sections = 2, Cautions = 3, Notes = 4, RNOs = 5, Steps = 6, Tables = 7
+ }
+}
diff --git a/PROMS/VEPROMS.CSLA.Library/Extension/PropertyDescriptors.cs b/PROMS/VEPROMS.CSLA.Library/Extension/PropertyDescriptors.cs
new file mode 100644
index 00000000..c92d4210
--- /dev/null
+++ b/PROMS/VEPROMS.CSLA.Library/Extension/PropertyDescriptors.cs
@@ -0,0 +1,95 @@
+// ========================================================================
+// Copyright 2006 - Volian Enterprises, Inc. All rights reserved.
+// Volian Enterprises - Proprietary Information - DO NOT COPY OR DISTRIBUTE
+// ------------------------------------------------------------------------
+// $Workfile: $ $Revision: $
+// $Author: $ $Date: $
+//
+// $History: $
+// ========================================================================
+
+using System;
+using System.Data;
+using System.Data.SqlClient;
+using Csla;
+using Csla.Data;
+using System.Configuration;
+using System.IO;
+using System.ComponentModel;
+using System.Collections.Generic;
+using System.Collections;
+
+namespace VEPROMS.CSLA.Library
+{
+ public partial class ChildFoldersPropertyDescriptor
+ {
+ public override string DisplayName
+ { get { return Item.Name; } }
+ public override string Description
+ { get { return Item.Title; } }
+ public override string Name
+ { get { return Item.Name; } }
+ }
+ public partial class FolderDocVersionsPropertyDescriptor
+ {
+ public override string DisplayName
+ { get { return Item.Name; } }
+ public override string Description
+ { get { return Item.Name; } }
+ public override string Name
+ { get { return Item.Name; } }
+ }
+ public class FormatList : System.ComponentModel.StringConverter
+ {
+ private static SortedList _FormatInfoList;
+ private static void LoadSortedList()
+ {
+ if (_FormatInfoList == null)
+ {
+ _FormatInfoList = new SortedList();
+ foreach (FormatInfo formatInfo in FormatInfoList.Get())
+ {
+ _FormatInfoList.Add(formatInfo.Name, formatInfo);
+ }
+ _FormatInfoList.Add("", null);
+ }
+ }
+ public override StandardValuesCollection GetStandardValues(ITypeDescriptorContext context)
+ {
+ LoadSortedList();
+ return new StandardValuesCollection((ICollection)_FormatInfoList.Values);
+ }
+ public override bool GetStandardValuesSupported(ITypeDescriptorContext context)
+ {
+ return true;
+ }
+ public override bool GetStandardValuesExclusive(ITypeDescriptorContext context)
+ {
+ return true;
+ }
+ public static int? ToInt(string formatName)
+ {
+ if (formatName == null || formatName == string.Empty) return null;
+ LoadSortedList();
+ foreach (FormatInfo formatInfo in _FormatInfoList.Values)
+ if (formatInfo != null && formatInfo.Name == formatName) return formatInfo.FormatID;
+ return null;
+ }
+ public static string ToString(int? formatID)
+ {
+ if (formatID == null) return null;
+ LoadSortedList();
+ foreach (FormatInfo formatInfo in _FormatInfoList.Values)
+ if (formatInfo != null && formatInfo.FormatID == formatID) return formatInfo.ToString();
+ return null;
+ }
+ public static Format ToFormat(string formatName)
+ {
+ if (formatName == null || formatName == string.Empty) return null;
+ LoadSortedList();
+ foreach (FormatInfo formatInfo in _FormatInfoList.Values)
+ if (formatInfo != null && formatInfo.ToString() == formatName) return formatInfo.Get();
+ return null;
+ }
+ }
+}
diff --git a/PROMS/VEPROMS.CSLA.Library/Extension/TransitionExt.cs b/PROMS/VEPROMS.CSLA.Library/Extension/TransitionExt.cs
new file mode 100644
index 00000000..679f6ce6
--- /dev/null
+++ b/PROMS/VEPROMS.CSLA.Library/Extension/TransitionExt.cs
@@ -0,0 +1,26 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace VEPROMS.CSLA.Library
+{
+ public partial class TransitionInfo
+ {
+ public string PathTo
+ {
+ get
+ {
+ //return "To " + MyItemToID.Path;
+ return MyItemToID.Path;
+ }
+ }
+ public string PathFrom
+ {
+ get
+ {
+ //return "From " + MyContent.ContentItems[0].Path;
+ return MyContent.ContentItems[0].Path;
+ }
+ }
+ }
+}
diff --git a/PROMS/VEPROMS.CSLA.Library/Format/DocStyles.cs b/PROMS/VEPROMS.CSLA.Library/Format/DocStyles.cs
new file mode 100644
index 00000000..af372a76
--- /dev/null
+++ b/PROMS/VEPROMS.CSLA.Library/Format/DocStyles.cs
@@ -0,0 +1,483 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+using System.ComponentModel;
+using System.Xml;
+
+namespace VEPROMS.CSLA.Library
+{
+ #region DocStyles
+ [TypeConverter(typeof(ExpandableObjectConverter))]
+ public class DocStyles : vlnFormatItem
+ {
+ [Description("Document Styles Name")]
+ private LazyLoad _Name;
+ public string Name
+ {
+ get
+ {
+ return LazyLoad(ref _Name, "@Name");
+ }
+ }
+ private DocStyleList _DocStyleList;
+ public DocStyleList DocStyleList
+ {
+ get
+ {
+ return (_DocStyleList == null) ? _DocStyleList = new DocStyleList(SelectNodes("DocStyle")): _DocStyleList;
+ }
+ set { _DocStyleList = value; }
+ }
+ public DocStyles(XmlNode xmlNode) : base(xmlNode) { }
+ }
+ #endregion
+ #region DocStyleAll
+ #region DocStyle
+ [TypeConverter(typeof(ExpandableObjectConverter))]
+ public class DocStyle : vlnFormatItem
+ {
+ public DocStyle(XmlNode xmlNode) : base(xmlNode) { }
+ public DocStyle() : base() { }
+ #region IndexName
+ private LazyLoad _Index;
+ public int? Index
+ {
+ get
+ {
+ return LazyLoad(ref _Index, "@Index");
+ }
+ }
+ [Description("Document Styles Name")]
+ private LazyLoad _Name;
+ public string Name
+ {
+ get
+ {
+ return LazyLoad(ref _Name, "@Name");
+ }
+ }
+ #endregion
+ #region Font
+ private VE_Font _Font;
+ [Category("Font")]
+ [DisplayName("Font")]
+ [Description("Font")]
+ public VE_Font Font
+ {
+ get
+ {
+ return(_Font == null) ?_Font = new VE_Font(XmlNode): _Font;
+ }
+ }
+ #endregion
+ #region numberingsequence
+ [Category("Miscellaneous")]
+ [Description("Numbering Sequence")]
+ private LazyLoad _NumberingSequence;
+ public E_NumberingSequence? NumberingSequence
+ {
+ get
+ {
+ return LazyLoad(ref _NumberingSequence, "@NumberingSequence");
+ }
+ }
+ #endregion
+ #region Oldtonew
+ [Category("Miscellaneous")]
+ [Description("Convert from old to new")]
+ private LazyLoad _OldToNew;
+ public int? OldToNew
+ {
+ get
+ {
+ return LazyLoad(ref _OldToNew, "@OldToNew");
+ }
+ }
+ #endregion
+ #region pagestyle
+ private PageStyle _pagestyle;
+ [Category("Miscellaneous")]
+ [DisplayName("Page Style")]
+ [Description("Page Style")]
+ public PageStyle pagestyle
+ {
+ get
+ {
+ string str = "//PageStyles/PageStyle[" + (IntLookup("@PageStyle") + 1).ToString() + "]";
+ XmlNode xn = SelectSingleNode(str);
+ if (_pagestyle == null) _pagestyle = new PageStyle(SelectSingleNode("//PageStyles/PageStyle[" + (IntLookup("@PageStyle") + 1).ToString() + "]"));
+ return _pagestyle;
+ }
+ }
+ #endregion
+ #region SubElements
+ private Layout _Layout;
+ public Layout Layout
+ {
+ get
+ {
+ return (_Layout == null ? _Layout = new Layout(SelectSingleNode("Layout")) : _Layout);
+ }
+ }
+ private Continue _Continue;
+ public Continue Continue
+ {
+ get
+ {
+ return (_Continue == null ? _Continue = new Continue(SelectSingleNode("Continue")) : _Continue);
+ }
+ }
+ private End _End;
+ public End End
+ {
+ get
+ {
+ return (_End == null ? _End = new End(SelectSingleNode("End")) : _End);
+ }
+ }
+ private Final _Final;
+ public Final Final
+ {
+ get
+ {
+ return (_Final == null ? _Final = new Final(SelectSingleNode("Final")) : _Final);
+ }
+ }
+ private StructureStyle _StructureStyle;
+ public StructureStyle StructureStyle
+ {
+ get
+ {
+ return (_StructureStyle == null ? _StructureStyle = new StructureStyle(SelectSingleNode("StructureStyle")) : _StructureStyle);
+ }
+ }
+ #endregion
+ public override string ToString()
+ {
+ return String.Format("{0:D2} - {1}", Index, Name);
+ }
+ }
+ #endregion
+ #region DocStyleList
+ [TypeConverter(typeof(vlnListConverter))]
+ public class DocStyleList : vlnFormatList
+ {
+ public DocStyleList(XmlNodeList xmlNodeList) : base(xmlNodeList) { }
+ }
+ #endregion
+ #region Layout
+ [TypeConverter(typeof(ExpandableObjectConverter))]
+ public class Layout : vlnFormatItem
+ {
+ public Layout(XmlNode xmlNode) : base(xmlNode) { }
+ public Layout() : base() { }
+ #region TopRow
+ private LazyLoad _TopRow;
+ [Category("Layout")]
+ [DisplayName("Top Row on Printed Page")]
+ [Description("Top Row on Printed Page")]
+ public int? TopRow
+ {
+ get
+ {
+ return LazyLoad(ref _TopRow, "@TopRow");
+ }
+ }
+ #endregion
+ #region FooterLength
+ private LazyLoad _FooterLength;
+ [Category("Location")]
+ [DisplayName("Number of lines required for footer")]
+ [Description("Number of lines required for footer")]
+ public int? FooterLength
+ {
+ get
+ {
+ return LazyLoad(ref _FooterLength, "@FooterLength");
+ }
+ }
+ #endregion
+ #region LeftMargin
+ private LazyLoad _LeftMargin;
+ [Category("Location")]
+ [DisplayName("Size of left margin")]
+ [Description("Size of left margin")]
+ public int? LeftMargin
+ {
+ get
+ {
+ return LazyLoad(ref _LeftMargin, "@LeftMargin");
+ }
+ }
+ #endregion
+ #region PageLength
+ private LazyLoad _PageLength;
+ [Category("Location")]
+ [DisplayName("Length of Page")]
+ [Description("Length of Page")]
+ public int? PageLength
+ {
+ get
+ {
+ return LazyLoad(ref _PageLength, "@PageLength");
+ }
+ }
+ #endregion
+ #region PageWidth
+ private LazyLoad _PageWidth;
+ [Category("Location")]
+ [DisplayName("Width of Page")]
+ [Description("Width of Page")]
+ public int? PageWidth
+ {
+ get
+ {
+ return LazyLoad(ref _PageWidth, "@PageWidth");
+ }
+ }
+ #endregion
+ }
+ #endregion
+ #region ContinueAll
+ #region Continue
+ [TypeConverter(typeof(ExpandableObjectConverter))]
+ public class Continue : vlnFormatItem
+ {
+ public Continue(XmlNode xmlNode) : base(xmlNode) { }
+ public Continue() : base() { }
+ #region Font
+ private VE_Font _Font;
+ [Category("Continue Msg")]
+ [DisplayName("Font")]
+ [Description("Font")]
+ public VE_Font Font
+ {
+ get
+ {
+ return (_Font == null ? _Font = new VE_Font(base.XmlNode) : _Font);
+ }
+ }
+ #endregion
+ #region SubElements
+ private Top _Top;
+ public Top Top
+ {
+ get
+ {
+ return (_Top == null? _Top = new Top(SelectSingleNode("Top")): _Top);
+ }
+ }
+ private Bottom _Bottom;
+ public Bottom Bottom
+ {
+ get
+ {
+ return (_Bottom == null ? _Bottom = new Bottom(SelectSingleNode("Bottom")) : _Bottom);
+ }
+ }
+ #endregion
+ }
+ #endregion
+ #region Top
+ [TypeConverter(typeof(ExpandableObjectConverter))]
+ public class Top : vlnFormatItem
+ {
+ public Top(XmlNode xmlNode) : base(xmlNode) { }
+ public Top() : base() { }
+ #region Margin
+ private LazyLoad _Margin;
+ [Category("Continue Msg")]
+ [DisplayName("Margin for top msg")]
+ [Description("Margin for top msg")]
+ public int? Margin
+ {
+ get
+ {
+ return LazyLoad(ref _Margin, "@Margin");
+ }
+ }
+ #endregion
+ #region HLS
+ private LazyLoad _HLS;
+ [Category("Continue Msg")]
+ [DisplayName("Include HLS in top continue msg")]
+ [Description("Include HLS in top continue msg")]
+ public int? HLS
+ {
+ get
+ {
+ return LazyLoad(ref _HLS, "@HLS");
+ }
+ }
+ #endregion
+ #region Message
+ private LazyLoad _Message;
+ [Category("Continue Msg")]
+ [DisplayName("Top Continue Msg")]
+ [Description("Top Continue Msg")]
+ public string Message
+ {
+ get
+ {
+ return LazyLoad(ref _Message, "@Message");
+ }
+ }
+ #endregion
+ }
+ #endregion
+ #region Bottom
+ [TypeConverter(typeof(ExpandableObjectConverter))]
+ public class Bottom : vlnFormatItem
+ {
+ public Bottom(XmlNode xmlNode) : base(xmlNode) { }
+ public Bottom() : base() { }
+ #region Margin
+ private LazyLoad _Margin;
+ [Category("Continue Msg")]
+ [DisplayName("Margin for bottom msg")]
+ [Description("Margin for bottom msg")]
+ public int? Margin
+ {
+ get
+ {
+ return LazyLoad(ref _Margin, "@Margin");
+ }
+ }
+ #endregion
+ #region Location
+ [Category("Continue Msg")]
+ [Description("Bottom Continue Location")]
+
+ private LazyLoad _NumberingSequence;
+ public E_NumberingSequence? NumberingSequence
+ {
+ get
+ {
+ return LazyLoad(ref _NumberingSequence, "@NumberingSequence");
+ }
+ }
+ private LazyLoad _Location;
+ public E_ContBottomLoc? Location
+ {
+ get
+ {
+ return LazyLoad(ref _Location, "@Location");
+ }
+ }
+ #endregion
+ #region Message
+ private LazyLoad _Message;
+ [Category("Continue Msg")]
+ [DisplayName("Bottom Continue Msg")]
+ [Description("Bottom Continue Msg")]
+ public string Message
+ {
+ get
+ {
+ return LazyLoad(ref _Message, "@Message");
+ }
+ }
+ #endregion
+ }
+ #endregion
+ #endregion
+ #region End
+ [TypeConverter(typeof(ExpandableObjectConverter))]
+ public class End : vlnFormatItem
+ {
+ public End(XmlNode xmlNode) : base(xmlNode) { }
+ public End() : base() { }
+ #region Font
+ private VE_Font _Font;
+ [Category("End Msg")]
+ [DisplayName("Font")]
+ [Description("Font")]
+ public VE_Font Font
+ {
+ get
+ {
+ return (_Font == null ? _Font = new VE_Font(XmlNode) : _Font);
+ }
+ }
+ #endregion
+ #region Flag
+ private LazyLoad _Flag;
+ [Category("End Msg")]
+ [DisplayName("End Msg Exists")]
+ [Description("End Msg Exists")]
+ public int? Flag
+ {
+ get
+ {
+ return LazyLoad(ref _Flag, "@Flag");
+ }
+ }
+ #endregion
+ #region Message
+ private LazyLoad _Message;
+ [Category("End Msg")]
+ [DisplayName("End Message")]
+ [Description("End Message")]
+ public string Message
+ {
+ get
+ {
+ return LazyLoad(ref _Message, "@Message");
+ }
+ }
+ #endregion
+ }
+ #endregion
+ #region Final
+ [TypeConverter(typeof(ExpandableObjectConverter))]
+ public class Final : vlnFormatItem
+ {
+ public Final(XmlNode xmlNode) : base(xmlNode) { }
+ public Final() : base() { }
+ private LazyLoad _Message;
+ [Category("Final Msg")]
+ [DisplayName("Final Message")]
+ [Description("Final Message")]
+ public string Message
+ {
+ get
+ {
+ return LazyLoad(ref _Message, "@Message");
+ }
+ }
+ }
+ #endregion
+ #region StructureStyle
+ [TypeConverter(typeof(ExpandableObjectConverter))]
+ public class StructureStyle : vlnFormatItem
+ {
+ public StructureStyle(XmlNode xmlNode) : base(xmlNode) { }
+ public StructureStyle() : base() { }
+ #region Where
+ [Category("Structure Style")]
+ [Description("Where Used")]
+ private LazyLoad _Where;
+ public E_DocStyleUse? Where
+ {
+ get
+ {
+ return LazyLoad(ref _Where, "@Where");
+ }
+ }
+ #endregion
+ #region Style
+ [Category("Structure Style")]
+ [Description("Style")]
+ private LazyLoad _Style;
+ public E_DocStructStyle? Style
+ {
+ get
+ {
+ return LazyLoad(ref _Style, "@Style");
+ }
+ }
+ #endregion
+ }
+ #endregion
+ #endregion
+}
diff --git a/PROMS/VEPROMS.CSLA.Library/Format/ENums.cs b/PROMS/VEPROMS.CSLA.Library/Format/ENums.cs
new file mode 100644
index 00000000..5add3817
--- /dev/null
+++ b/PROMS/VEPROMS.CSLA.Library/Format/ENums.cs
@@ -0,0 +1,199 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+using System.Xml;
+using System.ComponentModel;
+
+namespace VEPROMS.CSLA.Library
+{
+ #region ENums
+ [Flags]
+ public enum E_PurchaseOptions : uint
+ {
+ APPROVEONE = 0x0001,
+ ACCPAGINATION = 0x0002,
+ LIBMAINT = 0x0004,
+ TRANSFER = 0x0008,
+ STREES = 0x0010,
+ DATECHGSUMRPT = 0x0020,
+ SETPOINTUSAGE = 0x0040,
+ REPLACE = 0x0080,
+ FLOPPYTRANSFER = 0x0100,
+ APPROVEGENERICBACK = 0x0200,
+ DISTRIBUTEAPPROVED = 0x0400,
+ OUTSIDETRANSITIONS = 0x0800,
+ ENHANCEDBACKGROUNDS = 0x1000,
+ ENHANCEDDEVIATIONS = 0x2000,
+ AUTOTABLEOFCONTENTS = 0x4000,
+ AUTOPLACEKEEPER = 0x8000
+ }
+ [Flags]
+ public enum E_Style : uint
+ {
+ // Fonts removed, not used here.
+ NONE = 0,
+ UNDERLINE = 64, BOLD = 128, LANDSCAPE = 256, ITALICS = 512, BOXED = 1024, BOXELEMENT = 0x00000800,
+ TBCENTERED = 4096, RTCHECKOFF = 8192, LTCHECKOFF = 16384, BIGSCRIPT = 32768, HLTEXTHL = 65536,
+ RTCHECKOFFWITHASTERISK = 131072, DB_UNDERLINE = 262144, COLDOTS = 524288,
+ MMBOLD = 1048576, RIGHTJUSTIFY = 2097152, SUBSCRIPT = 4194304, SUPERSCRIPT = 8388608,
+ PAGELISTITEM = 16777216, PRINTONTOPOFLINE = 33554432, HORZCENTER = 67108864,
+ CIRCLESTRING2 = 0x08000000, ALIGNWITHUP1 = 0x10000000, ALIGNWSECNUM = 0x20000000,
+ MATCHCOLUMNMODE = 0x40000000, KEEPRNOSUBSTYLE = 0x80000000
+ };
+ public enum E_ChangeBarMessage : uint
+ {
+ DATEANDUSERID = 0,
+ REVNUMBER = 1,
+ USERID = 2,
+ NOTHING = 3
+ }
+ public enum E_EMode : uint
+ {
+ INSERT = 0,
+ OVERRIDE = 1
+ }
+ public enum E_ViewMode : uint
+ {
+ VIEW = 0,
+ EDIT = 1
+ }
+ public enum E_EditPrintMode : uint
+ {
+ EDIT = 0,
+ PRINT = 1
+ }
+ [Flags]
+ public enum E_Justify : uint
+ {
+ PSCENTER = 0, // Page style, center field
+ PSLEFT = 1, // Page style, left justify
+ PSRIGHT = 2, // Page style, right justify
+ // *** PS modifiers: ***
+ PSBOTTOM = 4, // Page style, always use bottom half line
+ PSTOP = 8, // Page style, always use top half line
+ PSTRUE = 16, // page style, don't adjust per CPI* (not needed after 4.0)
+ PSNOTFIRST = 32, // page style, don't put this token on the first page of section
+ PSONLYFIRST = 64, // page style, only put this token on the first page of section
+ PSRELROW = 128, // place in RelPageList
+ PSNOHALFLINE = 256, // DontDoHalflines for his paglist row item
+ PSNOTLAST = 0x200, // 512 - use this token on all but the last page of this section
+ PSRTFONLY = 0x400, // Only use this token when the driver is rtf
+ PSRTFNOT = 0x800, // Do NOT use token when driver is rtf
+ PSGDIONLY = 0X1000, // Only use this token when the driver is GDI
+ PSGDINOT = 0x2000, // Do NOT use token when driver is GDI
+ PSADJBNGROW = 0x4000 // If the pagelist item exceeds the row it's printed on,
+ // then adjust the starting row for the procedure body
+ };
+ public enum E_NumberingSequence : uint
+ {
+ NOPAGENUM = 0,
+ INCLUDEWOTHSTEPS = 1,
+ WITHINSECTIONS = 2,
+ WITHINACCESSORY = 3
+ };
+ public enum E_ContBottomLoc : uint
+ {
+ ENDOFTEXT = 0,
+ BTWNTEXTANDBOTTOM = 1,
+ BOTTOMOFPAGE = 2
+ };
+ [Flags]
+ public enum E_DocStructStyle : uint
+ {
+ //USEONALLPAGES = 0, // Default
+ //USEONFIRSTPAGE = 1, // Use only on the first page
+ //USEONALLBUTFIRSTPAGE = 2, // Use on all but the first page
+ //USEONLASTPAGE = 4, // NO LOGIC exists for this selection. Use only on the last page
+ NONE = 0,
+ USESECTIONFOLDOUT = 8, // Attach section foldouts (only active if using SectionLevelFoldouts_ON
+ DONTCOUNTFOLDOUTPGS = 16, // Used with the USESECTIONFOLDOUT flag. Keeps foldout pages from
+ // being included in the section total page count.
+ TABLEOFCONTENTS = 32,
+ DONTCOUNTINTABOFCONT = 64,
+ PLACEKEEPER = 128,
+ ALIGN1STLEVSUBWHLS = 0x00000100, // guess?
+ DOUBLEBOXHLS = 0x00000200,
+ USEALTCNTRLINE = 0x00000400,
+ DONTNUMBERINTOC = 0x00000800, // Don't include page number for this section in the Table of Contents
+ USESPECIALFIGFRAME = 0x00001000, // for use with stp55 and 55a in bge
+ HLSUSELETTERS = 0x00002000, // docstyles with this bit set in the DocStructStyle will
+ // default to using letters for HLSteps
+ NOSECTIONINSTEPCONTINUE = 0x00004000, // don't include the section number in the step continue
+ BOTTOMSECTIONCONTINUE = 0x00008000, // print the continue message if the section continues
+ ALWAYSDOTSTEP = 0x00010000, // put the period after step number in the continue message
+ XBLANKW1STLEVSUB = 0x00020000, // insert an extra blank line before a 1st level substep
+ AFFECTEDPAGES = 0x00040000,
+ DSS_TREATASTRUESECTNUM = 0x00080000, // in conjunction with tietabtolevel, takes section number
+ // from the last space and appends a period
+ SAMPLEWATERMARK = 0x00100000, // Will force "SAMPLE" to be printed across the page
+ // on all pages in this section
+ DSS_PAGEBREAKHLS = 0x00200000, // Page Breaks on all high level steps
+ DSS_NOCHKIFCONTTYPEHIGH = 0x00400000, // Will suppress the checkoff if type is HIGH and the
+ // step is continued on the next page
+ DSS_WIDTHOVRDSTDHLS = 0x00800000, // Width Override for Standard HLStep in this section
+ DSS_ADDDOTZEROSTDHLS = 0x01000000, // Append .0 to the Standard HLStep for this section
+ DSS_SECTIONCOMPRESS = 0x02000000, // Compress all the steps of this section (i.e. use 7 LPI)
+ DSS_PRINTSECTONFIRST = 0x04000000, // Prints section title/number only on the first
+ // page of an attachment section, assuming numberingsequence is not 1
+ DSS_UNNUMLIKEROMAN = 0x08000000, // the substeps underneath unnumbered HLSteps will have same tabs as romans
+ DSS_DONTCHANGEROMANLEVEL = 0x10000000, // Dont alter the the substep level for roman-numeral-tabbed hlsteps
+ DSS_SKIPTWOSTEPLEVELS = 0x20000000, // Skip two step levels for this doc style
+ DSS_SKIPONESTEPLEVEL = 0x40000000, // Skip one step level for this doc style
+ DSS_SIMPLETOPSECTIONCONTINUE = 0x80000000, // Use the Top continue message as the section continue */
+ };
+ public enum E_DocStyleUse : uint
+ {
+ USEONALLPAGES = 0, USEONFIRSTPAGE = 1, USEONALLBUTFIRSTPAGE = 2, USEONLASTPAGE = 4
+ };
+ [Flags]
+ // acceptence list for adding Tables, Cautions, Notes, Substeps, Next, Previous and RNO
+ public enum E_AccStep : uint
+ {
+ ADDING_CAUTION = 1,
+ ADDING_NOTE = 2,
+ ADDING_RNO = 4,
+ ADDING_SUB = 8,
+ ADDING_TABLE = 16,
+ ADDING_NEXT = 32,
+ ADDING_PREV = 64
+ }
+ [Flags]
+ public enum E_ReplaceFlags : uint
+ {
+ // Generally used: HIGH, RNO, CAUTION, NOTE, TABLE, SUBSTEP, ATTACH
+ // ANONOP: BKGD, TOC, INSECTITLE, TRAN
+ // BGEEOP: BKGD, PLACKEEP, TOC, PARTIALS
+ // CAL1 & WCN & WEP (various): STATTREE, HLSSETPNT
+ // CAL2 & CPL: SETPOINT
+ // HLP: CASEINSENS
+ // CPLSSD: DIFFUNIT, TOC, STATTREE, HLSSETPNT
+ // CWE: CASEINSENS, DIFFUNIT
+ // MYA: CASEINSENSALL
+ HIGH = 0x0001, // Do ReplaceWords in HIGH LEVEL STEPS
+ RNO = 0x0002, // Do ReplaceWords in RNOS
+ CAUTION = 0x0004, // Do ReplaceWords in CAUTIONS
+ NOTE = 0x0008, // Do ReplaceWords in NOTES
+ TABLE = 0x0010, // Do ReplaceWords in TABLES
+ SUBSTEP = 0x0020, // Do ReplaceWords in SUBSTEPS
+ ATTACH = 0x0040, // Do ReplaceWords in ATTACHMENTS
+ BKGD = 0x0080, // Do ReplaceWords in BACKGROUNDS
+ DIFFUNIT = 0x0100, // Do ReplaceWords ONLY for different UNIT #
+ TOC = 0x0200, // Do in auto table-of-contents
+ STATTREE = 0x0400,
+ HLSSETPNT = 0x0800, // Do ReplaceWords in HighLevelStep SETPoiNTs
+ TRAN = 0x1000, // Do ReplaceWords in TRANSITIONS
+ SETPOINT = 0x2000, // Do ReplaceWords in SETPOINTS
+
+ // Case Sensitivity Flags - default is off (Case Sensitive Replace)
+ CASEINSENS = 0x0000C000, // Do ReplaceWords for all words thatmatch, regardless of case,
+ // and replace with the ReplaceWith string as is
+ CASEINSENSFIRST = 0x4000, // Do ReplaceWords for all words thatexactly match the ReplaceWord,
+ // except the case of the first character may be different
+ CASEINSENSALL = 0x8000, // Do ReplaceWords for all words that match the ReplaceWord, regardless of case
+
+ PARTIALS = 0x10000, // Do replace even on partial matches
+ PLACKEEP = 0x20000, // Do replace in PlaceKeepers
+ INSECTITLE = 0x40000
+ }
+ #endregion
+}
diff --git a/PROMS/VEPROMS.CSLA.Library/Format/PageStyles.cs b/PROMS/VEPROMS.CSLA.Library/Format/PageStyles.cs
new file mode 100644
index 00000000..6caab392
--- /dev/null
+++ b/PROMS/VEPROMS.CSLA.Library/Format/PageStyles.cs
@@ -0,0 +1,140 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+using System.ComponentModel;
+using System.Xml;
+
+namespace VEPROMS.CSLA.Library
+{
+ #region PageStyles
+ [TypeConverter(typeof(vlnListConverter))]
+ public class PageStyles : vlnFormatList
+ {
+ public PageStyles(XmlNodeList xmlNodeList) : base(xmlNodeList) { }
+ }
+ #endregion
+ #region PageStyle
+ public class PageStyle : vlnFormatItem
+ {
+ #region Constructor
+ public PageStyle(XmlNode xmlNode) : base(xmlNode) { }
+ public PageStyle() : base() { }
+ #endregion
+ #region Business Methods
+ private LazyLoad _Name;
+ [DisplayName("Name")]
+ [Description("Page Style Name")]
+ public string Name
+ {
+ get
+ {
+ return LazyLoad(ref _Name, "@Name");
+ }
+ }
+ private LazyLoad _Index;
+ [DisplayName("Index")]
+ [Description("Page Style Index")]
+ public int? Index
+ {
+ get
+ {
+ return LazyLoad(ref _Index, "@Index");
+ }
+ }
+ private PageItems _PageItems;
+ public PageItems PageItems
+ {
+ get
+ {
+ return (_PageItems == null)? _PageItems = new PageItems(SelectNodes("Item")): _PageItems;
+ }
+ }
+ #endregion
+ #region Override ToString
+ public override string ToString()
+ {
+ return string.Format("{0:D2} - {1}", Index, Name);
+ }
+ #endregion
+ }
+ #endregion
+ #region PageItems
+ [TypeConverter(typeof(vlnListConverter))]
+ public class PageItems : vlnFormatList
+ {
+ public PageItems(XmlNodeList xmlNodeList) : base(xmlNodeList) { }
+ }
+ #endregion
+ #region PageItem
+ public class PageItem : vlnFormatItem
+ {
+ #region Constructor
+ public PageItem(XmlNode xmlNode) : base(xmlNode) { }
+ public PageItem() : base() { }
+ #endregion
+ #region Business Methods
+ private VE_Font _Font;
+ [Category("Font")]
+ [DisplayName("Font")]
+ [Description("Font")]
+ public VE_Font Font
+ {
+ get
+ {
+ return (_Font == null) ?_Font = new VE_Font(XmlNode): _Font;
+ }
+ }
+ private LazyLoad _Token;
+ [Category("Content")]
+ [DisplayName("Content")]
+ [Description("Item Content")]
+ public string Token
+ {
+ get
+ {
+ return LazyLoad(ref _Token, "@Token");
+ }
+ }
+ private LazyLoad _Row;
+ [Category("Location")]
+ [DisplayName("Vertical Position")]
+ [Description("Vertical Position")]
+ public int? Row
+ {
+ get
+ {
+ return LazyLoad(ref _Row, "@Row");
+ }
+ }
+ private LazyLoad _Col;
+ [Category("Location")]
+ [DisplayName("Horizontal Position")]
+ [Description("Horizontal Position")]
+ public int? Col
+ {
+ get
+ {
+ return LazyLoad(ref _Col, "@Col");
+ }
+ }
+ private LazyLoad _Justify;
+ public E_Justify? Justify
+ {
+ get
+ {
+ return LazyLoad(ref _Justify, "@Justify");
+ }
+ }
+ #endregion
+ #region Override ToString
+ public override string ToString()
+ {
+ //return string.Format("({0:D5},{1:D5}) - {2}",Row,Col,Token);
+ return Token;
+ }
+ public override string GetPDDisplayName()
+ { return string.Format("({0},{1})",Row,Col); }
+ #endregion
+ }
+ #endregion
+}
diff --git a/PROMS/VEPROMS.CSLA.Library/Format/PlantFormat.cs b/PROMS/VEPROMS.CSLA.Library/Format/PlantFormat.cs
new file mode 100644
index 00000000..d56b1f35
--- /dev/null
+++ b/PROMS/VEPROMS.CSLA.Library/Format/PlantFormat.cs
@@ -0,0 +1,2642 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+using System.Xml;
+using System.ComponentModel;
+using System.Drawing;
+
+namespace VEPROMS.CSLA.Library
+{
+ #region PlantFormat
+ [TypeConverter(typeof(ExpandableObjectConverter))]
+ public class PlantFormat
+ {
+ public PlantFormat(Format format)
+ {
+ _MyFormat = format;
+ }
+ private Format _MyFormat;
+ public Format MyFormat
+ {
+ get { return _MyFormat; }
+ set { _MyFormat = value; }
+ }
+ private vlnFormatDocument _XmlDoc;
+ internal vlnFormatDocument XmlDoc
+ {
+ get
+ {
+ if (_XmlDoc == null)
+ _XmlDoc = new vlnFormatDocument(_MyFormat);
+ return _XmlDoc;
+ }
+ }
+ private FormatData _FormatData;
+ public FormatData FormatData
+ {
+ get
+ {
+ if (_FormatData == null) _FormatData = new FormatData(XmlDoc.SelectSingleNode("/PlantFormat/FormatData"));
+ return _FormatData;
+ }
+ }
+ private PageStyles _PageStyles;
+ public PageStyles PageStyles
+ {
+ get
+ {
+ if (_PageStyles == null) _PageStyles = new PageStyles(XmlDoc.SelectNodes("/PlantFormat/PageStyles/PageStyle"));
+ return _PageStyles;
+ }
+ }
+ private DocStyles _DocStyles;
+ public DocStyles DocStyles
+ {
+ get
+ {
+ if (_DocStyles == null) _DocStyles = new DocStyles(XmlDoc.SelectSingleNode("/PlantFormat/DocStyles"));
+ return _DocStyles;
+ }
+ }
+ }
+ #endregion
+ #region VE_Font
+ [TypeConverter(typeof(ExpandableObjectConverter))]
+ public class VE_Font : vlnFormatItem
+ {
+ public VE_Font(XmlNode xmlNode) : base(xmlNode) { }
+ private LazyLoad _Family;
+ private Font _WindowsFont;
+ public Font WindowsFont
+ {
+ get
+ {
+ // TODO: eventually want styles
+ // TODO: Size should be float to support 10.5 etc.
+ if (_WindowsFont == null) _WindowsFont = new Font(Family, (float)Size);
+ return _WindowsFont;
+ }
+ }
+ [Description("Font Family")]
+ public string Family
+ {
+ get
+ {
+ return LazyLoad(ref _Family,"Font/@Family");
+ }
+ }
+ private LazyLoad _Size;
+ [Description("Font Size (in Double Points)")]
+ public int? Size
+ {
+ get
+ {
+ return LazyLoad(ref _Size, "Font/@Size");
+ }
+ }
+ private LazyLoad _Style;
+ public E_Style? Style
+ {
+ get
+ {
+ return LazyLoad(ref _Style, "Font/@Style");
+ }
+ }
+ public override string ToString()
+ {
+ return string.Format("{0}, {1} pt, {2}", Family, Size, Style);
+ }
+ }
+ #endregion
+ #region FormatData
+ [TypeConverter(typeof(ExpandableObjectConverter))]
+ public class FormatData : vlnFormatItem
+ {
+ public FormatData(XmlNode xmlNode) : base(xmlNode) { }
+ private LazyLoad _Name;
+ public string Name
+ {
+ get
+ {
+ return LazyLoad(ref _Name, "@Name");
+ }
+ }
+ private LazyLoad _XtraFlags;
+ public string XtraFlags
+ {
+ get
+ {
+ return LazyLoad(ref _XtraFlags, "XtraFlags");
+ }
+ }
+ public bool XtraOptions(string attr)
+ {
+ XmlNode nd = this.SelectSingleNode("XtraFlags/@" + attr);
+ if (nd == null) return false;
+ if (nd.InnerText.ToUpper() == "TRUE") return true;
+ return false;
+ }
+ private LazyLoad _PurchaseOptions;
+ public E_PurchaseOptions? PurchaseOptions
+ {
+ get
+ {
+ return LazyLoad(ref _PurchaseOptions, "@PurchaseOptions");
+ }
+ }
+ private VE_Font _Font;
+ public VE_Font Font
+ {
+ get
+ {
+ return _Font == null? _Font = new VE_Font(base.XmlNode): _Font;
+ }
+ }
+ private EditData _EditData;
+ public EditData EditData
+ {
+ get
+ {
+ return _EditData == null ? _EditData = new EditData(SelectSingleNode("EditData")): _EditData;
+ }
+ }
+ private PrintData _PrintData;
+ public PrintData PrintData
+ {
+ get
+ {
+ return _PrintData == null? _PrintData = new PrintData(SelectSingleNode("PrintData")):_PrintData;
+ }
+ }
+ private ProcData _ProcData;
+ public ProcData ProcData
+ {
+ get
+ {
+ return _ProcData == null? _ProcData = new ProcData(SelectSingleNode("ProcData")):_ProcData;
+ }
+ }
+ private SectData _SectData;
+ public SectData SectData
+ {
+ get
+ {
+ return _SectData == null? _SectData = new SectData(SelectSingleNode("SectData")):_SectData;
+ }
+ }
+ private BoxList _BoxList;
+ public BoxList BoxList
+ {
+ get
+ {
+ return _BoxList == null? _BoxList = new BoxList(SelectNodes("BoxData/Box")):_BoxList;
+ }
+ set { _BoxList = value; }
+ }
+ private TransData _TransData;
+ public TransData TransData
+ {
+ get
+ {
+ return _TransData == null? _TransData = new TransData(SelectSingleNode("TransData")):_TransData;
+ }
+ }
+ private StepDataList _StepDataList;
+ public StepDataList StepDataList
+ {
+ get
+ {
+ return _StepDataList == null? _StepDataList = new StepDataList(SelectNodes("StepData/Step")):_StepDataList;
+ }
+ set { _StepDataList = value; }
+ }
+ }
+ #endregion
+ #region EditData
+ [TypeConverter(typeof(ExpandableObjectConverter))]
+ public class EditData : vlnFormatItem
+ {
+ public EditData(XmlNode xmlNode) : base(xmlNode) { }
+ private LazyLoad _EMode;
+ public E_EMode? EMode
+ {
+ get
+ {
+ return LazyLoad(ref _EMode, "@EMode");
+ }
+ }
+ }
+ #endregion
+ #region PrintDataAll
+ #region PrintData
+ [TypeConverter(typeof(ExpandableObjectConverter))]
+ public class PrintData : vlnFormatItem
+ {
+ public PrintData(XmlNode xmlNode) : base(xmlNode) { }
+ private VersionIdTextList _VersionIdTextList;
+ public VersionIdTextList VersionIdTextList
+ {
+ get
+ {
+ return _VersionIdTextList == null? _VersionIdTextList = new VersionIdTextList(SelectNodes("VersionIdText/string")):_VersionIdTextList;
+ }
+ set { _VersionIdTextList = value; }
+ }
+ private ProcDescrList _ProcDescrList;
+ public ProcDescrList ProcDescrList
+ {
+ get
+ {
+ return _ProcDescrList == null? _ProcDescrList = new ProcDescrList(SelectNodes("ProcDescrList/ProcDescr")):_ProcDescrList;
+ }
+ }
+ private LazyLoad _DoPrnDrvrAdjusts;
+ public int? DoPrnDrvrAdjusts
+ {
+ get
+ {
+ return LazyLoad(ref _DoPrnDrvrAdjusts, "@DoPrnDrvrAdjusts");
+ }
+ }
+ private LazyLoad _TopOfPageThing;
+ public string TopOfPageThing
+ {
+ get
+ {
+ return LazyLoad(ref _TopOfPageThing, "@TopOfPageThing");
+ }
+ }
+ }
+ #endregion
+ #region VersionIdText
+ [TypeConverter(typeof(ExpandableObjectConverter))]
+ public class VersionIdText : vlnFormatItem
+ {
+ public VersionIdText(XmlNode xmlNode) : base(xmlNode) { }
+ public VersionIdText() : base() { }
+ private LazyLoad _Text;
+ public string Text
+ {
+ get
+ {
+ return LazyLoad(ref _Text, "text()");
+ }
+ }
+ public override string GetPDDisplayName()
+ { return "Text"; }
+ public override string GetPDDescription()
+ { return string.Format("VersionIdText '{0}'", Text); }
+ public override string GetPDCategory()
+ { return "Version Id Text"; }
+ public override string ToString()
+ {
+ return Text;
+ }
+ }
+ #endregion
+ #region VersionIdTextList
+ [TypeConverter(typeof(vlnListConverter))]
+ public class VersionIdTextList : vlnFormatList
+ {
+ public VersionIdTextList(XmlNodeList xmlNodeList) : base(xmlNodeList) { }
+ }
+ #endregion
+ #region ProcDescr
+ [TypeConverter(typeof(ExpandableObjectConverter))]
+ public partial class ProcDescr : vlnFormatItem //: BusinessBase, IDisposable
+ {
+ public ProcDescr(XmlNode xmlNode) : base(xmlNode) { }
+ public ProcDescr() : base() { }
+ private LazyLoad _MatchProcNumber;
+ public string MatchProcNumber
+ {
+ get
+ {
+ return LazyLoad(ref _MatchProcNumber, "@MatchProcNumber");
+ }
+ }
+ private LazyLoad _ProcDescr1;
+ public string ProcDescr1
+ {
+ get
+ {
+ return LazyLoad(ref _ProcDescr1, "@ProcDescr1");
+ }
+ }
+ private LazyLoad _ProcDescr2;
+ public string ProcDescr2
+ {
+ get
+ {
+ return LazyLoad(ref _ProcDescr2, "@ProcDescr2");
+ }
+ }
+ public override string ToString()
+ {
+ return string.Format("{0}, {1}", ProcDescr1, MatchProcNumber);
+ }
+ }
+ #region ProcDescrList
+ [TypeConverter(typeof(vlnListConverter))]
+ public class ProcDescrList : vlnFormatList
+ {
+ public ProcDescrList(XmlNodeList xmlNodeList) : base(xmlNodeList) { }
+ }
+ #endregion
+ #endregion
+ #endregion
+ #region ProcDataAll
+ #region ProcData
+ [TypeConverter(typeof(ExpandableObjectConverter))]
+ public class ProcData : vlnFormatItem
+ {
+ public ProcData(XmlNode xmlNode): base(xmlNode) {}
+ private ProcedureSuffixList _ProcedureSuffixList;
+ public ProcedureSuffixList ProcedureSuffixList
+ {
+ get
+ {
+ return _ProcedureSuffixList == null? _ProcedureSuffixList = new ProcedureSuffixList(SelectNodes("ProcedureSuffix/string")): _ProcedureSuffixList;
+ }
+ set { _ProcedureSuffixList = value; }
+ }
+ private ChangeBarData _ChangeBarData;
+ public ChangeBarData ChangeBarData
+ {
+ get
+ {
+ return _ChangeBarData == null? _ChangeBarData = new ChangeBarData(SelectSingleNode("ChangeBarData")):_ChangeBarData;
+ }
+ }
+ private CheckOffData _CheckOffData;
+ public CheckOffData CheckOffData
+ {
+ get
+ {
+ return _CheckOffData == null? _CheckOffData = new CheckOffData(SelectSingleNode("CheckOffData")):_CheckOffData;
+ }
+ }
+ private LazyLoad _TitleLength;
+ public int? TitleLength
+ {
+ get
+ {
+ return LazyLoad(ref _TitleLength, "@TitleLength");
+ }
+ }
+ private LazyLoad _CoverTitleLength;
+ public int? CoverTitleLength
+ {
+ get
+ {
+ return LazyLoad(ref _CoverTitleLength, "@CoverTitleLength");
+ }
+ }
+ private LazyLoad _ProcedureSuffixFlags;
+ public string ProcedureSuffixFlags
+ {
+ get
+ {
+ return LazyLoad(ref _ProcedureSuffixFlags, "@ProcedureSuffixFlags");
+ }
+ }
+ private LazyLoad _PSInfFile;
+ public string PSInfFile
+ {
+ get
+ {
+ return LazyLoad(ref _PSInfFile, "@PSInfFile");
+ }
+ }
+ private LazyLoad _ForeColor;
+ public string ForeColor
+ {
+ get
+ {
+ return LazyLoad(ref _ForeColor, "@ForeColor");
+ }
+ }
+ private LazyLoad _BackColor;
+ public string BackColor
+ {
+ get
+ {
+ return LazyLoad(ref _BackColor, "@BackColor");
+ }
+ }
+ }
+ #endregion
+ #region ProcedureSuffix
+ [TypeConverter(typeof(ExpandableObjectConverter))]
+ public class ProcedureSuffix : vlnFormatItem
+ {
+ public ProcedureSuffix(XmlNode xmlNode) : base(xmlNode) { }
+ public ProcedureSuffix() : base() { }
+ private LazyLoad _Text;
+ public string Text
+ {
+ get
+ {
+ return LazyLoad(ref _Text, "text()");
+ }
+ }
+ public override string GetPDDisplayName()
+ { return "Text"; }
+ public override string GetPDDescription()
+ { return string.Format("ProcedureSuffix '{0}'", Text); }
+ public override string GetPDCategory()
+ { return "Procedure Suffix"; }
+ public override string ToString()
+ {
+ return Text;
+ }
+ }
+ #endregion
+ #region ProcedureSuffixList
+ [TypeConverter(typeof(vlnListConverter))]
+ public class ProcedureSuffixList : vlnFormatList
+ {
+ public ProcedureSuffixList(XmlNodeList xmlNodeList) : base(xmlNodeList) { }
+ }
+ #endregion
+ #region CheckOffAll
+ #region CheckOffData
+ [TypeConverter(typeof(ExpandableObjectConverter))]
+ public class CheckOffData : vlnFormatItem
+ {
+ public CheckOffData(XmlNode xmlNode) : base(xmlNode) { }
+ private RightCheckOffBoxList _RightCheckOffBoxList;
+ public RightCheckOffBoxList RightCheckOffBoxList
+ {
+ get
+ {
+ return _RightCheckOffBoxList == null? _RightCheckOffBoxList = new RightCheckOffBoxList(SelectNodes("RightCheckOffBoxList/RightCheckOffBox")):_RightCheckOffBoxList;
+ }
+ }
+ private CheckOffList _CheckOffList;
+ public CheckOffList CheckOffList
+ {
+ get
+ {
+ return _CheckOffList == null? _CheckOffList = new CheckOffList(SelectNodes("CheckOffList/CheckOff")):_CheckOffList;
+ }
+ }
+ private CheckOffHeaderList _CheckOffHeaderList;
+ public CheckOffHeaderList CheckOffHeaderList
+ {
+ get
+ {
+ return _CheckOffHeaderList == null? _CheckOffHeaderList = new CheckOffHeaderList(SelectNodes("CheckOffHeaderList/CheckOffHeader")): _CheckOffHeaderList;
+ }
+ }
+ private LazyLoad _UseCheckOffsIn;
+ public int? UseCheckOffsIn
+ {
+ get
+ {
+ return LazyLoad(ref _UseCheckOffsIn, "@UseCheckOffsIn");
+ }
+ }
+ private LazyLoad _CheckOffAdjustment;
+ public int? CheckOffAdjustment
+ {
+ get
+ {
+ return LazyLoad(ref _CheckOffAdjustment, "@CheckOffAdjustment");
+ }
+ }
+ }
+ #endregion
+ #region RightCheckOffBox
+ [TypeConverter(typeof(ExpandableObjectConverter))]
+ public class RightCheckOffBox : vlnFormatItem
+ {
+ public RightCheckOffBox(XmlNode xmlNode) : base(xmlNode) { }
+ public RightCheckOffBox() : base() { }
+ private LazyLoad _Index;
+ public int? Index
+ {
+ get
+ {
+ return LazyLoad(ref _Index, "@Index");
+ }
+ }
+ private LazyLoad _RightCheckOffBoxChar;
+ public int? RightCheckOffBoxChar
+ {
+ get
+ {
+ return LazyLoad(ref _RightCheckOffBoxChar, "@RightCheckOffBoxChar");
+ }
+ }
+ public override string GetPDDisplayName()
+ { return string.Format("[{0}]", Index); }
+ public override string GetPDDescription()
+ { return string.Format("[{0}] - {1}", Index, RightCheckOffBoxChar); }
+ public override string GetPDCategory()
+ { return "RightCheckOffBox Data"; }
+ public override string ToString()
+ {
+ return RightCheckOffBoxChar.ToString();
+ }
+ }
+ #endregion
+ #region RightCheckOffBoxList
+ [TypeConverter(typeof(vlnListConverter))]
+ public class RightCheckOffBoxList : vlnFormatList
+ {
+ public RightCheckOffBoxList(XmlNodeList xmlNodeList) : base(xmlNodeList) { }
+ }
+ #endregion
+ #region CheckOff
+ [TypeConverter(typeof(ExpandableObjectConverter))]
+ public class CheckOff : vlnFormatItem
+ {
+ public CheckOff(XmlNode xmlNode) : base(xmlNode) { }
+ public CheckOff() : base() { }
+ private LazyLoad _Index;
+ public int? Index
+ {
+ get
+ {
+ return LazyLoad(ref _Index, "@Index");
+ }
+ }
+ private LazyLoad _RightCheckOffChars;
+ public int? RightCheckOffChars
+ {
+ get
+ {
+ return LazyLoad(ref _RightCheckOffChars, "@RightCheckOffChars");
+ }
+ }
+ private LazyLoad _CheckOffWidAdjust;
+ public int? CheckOffWidAdjust
+ {
+ get
+ {
+ return LazyLoad(ref _CheckOffWidAdjust, "@CheckOffWidAdjust");
+ }
+ }
+ private LazyLoad _RightCheckOffPrompt;
+ public string RightCheckOffPrompt
+ {
+ get
+ {
+ return LazyLoad(ref _RightCheckOffPrompt, "@RightCheckOffPrompt");
+ }
+ }
+ public override string GetPDDisplayName()
+ { return string.Format("[{0}]",Index); }
+ public override string GetPDDescription()
+ { return string.Format("[{0}] - {1}", Index, RightCheckOffPrompt); }
+ public override string GetPDCategory()
+ { return "Checkoff Data"; }
+ public override string ToString()
+ {
+ return RightCheckOffPrompt;
+ }
+ }
+ #endregion
+ #region CheckOffList
+ [TypeConverter(typeof(vlnListConverter))]
+ public class CheckOffList : vlnFormatList
+ {
+ public CheckOffList(XmlNodeList xmlNodeList) : base(xmlNodeList) { }
+ }
+ #endregion
+ #region CheckOffHeader
+ [TypeConverter(typeof(ExpandableObjectConverter))]
+ public class CheckOffHeader : vlnFormatItem
+ {
+ public CheckOffHeader(XmlNode xmlNode) : base(xmlNode) { }
+ public CheckOffHeader() : base() { }
+ private LazyLoad _Index;
+ public int? Index
+ {
+ get
+ {
+ return LazyLoad(ref _Index, "@Index");
+ }
+ }
+ private VE_Font _Font;
+ public VE_Font Font
+ {
+ get
+ {
+ return (_Font == null ? _Font = new VE_Font(base.XmlNode) : _Font);
+ }
+ }
+ private LazyLoad _CheckOffHeading;
+ public string CheckOffHeading
+ {
+ get
+ {
+ return LazyLoad(ref _CheckOffHeading, "@CheckOffHeading");
+ }
+ }
+ public override string GetPDDisplayName()
+ { return string.Format("[{0}]", Index); }
+ public override string GetPDDescription()
+ { return string.Format("[{0}] - {1}", Index, CheckOffHeading); }
+ public override string GetPDCategory()
+ { return "Checkoff Header Data"; }
+ public override string ToString()
+ {
+ return CheckOffHeading;
+ }
+ }
+ #endregion
+ #region CheckOffHeaderList
+ [TypeConverter(typeof(vlnListConverter))]
+ public class CheckOffHeaderList : vlnFormatList
+ {
+ public CheckOffHeaderList(XmlNodeList xmlNodeList) : base(xmlNodeList) { }
+ }
+ #endregion
+ #endregion
+ #region ChangeBarData
+ [TypeConverter(typeof(ExpandableObjectConverter))]
+ public class ChangeBarData : vlnFormatItem
+ {
+ public ChangeBarData(XmlNode xmlNode) : base(xmlNode) { }
+ private LazyLoad _ChangeBarMessage;
+ public string ChangeBarMessage
+ {
+ get
+ {
+ return LazyLoad(ref _ChangeBarMessage, "@ChangeBarMessage");
+ }
+ }
+ private LazyLoad _FixedChangeColumn;
+ public int? FixedChangeColumn
+ {
+ get
+ {
+ return LazyLoad(ref _FixedChangeColumn, "@FixedChangeColumn");
+ }
+ }
+ private LazyLoad _FixedAERChangeColumn;
+ public int? FixedAERChangeColumn
+ {
+ get
+ {
+ return LazyLoad(ref _FixedAERChangeColumn, "@FixedAERChangeColumn");
+ }
+ }
+ private LazyLoad _ChangeSummaryStyle;
+ public E_Style? ChangeSummaryStyle
+ {
+ get
+ {
+ return LazyLoad(ref _ChangeSummaryStyle, "@ChangeSummaryStyle");
+ }
+ }
+ private LazyLoad _ChangeBarStyle;
+ public E_Style? ChangeBarStyle
+ {
+ get
+ {
+ return LazyLoad(ref _ChangeBarStyle, "@ChangeBarStyle");
+ }
+ }
+ private LazyLoad _SpecialChangeBar;
+ public string SpecialChangeBar
+ {
+ get
+ {
+ return LazyLoad(ref _SpecialChangeBar, "@SpecialChangeBar");
+ }
+ }
+ }
+ #endregion
+ #endregion
+ #region SectDataAll
+ #region SectData
+ [TypeConverter(typeof(ExpandableObjectConverter))]
+ public class SectData : vlnFormatItem
+ {
+ public SectData(XmlNode xmlNode) : base(xmlNode) { }
+ private SectionNumber _SectionNumber;
+ public SectionNumber SectionNumber
+ {
+ get
+ {
+ if (_SectionNumber == null) _SectionNumber = new SectionNumber(SelectSingleNode("SectionNumber"));
+ return _SectionNumber;
+ }
+ }
+ private SectionHeader _SectionHeader;
+ public SectionHeader SectionHeader
+ {
+ get
+ {
+ if (_SectionHeader == null) _SectionHeader = new SectionHeader(SelectSingleNode("SectionHeader"));
+ return _SectionHeader;
+ }
+ }
+ private StepSectionData _StepSectionData;
+ public StepSectionData StepSectionData
+ {
+ get
+ {
+ if (_StepSectionData == null) _StepSectionData = new StepSectionData(SelectSingleNode("StepSectionData"));
+ return _StepSectionData;
+ }
+ }
+ private AccSectionData _AccSectionData;
+ public AccSectionData AccSectionData
+ {
+ get
+ {
+ if (_AccSectionData == null) _AccSectionData = new AccSectionData(SelectSingleNode("AccSectionData"));
+ return _AccSectionData;
+ }
+ }
+ private MetaSectionList _MetaSectionList;
+ public MetaSectionList MetaSectionList
+ {
+ get
+ {
+ if (_MetaSectionList == null) _MetaSectionList = new MetaSectionList(SelectNodes("MetaSectionData/MetaSection"));
+ return _MetaSectionList;
+ }
+ set { _MetaSectionList = value; }
+ }
+ private ReplaceStrList _ReplaceStrList;
+ public ReplaceStrList ReplaceStrList
+ {
+ get
+ {
+ return (_ReplaceStrList == null) ? _ReplaceStrList = new ReplaceStrList(SelectNodes("ReplaceStrData/ReplaceStr")) : _ReplaceStrList;
+ }
+ set { _ReplaceStrList = value; }
+ }
+ private LazyLoad _SectionTitleLength;
+ public int? SectionTitleLength
+ {
+ get
+ {
+ return LazyLoad(ref _SectionTitleLength, "@SectionTitleLength");
+ }
+ }
+ private LazyLoad _ForeColor;
+ public string ForeColor
+ {
+ get
+ {
+ return LazyLoad(ref _ForeColor, "@ForeColor");
+ }
+ }
+ private LazyLoad _BackColor;
+ public string BackColor
+ {
+ get
+ {
+ return LazyLoad(ref _BackColor, "@BackColor");
+ }
+ }
+ }
+ #endregion
+ #region SectionNumber
+ [TypeConverter(typeof(ExpandableObjectConverter))]
+ public class SectionNumber : vlnFormatItem
+ {
+ public SectionNumber(XmlNode xmlNode) : base(xmlNode) { }
+ public SectionNumber() : base() { }
+ private LazyLoad _Pos;
+ public int? Pos
+ {
+ get
+ {
+ return LazyLoad(ref _Pos, "@Pos");
+ }
+ }
+ private LazyLoad _Just;
+ public string Just
+ {
+ get
+ {
+ return LazyLoad(ref _Just, "@Just");
+ }
+ }
+ private VE_Font _Font;
+ public VE_Font Font
+ {
+ get
+ {
+ return (_Font == null ? _Font = new VE_Font(base.XmlNode) : _Font);
+ }
+ }
+ }
+ #endregion
+ #region SectionHeader
+ [TypeConverter(typeof(ExpandableObjectConverter))]
+ public class SectionHeader : vlnFormatItem
+ {
+ public SectionHeader(XmlNode xmlNode) : base(xmlNode) { }
+ public SectionHeader() : base() { }
+ private LazyLoad _Pos;
+ public int? Pos
+ {
+ get
+ {
+ return LazyLoad(ref _Pos, "@Pos");
+ }
+ }
+ private LazyLoad _Just;
+ public string Just
+ {
+ get
+ {
+ return LazyLoad(ref _Just, "@Just");
+ }
+ }
+ private VE_Font _Font;
+ public VE_Font Font
+ {
+ get
+ {
+ return (_Font == null ? _Font = new VE_Font(base.XmlNode) : _Font);
+ }
+ }
+ }
+ #endregion
+ #region StepSectionDataAll
+ #region StepSectionData
+ [TypeConverter(typeof(ExpandableObjectConverter))]
+ public class StepSectionData : vlnFormatItem
+ {
+ public StepSectionData(XmlNode xmlNode) : base(xmlNode) { }
+ private TextTypeValueList _TextTypeValueList;
+ public TextTypeValueList TextTypeValueList
+ {
+ get
+ {
+ return (_TextTypeValueList == null)? _TextTypeValueList = new TextTypeValueList(SelectNodes("TextTypeValue/short")): _TextTypeValueList;
+ }
+ set { _TextTypeValueList = value; }
+ }
+ private TextTypeList _TextTypeList;
+ public TextTypeList TextTypeList
+ {
+ get
+ {
+ return (_TextTypeList == null)? _TextTypeList = new TextTypeList(SelectNodes("TextType/string")): _TextTypeList;
+ }
+ set { _TextTypeList = value; }
+ }
+ //private SeqTabList _SeqTabList;
+ //public SeqTabList SeqTabList
+ //{
+ // get
+ // {
+ // return (_SeqTabList == null)? _SeqTabList = new SeqTabList(SelectNodes("SeqTab/string")): _SeqTabList;
+ // }
+ // set { _SeqTabList = value; }
+ //}
+ //private PreSeqTabEditList _PreSeqTabEditList;
+ //public PreSeqTabEditList PreSeqTabEditList
+ //{
+ // get
+ // {
+ // return (_PreSeqTabEditList == null) ?_PreSeqTabEditList = new PreSeqTabEditList(SelectNodes("PreSeqTabEdit/string")): _PreSeqTabEditList;
+ // }
+ // set { _PreSeqTabEditList = value; }
+ //}
+ //private PreSeqTabPrintList _PreSeqTabPrintList;
+ //public PreSeqTabPrintList PreSeqTabPrintList
+ //{
+ // get
+ // {
+ // return (_PreSeqTabPrintList == null)? _PreSeqTabPrintList = new PreSeqTabPrintList(SelectNodes("PreSeqTabPrint/string")):_PreSeqTabPrintList;
+ // }
+ // set { _PreSeqTabPrintList = value; }
+ //}
+ //private PostSeqTabEditList _PostSeqTabEditList;
+ //public PostSeqTabEditList PostSeqTabEditList
+ //{
+ // get
+ // {
+ // return (_PostSeqTabEditList == null)? _PostSeqTabEditList = new PostSeqTabEditList(SelectNodes("PostSeqTabEdit/string")): _PostSeqTabEditList;
+ // }
+ // set { _PostSeqTabEditList = value; }
+ //}
+ //private PostSeqTabPrintList _PostSeqTabPrintList;
+ //public PostSeqTabPrintList PostSeqTabPrintList
+ //{
+ // get
+ // {
+ // return (_PostSeqTabPrintList == null)? _PostSeqTabPrintList = new PostSeqTabPrintList(SelectNodes("PostSeqTabPrint/string")): _PostSeqTabPrintList;
+ // }
+ // set { _PostSeqTabPrintList = value; }
+ //}
+ private UnderlineTerminateList _UnderlineTerminateList;
+ public UnderlineTerminateList UnderlineTerminateList
+ {
+ get
+ {
+ return (_UnderlineTerminateList == null)? _UnderlineTerminateList = new UnderlineTerminateList(SelectNodes("UnderlineTerminate/string")):_UnderlineTerminateList;
+ }
+ set { _UnderlineTerminateList = value; }
+ }
+ private ObserveNCString1List _ObserveNCString1List;
+ public ObserveNCString1List ObserveNCString1List
+ {
+ get
+ {
+ return (_ObserveNCString1List == null)? _ObserveNCString1List = new ObserveNCString1List(SelectNodes("ObserveNCString1/string")): _ObserveNCString1List;
+ }
+ set { _ObserveNCString1List = value; }
+ }
+ private ObserveNCString2List _ObserveNCString2List;
+ public ObserveNCString2List ObserveNCString2List
+ {
+ get
+ {
+ return (_ObserveNCString2List == null)? _ObserveNCString2List = new ObserveNCString2List(SelectNodes("ObserveNCString2/string")):_ObserveNCString2List;
+ }
+ set { _ObserveNCString2List = value; }
+ }
+ private StepSectionLayoutData _StepSectionLayoutData;
+ public StepSectionLayoutData StepSectionLayoutData
+ {
+ get
+ {
+ return (_StepSectionLayoutData == null)? _StepSectionLayoutData = new StepSectionLayoutData(SelectSingleNode("StpSectLayData")):_StepSectionLayoutData;
+ }
+ }
+ private StepSectionEditData _StepSectionEditData;
+ public StepSectionEditData StepSectionEditData
+ {
+ get
+ {
+ return (_StepSectionEditData == null)? _StepSectionEditData = new StepSectionEditData(SelectSingleNode("StpSectEditData")): _StepSectionEditData;
+ }
+ }
+ private SeqTabFmtList _SeqTabFmtList;
+ public SeqTabFmtList SeqTabFmtList
+ {
+ get
+ {
+ return (_SeqTabFmtList == null) ? _SeqTabFmtList = new SeqTabFmtList(SelectNodes("SequentialTabFormat/SeqTabFmt")) : _SeqTabFmtList;
+ }
+ }
+ private StepSectionPrintData _StepSectionPrintData;
+ public StepSectionPrintData StepSectionPrintData
+ {
+ get
+ {
+ return (_StepSectionPrintData == null) ? _StepSectionPrintData = new StepSectionPrintData(SelectSingleNode("StpSectPrtData")) : _StepSectionPrintData;
+ }
+ }
+ private LazyLoad _TopRow;
+ public int? TopRow
+ {
+ get
+ {
+ return LazyLoad(ref _TopRow, "@TopRow");
+ }
+ }
+ //private LazyLoad _SeqStart;
+ //public string SeqStart
+ //{
+ // get
+ // {
+ // return LazyLoad(ref _SeqStart, "@SeqStart");
+ // }
+ //}
+ //private LazyLoad _LeftJustSeqTab;
+ //public string LeftJustSeqTab
+ //{
+ // get
+ // {
+ // return LazyLoad(ref _LeftJustSeqTab, "@LeftJustSeqTab") ;
+ // }
+ //}
+ //private LazyLoad _HighSeqStart;
+ //public int? HighSeqStart
+ //{
+ // get
+ // {
+ // return LazyLoad(ref _HighSeqStart, "@HighSeqStart");
+ // }
+ //}
+ private LazyLoad _IndentToken;
+ public string IndentToken
+ {
+ get
+ {
+ return LazyLoad(ref _IndentToken, "@IndentToken");
+ }
+ }
+ private LazyLoad _NumberOfHighLevelSteps;
+ public int? NumberOfHighLevelSteps
+ {
+ get
+ {
+ return LazyLoad(ref _NumberOfHighLevelSteps, "@NumberOfHighLevelSteps");
+ }
+ }
+ private LazyLoad _NumberOfSubStypeTypes;
+ public int? NumberOfSubStypeTypes
+ {
+ get
+ {
+ return LazyLoad(ref _NumberOfSubStypeTypes, "@NumberOfSubStepTypes");
+ }
+ }
+ private LazyLoad _IdentB;
+ public string IdentB
+ {
+ get
+ {
+ return LazyLoad(ref _IdentB, "@IdentB");
+ }
+ }
+ }
+ #endregion
+ #region TextTypeValue
+ [TypeConverter(typeof(ExpandableObjectConverter))]
+ public class TextTypeValue : vlnFormatItem
+ {
+ public TextTypeValue(XmlNode xmlNode) : base(xmlNode) { }
+ public TextTypeValue() : base() { }
+ private LazyLoad _TheValue;
+ public int? TheValue
+ {
+ get
+ {
+ return LazyLoad(ref _TheValue, "text()");
+ }
+ }
+ public override string GetPDDisplayName()
+ { return "Value"; }
+ public override string GetPDDescription()
+ { return string.Format("TextTypeValue '{0}'", TheValue); }
+ public override string GetPDCategory()
+ { return "Text Type Value"; }
+ public override string ToString()
+ {
+ return TheValue.ToString();
+ }
+ }
+ #endregion
+ #region TextTypeValueList
+ [TypeConverter(typeof(vlnListConverter))]
+ public class TextTypeValueList : vlnFormatList
+ {
+ public TextTypeValueList(XmlNodeList xmlNodeList) : base(xmlNodeList) { }
+ }
+ #endregion
+ #region TextType
+ [TypeConverter(typeof(ExpandableObjectConverter))]
+ public class TextType : vlnFormatItem
+ {
+ public TextType(XmlNode xmlNode) : base(xmlNode) { }
+ public TextType() : base() { }
+ //[Category("Strings")]
+ private LazyLoad _Text;
+ public string Text
+ {
+ get
+ {
+ return LazyLoad(ref _Text, "text()");
+ }
+ }
+ public override string GetPDDisplayName()
+ { return "Text"; }
+ public override string GetPDDescription()
+ { return string.Format("TextType '{0}'", Text); }
+ public override string GetPDCategory()
+ { return "Text Type"; }
+ public override string ToString()
+ {
+ return Text;
+ }
+ }
+ #endregion
+ #region TextTypeList
+ [TypeConverter(typeof(vlnListConverter))]
+ public class TextTypeList : vlnFormatList
+ {
+ public TextTypeList(XmlNodeList xmlNodeList) : base(xmlNodeList) { }
+ }
+ #endregion
+ #region OLD - SeqTab
+ //[TypeConverter(typeof(ExpandableObjectConverter))]
+ //public class SeqTab : vlnFormatItem
+ //{
+ // public SeqTab(XmlNode xmlNode) : base(xmlNode) { }
+ // public SeqTab() : base() { }
+ // private LazyLoad _Text;
+ // public string Text
+ // {
+ // get
+ // {
+ // return LazyLoad(ref _Text, "text()");
+ // }
+ // }
+ // public override string GetPDDisplayName()
+ // { return "Text"; }
+ // public override string GetPDDescription()
+ // { return string.Format("SeqTab '{0}'", Text); }
+ // public override string GetPDCategory()
+ // { return "Seq Tab"; }
+ // public override string ToString()
+ // {
+ // return Text;
+ // }
+ //}
+ #endregion
+ #region OLD - SeqTabList
+ //[TypeConverter(typeof(vlnListConverter))]
+ //public class SeqTabList : vlnFormatList
+ //{
+ // public SeqTabList(XmlNodeList xmlNodeList) : base(xmlNodeList) { }
+ //}
+ #endregion
+ #region OLD - PreSeqTabEdit
+ //[TypeConverter(typeof(ExpandableObjectConverter))]
+ //public class PreSeqTabEdit : vlnFormatItem
+ //{
+ // public PreSeqTabEdit(XmlNode xmlNode) : base(xmlNode) { }
+ // public PreSeqTabEdit() : base() { }
+ // //[Category("Strings")]
+ // private LazyLoad _Text;
+ // public string Text
+ // {
+ // get
+ // {
+ // return LazyLoad(ref _Text, "text()");
+ // }
+ // }
+ // public override string GetPDDisplayName()
+ // { return "Text"; }
+ // public override string GetPDDescription()
+ // { return string.Format("PreSeqTabEdit '{0}'", Text); }
+ // public override string GetPDCategory()
+ // { return "PreSeq Tab Edit"; }
+ // public override string ToString()
+ // {
+ // return Text;
+ // }
+ //}
+ #endregion
+ #region OLD - PreSeqTabEditList
+ //[TypeConverter(typeof(vlnListConverter))]
+ //public class PreSeqTabEditList : vlnFormatList
+ //{
+ // public PreSeqTabEditList(XmlNodeList xmlNodeList) : base(xmlNodeList) { }
+ //}
+ #endregion
+ #region OLD - PreSeqTabPrint
+ //[TypeConverter(typeof(ExpandableObjectConverter))]
+ //public class PreSeqTabPrint : vlnFormatItem
+ //{
+ // public PreSeqTabPrint(XmlNode xmlNode) : base(xmlNode) { }
+ // public PreSeqTabPrint() : base() { }
+ // private LazyLoad _Text;
+ // public string Text
+ // {
+ // get
+ // {
+ // return LazyLoad(ref _Text, "text()");
+ // }
+ // }
+ // public override string GetPDDisplayName()
+ // { return "Text"; }
+ // public override string GetPDDescription()
+ // { return string.Format("PreSeqTabPrint '{0}'", Text); }
+ // public override string GetPDCategory()
+ // { return "PreSeq Tab Printt"; }
+ // public override string ToString()
+ // {
+ // return Text;
+ // }
+ //}
+ #endregion
+ #region OLD - PreSeqTabPrintList
+ //[TypeConverter(typeof(vlnListConverter))]
+ //public class PreSeqTabPrintList : vlnFormatList
+ //{
+ // public PreSeqTabPrintList(XmlNodeList xmlNodeList) : base(xmlNodeList) { }
+ //}
+ #endregion
+ #region OLD - PostSeqTabEdit
+ //[TypeConverter(typeof(ExpandableObjectConverter))]
+ //public class PostSeqTabEdit : vlnFormatItem
+ //{
+ // public PostSeqTabEdit(XmlNode xmlNode) : base(xmlNode) { }
+ // public PostSeqTabEdit() : base() { }
+ // private LazyLoad _Text;
+ // public string Text
+ // {
+ // get
+ // {
+ // return LazyLoad(ref _Text, "text()");
+ // }
+ // }
+ // public override string GetPDDisplayName()
+ // { return "Text"; }
+ // public override string GetPDDescription()
+ // { return string.Format("PostSeqTabEdit '{0}'", Text); }
+ // public override string GetPDCategory()
+ // { return "PostSeq Tab Edit"; }
+ // public override string ToString()
+ // {
+ // return Text;
+ // }
+ //}
+ #endregion
+ #region OLD - PostSeqTabEditList
+ //[TypeConverter(typeof(vlnListConverter))]
+ //public class PostSeqTabEditList : vlnFormatList
+ //{
+ // public PostSeqTabEditList(XmlNodeList xmlNodeList) : base(xmlNodeList) { }
+ //}
+ #endregion
+ #region OLD - PostSeqTabPrint
+ //[TypeConverter(typeof(ExpandableObjectConverter))]
+ //public class PostSeqTabPrint : vlnFormatItem
+ //{
+ // public PostSeqTabPrint(XmlNode xmlNode) : base(xmlNode) { }
+ // public PostSeqTabPrint() : base() { }
+ // private LazyLoad _Text;
+ // public string Text
+ // {
+ // get
+ // {
+ // return LazyLoad(ref _Text, "text()");
+ // }
+ // }
+ // public override string GetPDDisplayName()
+ // { return "Text"; }
+ // public override string GetPDDescription()
+ // { return string.Format("PostSeqTabPrint '{0}'", Text); }
+ // public override string GetPDCategory()
+ // { return "PostSeq Tab Printt"; }
+ // public override string ToString()
+ // {
+ // return Text;
+ // }
+ //}
+ #endregion
+ #region OLD - PostSeqTabPrintList
+ //[TypeConverter(typeof(vlnListConverter))]
+ //public class PostSeqTabPrintList : vlnFormatList
+ //{
+ // public PostSeqTabPrintList(XmlNodeList xmlNodeList) : base(xmlNodeList) { }
+ //}
+ #endregion
+ #region UnderlineTerminate
+ [TypeConverter(typeof(ExpandableObjectConverter))]
+ public class UnderlineTerminate : vlnFormatItem
+ {
+ public UnderlineTerminate(XmlNode xmlNode) : base(xmlNode) { }
+ public UnderlineTerminate() : base() { }
+ private LazyLoad _Text;
+ public string Text
+ {
+ get
+ {
+ return LazyLoad(ref _Text, "text()");
+ }
+ }
+ public override string GetPDDisplayName()
+ { return "Text"; }
+ public override string GetPDDescription()
+ { return string.Format("UnderlineTerminate '{0}'", Text); }
+ public override string GetPDCategory()
+ { return "Underline Terminate"; }
+ public override string ToString()
+ {
+ return Text;
+ }
+ }
+ #endregion
+ #region UnderlineTerminateList
+ [TypeConverter(typeof(vlnListConverter))]
+ public class UnderlineTerminateList : vlnFormatList
+ {
+ public UnderlineTerminateList(XmlNodeList xmlNodeList) : base(xmlNodeList) { }
+ }
+ #endregion
+ #region ObserveNCString1
+ [TypeConverter(typeof(ExpandableObjectConverter))]
+ public class ObserveNCString1 : vlnFormatItem
+ {
+ public ObserveNCString1(XmlNode xmlNode) : base(xmlNode) { }
+ public ObserveNCString1() : base() { }
+ private LazyLoad _Text;
+ public string Text
+ {
+ get
+ {
+ return LazyLoad(ref _Text, "text()");
+ }
+ }
+ public override string GetPDDisplayName()
+ { return "Text"; }
+ public override string GetPDDescription()
+ { return string.Format("ObserveNCString1 '{0}'", Text); }
+ public override string GetPDCategory()
+ { return "ObserveNCString1"; }
+ public override string ToString()
+ {
+ return Text;
+ }
+ }
+ #endregion
+ #region ObserveNCString1List
+ [TypeConverter(typeof(vlnListConverter))]
+ public class ObserveNCString1List : vlnFormatList
+ {
+ public ObserveNCString1List(XmlNodeList xmlNodeList) : base(xmlNodeList) { }
+ }
+ #endregion
+ #region ObserveNCString2
+ [TypeConverter(typeof(ExpandableObjectConverter))]
+ public class ObserveNCString2 : vlnFormatItem
+ {
+ public ObserveNCString2(XmlNode xmlNode) : base(xmlNode) { }
+ public ObserveNCString2() : base() { }
+ private LazyLoad _Text;
+ public string Text
+ {
+ get
+ {
+ return LazyLoad(ref _Text, "text()");
+ }
+ }
+ public override string GetPDDisplayName()
+ { return "Text"; }
+ public override string GetPDDescription()
+ { return string.Format("ObserveNCString2 '{0}'", Text); }
+ public override string GetPDCategory()
+ { return "ObserveNCString2"; }
+ public override string ToString()
+ {
+ return Text;
+ }
+ }
+ #endregion
+ #region ObserveNCString2List
+ [TypeConverter(typeof(vlnListConverter))]
+ public class ObserveNCString2List : vlnFormatList
+ {
+ public ObserveNCString2List(XmlNodeList xmlNodeList) : base(xmlNodeList) { }
+ }
+ #endregion
+ #region ReplaceStr
+ [TypeConverter(typeof(ExpandableObjectConverter))]
+ public class ReplaceStr : vlnFormatItem
+ {
+ public ReplaceStr(XmlNode xmlNode) : base(xmlNode) { }
+ public ReplaceStr() : base() { }
+ [Category("Strings")]
+ private LazyLoad _ReplaceWord;
+ public string ReplaceWord
+ {
+ get
+ {
+ return LazyLoad(ref _ReplaceWord, "@ReplaceWord");
+ }
+ }
+ [Category("Strings")]
+ private LazyLoad _ReplaceWith;
+ public string ReplaceWith
+ {
+ get
+ {
+ return LazyLoad(ref _ReplaceWith, "@ReplaceWith");
+ }
+ }
+ private LazyLoad _Flag;
+ public E_ReplaceFlags? Flag
+ {
+ get
+ {
+ return LazyLoad(ref _Flag, "@Flag");
+ }
+ }
+ public override string GetPDDisplayName()
+ { return ReplaceWord; }
+ public override string GetPDDescription()
+ { return string.Format("Replace '{0}' with '{1}'",ReplaceWord,ReplaceWith); }
+ public override string GetPDCategory()
+ { return "Words to Replace"; }
+ public override string ToString()
+ {
+ return ReplaceWith;
+ }
+ }
+
+ #endregion
+ #region ReplaceStrList
+ [TypeConverter(typeof(vlnListConverter))]
+ public class ReplaceStrList : vlnFormatList
+ {
+ public ReplaceStrList(XmlNodeList xmlNodeList) : base(xmlNodeList) { }
+ }
+ #endregion
+ #region StepSectionLayoutData
+ public class StepSectionLayoutData : vlnFormatItem
+ {
+ public StepSectionLayoutData(XmlNode xmlNode) : base(xmlNode) { }
+ private TopOfPage _TopOfPage;
+ public TopOfPage TopOfPage
+ {
+ get
+ {
+ return (_TopOfPage == null)? _TopOfPage = new TopOfPage(SelectSingleNode("TopOfPage")): _TopOfPage;
+ }
+ }
+ private Separator _Separator;
+ public Separator Separator
+ {
+ get
+ {
+ return (_Separator == null) ?_Separator = new Separator(SelectSingleNode("Separator")):_Separator;
+ }
+ }
+ private LazyLoad _LastLineToStartStep;
+ public int? LastLineToStartStep
+ {
+ get
+ {
+ return LazyLoad(ref _LastLineToStartStep, "@LastLineToStartStep");
+ }
+ }
+ private LazyLoad _LineDrawingOption;
+ public int? LineDrawingOption
+ {
+ get
+ {
+ return LazyLoad(ref _LineDrawingOption, "@LineDrawingOption");
+ }
+ }
+ private LazyLoad _ColS;
+ public int? ColS
+ {
+ get
+ {
+ return LazyLoad(ref _ColS, "@ColS");
+ }
+ }
+ private LazyLoad _ColT;
+ public int? ColT
+ {
+ get
+ {
+ return LazyLoad(ref _ColT, "@ColT");
+ }
+ }
+ private LazyLoad _ColAbs;
+ public int? ColAbs
+ {
+ get
+ {
+ return LazyLoad(ref _ColAbs, "@ColAbs");
+ }
+ }
+ private LazyLoad _WidT;
+ public int? WidT
+ {
+ get
+ {
+ return LazyLoad(ref _WidT, "@WidT");
+ }
+ }
+ private LazyLoad _PMode;
+ public int? PMode
+ {
+ get
+ {
+ return LazyLoad(ref _PMode, "@PMode");
+ }
+ }
+ private LazyLoad _MaxRNO;
+ public int? MaxRNO
+ {
+ get
+ {
+ return LazyLoad(ref _MaxRNO, "@MaxRNO");
+ }
+ }
+ private LazyLoad _MaxRNOTable;
+ public string MaxRNOTable
+ {
+ get
+ {
+ return LazyLoad(ref _MaxRNOTable, "@MaxRNOTable");
+ }
+ }
+ private LazyLoad _ColRTable;
+ public string ColRTable
+ {
+ get
+ {
+ return LazyLoad(ref _ColRTable, "@ColRTable");
+ }
+ }
+ private LazyLoad _WidSTableEdit;
+ public string WidSTableEdit
+ {
+ get
+ {
+ return LazyLoad(ref _WidSTableEdit, "@WidSTableEdit");
+ }
+ }
+ private LazyLoad _WidSTablePrint;
+ public string WidSTablePrint
+ {
+ get
+ {
+ return LazyLoad(ref _WidSTablePrint, "@WidSTablePrint");
+ }
+ }
+ private LazyLoad _AdjRNOCol;
+ public int? AdjRNOCol
+ {
+ get
+ {
+ return LazyLoad(ref _AdjRNOCol, "@AdjRNOCol");
+ }
+ }
+ private LazyLoad _EndMessagePos;
+ public int? EndMessagePos
+ {
+ get
+ {
+ return LazyLoad(ref _EndMessagePos, "@EndMessagePos");
+ }
+ }
+ private LazyLoad _RNOWidthAlt;
+ public string RNOWidthAlt
+ {
+ get
+ {
+ return LazyLoad(ref _RNOWidthAlt, "@RNOWidthAlt");
+ }
+ }
+ private LazyLoad _HLSWidthOVRD;
+ public int? HLSWidthOVRD
+ {
+ get
+ {
+ return LazyLoad(ref _HLSWidthOVRD, "@HLSWidthOVRD");
+ }
+ }
+ private LazyLoad _SubPaginationWght;
+ public int? SubPaginationWght
+ {
+ get
+ {
+ return LazyLoad(ref _SubPaginationWght, "@SubPaginationWght");
+ }
+ }
+ private LazyLoad _TextTitleAdjustment;
+ public int? TextTitleAdjustment
+ {
+ get
+ {
+ return LazyLoad(ref _TextTitleAdjustment, "@TextTitleAdjustment");
+ }
+ }
+ private VE_Font _VertStyle;
+ public VE_Font VertStyle
+ {
+ get
+ {
+ return (_VertStyle == null)? _VertStyle = new VE_Font(base.XmlNode): _VertStyle;
+ }
+ }
+ private LazyLoad _TableCenterPos;
+ public string TableCenterPos
+ {
+ get
+ {
+ return LazyLoad(ref _TableCenterPos, "@TableCenterPos");
+ }
+ }
+ private LazyLoad _LowerLimitDivisor;
+ public string LowerLimitDivisor
+ {
+ get
+ {
+ return LazyLoad(ref _LowerLimitDivisor, "@LowerLimitDivisor");
+ }
+ }
+ private LazyLoad _NonLinkedStepNumber;
+ public string NonLinkedStepNumber
+ {
+ get
+ {
+ return LazyLoad(ref _NonLinkedStepNumber, "@NonLinkedStepNumber");
+ }
+ }
+ private LazyLoad _NonLinkedCautNoteNumber;
+ public string NonLinkedCautNoteNumber
+ {
+ get
+ {
+ return LazyLoad(ref _NonLinkedCautNoteNumber, "@NonLinkedCautNoteNumber");
+ }
+ }
+ private LazyLoad _NonLinkedRNONumber;
+ public string NonLinkedRNONumber
+ {
+ get
+ {
+ return LazyLoad(ref _NonLinkedRNONumber, "@NonLinkedRNONumber");
+ }
+ }
+ }
+ #endregion
+ #region TopOfPage
+ public class TopOfPage : vlnFormatItem
+ {
+ public TopOfPage(XmlNode xmlNode) : base(xmlNode) { }
+ private LazyLoad _Row;
+ public int? Row
+ {
+ get
+ {
+ return LazyLoad(ref _Row, "@Row");
+ }
+ }
+ private LazyLoad _Col;
+ public int? Col
+ {
+ get
+ {
+ return LazyLoad(ref _Col, "@Col");
+ }
+ }
+ private VE_Font _Font;
+ public VE_Font Font
+ {
+ get
+ {
+ return (_Font == null? _Font = new VE_Font(base.XmlNode): _Font);
+ }
+ }
+ }
+ #endregion
+ #region Separator
+ public class Separator : vlnFormatItem
+ {
+ public Separator(XmlNode xmlNode) : base(xmlNode) { }
+ private LazyLoad _SeparatorLocation;
+ public int? SeparatorLocation
+ {
+ get
+ {
+ return LazyLoad(ref _SeparatorLocation, "@SeparatorLocation");
+ }
+ }
+ private VE_Font _Font;
+ public VE_Font Font
+ {
+ get
+ {
+ return (_Font == null ? _Font = new VE_Font(base.XmlNode) : _Font);
+ }
+ }
+ }
+ #endregion
+ #region StepSectionEditData
+ public class StepSectionEditData : vlnFormatItem
+ {
+ public StepSectionEditData(XmlNode xmlNode) : base(xmlNode) { }
+ private LazyLoad _ColSScreenAdj;
+ public int? ColSScreenAdj
+ {
+ get
+ {
+ return LazyLoad(ref _ColSScreenAdj, "@ColSScreenAdj");
+ }
+ }
+ private LazyLoad _ScrnAdjRNOText;
+ public int? ScrnAdjRNOText
+ {
+ get
+ {
+ return LazyLoad(ref _ScrnAdjRNOText, "@ScrnAdjRNOText");
+ }
+ }
+ private LazyLoad _ColRScreen;
+ public string ColRScreen
+ {
+ get
+ {
+ return LazyLoad(ref _ColRScreen, "@ColRScreen");
+ }
+ }
+ }
+ #endregion
+ #region StepSectionPrintData
+ public class StepSectionPrintData : vlnFormatItem
+ {
+ public StepSectionPrintData(XmlNode xmlNode) : base(xmlNode) { }
+ private LazyLoad _ImmStepHdrCol;
+ public int? ImmStepHdrCol
+ {
+ get
+ {
+ return LazyLoad(ref _ImmStepHdrCol, "@ImmStepHdrCol");
+ }
+ }
+ private LazyLoad _SecColHdrforActPMode;
+ public int? SecColHdrforActPMode
+ {
+ get
+ {
+ return LazyLoad(ref _SecColHdrforActPMode, "@SecColHdrforActPMode");
+ }
+ }
+ private LazyLoad _RNOSepString;
+ public string RNOSepString
+ {
+ get
+ {
+ return LazyLoad(ref _RNOSepString, "@RNOSepString");
+ }
+ }
+ private LazyLoad _HLStpSeparatorString;
+ public string HLStpSeparatorString
+ {
+ get
+ {
+ return LazyLoad(ref _HLStpSeparatorString, "@HLStpSeparatorString");
+ }
+ }
+ private LazyLoad _HLRNOStpSeparatorString;
+ public string HLRNOStpSeparatorString
+ {
+ get
+ {
+ return LazyLoad(ref _HLRNOStpSeparatorString, "@HLRNOStpSeparatorString");
+ }
+ }
+ private VE_Font _ModifiedTextStyle;
+ public VE_Font ModifiedTextStyle
+ {
+ get
+ {
+ return (_ModifiedTextStyle == null)? _ModifiedTextStyle = new VE_Font(base.XmlNode):_ModifiedTextStyle;
+ }
+ }
+ private VE_Font _ImmStepHdrStyle;
+ public VE_Font ImmStepHdrStyle
+ {
+ get
+ {
+ return (_ImmStepHdrStyle == null)? _ImmStepHdrStyle = new VE_Font(base.XmlNode):_ImmStepHdrStyle;
+ }
+ }
+ private ImmStepHdrList _ImmStepHdrList;
+ public ImmStepHdrList ImmStepHdrList
+ {
+ get
+ {
+ return (_ImmStepHdrList == null)? _ImmStepHdrList = new ImmStepHdrList(SelectNodes("ImmStepHdrList/string")):_ImmStepHdrList;
+ }
+ set { _ImmStepHdrList = value; }
+ }
+ }
+ #region ImmStepHdr
+ [TypeConverter(typeof(ExpandableObjectConverter))]
+ public class ImmStepHdr : vlnFormatItem
+ {
+ public ImmStepHdr(XmlNode xmlNode) : base(xmlNode) { }
+ public ImmStepHdr() : base() { }
+ private LazyLoad _Text;
+ public string Text
+ {
+ get
+ {
+ return LazyLoad(ref _Text, "text()");
+ }
+ }
+ public override string GetPDDisplayName()
+ { return "Text"; }
+ public override string GetPDDescription()
+ { return string.Format("ImmStepHdr '{0}'", Text); }
+ public override string GetPDCategory()
+ { return "Imm Step Hdr"; }
+ public override string ToString()
+ {
+ return Text;
+ }
+ }
+ #endregion
+ #region ImmStepHdrList
+ [TypeConverter(typeof(vlnListConverter))]
+ public class ImmStepHdrList : vlnFormatList
+ {
+ public ImmStepHdrList(XmlNodeList xmlNodeList) : base(xmlNodeList) { }
+ }
+ #endregion
+ #endregion
+ #region SeqTabFmtAll
+ #region SeqTabFmt
+ [TypeConverter(typeof(ExpandableObjectConverter))]
+ public class SeqTabFmt : vlnFormatItem
+ {
+ public SeqTabFmt() : base() { }
+ private LazyLoad _Index; //not included - is it needed?
+ [Description("SeqTab Index")]
+ public int? Index
+ {
+ get
+ {
+ return LazyLoad(ref _Index, "@Index");
+ }
+ }
+ private LazyLoad _LeftJustify;
+ public int? LeftJustify
+ {
+ get
+ {
+ return LazyLoad(ref _LeftJustify, "@LeftJustify");
+ }
+ }
+ private LazyLoad _TabFormat;
+ public string TabFormat
+ {
+ get
+ {
+ return LazyLoad(ref _TabFormat, "@TabFormat");
+ }
+ }
+ public override string GetPDDisplayName()
+ { return string.Format("Index [{0}]",Index); }
+ public override string GetPDDescription()
+ { return string.Format("Sequential Tab Format Index '{0}' Format '{1}'", Index, TabFormat); }
+ public override string GetPDCategory()
+ { return "Sequential Tab Formatting"; }
+ public override string ToString()
+ {
+ return TabFormat;
+ }
+ }
+ #endregion
+ #region SeqTabFmtList
+ [TypeConverter(typeof(vlnListConverter))]
+ public class SeqTabFmtList : vlnFormatList
+ {
+ public new SeqTabFmt this[int index]
+ {
+ get
+ {
+ foreach (SeqTabFmt seqTabFmt in this)
+ if (seqTabFmt.Index == index) return seqTabFmt;
+ return null;
+ }
+ }
+ public SeqTabFmtList(XmlNodeList xmlNodeList) : base(xmlNodeList) { }
+ }
+ #endregion
+ #endregion
+ #endregion
+ #region AccSectionDataAll
+ #region AccSectionData
+ [TypeConverter(typeof(ExpandableObjectConverter))]
+ public class AccSectionData : vlnFormatItem
+ {
+ public AccSectionData(XmlNode xmlNode) : base(xmlNode) { }
+ private LazyLoad _AutoContActSumSection;
+ public int? AutoContActSumSection
+ {
+ get
+ {
+ return LazyLoad(ref _AutoContActSumSection, "@AutoContActSumSection");
+ }
+ }
+ private TableOfContentsData _TableOfContentsData;
+ public TableOfContentsData TableOfContentsData
+ {
+ get
+ {
+ return (_TableOfContentsData == null ? _TableOfContentsData = new TableOfContentsData(SelectSingleNode("TableOfContentsData")) : _TableOfContentsData);
+ }
+ }
+ }
+ #endregion
+ #region TableOfContentsData
+ public class TableOfContentsData : vlnFormatItem
+ {
+ public TableOfContentsData(XmlNode xmlNode) : base(xmlNode) { }
+ private LazyLoad _TofCSecNumPos;
+ public int? TofCSecNumPos
+ {
+ get
+ {
+ return LazyLoad(ref _TofCSecNumPos, "@TofCSecNumPos");
+ }
+ }
+ private LazyLoad _TofCSecTitlePos;
+ public int? TofCSecTitlePos
+ {
+ get
+ {
+ return LazyLoad(ref _TofCSecTitlePos, "@TofCSecTitlePos");
+ }
+ }
+ private LazyLoad _TofCSecTitleLen;
+ public int? TofCSecTitleLen
+ {
+ get
+ {
+ return LazyLoad(ref _TofCSecTitleLen, "@TofCSecTitleLen");
+ }
+ }
+ private LazyLoad _TofCPageNumPos;
+ public int? TofCPageNumPos
+ {
+ get
+ {
+ return LazyLoad(ref _TofCPageNumPos, "@TofCPageNumPos");
+ }
+ }
+ private LazyLoad _TofCSpaceChar;
+ public int? TofCSpaceChar
+ {
+ get
+ {
+ return LazyLoad(ref _TofCSpaceChar, "@TofCSpaceChar");
+ }
+ }
+ private LazyLoad _TofCLineSpacing;
+ public int? TofCLineSpacing
+ {
+ get
+ {
+ return LazyLoad(ref _TofCLineSpacing, "@TofCLineSpacing");
+ }
+ }
+ private VE_Font _Font;
+ public VE_Font Font
+ {
+ get
+ {
+ return (_Font == null) ?_Font = new VE_Font(base.XmlNode):_Font;
+ }
+ }
+ }
+ #endregion
+ #endregion
+ #region MetaSectionAll
+ #region MetaSection
+ [TypeConverter(typeof(ExpandableObjectConverter))]
+ public class MetaSection : vlnFormatItem
+ {
+ public MetaSection(XmlNode xmlNode) : base(xmlNode) { }
+ public MetaSection() : base() { }
+ private LazyLoad _Index;
+ public int? Index
+ {
+ get
+ {
+ return LazyLoad(ref _Index, "@Index");
+ }
+ }
+ private LazyLoad _SecNumPositionAdj;
+ public int? SecNumPositionAdj
+ {
+ get
+ {
+ return LazyLoad(ref _SecNumPositionAdj, "@SecNumPositionAdj");
+ }
+ }
+ private LazyLoad _SecTitlePositionAdj;
+ public int? SecTitlePositionAdj
+ {
+ get
+ {
+ return LazyLoad(ref _SecTitlePositionAdj, "@SecTitlePositionAdj");
+ }
+ }
+ private LazyLoad _ColSByLevel;
+ public int? ColSByLevel
+ {
+ get
+ {
+ return LazyLoad(ref _ColSByLevel, "@ColSByLevel");
+ }
+ }
+ private LazyLoad _TofCPositionAdj;
+ public int? TofCPositionAdj
+ {
+ get
+ {
+ return LazyLoad(ref _TofCPositionAdj, "@TofCPositionAdj");
+ }
+ }
+ private LazyLoad _WidSAdjByLevel;
+ public int? WidSAdjByLevel
+ {
+ get
+ {
+ return LazyLoad(ref _WidSAdjByLevel, "@WidSAdjByLevel");
+ }
+ }
+ public override string GetPDDisplayName()
+ { return string.Format("[{0}]", Index); }
+ public override string GetPDCategory()
+ { return "Meta Section Values"; }
+ public override string ToString()
+ {
+ return String.Format("{0}, {1}, {2}, {3}, {4}", SecNumPositionAdj, SecTitlePositionAdj, ColSByLevel, TofCPositionAdj, TofCPositionAdj);
+ }
+ }
+
+ #endregion
+ #region MetaSectionList
+ [TypeConverter(typeof(vlnListConverter))]
+ public class MetaSectionList : vlnFormatList
+ {
+ public MetaSectionList(XmlNodeList xmlNodeList) : base(xmlNodeList) { }
+ }
+ #endregion
+ #endregion
+ #endregion
+ #region StepDataAll
+ #region Step
+ [TypeConverter(typeof(ExpandableObjectConverter))]
+ public class StepData : vlnFormatItem
+ {
+ public StepData() : base() { }
+ private LazyLoad _Index;
+ [Description("Step Index")]
+ public int? Index
+ {
+ get
+ {
+ return LazyLoad(ref _Index, "@Index");
+ }
+ }
+ private LazyLoad _Type;
+ public string Type
+ {
+ get
+ {
+ return LazyLoad(ref _Type, "@Type");
+ }
+ }
+ private LazyLoad _ParentType;
+ public string ParentType
+ {
+ get
+ {
+ return LazyLoad(ref _ParentType, "@ParentType");
+ }
+ }
+ private LazyLoad _StepTypeColOverride;
+ public string StepTypeColOverride
+ {
+ get
+ {
+
+ return LazyLoad(ref _StepTypeColOverride, "@StepTypeColOverride");
+ }
+ }
+ private LazyLoad _Sep;
+ public string Sep
+ {
+ get
+ {
+ return LazyLoad(ref _Sep, "@Sep");
+ }
+ }
+ private LazyLoad _AlternateName;
+ public string AlternateName
+ {
+ get
+ {
+ return LazyLoad(ref _AlternateName, "@AlternateName");
+ }
+ }
+ private LazyLoad _Prefix;
+ public string Prefix
+ {
+ get
+ {
+ return LazyLoad(ref _Prefix, "@Prefix");
+ }
+ }
+ private LazyLoad _Suffix;
+ public string Suffix
+ {
+ get
+ {
+ return LazyLoad(ref _Suffix, "@Suffix");
+ }
+ }
+ private LazyLoad _UnderlineTheseChar;
+ public string UnderlineTheseChar
+ {
+ get
+ {
+ return LazyLoad(ref _UnderlineTheseChar, "@UnderlineTheseChar");
+ }
+ }
+ private LazyLoad _VertPos;
+ public string VertPos
+ {
+ get
+ {
+ return LazyLoad(ref _VertPos, "@VertPos");
+ }
+ }
+ private VE_Font _Font;
+ public VE_Font Font
+ {
+ get
+ {
+ return (_Font == null) ?_Font = new VE_Font(base.XmlNode): _Font;
+ }
+ }
+ private StepLayoutData _StepLayoutData;
+ public StepLayoutData StepLayoutData
+ {
+ get
+ {
+ return (_StepLayoutData == null)? _StepLayoutData = new StepLayoutData(base.XmlNode): _StepLayoutData;
+ }
+ }
+ private StepEditData _StepEditData;
+ public StepEditData StepEditData
+ {
+ get
+ {
+ return (_StepEditData == null) ? _StepEditData = new StepEditData(base.XmlNode) : _StepEditData;
+ }
+ }
+ private TabData _TabData;
+ public TabData TabData
+ {
+ get
+ {
+ return (_TabData == null) ? _TabData = new TabData(base.XmlNode) : _TabData;
+ }
+ }
+ public override string ToString()
+ {
+ return string.Format("{0}", Type);
+ }
+ }
+ #endregion
+ #region StepDataList
+ [TypeConverter(typeof(vlnListConverter))]
+ public class StepDataList : vlnFormatList
+ {
+ public new StepData this[int index]
+ {
+ get
+ {
+ foreach (StepData stepData in this)
+ if (stepData.Index == index) return stepData;
+ return null;
+ }
+ }
+ public StepDataList(XmlNodeList xmlNodeList) : base(xmlNodeList) { }
+ }
+ #endregion
+ #region StepLayoutData
+ [TypeConverter(typeof(ExpandableObjectConverter))]
+ public class StepLayoutData : vlnFormatItem
+ {
+ public StepLayoutData(XmlNode xmlNode)
+ : base(xmlNode)
+ {
+ }
+ private LazyLoad _ForeColor;
+ public string ForeColor
+ {
+ get
+ {
+ return LazyLoad(ref _ForeColor, "StepLayoutData/@ForeColor");
+ }
+ }
+ private LazyLoad _BackColor;
+ public string BackColor
+ {
+ get
+ {
+ return LazyLoad(ref _BackColor, "StepLayoutData/@BackColor");
+ }
+ }
+ private LazyLoad _STExtralines;
+ public int? STExtralines
+ {
+ get
+ {
+ return LazyLoad(ref _STExtralines, "StepLayoutData/@STExtralines");
+ }
+ }
+ private LazyLoad _STBoxindex;
+ public int? STBoxindex
+ {
+ get
+ {
+ return LazyLoad(ref _STBoxindex, "StepLayoutData/@STBoxindex");
+ }
+ }
+ private LazyLoad _EveryNLines;
+ public int? EveryNLines
+ {
+ get
+ {
+ return LazyLoad(ref _EveryNLines, "StepLayoutData/@EveryNLines");
+ }
+ }
+ }
+ #endregion
+ #region StepEditData
+ [TypeConverter(typeof(ExpandableObjectConverter))]
+ public class StepEditData : vlnFormatItem
+ {
+ public StepEditData(XmlNode xmlNode)
+ : base(xmlNode)
+ {
+ }
+ private LazyLoad