private void ok_Click(object sender, EventArgs e) { if (text.Text.Trim() == unknown_) { // user hasn't changed anything DialogResult = DialogResult.Cancel; return; } var old = aliases_; aliases_ = aliases.from_enter_separated_string(text.Text); if (!aliases_.is_non_friendly_name_info_the_same(old)) { needs_restart_ = true; } DialogResult = DialogResult.OK; }
private void text_TextChanged(object sender, EventArgs e) { bool needs_restart = !aliases_.is_non_friendly_name_info_the_same(aliases.from_enter_separated_string(text.Text)); requiresRestart.Visible = needs_restart; }