private void ImportDiscoveredFavorites() { if (this.rdp.DiscoveredConnections.Count > 0) { String message = String.Format("Automatic Discovery was able to find {0} connections.\r\n" + "Would you like to add them to your connections list?", this.rdp.DiscoveredConnections.Count); if (MessageBox.Show(message, "Terminals Confirmation", MessageBoxButtons.YesNo) == DialogResult.Yes) { List <FavoriteConfigurationElement> favoritesToImport = this.rdp.DiscoveredConnections.ToList(); var managedImport = new ImportWithDialogs(this, this.persistence, this.connectionManager); managedImport.Import(favoritesToImport); } } }
private void ImportSelectedItems(List <FavoriteConfigurationElement> favoritesToImport) { var managedImport = new ImportWithDialogs(this, this.persistence, this.connectionManager); managedImport.Import(favoritesToImport); }