5
我有這樣的事情:在基類中激活未觸發?
public class WinformBase : Winform
{
public WinformBase(){
this.Activated += new System.EventHandler(this.MyTest1_Activated);
}
private void MyTest1_Activated(object sender, EventArgs e)
{
MyController.TopFormActivated(this);
}
}
public class MyForm : WinformBase
{
public MyForm(){
this.Activated += new System.EventHandler(this.MyTest2_Activated);
}
private void MyTest2_Activated(object sender, EventArgs e)
{
MyController.TopFormActivated(this);
}
}
的問題是,該事件在MyForm的,而不是在WinForm的基礎,才觸發?
這是爲什麼,我怎樣才能在WinformBase
觸發事件呢?