W() public static méthode

public static W ( string content ) : void
content string
Résultat void
Exemple #1
0
 public void DisableProxy()
 {
     Logger.V(">> AppManager.DisableProxy");
     m_semaphore.WaitOne();
     RunProcessProxyAgent(false.ToString());
     if (IeProxyOptions.ProxyEnable != false)
     {
         Logger.W("AppManager.DisableProxy :: "
                  + "Failed to disable system proxy for the 1st round.");
         RunProcessProxyAgent(false.ToString());
         if (IeProxyOptions.ProxyEnable != false)
         {
             Logger.E("AppManager.DisableProxy :: "
                      + "Failed to disable system proxy for the 2nd round.");
         }
         else
         {
             Logger.I("AppManager.DisableProxy :: "
                      + "Correctly disable system proxy for the 2nd round.");
         }
     }
     else
     {
         Logger.I("AppManager.DisableProxy :: "
                  + "Correctly disable system proxy for the 1st round.");
     }
     NotifyGuiNetworkChanged(this, new EventArgs());
     m_semaphore.Release();
     Logger.V("<< AppManager.DisableProxy");
 }
Exemple #2
0
        public void EnableProxy(ProxyItem pi)
        {
            Logger.V(">> AppManager.EnableProxy(@1.ProxyAddr:" + pi.m_szProxyAddr + ")");
            m_semaphore.WaitOne();
            string args = true.ToString() + " "
                          + "\"" + pi.m_szProxyAddr + "\" "
                          + "\"" + pi.m_szBypass + "\" "
                          + pi.m_isAutoConfDisabled.ToString();

            RunProcessProxyAgent(args);
            if (IeProxyOptions.ProxyEnable != true ||
                IeProxyOptions.ProxyAddr != pi.m_szProxyAddr ||
                IeProxyOptions.Bypass != pi.m_szBypass ||
                IeProxyOptions.AutoConfDisabled != pi.m_isAutoConfDisabled)
            {
                Logger.W("AppManager.EnableProxy :: "
                         + "Failed to enable system proxy as specified for the 1st round.");
                RunProcessProxyAgent(args);
                if (IeProxyOptions.ProxyEnable != true ||
                    IeProxyOptions.ProxyAddr != pi.m_szProxyAddr ||
                    IeProxyOptions.Bypass != pi.m_szBypass ||
                    IeProxyOptions.AutoConfDisabled != pi.m_isAutoConfDisabled)
                {
                    Logger.E("AppManager.EnableProxy :: "
                             + "Failed to enable system proxy as specified for the 2nd round.");
                }
                else
                {
                    Logger.I("AppManager.EnableProxy :: "
                             + "Correctly enable system proxy as specified for the 2nd round.");
                }
            }
            else
            {
                Logger.I("AppManager.EnableProxy :: "
                         + "Correctly enable system proxy as specified for the 1st round.");
            }
            NotifyGuiNetworkChanged(this, new EventArgs());
            m_semaphore.Release();
            Logger.V("<< AppManager.EnableProxy(@1.ProxyAddr:" + pi.m_szProxyAddr + ")");
        }
Exemple #3
0
        public void EnableProxy()
        {
            Logger.V(">> AppManager.EnableProxy");
            m_semaphore.WaitOne();
            string szProxyAddr = IeProxyOptions.ProxyAddr;
            string szBypass    = IeProxyOptions.Bypass;
            string args        = true.ToString() + " "
                                 + "\"" + szProxyAddr + "\" "
                                 + "\"" + szBypass + "\" "
                                 + true.ToString();

            RunProcessProxyAgent(args);
            if (IeProxyOptions.ProxyEnable != true ||
                IeProxyOptions.AutoConfDisabled != true)
            {
                Logger.W("AppManager.EnableProxy :: "
                         + "Failed to enable system proxy for the 1st round.");
                System.Threading.Thread.Sleep(1000);
                RunProcessProxyAgent(args);
                if (IeProxyOptions.ProxyEnable != true ||
                    IeProxyOptions.AutoConfDisabled != true)
                {
                    Logger.E("AppManager.EnableProxy :: "
                             + "Failed to enable system proxy for the 2nd round.");
                }
                else
                {
                    Logger.I("AppManager.EnableProxy :: "
                             + "Correctly enable system proxy for the 2nd round.");
                }
            }
            else
            {
                Logger.I("AppManager.EnableProxy :: "
                         + "Correctly enable system proxy for the 1st round.");
            }
            NotifyGuiNetworkChanged(this, new EventArgs());
            m_semaphore.Release();
            Logger.V("<< AppManager.EnableProxy");
        }