C2018-033 added logic to save selected prefix and suffix date/time format to the config
		
			
				
	
	
		
			163 lines
		
	
	
		
			4.8 KiB
		
	
	
	
		
			C#
		
	
	
	
	
	
			
		
		
	
	
			163 lines
		
	
	
		
			4.8 KiB
		
	
	
	
		
			C#
		
	
	
	
	
	
| 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("Override Change Bar Text Type")]
 | |
| 			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
 | |
| 		}
 | |
| 	// C2018-033 PDF file date/time Prefix formats
 | |
| 	/// <summary>
 | |
| 	///          The description is used in the drop down list
 | |
| 	///					 The enum is the date/time format that is used as a parameter for dts.ToString() to generate the desired format
 | |
| 	///           A "__" will be replaced with a space, a "_" will be replaced with a dash before giving it to ToString().
 | |
| 	///					 This is used in DlgPrintProcedure.cs BuildPDFFileName()
 | |
| 	///           date/time formating:
 | |
| 	///						yyyy will give a four digit year
 | |
| 	///						MM will give a two digit month
 | |
| 	///						dd will give a two digit day
 | |
| 	///						HH will give a two digit hour (military time)
 | |
| 	///						mm will give a two digit minutes
 | |
| 	///					  ss will give a two digit sections (but it was decided seconds was not needed so we are not using this)
 | |
| 	/// </summary>
 | |
| 		[TypeConverter(typeof(EnumDescConverter))]
 | |
| 		public enum PDFDTPrefix : int
 | |
| 		{
 | |
| 			[Description("Use Text Instead")]
 | |
| 			None = 0,
 | |
| 			[Description("Yr-Mt-Dy")]
 | |
| 			yyyy_MM_dd,
 | |
| 			[Description("Dy-Mt-Yr")]
 | |
| 			dd_MM_yyyy,
 | |
| 			[Description("Yr-Mt-Dy HrMn")]
 | |
| 			yyyy_MM_dd__HHmm,
 | |
| 			[Description("Dy-Mt-Yr HrMn")]
 | |
| 			dd_MM_yyyy__HHmm,
 | |
| 			[Description("Mt-Dy-Yr HrMn")]
 | |
| 			MM_dd_yyyy__HHmm,
 | |
| 			[Description("HrMn")]
 | |
| 			HHmm,
 | |
| 			[Description("HrMn Yr-Mt-Dy")]
 | |
| 			HHmm__yyyy_MM_dd
 | |
| 			}
 | |
| 	// C2018-033 PDF file date/time Suffix formats
 | |
| 		/// <summary>
 | |
| 		///          The description is used in the drop down list
 | |
| 		///					 The enum is the date/time format that is used as a parameter for dts.ToString() to generate the desired format
 | |
| 		///           A "__" will be replaced with a space, a "_" will be replaced with a dash before giving it to ToString().
 | |
| 		///					 This is used in DlgPrintProcedure.cs BuildPDFFileName()
 | |
| 		///           date/time formating:
 | |
| 		///						yyyy will give a four digit year
 | |
| 		///						MM will give a two digit month
 | |
| 		///						dd will give a two digit day
 | |
| 		///						HH will give a two digit hour (military time)
 | |
| 		///						mm will give a two digit minutes
 | |
| 		///					  ss will give a two digit sections (but it was decided seconds was not needed so we are not using this)
 | |
| 		/// </summary>
 | |
| 		[TypeConverter(typeof(EnumDescConverter))]
 | |
| 		public enum PDFDTSuffix : int
 | |
| 		{
 | |
| 			[Description("Use Text Instead")]
 | |
| 			None = 0,
 | |
| 			[Description("Yr-Mt-Dy")]
 | |
| 			yyyy_MM_dd,
 | |
| 			[Description("Dy-Mt-Yr")]
 | |
| 			dd_MM_yyyy,
 | |
| 			[Description("Yr-Mt-Dy HrMn")]
 | |
| 			yyyy_MM_dd__HHmm,
 | |
| 			[Description("Dy-Mt-Yr HrMn")]
 | |
| 			dd_MM_yyyy__HHmm,
 | |
| 			[Description("Mt-Dy-Yr HrMn")]
 | |
| 			MM_dd_yyyy__HHmm,
 | |
| 			[Description("HrMn")]
 | |
| 			HHmm,
 | |
| 			[Description("HrMn Yr-Mt-Dy")]
 | |
| 			HHmm__yyyy_MM_dd
 | |
| 		}
 | |
| 		//
 | |
| 	//}
 | |
| }
 |