Beispiel #1
0
        private void ApplyChanges()
        {
            var aircrafts     = checkedListBoxAircraft.CheckedItems.Cast <Aircraft>();
            var applicability = checkedListBoxApplicability.CheckedItems.Cast <Aircraft>();

            foreach (var aircraft in aircrafts)
            {
                var a            = aircraft;
                var newDirective = _directive.GetCopyUnsaved();
                newDirective.ParentBaseComponent = GlobalObjects.ComponentCore.GetAircraftFrame(a.ItemId);
                newDirective.IsApplicability     = applicability.FirstOrDefault(i => i.ItemId == a.ItemId) != null;
                newDirective.IsClosed            = !newDirective.IsApplicability;
                Directives.Add(newDirective);
            }
        }