private void ParseValue(String txtValue)
{
Double tmpValue = 0;
if(Double.TryParse(txtValue, out tmpValue))
{
if(Digits != null)
{
tmpValue = Math.Round(tmpValue, (Int32)Digits);
}
m_Value = tmpValue;
if (!String.IsNullOrEmpty(Format))
{
this.Text = tmpValue.ToString(Format);
}
else if(Digits != null)
{
this.Text = tmpValue.ToString(String.Format("F{0}", Digits));
}
else
this.Text = tmpValue.ToString();
}
else
{
m_Value = DefaultValue;
this.Text = DefaultValue.ToString();
}
}
}