protected override void OnViewLoaded(object view)
        {
            base.OnViewLoaded(view);

            var window = (view as FrameworkElement).GetWindow();

            _inputBindings = new InputBindings(window);
            _inputBindings.RegisterCommands(GetInputBindingCommands());
        }
示例#2
0
        protected override void OnViewLoaded(object view)
        {
            base.OnViewLoaded(view);
            // load the saved window positions
            _window = view as Window;
            if (_window != null)
            {
                _window.Closing += WindowClosing;
                // SetPlacement will adjust the position if it's outside of the visible boundaries
                _window.SetPlacement(Options.WindowPosition);
                _notifyIcon = new NotifyIcon(_window, _eventAggregator);
                if (_host.DebugLogging)
                {
                    ShowLoggingEnabledNotification();
                }

                //Application.Current.LoadRibbonTheme();
                _inputBindings = new InputBindings(_window);
            }

            _inputBindings.RegisterCommands(GetInputBindingCommands());
            _eventAggregator.PublishOnBackgroundThread(new LoadQueryHistoryAsyncEvent());
        }
示例#3
0
        protected override void OnViewLoaded(object view)
        {
            base.OnViewLoaded(view);
            // load the saved window positions
            _window          = view as Window;
            _window.Closing += windowClosing;
            // SetPlacement will adjust the position if it's outside of the visible boundaries
            //_window.SetPlacement(Properties.Settings.Default.MainWindowPlacement);
            _window.SetPlacement(Options.WindowPosition);
            notifyIcon = new NotifyIcon(_window, _eventAggregator);
            if (_host.DebugLogging)
            {
                ShowLoggingEnabledNotification();
            }

            //Application.Current.LoadRibbonTheme();
            _inputBindings = new InputBindings(_window);
            _inputBindings.RegisterCommands(GetInputBindingCommands());
        }
示例#4
0
 public void ResetInputBindings()
 {
     _inputBindings.DeregisterCommands();
     _inputBindings.RegisterCommands(GetInputBindingCommands());
 }
示例#5
0
 public void InitializeGestures()
 {
     InputBindings.RegisterCommands(GetActionBindings(), this.GetHashCode());
 }