예제 #1
0
		static void InitImp (Atom input, NumericOptions options=null)
		{
			input.SetAttribute ("autonumeric", true);
			input.SetAttribute ("data-type", "numeric");
			input.Style.CssText = "text-align:right;";
			jQuery.FromElement (input).Execute ("autoNumeric", "init", options);
		}
예제 #2
0
		static void Init (Atom input, NumericOptions options=null)
		{
			if (input.HasAttribute ("autonumeric"))
				return;
			InitImp (input, options);

		}
예제 #3
0
		static void Update (Atom input, NumericOptions options)
		{
			if (!input.HasAttribute ("autonumeric"))
				InitImp (input, options);
			else
				jQuery.FromElement (input).Execute ("autoNumeric", "update", options);

		}
예제 #4
0
		public static AutoNumeric AutoNumeric(Atom input, NumericOptions options=null)
		{

			Init (input, options);		
			dynamic methods = new {};

			methods["get"]= (Func<bool, decimal?>)( (r)=>  GetValue(input,false)  );
			methods["set"]= (Action< decimal?>)( (v)=> SetValue(input,v) );
			methods["init"]= (Action<NumericOptions>)( o=> Init(input,o) );
			methods["update"]= (Action<NumericOptions>)( o=> Update(input,o) );
			methods["getSettings"]= (Func<NumericOptions>)( ()=> GetSettings(input) );

			input.SetToAtomProperty ("autoNumeric",(object) methods);

			return UI.Cast<AutoNumeric> (input);
		}
예제 #5
0
		public AutoNumeric(Element atom, NumericOptions options=null)
		{
		}
예제 #6
0
		public void Update (NumericOptions options) {

		}