原因是初始化的时候构造器不能有参数,但是各个usercontrol之间需要传参,使用interface,使用一个带参数的构造器,在.design里面加参数。但是这时候设计会出错没法正常显示,打开运行是正常的
this.divider_QSPI = new AmebaPinmuxTool.Divider();
this.divider_PERI = new AmebaPinmuxTool.Divider();
this.divider_KM4 = new AmebaPinmuxTool.Divider();
this.divider_PSRAM = new AmebaPinmuxTool.Divider();
this.divider_KM0 = new AmebaPinmuxTool.Divider();
this.divider_SPIC = new AmebaPinmuxTool.Divider();
this.divider_SRAM = new AmebaPinmuxTool.Divider(this);
this.divider_QSPI = new AmebaPinmuxTool.Divider(this);
this.divider_PERI = new AmebaPinmuxTool.Divider(this);
this.divider_KM4 = new AmebaPinmuxTool.Divider(this);
this.divider_PSRAM = new AmebaPinmuxTool.Divider(this);
this.divider_KM0 = new AmebaPinmuxTool.Divider(this);
this.divider_SPIC = new AmebaPinmuxTool.Divider(this);
public Divider()
{
InitializeComponent();
}
public Divider(DplusClockInterface dplusClockInterface)
{
InitializeComponent();
mDplusClockInterface = dplusClockInterface;
}