⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 fontunit.cs

📁 不错的人事管理系统
💻 CS
字号:
using System;
using System.Globalization;

namespace System.Web.UI.WebControls
{
	/// <summary>
	/// Summary description for FontUnit.
	/// </summary>
	//.custom instance void [System]System.ComponentModel.TypeConverterAttribute::.ctor(class [mscorlib]System.Type) 
	public struct FontUnit
	{
		public static System.Web.UI.WebControls.FontUnit Empty;
		public static System.Web.UI.WebControls.FontUnit Smaller;
		public static System.Web.UI.WebControls.FontUnit Larger;
		public static System.Web.UI.WebControls.FontUnit XXSmall;
		public static System.Web.UI.WebControls.FontUnit XSmall;
		public static System.Web.UI.WebControls.FontUnit Small;
		public static System.Web.UI.WebControls.FontUnit Medium;
		public static System.Web.UI.WebControls.FontUnit Large;
		public static System.Web.UI.WebControls.FontUnit XLarge;
		public static System.Web.UI.WebControls.FontUnit XXLarge;
		private System.Web.UI.WebControls.FontSize type;
		private System.Web.UI.WebControls.Unit value;

		static FontUnit() 
		{
			Empty = new System.Web.UI.WebControls.FontUnit();

			Smaller = new System.Web.UI.WebControls.FontUnit(FontSize.Smaller);
			Larger = new System.Web.UI.WebControls.FontUnit(FontSize.Larger);
			XXSmall = new System.Web.UI.WebControls.FontUnit(FontSize.XXSmall);
			XSmall = new System.Web.UI.WebControls.FontUnit(FontSize.XSmall);
			Small = new System.Web.UI.WebControls.FontUnit(FontSize.Small);
			Medium = new System.Web.UI.WebControls.FontUnit(FontSize.Medium);
			Large = new System.Web.UI.WebControls.FontUnit(FontSize.Large);
			XLarge = new System.Web.UI.WebControls.FontUnit(FontSize.XLarge);
			XXLarge = new System.Web.UI.WebControls.FontUnit(FontSize.XXLarge);
		}

		public FontUnit(FontSize type) 
		{
			if (type < FontSize.NotSet || type > FontSize.XXLarge)
				throw new ArgumentOutOfRangeException("type");
			this.type = type;
			if (this.type == FontSize.AsUnit) 
			{
				this.value = System.Web.UI.WebControls.Unit.Point(10);
				return;
			}
			this.value = System.Web.UI.WebControls.Unit.Empty;
		}

		public FontUnit(string value, CultureInfo culture) 
		{
			char local0;
			string local1;
			string local2;
			string local3;

			this.type = 0;
			this.value = System.Web.UI.WebControls.Unit.Empty;
			if (value != null && value.Length > 0) 
			{
				local0 = System.Char.ToLower(value[0]);
				if (local0 == 120) 
				{
					local1 = value.ToLower(culture);
					if (local1 == "xx-small" || local1 == "xxsmall") 
					{
						this.type = FontSize.XXSmall;
						return;
					}
					if (local1 == "x-small" || local1 == "xsmall") 
					{
						this.type = FontSize.XSmall;
						return;
					}
					if (local1 == "x-large" || local1 == "xlarge") 
					{
						this.type = FontSize.XLarge;
						return;
					}
					if (local1 != "xx-large" && local1 != "xxlarge")
					{
//						goto i0;
					}
					this.type = FontSize.XXLarge;
					return;
				}
				if (local0 == 115) 
				{
					local2 = value.ToLower(culture);
					if (local2 == "small") 
					{
						this.type = FontSize.Small;
						return;
					}
					if (local2 != "smaller")
					{
//						goto i0;
					}
					this.type = FontSize.Smaller;
					return;
				}
				if (local0 == 108) 
				{
					local3 = value.ToLower(culture);
					if (local3 == "large") 
					{
						this.type = FontSize.Large;
						return;
					}
					if (local3 != "larger")
					{
//						goto i0;
					}
					this.type = FontSize.Larger;
					return;
				}
				if (local0 == 109 && value.ToLower(culture) == "medium") 
				{
					this.type = FontSize.Medium;
					return;
				}
//			i0: this.value = new System.Web.UI.WebControls.Unit(value, culture, FontSize.Smaller);
				this.type = FontSize.AsUnit;
			}
		}

		public FontUnit(string value) 
		{
			throw new Exception("");
//			this = new System.Web.UI.WebControls.FontUnit(value, CultureInfo.CurrentCulture);
		}

		public FontUnit(int value) 
		{
			this.type = FontSize.AsUnit;
			this.value = System.Web.UI.WebControls.Unit.Point(value);
		}

		public FontUnit(Unit value) 
		{
			this.type = 0;
			if (!(value.IsEmpty)) 
			{
				this.type = FontSize.AsUnit;
				this.value = value;
				return;
			}
			this.value = System.Web.UI.WebControls.Unit.Empty;
		}

		public override bool Equals(object obj) 
		{
			FontUnit local0;

//			if (obj == null || obj as FontUnit == null)
//				return false;
			local0 = (FontUnit) obj;
			if (local0.type == this.type && System.Web.UI.WebControls.Unit.op_Equality(local0.value, this.value))
				return true;
			return false;
		}

		public override int GetHashCode() 
		{
			throw new Exception("");
			//			return <{ class ILEngineer::Ops::MSIL::XOr }>;
		}

		public static bool op_Equality(FontUnit left, FontUnit right) 
		{
			if (left.type == right.type)
				return System.Web.UI.WebControls.Unit.op_Equality(left.value, right.value);
			return false;
		}

		public static FontUnit op_Implicit(int n) 
		{
			return FontUnit.Point(n);
		}

		public static bool op_Inequality(FontUnit left, FontUnit right) 
		{
			if (left.type == right.type)
				return System.Web.UI.WebControls.Unit.op_Inequality(left.value, right.value);
			return true;
		}

		public static FontUnit Parse(string s) 
		{
			return new FontUnit(s);
		}

		public static FontUnit Parse(string s, CultureInfo culture) 
		{
			return new FontUnit(s, culture);
		}

		public static FontUnit Point(int n) 
		{
			return new FontUnit(n);
		}
		public string ToString(CultureInfo culture) 
		{
			throw new Exception("");
		}
		public override string ToString() 
		{
			return this.ToString(null);
		}

		public bool IsEmpty 
		{
			get
			{
				return this.type == 0;
			}
		}

		public FontSize Type 
		{
			get
			{
				return this.type;
			}
		}

		public Unit Unit 
		{
			get
			{
				return this.value;
			}
		}
	}
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -