Пример #1
0
        private void addButton_Click(object sender, EventArgs e)
        {
            FormEditRule FormEditRule = new FormEditRule(null);

            if (FormEditRule.ShowDialog() == DialogResult.OK)
            {
                Configuration.GetConfig().Rules.Add(FormEditRule.Rule);
                this.SaveConfigAndRefresh();
            }
        }
Пример #2
0
 private void editButton_Click(object sender, EventArgs e)
 {
     if (this.dataGridView1.SelectedRows.Count > 0)
     {
         FirewallRule usb          = (FirewallRule)this.dataGridView1.SelectedRows[0].DataBoundItem;
         FormEditRule FormEditRule = new FormEditRule(usb);
         if (FormEditRule.ShowDialog() == DialogResult.OK)
         {
             this.SaveConfigAndRefresh();
         }
     }
 }