public void AddServer(ServerModel ServerToAdd, IPAddress IpAddressToAdd) { // Add the server to the servers list. // IpConnections is also bound to the ServersComboBox IpConnections.Add(IpAddressToAdd); // Add the server Ip Address to the IpConnection list. ServerConnections.Add(ServerToAdd); }
public ServerConnectionData AddServerConnectionData(String connectionType, String connectionDataString) { var scd = new ServerConnectionData(connectionType, connectionDataString); foreach (var cnd in ServerConnections) { if (cnd.ID == scd.ID) { cnd.ParseConnectionDataString(connectionDataString); return(cnd); } } System.Diagnostics.Debug.Print("Adding server connection " + scd.ID); ServerConnections.Add(scd); return(scd); }