public PathItemEditor( )
 {
     _properties = new PathItemProperties
         {
             Visible = true,
             Position = Vector2.Zero,
             WorldPoints = new List<Vector2>(),
             LocalPoints = new List<Vector2>(),
             LineWidth = Constants.Instance.DefaultPathItemLineWidth,
             LineColor = Constants.Instance.ColorPrimitives
         };
 }
        public override void RecreateFromXml( LayerEditor parentLayer, XElement xml )
        {
            base.RecreateFromXml( parentLayer, xml );

            _editorMode = ItemEditorMode.Created ;
            ParentLayer = parentLayer ;
            _properties = xml.Element( @"PathItemProperties" ).DeserializedAs<PathItemProperties>( ) ;

            WhenUpdatedByUi(  );
        }
Beispiel #3
0
 public PathItem(PathItemProperties i)
 {
     this._item = i;
 }
        public override void CreateInDesignMode(LayerEditor parentLayer, IEntityCreationProperties creationProperties)
        {
            _editorMode = ItemEditorMode.Creating ;

            Vector2 mouseWorldPos = MouseStatus.WorldPosition ;

            _properties = new PathItemProperties
                {
                    Visible = true,
                    Position = mouseWorldPos,
                    WorldPoints = new List<Vector2>(),
                    LocalPoints = new List<Vector2>(),
                    LineWidth = Constants.Instance.DefaultPathItemLineWidth,
                    LineColor = Constants.Instance.ColorPrimitives
                } ;

            addWorldPoint( mouseWorldPos );

            summonMainForm(  ).SetToolStripStatusLabel1(Resource1.Path_Started);

            ParentLayer = parentLayer ;

            WhenUpdatedByUi(  );
        }
 public virtual void LoadPathItem(PathItemProperties pathitem, Layer l)
 {
     PathItem p = new PathItem((PathItemProperties)pathitem);
     p.load(this);
     PathItems[pathitem.Name] = p;
 }