diff --git a/PROMS/VEPROMS.CSLA.Library/Config/ConfigEnum.cs b/PROMS/VEPROMS.CSLA.Library/Config/ConfigEnum.cs new file mode 100644 index 00000000..b005d51b --- /dev/null +++ b/PROMS/VEPROMS.CSLA.Library/Config/ConfigEnum.cs @@ -0,0 +1,94 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.ComponentModel; +using DescriptiveEnum; + +namespace VEPROMS.CSLA.Library +{ + //class ConfigEnum + //{ + [TypeConverter(typeof(EnumDescConverter))] + public enum PrintWatermark : int + { + None = 0, Reference, Draft, Master, Sample, + [Description("Information Only")] + InformationOnly + } + // 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("No Default, Select Before Printing")] + SelectBeforePrinting = 0, + [Description("Without Change Bars")] + Without, + [Description("With Default Change Bars")] + WithDefault, + [Description("Use Custom Change Bars")] + WithUserSpecified + } + // 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 + } + // 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 + } + [TypeConverter(typeof(EnumDescConverter))] + public enum PrintPagination : int + { + Free = 0, Fixed, + [Description("Automatic")] + Auto + } + [TypeConverter(typeof(EnumDescConverter))] + public enum FormatColumns : int + { + Default = 0, + [Description("Single Column")] + OneColumn, + [Description("Dual Column")] + TwoColumn, + [Description("Triple Column")] + ThreeColumn, + [Description("Quad Column")] + FourColumns + } + // + //} +} diff --git a/PROMS/VEPROMS.CSLA.Library/Config/DocVersionConfig.cs b/PROMS/VEPROMS.CSLA.Library/Config/DocVersionConfig.cs index 8eeb01dd..6649054b 100644 --- a/PROMS/VEPROMS.CSLA.Library/Config/DocVersionConfig.cs +++ b/PROMS/VEPROMS.CSLA.Library/Config/DocVersionConfig.cs @@ -284,13 +284,13 @@ namespace VEPROMS.CSLA.Library OnPropertyChanged("Print_Printer"); } } - [TypeConverter(typeof(EnumDescConverter))] - 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 + //} [Category("Print Settings")] [DisplayName("Watermark")] @@ -366,23 +366,23 @@ namespace VEPROMS.CSLA.Library 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("No Default, Select Before Printing")] - SelectBeforePrinting = 0, - [Description("Without Change Bars")] - Without, - [Description("With Default Change Bars")] - WithDefault, - [Description("Use Custom Change Bars")] - WithUserSpecified - } + //// 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("No Default, Select Before Printing")] + // SelectBeforePrinting = 0, + // [Description("Without Change Bars")] + // Without, + // [Description("With Default Change Bars")] + // WithDefault, + // [Description("Use Custom Change Bars")] + // WithUserSpecified + //} [Category("Format Settings")] [DisplayName("Change Bars")] @@ -424,23 +424,23 @@ namespace VEPROMS.CSLA.Library } } } - // 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 - } + //// 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("Format Settings")] [DisplayName("Change Bar Position")] [RefreshProperties(RefreshProperties.All)] @@ -482,26 +482,26 @@ namespace VEPROMS.CSLA.Library } } - // 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 - } + //// 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("Format Settings")] [DisplayName("Change Bar Text Type")] [Description("Change Bar Text")] @@ -639,10 +639,10 @@ namespace VEPROMS.CSLA.Library OnPropertyChanged("Print_UserFormat"); } } - public enum PrintPagination : int - { - Free = 0, Fixed, Auto - } + //public enum PrintPagination : int + //{ + // Free = 0, Fixed, Auto + //} [Category("Print Settings")] [DisplayName("Pagination")] [RefreshProperties(RefreshProperties.All)] diff --git a/PROMS/VEPROMS.CSLA.Library/Config/FolderConfig.cs b/PROMS/VEPROMS.CSLA.Library/Config/FolderConfig.cs index 0565dcb0..427c348b 100644 --- a/PROMS/VEPROMS.CSLA.Library/Config/FolderConfig.cs +++ b/PROMS/VEPROMS.CSLA.Library/Config/FolderConfig.cs @@ -558,20 +558,20 @@ namespace VEPROMS.CSLA.Library } #endregion #region FormatCategory - [TypeConverter(typeof(EnumDescConverter))] - public enum FormatColumns : int - { - [Description("Format Default")] - Default = 0, - [Description("Single Column")] - OneColumn, - [Description("Dual Column")] - TwoColumn, - [Description("Triple Column")] - ThreeColumn, - [Description("Quad Column")] - FourColumns - } + //[TypeConverter(typeof(EnumDescConverter))] + //public enum FormatColumns : int + //{ + // [Description("Format Default")] + // Default = 0, + // [Description("Single Column")] + // OneColumn, + // [Description("Dual Column")] + // TwoColumn, + // [Description("Triple Column")] + // ThreeColumn, + // [Description("Quad Column")] + // FourColumns + //} [Category("Editor Settings")] [DisplayName("Step Editor Columns")] [RefreshProperties(RefreshProperties.All)] @@ -649,10 +649,10 @@ namespace VEPROMS.CSLA.Library OnPropertyChanged("Print_NumCopies"); } } - public enum PrintPagination : int - { - Free = 0, Fixed, Auto - } + //public enum PrintPagination : int + //{ + // Free = 0, Fixed, Auto + //} [Category("Print Settings")] [DisplayName("Pagination")] [RefreshProperties(RefreshProperties.All)] @@ -690,13 +690,13 @@ namespace VEPROMS.CSLA.Library OnPropertyChanged("Print_Pagination"); } } - [TypeConverter(typeof(EnumDescConverter))] - 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 + //} [Category("Print Settings")] [DisplayName("Watermark")] @@ -777,18 +777,18 @@ namespace VEPROMS.CSLA.Library // 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 - } + //[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("Format Settings")] [DisplayName("Change Bar")] [RefreshProperties(RefreshProperties.All)] @@ -831,18 +831,18 @@ namespace VEPROMS.CSLA.Library // 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 - } + //[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("Format Settings")] [DisplayName("Change Bar Position")] @@ -888,20 +888,20 @@ namespace VEPROMS.CSLA.Library // 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 - } + //[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("Format Settings")] [DisplayName("Change bar Text Type")] [RefreshProperties(RefreshProperties.All)] diff --git a/PROMS/VEPROMS.CSLA.Library/Config/ProcConfig.cs b/PROMS/VEPROMS.CSLA.Library/Config/ProcConfig.cs index 2cfcbc5b..c20a3b97 100644 --- a/PROMS/VEPROMS.CSLA.Library/Config/ProcConfig.cs +++ b/PROMS/VEPROMS.CSLA.Library/Config/ProcConfig.cs @@ -196,19 +196,19 @@ namespace VEPROMS.CSLA.Library } #endregion #region FormatCategory - [TypeConverter(typeof(EnumDescConverter))] - public enum FormatColumns : int - { - Default = 0, - [Description("Single Column")] - OneColumn, - [Description("Dual Column")] - TwoColumn, - [Description("Triple Column")] - ThreeColumn, - [Description("Quad Column")] - FourColumns - } + //[TypeConverter(typeof(EnumDescConverter))] + //public enum FormatColumns : int + //{ + // Default = 0, + // [Description("Single Column")] + // OneColumn, + // [Description("Dual Column")] + // TwoColumn, + // [Description("Triple Column")] + // ThreeColumn, + // [Description("Quad Column")] + // FourColumns + //} [Category("General")] [DisplayName("Default Column Mode")] [RefreshProperties(RefreshProperties.All)] @@ -286,12 +286,12 @@ namespace VEPROMS.CSLA.Library OnPropertyChanged("Print_NumCopies"); } } - public enum PrintPagination : int - { - Free = 0, Fixed, - [Description("Automatic")] - Auto - } + //public enum PrintPagination : int + //{ + // Free = 0, Fixed, + // [Description("Automatic")] + // Auto + //} [Category("Print Settings")] [DisplayName("Pagination")] [RefreshProperties(RefreshProperties.All)] @@ -329,13 +329,13 @@ namespace VEPROMS.CSLA.Library OnPropertyChanged("Print_Pagination"); } } - [TypeConverter(typeof(EnumDescConverter))] - 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 + //} [Category("Print Settings")] [DisplayName("Watermark")] [RefreshProperties(RefreshProperties.All)] @@ -415,18 +415,18 @@ namespace VEPROMS.CSLA.Library // 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 - } + //[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("Format Settings")] [DisplayName("Change Bar")] [RefreshProperties(RefreshProperties.All)] @@ -469,18 +469,18 @@ namespace VEPROMS.CSLA.Library // 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 - } + //[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("Format Settings")] [DisplayName("Change Bar Position")] [RefreshProperties(RefreshProperties.All)] @@ -525,20 +525,20 @@ namespace VEPROMS.CSLA.Library // 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 - } + //[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("Format Settings")] [DisplayName("Change Bar Text Type")] [RefreshProperties(RefreshProperties.All)] diff --git a/PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs b/PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs index 595ce126..32f843d4 100644 --- a/PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs +++ b/PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs @@ -958,7 +958,7 @@ namespace VEPROMS.CSLA.Library #region ProcedureConfig [NonSerialized] private ProcedureConfig _ProcedureConfig = null; - public ProcedureConfig.PrintChangeBar PrintChangeBar + public PrintChangeBar PrintChangeBar { get { @@ -966,7 +966,7 @@ namespace VEPROMS.CSLA.Library return _ProcedureConfig.Print_ChangeBar; } } - public ProcedureConfig.PrintChangeBarLoc PrintChangeBarLoc + public PrintChangeBarLoc PrintChangeBarLoc { get { @@ -974,7 +974,7 @@ namespace VEPROMS.CSLA.Library return _ProcedureConfig.Print_ChangeBarLoc; } } - public ProcedureConfig.PrintChangeBarText PrintChangeBarText + public PrintChangeBarText PrintChangeBarText { get { @@ -1485,6 +1485,22 @@ namespace VEPROMS.CSLA.Library } } + private DocVersionInfo _MyDocVersion = null; + + public DocVersionInfo MyDocVersion + { + get + { + if (_MyDocVersion == null) + { + if (ActiveParent is DocVersionInfo) + _MyDocVersion = ActiveParent as DocVersionInfo; + else + _MyDocVersion = (ActiveParent as ItemInfo).MyDocVersion; + } + return _MyDocVersion; + } + } private IVEDrillDownReadOnly _ActiveParent = null; public IVEDrillDownReadOnly MyActiveParent { get { return _ActiveParent; } } public IVEDrillDownReadOnly ActiveParent