Пример #1
0
        void ShowVisualFeedback()
        {
            if (_feedbackWindow == null)
            {
                _feedbackWindow = new SnoopabilityFeedbackWindow();

                // we don't have to worry about not having an application or not having a main window,
                // for, we are still in Snoop's process and not in the injected process.
                // so, go ahead and grab the Application.Current.MainWindow.
                _feedbackWindow.Owner = Application.Current.MainWindow;
            }

            if (!_feedbackWindow.IsVisible)
            {
                _feedbackWindow.SnoopTargetName = _windowUnderCursor.Description;

                UpdateFeedbackWindowPosition();
                _feedbackWindow.Show();

                if (_feedbackWindowHandle == IntPtr.Zero)
                {
                    var wih = new WindowInteropHelper(_feedbackWindow);
                    _feedbackWindowHandle = wih.Handle;
                }
            }
        }
Пример #2
0
        private void ShowVisualFeedback()
        {
            if (this._feedbackWindow == null)
            {
                this._feedbackWindow = new SnoopabilityFeedbackWindow();
                this._feedbackWindow.PreviewKeyDown += this._feedbackWindow_PreviewKeyDown;
                // we don't have to worry about not having an application or not having a main window,
                // for, we are still in Snoop's process and not in the injected process.
                // so, go ahead and grab the Application.Current.MainWindow.
                this._feedbackWindow.Owner = Application.Current.MainWindow;
            }

            if (!this._feedbackWindow.IsVisible)
            {
                this._feedbackWindow.DataContext = this._windowUnderCursor;

                this.UpdateFeedbackWindowPosition();
                this._feedbackWindow.Show();

                if (this._feedbackWindowHandle == IntPtr.Zero)
                {
                    var wih = new WindowInteropHelper(this._feedbackWindow);
                    this._feedbackWindowHandle = wih.Handle;
                }
            }
        }
Пример #3
0
        private void ShowVisualFeedback()
        {
            if (_feedbackWindow == null)
            {
                _feedbackWindow = new SnoopabilityFeedbackWindow();

                // we don't have to worry about not having an application or not having a main window,
                // for, we are still in Snoop's process and not in the injected process.
                // so, go ahead and grab the Application.Current.MainWindow.
                _feedbackWindow.Owner = Application.Current.MainWindow;
            }

            if (!_feedbackWindow.IsVisible)
            {
                _feedbackWindow.SnoopTargetName = _windowUnderCursor.Description;

                UpdateFeedbackWindowPosition();
                _feedbackWindow.Show();

                if (_feedbackWindowHandle == IntPtr.Zero)
                {
                    var wih = new WindowInteropHelper(_feedbackWindow);
                    _feedbackWindowHandle = wih.Handle;
                }
            }
        }