CircuitBoard vBoard = this;
// Find the desired circuit shape
CircuitShape vShape = vBoard.GetComponent(vId);
在上面的陈述中,是在一定的时间内vBoard
抛出。null
任何的想法?
请帮忙。
先感谢您....
更多代码..这是一个公共功能
class CircuitBoard :Canvas
{
public void Move(string iBoardId, string iCircuitShapeId, double iXCordinate, double iYCordinate)
{
CircuitBoard vBoard = this;
// secutity check..
if (null != vBoard)
{
string vId = PCBFactory.GetUniqueTag(iCircuitShapeId, vBoard);
// Find the desired circuit shape
CircuitShape vShape = vBoard.GetComponent(vId);
if (vShape != null)
{
// do something...
}
}
}
}