Esempio n. 1
0
        public void OpenFindGroupChatWindow(string searchKey)
        {
            var chatView = Notebook.CurrentChatView;

            if (chatView == null)
            {
                return;
            }

            // FIXME: REMOTING CALL
            var manager = chatView.ChatModel.ProtocolManager;

            if (manager == null)
            {
                return;
            }

            FindGroupChatDialog dialog = new FindGroupChatDialog(
                this, manager
                );

            if (!String.IsNullOrEmpty(searchKey))
            {
                dialog.NameEntry.Text = searchKey;
                dialog.FindButton.Click();
            }
            int            res       = dialog.Run();
            GroupChatModel groupChat = dialog.GroupChat;

            dialog.Destroy();
            if (res != (int)Gtk.ResponseType.Ok)
            {
                return;
            }

            ThreadPool.QueueUserWorkItem(delegate {
                try {
                    manager.OpenChat(Frontend.FrontendManager, groupChat);
                } catch (Exception ex) {
                    Frontend.ShowException(this, ex);
                }
            });
        }
Esempio n. 2
0
        public static void OpenFindGroupChatWindow(string searchKey)
        {
            var chatView = MainWindow.ChatViewManager.CurrentChatView;

            if (chatView == null)
            {
                return;
            }

            var manager = chatView.ProtocolManager;

            if (manager == null)
            {
                return;
            }

            var dialog = new FindGroupChatDialog(
                MainWindow, manager
                );

            if (!String.IsNullOrEmpty(searchKey))
            {
                dialog.NameEntry.Text = searchKey;
                dialog.FindButton.Click();
            }
            var res       = dialog.Run();
            var groupChat = dialog.GroupChat;

            dialog.Destroy();
            if (res != (int)Gtk.ResponseType.Ok)
            {
                return;
            }

            ThreadPool.QueueUserWorkItem(delegate {
                try {
                    manager.OpenChat(Frontend.FrontendManager, groupChat);
                } catch (Exception ex) {
                    Frontend.ShowException(null, ex);
                }
            });
        }
Esempio n. 3
0
        public static void OpenFindGroupChatWindow(string searchKey)
        {
            var chatView = MainWindow.ChatViewManager.CurrentChatView;
            if (chatView == null) {
                return;
            }

            var manager = chatView.ProtocolManager;
            if (manager == null) {
                return;
            }

            var dialog = new FindGroupChatDialog(
                MainWindow, manager
            );
            if (!String.IsNullOrEmpty(searchKey)) {
                dialog.NameEntry.Text = searchKey;
                dialog.FindButton.Click();
            }
            var res = dialog.Run();
            var groupChat = dialog.GroupChat;
            dialog.Destroy();
            if (res != (int) Gtk.ResponseType.Ok) {
                return;
            }

            ThreadPool.QueueUserWorkItem(delegate {
                try {
                    manager.OpenChat(Frontend.FrontendManager, groupChat);
                } catch (Exception ex) {
                    Frontend.ShowException(null, ex);
                }
            });
        }
Esempio n. 4
0
        protected virtual void OnChatFindGroupChatButtonClicked(object sender, EventArgs e)
        {
            Trace.Call(sender, e);

            try {
                var chatView = Notebook.CurrentChatView;
                if (chatView == null) {
                    return;
                }

                var manager = chatView.ChatModel.ProtocolManager;
                if (manager == null) {
                    return;
                }

                FindGroupChatDialog dialog = new FindGroupChatDialog(
                    this, manager
                );
                int res = dialog.Run();
                GroupChatModel groupChat = dialog.GroupChat;
                dialog.Destroy();
                if (res != (int) Gtk.ResponseType.Ok) {
                    return;
                }

                manager.OpenChat(Frontend.FrontendManager, groupChat);
            } catch (Exception ex) {
                Frontend.ShowException(this, ex);
            }
        }
Esempio n. 5
0
        public void OpenFindGroupChatWindow()
        {
            var chatView = Notebook.CurrentChatView;
            if (chatView == null) {
                return;
            }

            // FIXME: REMOTING CALL
            var manager = chatView.ChatModel.ProtocolManager;
            if (manager == null) {
                return;
            }

            FindGroupChatDialog dialog = new FindGroupChatDialog(
                this, manager
            );
            int res = dialog.Run();
            GroupChatModel groupChat = dialog.GroupChat;
            dialog.Destroy();
            if (res != (int) Gtk.ResponseType.Ok) {
                return;
            }

            ThreadPool.QueueUserWorkItem(delegate {
                try {
                    manager.OpenChat(Frontend.FrontendManager, groupChat);
                } catch (Exception ex) {
                    Frontend.ShowException(this, ex);
                }
            });
        }