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