示例#1
0
 public void getData()
 {
     currentProxyAddress = NetResolver.GetProxyFromRegistry();
     localIPs            = null;
     localIPs            = NetResolver.GetLocalIPAddress();
     machineName         = Environment.MachineName;
     userName            = System.Security.Principal.WindowsIdentity.GetCurrent().Name;
     proxyStatus         = NetResolver.CheckIfProxyIsEnabled();
     remoteStatus        = NetResolver.CheckIfRemoteIsEnabled().ToString();
     displayData();
 }
示例#2
0
        public void getData()
        {
            try
            {
                log.Debug("Getting Data");
                currentProxyAddress = NetResolver.GetProxyFromRegistry();
                localIPs            = null;

                localIPs = NetResolver.GetLocalIPAddress();

                machineName = Environment.MachineName;
                userName    = System.Security.Principal.WindowsIdentity.GetCurrent().Name;

                proxyStatus = NetResolver.CheckIfProxyIsEnabled();

                remoteStatus = NetResolver.CheckIfRemoteIsEnabled().ToString();
            }
            catch (Exception ex)
            {
                log.Error(ex.ToString());
            }
        }