/[RomCheater]/trunk/Win32/libWin32/Win32/UI/NumericBoxBase.cs
ViewVC logotype

Diff of /trunk/Win32/libWin32/Win32/UI/NumericBoxBase.cs

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

--- trunk/Win32/libWin32/Win32/UI/NumericBox.cs	2012/05/09 20:52:20	88
+++ trunk/Win32/libWin32/Win32/UI/NumericBoxBase.cs	2012/06/02 11:55:57	220
@@ -9,24 +9,25 @@
 
 namespace System.Windows.Forms
 {
-    public partial class NumericBox : UserControl
+    public partial class NumericBoxBase : UserControl
     {
-        public NumericBox()
+        public NumericBoxBase()
         {
             InitializeComponent();
             this.Value = 0;
             this.ReadOnly = false;
         }
 
-        private object _Value;
-        public virtual object Value
+        private ValueType _Value;
+        [Browsable(true)]
+        public ValueType Value
         {
             get { return _Value; }
             set { _Value = value; this.Text = value.ToString(); }
         }
 
         private bool _ReadOnly;
-        public virtual bool ReadOnly
+        public bool ReadOnly
         {
             get { return _ReadOnly; }
             set { _ReadOnly = value; if (_ReadOnly) { txtValueBox.Enabled = false; } else { txtValueBox.Enabled = true; } }
@@ -44,7 +45,7 @@
     #region NumericBox Extensions
     public static class NumericBoxExtensions
     {
-        public static byte ToByte(this NumericBox val)
+        public static byte ToByte(this NumericBoxBase val) 
         {
             try
             {
@@ -52,7 +53,7 @@
             }
             catch { return 0; }
         }
-        public static sbyte ToSByte(this NumericBox val)
+        public static sbyte ToSByte(this NumericBoxBase val) 
         {
             try
             {
@@ -60,7 +61,7 @@
             }
             catch { return 0; }
         }
-        public static Int16 ToInt16(this NumericBox val)
+        public static Int16 ToInt16(this NumericBoxBase val) 
         {
             try
             {
@@ -68,7 +69,7 @@
             }
             catch { return 0; }
         }
-        public static Int32 ToInt32(this NumericBox val)
+        public static Int32 ToInt32(this NumericBoxBase val) 
         {
             try
             {
@@ -76,7 +77,7 @@
             }
             catch { return 0; }
         }
-        public static Int64 ToInt64(this NumericBox val)
+        public static Int64 ToInt64(this NumericBoxBase val) 
         {
             try
             {
@@ -84,7 +85,7 @@
             }
             catch { return 0; }
         }
-        public static UInt16 ToUInt16(this NumericBox val)
+        public static UInt16 ToUInt16(this NumericBoxBase val) 
         {
             try
             {
@@ -92,7 +93,7 @@
             }
             catch { return 0; }
         }
-        public static UInt32 ToUInt32(this NumericBox val)
+        public static UInt32 ToUInt32(this NumericBoxBase val) 
         {
             try
             {
@@ -100,7 +101,7 @@
             }
             catch { return 0; }
         }
-        public static UInt64 ToUInt64(this NumericBox val)
+        public static UInt64 ToUInt64(this NumericBoxBase val) 
         {
             try
             {
@@ -108,7 +109,7 @@
             }
             catch { return 0; }
         }
-        public static Single ToSingle(this NumericBox val)
+        public static Single ToSingle(this NumericBoxBase val) 
         {
             try
             {
@@ -116,7 +117,7 @@
             }
             catch { return 0; }
         }
-        public static double ToDouble(this NumericBox val)
+        public static double ToDouble(this NumericBoxBase val) 
         {
             try
             {
@@ -124,7 +125,7 @@
             }
             catch { return 0; }
         }
-        public static decimal ToDecimal(this NumericBox val)
+        public static decimal ToDecimal(this NumericBoxBase val) 
         {
             try
             {
@@ -132,7 +133,7 @@
             }
             catch { return 0; }
         }
-        public static string ToString(this NumericBox val)
+        public static string ToString(this NumericBoxBase val) 
         {
             try
             {

 

  ViewVC Help
Powered by ViewVC 1.1.22