• UpDownBase & UpDownBase<T>


    public class DoubleUpDown : UpDownBase<double>
        {
            
    ///<summary>
            
    /// Internal constructor.
            
    ///</summary>
            public DoubleUpDown( )
                : 
    base( )
            {
                Value 
    = 0;
            }

            
    ///<summary>
            
    /// Called by OnSpin when the spin direction is SpinDirection.Increase.
            
    ///</summary>
            protected override void OnIncrement( )
            {
                Value 
    = Value + 1;
            }

            
    ///<summary>
            
    /// Called by OnSpin when the spin direction is SpinDirection.Increase.
            
    ///</summary>
            protected override void OnDecrement( )
            {
                Value 
    = Value - 1;
            }

            
    ///<summary>
            
    /// Called by ApplyValue to parse user input.
            
    ///</summary>
            
    ///<param name="text">User input.</param>
            
    ///<returns>Value parsed from user input.</returns>
            protected override double ParseValue( string text )
            {
                
    return double.Parse( text, CultureInfo.CurrentCulture );
            }

            
    ///<summary>
            
    /// Called to render Value for Text template part to display.
            
    ///</summary>
            
    ///<returns>Formatted Value.</returns>
            protected override string FormatValue( )
            {
                
    return Value.ToString( CultureInfo.CurrentCulture );
            }
        }
  • 相关阅读:
    简单的JS控制button颜色随点击更改
    以 “月” 为单位的可以翻页的效果 显示为 2016年01月
    荷兰国旗 Flag of the Kingdom of the Netherlands
    最大连续子数组以及拓展
    Something Wrong or Something Right
    转载文章----十步完全理解SQL
    数据库关系代数练习题
    SQL server 2014安装以及解决连接数据库失败问题
    回文判断
    字符串的包含
  • 原文地址:https://www.cnblogs.com/mycrystal/p/2174631.html
Copyright © 2020-2023  润新知