private void OnButtonImportClick(object sender, EventArgs e) { this.Cursor = Cursors.WaitCursor; List <FavoriteConfigurationElement> favoritesToImport = GetFavoritesFromBindingSource(this.domainTextbox.Text); var managedImport = new ImportWithDialogs(this, this.persistence, this.connectionManager); managedImport.Import(favoritesToImport); }
private static bool InvokeTheImport(List <FavoriteConfigurationElement> toImport, IPersistence persistence, Func <int, DialogResult> strategy) { var moqInterface = new TestImportUi(strategy); var managedImport = new ImportWithDialogs(moqInterface, persistence, TestConnectionManager.Instance); return(managedImport.Import(toImport)); }
private void ImportFavoritesWithManagerImport(List <FavoriteConfigurationElement> favoritesToImport) { var managedImport = new ImportWithDialogs(this, this.persistence, this.connectionManager); var imported = managedImport.Import(favoritesToImport); if (imported) { this.UpdateFavoritesBindingSource(); } }
private void ImportFavoritesWithManagerImport(List <FavoriteConfigurationElement> favoritesToImport) { ImportWithDialogs managedImport = new ImportWithDialogs(this); bool imported = managedImport.Import(favoritesToImport); if (imported) { this.UpdateFavoritesBindingSource(); } }
private void MoveFavoritesFromConfigFile() { var tagsConvertert = new TagsConverter(); foreach (FavoriteConfigurationElement favoriteConfigElement in settings.GetFavorites()) { IFavorite favorite = ModelConverterV1ToV2.ConvertToFavorite(favoriteConfigElement, this.persistence, this.connectionManager); ImportWithDialogs.AddFavoriteIntoGroups(this.persistence, favorite, tagsConvertert.ResolveTagsList(favoriteConfigElement)); this.persistence.Favorites.Add(favorite); } }
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); }