Пример #1
0
 //应用
 private void btnApply_Click(object sender, RoutedEventArgs e)
 {
     if (textConfigIP.Text != AppConfig.m_config.ProxyIP || textConfigPort.Text != AppConfig.m_config.ProxyPort)
     {
         AppConfig.m_config.ProxyIP   = textConfigIP.Text;
         AppConfig.m_config.ProxyPort = textConfigPort.Text;
         AppConfig.Save();
         TitaniumWebProxy.UpdateUpStreamProxy();
     }
     //应用后关闭
     MainWindow.thisFrm.ToggleFlyout(0); //关闭Flyout
 }
Пример #2
0
        App() //初始化
        {
            InitAppPath();
            //IEProxyHelper.SetIEUserAgent();
            IEProxyHelper.SetIE11KeyforWebBrowserControl(AppName);
            IEProxyHelper.SetGPUKeyforWebBrowserControl(AppName);
            AppConfig.Init();
            TitaniumWebProxy.Init();

            //Add Custom assembly resolver
            AppDomain.CurrentDomain.AssemblyResolve += Resolver;

            //Any CefSharp references have to be in another method with NonInlining
            // attribute so the assembly rolver has time to do it's thing.
            InitializeCefSharp();
        }