Example #1
0
        private void btnRemove_Click(object sender, EventArgs e)
        {
            if (slvPortMappings.SelectedItems.Count < 1)
            {
                return;
            }
            PortMappingEntry entry = (PortMappingEntry)slvPortMappings.SelectedItems[0].Tag;

            entry.RemoveFromMapping();
        }
Example #2
0
        private void btnRemove_Click(object sender, EventArgs e)
        {
            if (slvPortMappings.SelectedItems.Count < 1)
            {
                return;
            }
            PortMappingEntry entry = (PortMappingEntry)slvPortMappings.SelectedItems[0].Tag;

            try
            {
                entry.RemoveFromMapping();
            }
            catch
            {
                MetroMessageBox.Show(this, "Error during rule removal",
                                     "This rule couldn't be removed. Try removing it from the router's webinterface.");
            }
        }