コード例 #1
0
        private void RemovePortAuth_Click(object sender, EventArgs e)
        {
            NET_FW_IP_PROTOCOL_ ipProtocol;

            if (tcpOption.Checked)
            {
                ipProtocol = NET_FW_IP_PROTOCOL_.NET_FW_IP_PROTOCOL_TCP;
            }
            else
            {
                ipProtocol = NET_FW_IP_PROTOCOL_.NET_FW_IP_PROTOCOL_UDP;
            }

            firewall.RemovePortAuthorization(appPath.Text, port.Text, ipProtocol);
        }