winform 订阅事件,关闭后要移除,避免引用
ITempFrmDeleagte sendtempfrm = tableForm as ITempFrmDeleagte;
if (sendtempfrm != null)
{
sendtempfrm.OpenModifyFrm += mainDialog.sendtempfrm_OpenModifyFrm;
sendtempfrm.OpenPrintFrm += mainDialog.sendtempfrm_OpenPrintFrm;
tableForm.Disposed += delegate
{
sendtempfrm.OpenModifyFrm -= mainDialog.sendtempfrm_OpenModifyFrm;
sendtempfrm.OpenPrintFrm -= mainDialog.sendtempfrm_OpenPrintFrm;
};
}

浙公网安备 33010602011771号