コード例 #1
0
 private void UpdateProxyList()
 {
     Proxies.Clear();
     Proxies.Add(new ProxyViewModel());
     foreach (ProxyInfo proxyInfo in _proxyRegistry.Proxies)
     {
         Proxies.Add(new ProxyViewModel(proxyInfo));
     }
 }
コード例 #2
0
 public void Remove(Proxy proxy)
 {
     lock (Lock)
     {
         var list = Proxies.ToList();
         list.Remove(proxy);
         Proxies.Clear();
         foreach (var p in list)
         {
             Proxies.Enqueue(p);
         }
     }
 }
コード例 #3
0
        private void Update()
        {
            Proxies.Clear();

            foreach (Proxy proxy in m_model)
            {
                Proxies.Add(new ProxyTestableViewModel()
                {
                    Model    = proxy,
                    TestSite = SelectedSite
                });

                Proxies.Last().GetLocation.Execute(null);
            }
        }
コード例 #4
0
        private void LoadConfig()
        {
            try
            {
                Servers.Clear();
                Servers.AddRange(GetAvailabilityGroupList(xml_config, "Servers", "Server", "ServerId"));

                Proxies.Clear();
                Proxies.AddRange(GetAvailabilityGroupList(xml_config, "Proxies", "Proxy", "ProxyId"));
            }
            catch (Exception e)
            {
                Log.WriteLine(LogLevel.Error, "There are errors in your configuration file.");
                Log.WriteLine(e.Message);
                Global.Exit();
            }
        }