public RectangularHullEditor( ) { _properties= new RectangularHullProperties( ); _edgeLookup = new Dictionary<EdgePosition, Cursor> { { EdgePosition.None, Cursors.Default }, { EdgePosition.Left, Cursors.SizeWE }, { EdgePosition.Right, Cursors.SizeWE }, { EdgePosition.Top, Cursors.SizeNS }, { EdgePosition.Bottom, Cursors.SizeNS }, } ; }
public override void RecreateFromXml( LayerEditor parentLayer, XElement xml ) { base.RecreateFromXml( parentLayer, xml ); ParentLayer = parentLayer ; _properties = xml.Element( @"RectangularHullProperties" ).DeserializedAs<RectangularHullProperties>( ) ; WhenUpdatedByUi( ); }
public override void CreateInDesignMode(LayerEditor parentLayer, IEntityCreationProperties creationProperties) { ParentLayer = parentLayer ; _properties = fromRectangle( Rectangle.Empty ) ; _properties.Position = MouseStatus.WorldPosition ; _properties.Visible = true ; _properties.Opacity = 1f ; _properties.Scale = Vector2.One ; _properties.Rotation = 0f ; summonMainForm( ).SetToolStripStatusLabel1(Resource1.Rectangle_Entered); WhenUpdatedByUi(); }