Beispiel #1
0
        protected override void OnLoad(EventArgs e)
        {
            base.OnLoad(e);

            if (!this.DesignMode)
            {
                InitShortcuts();

                EventViewerConfig config = ConfigManager.Config.Debug.EventViewer;
                RestoreLocation(config.WindowLocation, config.WindowSize);

                mnuRefreshOnBreakPause.Checked = ConfigManager.Config.Debug.EventViewer.RefreshOnBreakPause;
                ctrlPpuView.ImageScale         = config.ImageScale;

                _notifListener = new NotificationListener();
                _notifListener.OnNotification += OnNotificationReceived;

                _refreshManager                      = new WindowRefreshManager(this);
                _refreshManager.AutoRefresh          = config.AutoRefresh;
                _refreshManager.AutoRefreshSpeed     = config.AutoRefreshSpeed;
                mnuAutoRefresh.Checked               = config.AutoRefresh;
                mnuAutoRefreshLow.Click             += (s, evt) => _refreshManager.AutoRefreshSpeed = RefreshSpeed.Low;
                mnuAutoRefreshNormal.Click          += (s, evt) => _refreshManager.AutoRefreshSpeed = RefreshSpeed.Normal;
                mnuAutoRefreshHigh.Click            += (s, evt) => _refreshManager.AutoRefreshSpeed = RefreshSpeed.High;
                mnuAutoRefreshSpeed.DropDownOpening += (s, evt) => UpdateRefreshSpeedMenu();

                ctrlFilters.Init();

                RefreshData();
                RefreshViewer();
            }
        }
Beispiel #2
0
        protected override void OnFormClosed(FormClosedEventArgs e)
        {
            base.OnFormClosed(e);
            _notifListener?.Dispose();

            EventViewerConfig config = ConfigManager.Config.Debug.EventViewer;

            config.WindowSize     = this.WindowState != FormWindowState.Normal ? this.RestoreBounds.Size : this.Size;
            config.WindowLocation = this.WindowState != FormWindowState.Normal ? this.RestoreBounds.Location : this.Location;
            config.ImageScale     = ctrlPpuView.ImageScale;
        }
Beispiel #3
0
        protected override void OnLoad(EventArgs e)
        {
            base.OnLoad(e);

            if (!this.DesignMode)
            {
                InitShortcuts();

                EventViewerConfig config = ConfigManager.Config.Debug.EventViewer;
                if (!config.WindowSize.IsEmpty)
                {
                    this.StartPosition = FormStartPosition.Manual;
                    this.Size          = config.WindowSize;
                    this.Location      = config.WindowLocation;
                }

                mnuRefreshOnBreakPause.Checked = ConfigManager.Config.Debug.EventViewer.RefreshOnBreakPause;
                ctrlPpuView.ImageScale         = config.ImageScale;

                _notifListener = new NotificationListener();
                _notifListener.OnNotification += OnNotificationReceived;
            }
        }