//--------------------------------------
//               PowerUI
//
//        For documentation or 
//    if you have any issues, visit
//        powerUI.kulestar.com
//
//    Copyright  2013 Kulestar Ltd
//          www.kulestar.com
//--------------------------------------

using System;


namespace Css.Units{
	
	/// <summary>
	/// Represents an instance of a khz frequency.
	/// </summary>
	
	public class KhzUnit:FrequencyUnit{
		
		public override float DisplayNumber{
			get{
				return ( RawValue / 1000f );
			}
		}
		
		public override string ToString(){
			return DisplayNumber+"kHz";
		}
		
		public override void OnValueReady(CssLexer lexer){
			// Map to hz:
			RawValue *= 1000f;
		}
		
		protected override Value Clone(){
			KhzUnit result=new KhzUnit();
			result.RawValue=RawValue;
			return result;
		}
		
		public override string[] PostText{
			get{
				return new string[]{"khz"};
			}
		}
		
	}
	
}



