Esempio n. 1
0
        private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e)
        {
            try
            {
                KbHook.Unhook();

                if (_lastSearchWindow != null) _lastSearchWindow.Close();
                _lastSearchWindow = null;
            }
            catch (Exception)
            {

            }
        }
            public PerformSearchTask(GameSearchWindow gameSearchWin, SearchList searchList)
            {
                _gameSearchWindow = gameSearchWin;
                this.SearchList = searchList;

                this.SearchMode = HyperSearchSettings.Instance().General.SearchMode;
                MainWindow.LogStatic("SearchMode: {0}", HyperSearchSettings.Instance().General.SearchMode);
            }
Esempio n. 3
0
        private static void ShowGameSearchWindow(RECT? hsWinRect, HyperSearch.Windows.GameSearchWindow.SearchList searchList)
        {
            try
            {
                Windows.GameSearchWindow win;

                if (_lastSearchWindow != null && !_lastSearchWindow.IsLoaded || (_lastSearchList.HasValue && _lastSearchList != searchList))
                {
                    if (_lastSearchWindow != null && _lastSearchWindow.IsLoaded) _lastSearchWindow.Close();

                    _lastSearchWindow = null;
                }

                var settings = HyperSearchSettings.Instance().Input;

                if (settings.Minimize == null|| _lastSearchWindow == null)
                { // if no minimizeKey was configured we do not reuse the prev window
                    if (_lastSearchWindow != null)
                    {
                        if (_lastSearchWindow.IsLoaded) _lastSearchWindow.Close();

                        _lastSearchWindow = null;
                    }

                    win = new Windows.GameSearchWindow(searchList);
                }
                else
                {
                    win = _lastSearchWindow;
                }

                PositionWindowOnRect(win, hsWinRect.Value, 15);

                _lastSearchWindow = win;
                _lastSearchList = searchList;

                win.ShowSystemImagesOnFilter = HyperSearchSettings.Instance().Misc.ShowSystemImagesOnFilter;
                win.ShowSystemImagesOnResults = HyperSearchSettings.Instance().Misc.ShowSystemImagesOnResults;
                win.ShowWheelImagesOnResults = HyperSearchSettings.Instance().Misc.ShowWheelImagesOnResults;

                win.Show();
                win.Activate();
            }
            catch (Exception ex)
            {
                ErrorHandler.LogException(ex);
            }
        }