コード例 #1
0
        private void MoveFavoriteAliasesGroup(GroupConfigurationElement configGroup)
        {
            IGroup           group          = FavoritesFactory.GetOrAddNewGroup(this.persistence, configGroup.Name);
            List <string>    favoriteNames  = configGroup.FavoriteAliases.GetFavoriteNames();
            List <IFavorite> groupFavorites = favoriteNames.Select(favoriteName => persistence.Favorites[favoriteName])
                                              .Where(favorite => favorite != null).ToList();

            group.AddFavorites(groupFavorites);
        }
コード例 #2
0
ファイル: OrganizeGroupsForm.cs プロジェクト: zoroz/Terminals
 private void AddFavoritesToGroup(IGroup group)
 {
     using (var frmAddConnection = new AddConnectionForm(this.persistence, this.favoriteIcons))
     {
         if (frmAddConnection.ShowDialog() == DialogResult.OK)
         {
             group.AddFavorites(frmAddConnection.SelectedFavorites);
             this.LoadSelectedGroupFavorites();
             this.persistence.SaveAndFinishDelayedUpdate();
         }
     }
 }
コード例 #3
0
 private void AddFavoritesToGroup(IGroup group)
 {
     using (var frmAddConnection = new AddConnectionForm(this.persistence))
     {
         if (frmAddConnection.ShowDialog() == DialogResult.OK)
         {
             group.AddFavorites(frmAddConnection.SelectedFavorites);
             this.LoadSelectedGroupFavorites();
             this.persistence.SaveAndFinishDelayedUpdate();
         }
     }
 }