public WireView(WireConnection connection) { InitializeComponent(); InitLine(); this.connection = connection; }
public void SetConnection(WireConnection con) { connection = con; XLine.X1 = con.StartPoint.X; XLine.Y1 = con.StartPoint.Y; XLine.X2 = con.EndPoint.X; XLine.Y2 = con.EndPoint.Y; //must be called to update coordinates immediately UpdateLayout(); }