BMXNET 4.0 Developer API

The Context type exposes the following events.

Events

 Public

 Protected
 Instance

 Static
 Declared

 Inherited
 XNA Framework Only

 .NET Compact Framework Only

 MemberDescription
Changed
The most important aspect of the Context interface is the Changed event that allows the receiver of the event know when the user is changing patient and visit. Applications need to change the data displayed to represent the currnet Patient and optional visit. The Changed event occurs after there is confirmation that the change has not been vetoed or the veto has been overridden. See Changing event.
Changing
When the current patient or visit is being changed by the user, every subscriber to the Changing method has the option to "Veto" the event by Cancelling it:
Copy Code
            public void Startup()
             {
                 if (this.Context != null)
                 {
                     this.Context.Changed += new EventHandler<ContextChangedArgs>(Context_Changed);
                     this.Context.Changing += new EventHandler<ContextChangedArgs>(Context_Changing);
             }
             
             void Context_Changing(object sender, ContextChangingArgs e)
             {
                 e.Cancel = needToFinishSomethingElseBeforeChangingContext;                
             }
            
However, a Veto is like a U.S. presential Veto and that it can be overridden. The WinFramework or EHR can override any Veto so all components (even if they veto changes) must be prepared to have the context changed at anytime.

See Also