private void LoadValueAndConvert(TextBox master) { if (string.IsNullOrEmpty(master.Text)) { return; } try { _lsnValue = new LogSequenceNumber(master.Text, _inputTextBoxConverter[master]); } catch (Exception ex) { MessageBox.Show(this, ex.Message, "Error Parsing LSN Value", MessageBoxButtons.OK); return; } foreach (TextBox textBox in _inputTextBoxConverter.Keys) { if (master != textBox) { textBox.Text = _lsnValue.ToString(_inputTextBoxConverter[textBox]); } } }
private void SetBackgroundColor(TextBox master) { foreach (TextBox textBox in _labelMapping.Keys) { if (master == textBox) { textBox.BackColor = Color.LightYellow; } else { textBox.BackColor = Color.White; textBox.Text = _lsnValue.ToString(_inputTextBoxConverter[textBox]); } } }