Пример #1
0
 public void RemoveChat(ChatModel chat)
 {
     lock (_SyncedChats) {
         _SyncedChats.Remove(chat);
     }
     f_TaskQueue.Queue(delegate {
         _UI.RemoveChat(chat);
     });
 }
Пример #2
0
        public void RemoveChat(ChatModel chat)
        {
            lock (_SyncedChats) {
                _SyncedChats.Remove(chat);
            }

            // switch to next protocol manager if the current one was closed
            if (chat is ProtocolChatModel &&
                chat.ProtocolManager == CurrentProtocolManager)
            {
                NextProtocolManager();
            }

            f_TaskQueue.Queue(delegate {
                _UI.RemoveChat(chat);
            });
        }