using System; using System.Collections.Generic; using System.Text; using System.ComponentModel; namespace IndianHealthService.BMXNet.Model { /// /// The argument to the ContextChanged method. This event has methods that allow you /// to detect which aspects of the context have changed and what the new context is. /// public class ContextChangedArgs:EventArgs { private bool _isVisitChange = false; /// /// Answer if the visit had changed. When the patient changes and a visit had been selected, the /// visit will change to null. /// /// /// In the following example, the first tab of a notebook is selected whenever the patient changes. /// /// void Context_Changed(object sender, ContextChangedArgs e) /// { /// if (e.IsPatientChange) /// { /// this.SelectedIndex = 1; /// this.RefreshAll(); /// } /// } /// /// public bool IsVisitChange { get { return _isVisitChange; } set { _isVisitChange = value; } } private bool _isPatientChange = false; /// /// Answer if the patient had changed. /// public bool IsPatientChange { get { return _isPatientChange; } set { _isPatientChange = value; } } private Context _afterContext = null; /// /// The current state of the context. This context object is that same instance used for the /// life of the LocalSession /// public Context AfterContext { get { return _afterContext; } set { _afterContext = value; } } } }