private void OpenLocalQueue(RecentQueueConnection rqc = null)
        {
            if (rqc != null)
            {
                bool automaticOpenOk = false;
                ShellService.WithGlobalBusy(() =>
                {
                    var q = MqController.TryOpenQueue(rqc);
                    if (q != null)
                    {
                        OpenQueueView(q);
                        UserSettings.AddRecentConnection(rqc);
                        automaticOpenOk = true;
                    }
                });
                if (automaticOpenOk)
                {
                    return;
                }
            }

            SelectQueueInternal(null, rqc, q =>
            {
                if (q != null)
                {
                    AddRecentConnection(q, rqc);
                    OpenQueueView(q);
                }
            });
        }
        private void OpenRemoteQueueManager(RecentRemoteQueueManagerConnection rrqmc = null)
        {
            if (rrqmc != null)
            {
                bool automaticOpenOk = false;
                ShellService.WithGlobalBusy(() =>
                {
                    var qm = MqController.TryOpenRemoteQueueManager(rrqmc);
                    if (qm != null)
                    {
                        IObjectNameFilter filter = null;
                        if (rrqmc.QueueList != null && rrqmc.QueueList.Count > 0)
                        {
                            filter = new StaticQueueList(rrqmc.QueueList.ToArray());
                        }
                        else
                        {
                            filter = qm.NewObjectNameFilter(rrqmc.ObjectNamePrefix);
                        }
                        var provider = qm.NewObjectProvider(filter);
                        OpenQueueManagerView(qm, provider);
                        UserSettings.AddRecentConnection(rrqmc);
                        automaticOpenOk = true;
                    }
                });
                if (automaticOpenOk)
                {
                    return;
                }
            }

            SelectQueueManagerInternal(true, true, rrqmc, (qm, qpfx) =>
            {
                if (qm != null)
                {
                    AddRecentConnection(qm, qpfx, rrqmc);
                    var provider = qm.NewObjectProvider(qpfx);
                    OpenQueueManagerView(qm, provider);
                }
            });
        }
        private void OpenRemoteQueue(RecentRemoteQueueConnection rrqc = null)
        {
            if (rrqc != null)
            {
                bool automaticOpenOk = false;
                ShellService.WithGlobalBusy(() =>
                {
                    var q = MqController.TryOpenRemoteQueue(rrqc);
                    if (q != null)
                    {
                        OpenQueueView(q);
                        UserSettings.AddRecentConnection(rrqc);
                        automaticOpenOk = true;
                    }
                });
                if (automaticOpenOk)
                {
                    return;
                }
            }

            SelectQueueManagerInternal(true, false, rrqc, (qm, qpfx) =>
            {
                if (qm != null)
                {
                    SelectQueueInternal(qm, rrqc, q =>
                    {
                        if (q != null)
                        {
                            AddRecentConnection(q, rrqc);
                            OpenQueueView(q);
                        }
                    });
                }
            });
        }