Пример #1
0
        protected override void OnFormClosing(FormClosingEventArgs e)
        {
            tmrCdlRatios.Stop();

            LabelManager.OnLabelUpdated          -= LabelManager_OnLabelUpdated;
            BreakpointManager.BreakpointsChanged -= BreakpointManager_BreakpointsChanged;
            ctrlConsoleStatus.OnStateChanged     -= ctrlConsoleStatus_OnStateChanged;
            ctrlProfiler.OnFunctionSelected      -= ctrlProfiler_OnFunctionSelected;

            if (_notifListener != null)
            {
                _notifListener.Dispose();
                _notifListener = null;
            }

            InteropEmu.DebugSetFlags(0);
            InteropEmu.SetFlag(EmulationFlags.DebuggerWindowEnabled, false);
            InteropEmu.DebugSetBreakpoints(new InteropBreakpoint[0], 0);
            InteropEmu.DebugRun();

            ConfigManager.Config.DebugInfo.WindowWidth    = this.WindowState == FormWindowState.Maximized ? this.RestoreBounds.Width : this.Width;
            ConfigManager.Config.DebugInfo.WindowHeight   = this.WindowState == FormWindowState.Maximized ? this.RestoreBounds.Height : this.Height;
            ConfigManager.Config.DebugInfo.TopPanelHeight = this.splitContainer.GetSplitterDistance();
            ConfigManager.Config.DebugInfo.LeftPanelWidth = this.ctrlSplitContainerTop.GetSplitterDistance();
            ConfigManager.ApplyChanges();

            DebugWorkspaceManager.SaveWorkspace();
        }
        protected override void OnFormClosed(FormClosedEventArgs e)
        {
            base.OnFormClosed(e);

            if (_notifListener != null)
            {
                _notifListener.Dispose();
                _notifListener = null;
            }
        }
Пример #3
0
        protected override void OnFormClosing(FormClosingEventArgs e)
        {
            base.OnFormClosing(e);

            this._notifListener.OnNotification -= this._notifListener_OnNotification;
            _notifListener?.Dispose();
            _refreshManager?.Dispose();

            _binder.UpdateObject();
            _config.EventViewerAutoRefresh      = _refreshManager.AutoRefresh;
            _config.EventViewerAutoRefreshSpeed = _refreshManager.AutoRefreshSpeed;
            _config.EventViewerLocation         = this.WindowState != FormWindowState.Normal ? this.RestoreBounds.Location : this.Location;
            _config.EventViewerSize             = this.WindowState != FormWindowState.Normal ? this.RestoreBounds.Size : this.Size;
            ConfigManager.Config.DebugInfo      = _config;
            ConfigManager.ApplyChanges();
        }
Пример #4
0
 protected override void OnHandleDestroyed(EventArgs e)
 {
     base.OnHandleDestroyed(e);
     _notifListener?.Dispose();
 }