Exemplo n.º 1
0
        public void Complete(Vector2 startingPoint, Vector2 point, bool isOutNodeDistance)
        {
            if (this.MezzanineLayerage == null)
            {
                return;
            }

            if (isOutNodeDistance)
            {
                if (this.MezzanineLayerage == null)
                {
                    return;
                }
                ILayer mezzanineLayer = this.MezzanineLayerage.Self;


                Transformer transformerDestination = this.CreateTransformer(startingPoint, point, this._sizeWidth, this._sizeHeight);

                this.SelectionViewModel.Transformer  = transformerDestination;//Selection
                mezzanineLayer.Transform.Transformer = transformerDestination;

                //Refactoring
                mezzanineLayer.IsRefactoringRender     = true;
                mezzanineLayer.IsRefactoringIconRender = true;
                this.MezzanineLayerage.RefactoringParentsRender();
                this.MezzanineLayerage.RefactoringParentsIconRender();


                foreach (Layerage layerage in this.ViewModel.LayerageCollection.RootLayerages)
                {
                    ILayer layer = layerage.Self;

                    layer.IsSelected = false;
                }

                mezzanineLayer.IsSelected = true;
                this.MezzanineLayerage    = null;
            }
            else
            {
                LayerageCollection.RemoveMezzanine(this.ViewModel.LayerageCollection, this.MezzanineLayerage); //Mezzanine
            }
            //         this.SelectionViewModel.SetMode(this.ViewModel.LayerageCollection);//Selection

            LayerageCollection.ArrangeLayers(this.ViewModel.LayerageCollection);
            LayerageCollection.ArrangeLayersBackground(this.ViewModel.LayerageCollection);

            this.ViewModel.Invalidate(InvalidateMode.HD);//Invalidate
        }