private void ServerList_Load(object sender, EventArgs e) { this.dataGridView1.DataSource = null; Application.DoEvents(); List<KnownServers> list = new List<KnownServers>(); Servers servers = new Servers(ServerType.All); foreach (string name in servers) { ServerType type = Servers.GetServerType(name); KnownServers s = new KnownServers {Name = name, Type = type}; list.Add(s); } this.dataGridView1.DataSource = list; }
/// <summary> /// </summary> public ServerComboBox() { this.InitializeComponent(); this.servers = new Servers(); this.autoRefresh = false; }