Example #1
0
 private void NoIPConfigure_Click(object sender, RoutedEventArgs e)
 {
     if (UserMessageBox.Show("无IP配置", "确定要将此防火墙配置成无IP吗?") == true)
     {
         INoIPConfig  noip  = new NoIPConfig();
         FWDeviceForm fwdev = (from devices in StaticGlobal.fwdev_list
                               where devices.getDev_MAC() == currentselectedItem.Header.ToString().Replace("防火墙  MAC: ", "")
                               select devices).ToList <FWDeviceForm>()[0];
         if (noip.NoipConfig(fwdev))
         {
             UserMessageBox.Show("提示", "无IP配置成功!");
         }
         else
         {
             UserMessageBox.Show("提示", "无IP配置失败!");
         }
     }
 }
Example #2
0
        private void NOIP_Click(object sender, RoutedEventArgs e)
        {
            INoIPConfig conf = new NoIPConfig();

            for (int i = 0; i < StaticGlobal.fwdev_list.Count(); i++)
            {
                if (StaticGlobal.fwdev_list[i].getDev_MAC() == StaticGlobal.firewallmac)
                {
                    if (conf.NoipConfig(StaticGlobal.fwdev_list[i]))
                    {
                        UserMessageBox.Show("提示", "无IP模式配置成功!");
                        StaticGlobal.FwMACandIP[StaticGlobal.firewallmac] = "0.0.0.0";
                        FWIP.Text = StaticGlobal.FwMACandIP[StaticGlobal.firewallmac];
                    }
                    else
                    {
                        UserMessageBox.Show("提示", "无IP模式配置失败!");
                        FWIP.Text = StaticGlobal.FwMACandIP[StaticGlobal.firewallmac];
                    }
                }
            }
        }