private static Collection createMergeCollection(Collection first, Collection second, string name) { var collectionRepo = new CollectionRepository(); first = collectionRepo.addIncludes(first); second = collectionRepo.addIncludes(second); var parentId = first.ParentID == second.ParentID ? first.ParentID : 0; var path = parentId != 0 ? first.Parent.Path + "/" + name : Storage.PATH + "/" + name; var collection = new Collection(name, path, Auth.getUser().ID, parentId, first.Type); Storage.createDirectory(collection.Path); return(collection); }
public CollectionsDetailsDialog(Collection collection, DialogInterface dialogInterface = null) { InitializeComponent(); FormBorderStyle = FormBorderStyle.FixedSingle; collectionRepository = new CollectionRepository(); this.collection = collectionRepository.addIncludes(collection); this.dialogInterface = dialogInterface; initialize(); }