private void BtnUpdateFilter_Click(object sender, EventArgs e) { string key = TxtBlockURL.Text, value = TxtBlockRule.Text; if (string.IsNullOrEmpty(key) || string.IsNullOrEmpty(value)) { MessageBox.Show("URL and Block Rule Can't be empty."); TxtBlockRule.Clear(); } else { MessageBox.Show(AppendRuleInFilter(key, value) ? "Update Success" : "Error", "Msg", MessageBoxButtons.OK, MessageBoxIcon.Information); } }
private void newRule_Leave(object sender, EventArgs e) { TxtBlockRule.Clear(); TxtBlockURL.Clear(); }