protected virtual void OnDisplayTypeChanged(object sender, DisplayType oldDisplayType, DisplayType newDisplayType) { switch (newDisplayType) { case DisplayType.Login: BizContext.CloseConnection(); lockScreen.Dispatcher.BeginInvoke((Func <int>) delegate() { lockScreen.FocusPassword(); return(0); }); break; case DisplayType.ChangePassword: BizContext.CloseConnection(); this.changePassword.Dispatcher.BeginInvoke((Func <int>) delegate() { changePassword.FocusPassword(); return(0); }); break; } }
private void UnloadData() { BizContext.CloseConnection(); RefreshData(); }