G
Guest
Hello,
I have a DLL Project with some user-controls which implements a Interface
(Exit), this is used to warn the user if any changes done when trying to
close the user-control.
the interface is defined in the DLL project it self, but
the when the 'Cancel' buton is pressed from the user-controls of DLL, I
raise a event to mother project which handles the closing of the user
control,
How can type cast the Interface here?
// MDI FORM.
// tempcontrol is a user control of DLL project.
//iFormExit is defined in DLL project
Internal void OnCancelUserControl(object sender,
CancelDevicePropertyPageEventArgs e)
{
UserControl tempControl = (UserControl)sender;
bool result = (iFormExit)tempControl).IsExitSave();
}
how can I make this work?
Thanks,
I have a DLL Project with some user-controls which implements a Interface
(Exit), this is used to warn the user if any changes done when trying to
close the user-control.
the interface is defined in the DLL project it self, but
the when the 'Cancel' buton is pressed from the user-controls of DLL, I
raise a event to mother project which handles the closing of the user
control,
How can type cast the Interface here?
// MDI FORM.
// tempcontrol is a user control of DLL project.
//iFormExit is defined in DLL project
Internal void OnCancelUserControl(object sender,
CancelDevicePropertyPageEventArgs e)
{
UserControl tempControl = (UserControl)sender;
bool result = (iFormExit)tempControl).IsExitSave();
}
how can I make this work?
Thanks,