Пример #1
0
		public void SetValueThrowsException ()
		{
			NumericUpDown nud = new NumericUpDown ();
			nud.Maximum = 3;
			nud.Value = 4;
			nud.Dispose ();
		}
Пример #2
0
		public void InitTest ()
		{
			NumericUpDown nud = new NumericUpDown ();
			nud.BeginInit ();
			nud.Maximum = 3;
			nud.BeginInit ();
			nud.EndInit ();
			nud.Value = 4;
			nud.Dispose ();
		}
Пример #3
0
 /*private static double HexToDec(string HexStr)
 {
     return Conversion.Val(string.Format("&H{0}", HexStr));
 }*/
 public static object ConvertTextToInteger(string text)
 {
     var down = new NumericUpDown
     {
         Maximum = 999999999999999999M,
         Minimum = -999999999999999999M,
         Text = text
     };
     var down2 = down;
     down2.Value = decimal.Add(down2.Value, decimal.One);
     down2 = down;
     down2.Value = decimal.Subtract(down2.Value, decimal.One);
     var num = Convert.ToInt64(down.Value);
     down.Dispose();
     return num;
 }