/// <summary> /// /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void numericUpDownDigits_ValueChanged(object sender, EventArgs e) { if ((comboBoxDataSize.SelectedText != string.Empty || comboBoxDataSize.SelectedText != null) && (numericUpDownDigits.Value >= 0 || numericUpDownDigits.Value <= 8)) { labelPreview.Text = Supporter.BuildPi(comboBoxDataSize.SelectedValue.ToString(), numericUpDownDigits.Value); } }
/// <summary> /// /// </summary> private void LoadSettings() { comboBoxDataSize.DataSource = dataStore.dataSizes; numericUpDownDigits.Value = Settings.Default.sortDigits; comboBoxDataSize.SelectedIndex = Settings.Default.sortSizes; labelPreview.Text = Supporter.BuildPi(comboBoxDataSize.SelectedValue.ToString(), numericUpDownDigits.Value); }
/// <summary> /// /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void comboBoxDataSize_SelectedIndexChanged(object sender, EventArgs e) { if (comboBoxDataSize.SelectedIndex == 0) { numericUpDownDigits.Enabled = false; } else { numericUpDownDigits.Enabled = true; } labelPreview.Text = Supporter.BuildPi(comboBoxDataSize.SelectedValue.ToString(), numericUpDownDigits.Value); }