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;
};
}