Smuxi.Frontend.Gnome.ChatViewManager.RemoveChat C# (CSharp) Method

RemoveChat() public method

public RemoveChat ( Smuxi.Engine.ChatModel chat ) : void
chat Smuxi.Engine.ChatModel
return void
        public override void RemoveChat(ChatModel chat)
        {
            ChatView chatView = GetChat(chat);
            if (chatView == null) {
             #if LOG4NET
                f_Logger.Warn("RemoveChat(): chatView is null!");
            #endif
                return;
            }

            f_Notebook.RemovePage(f_Notebook.PageNum(chatView));
            TreeView.Remove(chatView);
            f_Chats.Remove(chatView);
            SyncManager.Remove(chat);

            if (ChatRemoved != null) {
                ChatRemoved(this, new ChatViewManagerChatRemovedEventArgs(chatView));
            }

            chatView.Dispose();
        }

Usage Example

コード例 #1
0
ファイル: GnomeUI.cs プロジェクト: shubhtr/smuxi
        public void RemoveChat(ChatModel chat)
        {
            TraceRemotingCall(chat);

            MethodBase mb = Trace.GetMethodBase();

            Gtk.Application.Invoke(delegate {
                TraceRemotingCall(mb, chat);

                try {
                    _ChatViewManager.RemoveChat(chat);
                } catch (Exception ex) {
                    Frontend.ShowException(ex);
                }
            });
        }