How could I create a custome Shape class


Author
Message
Hamdy Ghanem
Hamdy Ghanem
Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)
Group: Forum Members
Posts: 7, Visits: 1
I want to add more property for every shape
So I tried to create a cusom class that inherited from Nshape
but I failed because the Nshape has no new construction and is created by factory
How could I implement this functionality
Reply
Tezcan Cirakoglu
Tezcan Cirakoglu
Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)
Group: Forum Members
Posts: 5, Visits: 1
What if you use something like below?






public class NFaiencePolygonShape: NPolygonShape
{
#region CTors

public NFaiencePolygonShape() { }

public NFaiencePolygonShape(NPointF[] points): base(points)
{

}

public NFaiencePolygonShape(NPolygonPath primitive): base(primitive)
{

}

#endregion

#region Properties

private string _Key = Guid.NewGuid().ToString();
public string Key { get { return _Key; } }

public int XPFaienceId { get; set; }
public FaienceDisplayMode FaienceDisplayMode { get; set; }
public bool AutoDecorate { get; set; }
public float DerzWidth { get; set; }
public float OffsetX { get; set; }
public float OffsetY { get; set; }
public float RotationAngle { get; set; }

public Color DerzColor { get; set; }
public float Tracker { get; set; }
public int TamFayansCount { get; set; }
public int BrokenFayansCount { get; set; }

#endregion
}
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...





Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search