예제 #1
0
        public static Panel add_Proxy_ActionsPanel(this O2_Web_Proxy o2WebProxy, Control topPanel)
        {
            var actionsPanel = topPanel.insert_Above(40, "actions");

            actionsPanel.add_Label("O2 Proxy")
            .append_Link("View Proxy Object", () => o2WebProxy.details())
            .append_Link("Proxy Start", () => o2WebProxy.startWebProxy())
            .append_Link("Proxy Stop", () => o2WebProxy.stopWebProxy())
            .append_Link("Set Browser Proxy", () => o2WebProxy.setBrowserProxy())
            .append_Link("Clear Browser Proxy", () => o2WebProxy.clearBrowserProxy())
            .append_Link("Stop Current Process", () => Processes.getCurrentProcess().stop());
            return(actionsPanel);
        }
 public static O2_Web_Proxy stopWebProxy(this O2_Web_Proxy o2WebProxy)
 {
     try
     {
         o2WebProxy.clearBrowserProxy();
         "Stopping Web Proxy".info();
         ProxyServer.Server.Stop();
     }
     catch (Exception ex)
     {
         "[O2_Web_Proxy] stopWebProxy : {0}".error(ex.Message);
     }
     return(o2WebProxy);
 }