using System;
using Medivators.Common.Enums;

namespace Medivators.Common
{
	/// <summary>
	/// Summary description for Common.
	/// </summary>
	public class Constants
	{
		#region text manipulation

		public static string NewLine					= string.Empty + (char)13 + (char)10;
		public static string Tab						= string.Empty + (char)8;
		public static string TabSpaces					= "    ";
		public static string StringDelimiter			= "{|}";
		public static string ValueDelimiter				= " = ";
		public static string ElementDelimiter			= ",";
		public static string DoubleQuote				= "\"";
		public static string DateDelimiter = "#";

		#endregion

		#region textsetting support
		
		internal const string KeyDelimiter = "|";
		internal const char TextSettingFieldDelimiter = (char)42;
		internal const string TextSettingsExtension = ".text.setting";
		internal const int TextSettingFields = 4;
		internal const int TextSettingFieldType = 0;
		internal const int TextSettingFieldSection = 1;
		internal const int TextSettingFieldName = 2;
		internal const int TextSettingFieldValue = 3;
		internal const string DefaultSectionName = "General";

		#endregion

		#region application settings

		public static string DefaultCommitInterval		= "1000";
		public static string DefaultParseInterval		= "1000";
		public static string DefaultConnection			= "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\\program files\\Medivators\\Database\\Medivators.Reporting.mdb;Persist Security Info=True";

		public static CommPorts DefaultCommPort			= CommPorts.COM1;
		public static BaudRates DefaultBaudRate			= BaudRates.bps9600;
		public static HandShakes DefaultHandShake		= HandShakes.None;
		public static StopBits DefaultStopBit			= StopBits.One;
		public static DataBits DefaultDataBit			= DataBits.Eight;
		public static Parities DefaultParity			= Parities.None;

		public const string BaudRateLabel = "BaudRate";
		public const string DataBitLabel = "DataBit";
		public const string StopBitLabel = "StopBit";
		public const string HandShakeLabel = "HandShake";
		public const string ParityLabel = "Parity";
		#endregion

		#region Medivators specific

		public const string TimestampKeyFormat = "yyyyMMddhhmm";
		public const string MedivatorsProgramFiles = "C:\\Program Files\\Medivators";
		public const string MedivatorsSettingsFile = "Medivators";

		#endregion

		#region string formats

		public const string DateTimeFormat = "MM-dd-yyyy HH:mm:ss";
		public const string PaddedIntegerFormat = "0000000000";

		#endregion
	}
}
