示例#1
0
        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);
            }
        }
示例#2
0
 private void newRule_Enter(object sender, EventArgs e)
 {
     TxtBlockRule.Focus();
 }
示例#3
0
 private void newRule_Leave(object sender, EventArgs e)
 {
     TxtBlockRule.Clear();
     TxtBlockURL.Clear();
 }