Exemplo n.º 1
0
        private void mc_JumpTab(CtxmCode code, bool reserveOnly = false, bool onReserveOnly = false)
        {
            if (listView_result.SelectedItem != null)
            {
                SearchItem item = lstCtrl.SelectSingleItem();

                reserveOnly |= onReserveOnly;
                if (reserveOnly && item.IsReserved == false)
                {
                    return;
                }
                if (onReserveOnly && item.ReserveInfo.IsEnabled == false)
                {
                    return;
                }

                if (mainWindow.IsVisible == false || mainWindow.WindowState == WindowState.Minimized)
                {
                    mainWindow.RestoreMinimizedWindow();
                }

                mainWindow.Dispatcher.BeginInvoke(new Action(() =>
                {
                    SetHideSearchWindow(this);
                    SearchWindow.MinimizeWindows();

                    BlackoutWindow.SelectedItem = item;
                    mainWindow.moveTo_tabItem(code);
                }));
            }
        }