Exemple #1
0
      /// <summary>
      /// Method called to initiate a disconnect.
      /// </summary>
      internal void DisconnectedByServer()
      {
         if (m_dispatcher.CheckAccess() == false)
         {
            m_dispatcher.Invoke(new NoParamDelegate(DisconnectedByServer));
         }
         else
         {
            // Update the Chat window state.
            m_chatWindow.Disconnected(false);

            // Close and dispose the user list window.
            if (m_userListWindow != null)
            {
               m_userListWindow.Close();
               m_userListWindow = null;
            }
         }
      }
Exemple #2
0
 private void userListWindowClosed(object sender, EventArgs e)
 {
    // The window is closed, null the reference to it.
    m_userListWindow = null;
 }
Exemple #3
0
      /// <summary>
      /// Method called to initiate a disconnect.
      /// </summary>
      internal void DisconnectedByUser()
      {
         // Disconnect from the server with the given reason.
         m_backgroundActions.Add(() => m_controller.Disconnect("User Quit."));

         // Update the Chat window state.
         m_chatWindow.Disconnected(true);

         // Close and dispose the user list window.
         if (m_userListWindow != null)
         {
            m_userListWindow.Close();
            m_userListWindow = null;
         }
      }
Exemple #4
0
      internal void ShowUserListWindow()
      {
         if (m_dispatcher.CheckAccess() == false)
         {
            m_dispatcher.Invoke(new NoParamDelegate(ShowUserListWindow));
         }
         else
         {
            // Open a UserListWindow if one is not already opened.
            if (m_userListWindow == null)
            {
               m_userListWindow = new UserListWindow(m_chatWindow, m_controller);
               m_userListWindow.Closed += new EventHandler(userListWindowClosed);
               m_userListWindow.RefreshUserList();
               m_userListWindow.Show();
            }

            // Activate and focus the window.
            m_userListWindow.Activate();
            m_userListWindow.Focus();
         }
      }