Пример #1
0
 void connection_LoginStatusChanged(ConnectionManager conn, ConnectionEvents e)
 {
     if (e.Status == CCMSStatuses.LOGGED_IN)
     {
         btnLogin.Text = "Logout";
     }
     else if (e.Status == CCMSStatuses.LOGGED_OUT)
     {
         btnLogin.Text = "Login";
     }
 }
 /*
  * Change the connection status and trigger the changed event.
  */
 private void SetStatus(CCMSStatuses status)
 {
     Status = status;
     if (LoginStatusChanged != null)
     {
         ConnectionEvents conn = new ConnectionEvents();
         conn.Status = status;
         LoginStatusChanged(this, conn);
     }
 }