예제 #1
0
        private void RemovePackageFromAssignations(Guid packageId)
        {
            if (packageId == UnassignedBanksPackageId)
            {
                UnassignedBanksPackage = _nonePackage;
            }
            if (packageId == UnassignedStreamsPackageId)
            {
                UnassignedStreamsPackage = _nonePackage;
            }
            if (packageId == UnassignedExternalsPackageId)
            {
                UnassignedExternalsPackage = _nonePackage;
            }
            if (packageId == UnassignedLooseMediaPackageId)
            {
                UnassignedLooseMediaPackage = _nonePackage;
            }

            _defaultLanguagePackageIds
            .Where(i => i.BankPackageId == packageId)
            .ForEach(i => i.BankPackage = _nonePackage);
            _defaultLanguagePackageIds
            .Where(i => i.StreamPackageId == packageId)
            .ForEach(i => i.StreamPackage = _nonePackage);
            _defaultLanguagePackageIds
            .Where(i => i.LooseMediaPackageId == packageId)
            .ForEach(i => i.LooseMediaPackage = _nonePackage);
        }
예제 #2
0
        private void RemoveMissingItems()
        {
            IEnumerable <LayoutContentItemViewModel> missings = _layoutItems.Where(i => i.IsMissing || i.IsMissingFromPackage).ToList();

            using (new UndoManager.EventGroupScope())
            {
                Package.LayoutItems.RemoveRange(missings.Select(i => i.Item));
            }
        }