Ejemplo n.º 1
0
 private void OpenUserListForm()
 {
    if (this.InvokeRequired)
    {
       this.Invoke(new NoParamDelegate(OpenUserListForm));
    }
    else
    {
       // Open a UserListWindow if one is not already opened.
       if (m_userListForm == null)
       {
          m_userListForm = new UserListForm(m_controller);
          m_userListForm.Closed += new EventHandler(userListWindowClosed);
          UserListFormUpdate();
          m_userListForm.Show(this);
       }
    }
 }
Ejemplo n.º 2
0
 private void userListWindowClosed(object sender, EventArgs e)
 {
    // The window is closed, null the reference to it.
    m_userListForm = null;
 }
Ejemplo n.º 3
0
      private void disconnected(object sender, EventArgs e)
      {
         // Disconnect from the server with the given reason.
         m_controller.Disconnect("User Quit.");

         // Clear the window title.
         SetWindowTitle(null);

         // Close and dispose the user list window.
         if (m_userListForm != null)
         {
            m_userListForm.Close();
            m_userListForm = null;
         }

         // Disable the "Disconnect" menu option since no longer connected.
         m_disconnectMenu.Enabled = false;
      }