public void FireKwsSmNotif(KwsSmNotifEventArgs notif) { try { if (OnKwsSmNotif != null) OnKwsSmNotif(this, notif); } catch (Exception ex) { // We cannot handle failures in immediate notifications. Base.HandleException(ex, true); } }
/// <summary> /// Handle an immediate notification received from the workspace state /// machine. /// </summary> public virtual void HandleImmediateNotification(Object sender, KwsSmNotifEventArgs evt) { if (m_doneFlag) return; KwsSmNotif type = evt.Type; if (type == KwsSmNotif.Connected) HandleKasConnected(); else if (type == KwsSmNotif.Disconnecting) HandleKasDisconnecting(evt.Ex); else if (type == KwsSmNotif.Login) HandleKwsLoginSuccess(); else if (type == KwsSmNotif.Logout) HandleKwsLogOut(evt.Ex); else if (type == KwsSmNotif.TaskSwitch) HandleTaskSwitch(evt.Task); else if (type == KwsSmNotif.AppFailure) HandleAppFailure(evt.Ex); }