AspNetEdit.UI.PropertyEditors.IntEditor.GetEditWidget C# (CSharp) Method

GetEditWidget() public method

public GetEditWidget ( ) : Gtk.Widget
return Gtk.Widget
        public override Gtk.Widget GetEditWidget()
        {
            Gtk.SpinButton spin;

            if (parentRow.PropertyDescriptor.PropertyType == typeof (Int16))
                spin = new SpinButton(Int16.MinValue, Int16.MaxValue, 1);
            else if (parentRow.PropertyDescriptor.PropertyType == typeof (Int32))
                spin = new SpinButton(Int32.MinValue, Int32.MaxValue, 1);
            else if (parentRow.PropertyDescriptor.PropertyType == typeof (Int64))
                spin = new SpinButton(Int64.MinValue, Int64.MaxValue, 1);
            else  //TODO: process floats etc nicely
                spin = new SpinButton(Int64.MinValue, Int64.MaxValue, 1);

            spin.HasFrame = false;
            spin.Value = Convert.ToDouble (parentRow.PropertyValue);
            spin.ValueChanged += new EventHandler (spin_ValueChanged);

            return spin;
        }