Ejemplo n.º 1
0
        private void UpdateText()
        {
            string formattedValue = string.Empty;

            if (_textBox == _textBoxHour)
            {
                formattedValue = ValueHour.ToString(StringFormat);
            }
            if (_textBox == _textBoxMinute)
            {
                formattedValue = ValueMinute.ToString(StringFormat);
            }

            if (_textBox != null)
            {
                _lastText     = formattedValue;
                _textBox.Text = formattedValue;
            }
        }
Ejemplo n.º 2
0
 private void UpdateText(string property)
 {
     if (property == "ValueHour" && _textBoxHour != null)
     {
         _textBoxHour.Text = ValueHour.ToString(StringFormat);
     }
     if (property == "FinalValueHour" && _textBoxHour != null)
     {
         _textBoxHour.Text = FinalValueHour.ToString(StringFormat);
     }
     if (property == "ValueMinute" && _textBoxMinute != null)
     {
         _textBoxMinute.Text = ValueMinute.ToString(StringFormat);
     }
     if (property == "FinalValueMinute" && _textBoxMinute != null)
     {
         _textBoxMinute.Text = FinalValueMinute.ToString(StringFormat);
     }
 }