Vetoable work item Terminating event

Topics: CAB & Smart Client Software Factory
Jun 29, 2006 at 10:43 AM
originally posted by: AndrePiwoni

It would be good to have a CancelEventHandler for Terminating event to prompt for saving work item (data in views etc.) or cancelling termination. Since caller of Terminate() does not really know a reason why termination was cancelled (probably shouldn't) it should at least have a way to signal that Termination cannot be cancelled.
For a lack of better way something like WorkItem.Terminate(bool isVetoable) would do.

Activating and Deactivating events currently have CancelEventHandler for cancelling Activate/Deactivate, though buggy as reported, this functionality is extremely useful.


Andre Piwoni
Jul 6, 2006 at 11:55 PM
originally posted by: juemue

Hi, Andre.

I've started a new approach to solve this problem by replacing the
IControlActivationService for my WorkItems. This works fine: now, a workitem
can cancel it's deactivation and the activation of another WorItem.
Still one problem: when deactivation is canceled (e.g. by prompting a MessageBox
and the user selects 'Cancel') the Focus is assigned to the clicked control and not
to the SmartPart of the WorkItem which cancelled its deactivation.
Any idea how to solve this? Just assigning the Focus back will crash the app (I think
because all action take place in the OnEntered event of the control)


Oct 11, 2006 at 7:33 AM
originally posted by: PauloMorgado

I totaly agree with you. Sometimes makes sense to be able to cancel a work item termination.
Oct 29, 2006 at 5:04 AM
originally posted by: juemue

Hi, Andre.

I haven't found a solution for this problem so far.
Do you have any news or another solution?