private void UpdateProxyList() { Proxies.Clear(); Proxies.Add(new ProxyViewModel()); foreach (ProxyInfo proxyInfo in _proxyRegistry.Proxies) { Proxies.Add(new ProxyViewModel(proxyInfo)); } }
public void Remove(Proxy proxy) { lock (Lock) { var list = Proxies.ToList(); list.Remove(proxy); Proxies.Clear(); foreach (var p in list) { Proxies.Enqueue(p); } } }
private void Update() { Proxies.Clear(); foreach (Proxy proxy in m_model) { Proxies.Add(new ProxyTestableViewModel() { Model = proxy, TestSite = SelectedSite }); Proxies.Last().GetLocation.Execute(null); } }
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(); } }