Represents a type that contains editors from the same layer.
예제 #1
0
파일: Model.cs 프로젝트: SteveDunn/oglr
        public void SelectEditors(SelectedEditors itemEditors)
        {
            Debug.WriteLine(@"SelectEditors with {0} item(s)", itemEditors.Count);

            if (itemEditors.Count != 0)
            {
                setActiveLayerIfItsDifferent(itemEditors.Items.First( ).ParentLayer);
            }

            Level.SelectEditors(itemEditors);

            tryFire(() => SelectionChanged, itemEditors.Items);
        }
예제 #2
0
파일: Level.cs 프로젝트: SteveDunn/oglr
        public void MoveSelectedIditorsToLayer(LayerEditor chosenLayer)
        {
            var selected = SelectedEditors.ToList(  );

            foreach (var eachSelectedEditor in selected)
            {
                ActiveLayer.RemoveEditor(eachSelectedEditor);

                eachSelectedEditor.ParentLayer = chosenLayer;

                chosenLayer.AddEditor(eachSelectedEditor);
            }
        }
예제 #3
0
파일: Level.cs 프로젝트: SteveDunn/oglr
        public IEnumerable <ItemEditor> CopySelectedEditorsToLayer(LayerEditor destinationLayer)
        {
            var selectedEditors = SelectedEditors.ToList(  );

            foreach (ItemEditor eachEditor in selectedEditors)
            {
                ItemEditor clonedEditor = eachEditor.Clone( );

                clonedEditor.ParentLayer         = destinationLayer;
                clonedEditor.ItemProperties.Name = destinationLayer.ParentLevel.GetUniqueNameBasedOn(clonedEditor.ItemProperties.Name);

                destinationLayer.AddEditor(clonedEditor);

                clonedEditor.ItemProperties.Id = generateId( );

                yield return(clonedEditor);
            }
        }
예제 #4
0
파일: Model.cs 프로젝트: SteveDunn/oglr
        public void SelectEditors( SelectedEditors itemEditors )
        {
            Debug.WriteLine( @"SelectEditors with {0} item(s)", itemEditors.Count ) ;

            if( itemEditors.Count != 0 )
            {
                setActiveLayerIfItsDifferent( itemEditors.Items.First( ).ParentLayer ) ;
            }

            Level.SelectEditors( itemEditors ) ;

            tryFire( ( ) => SelectionChanged, itemEditors.Items ) ;
        }
예제 #5
0
파일: Level.cs 프로젝트: SteveDunn/oglr
        public void SelectEditors( SelectedEditors editors )
        {
            clearAllSelections(  );

            editors.Items.ForEach( ce => ce.IsSelected = true ) ;
        }
예제 #6
0
파일: Level.cs 프로젝트: SteveDunn/oglr
        public void SelectEditors(SelectedEditors editors)
        {
            clearAllSelections(  );

            editors.Items.ForEach(ce => ce.IsSelected = true);
        }