Beispiel #1
0
        public ctrlDebuggerCode()
        {
            InitializeComponent();
            _tooltipManager = new CodeTooltipManager(this, this.ctrlCodeViewer);

            bool designMode = (LicenseManager.UsageMode == LicenseUsageMode.Designtime);

            if (!designMode)
            {
                _codeViewerActions = new CodeViewerActions(this, false);

                ctrlFindOccurrences.Viewer     = this;
                splitContainer.Panel2Collapsed = true;
            }
        }
        public frmTraceLogger()
        {
            InitializeComponent();

            DebugInfo debugInfo = ConfigManager.Config.DebugInfo;

            if (!debugInfo.TraceLoggerSize.IsEmpty)
            {
                this.StartPosition = FormStartPosition.Manual;
                this.Size          = debugInfo.TraceLoggerSize;
                this.Location      = debugInfo.TraceLoggerLocation;
            }

            _tooltipManager = new CodeTooltipManager(this, txtTraceLog);

            txtTraceLog.BaseFont = new Font(debugInfo.TraceFontFamily, debugInfo.TraceFontSize, debugInfo.TraceFontStyle);
            txtTraceLog.TextZoom = debugInfo.TraceTextZoom;

            mnuAutoRefresh.Checked = debugInfo.TraceAutoRefresh;
            _lineCount             = debugInfo.TraceLineCount;

            _entityBinder.Entity = debugInfo.TraceLoggerOptions;
            _entityBinder.AddBinding("ShowByteCode", chkShowByteCode);
            _entityBinder.AddBinding("ShowCpuCycles", chkShowCpuCycles);
            _entityBinder.AddBinding("ShowEffectiveAddresses", chkShowEffectiveAddresses);
            _entityBinder.AddBinding("ShowMemoryValues", chkShowMemoryValues);
            _entityBinder.AddBinding("ShowExtraInfo", chkShowExtraInfo);
            _entityBinder.AddBinding("ShowPpuFrames", chkShowFrameCount);
            _entityBinder.AddBinding("ShowPpuCycles", chkShowPpuCycles);
            _entityBinder.AddBinding("ShowPpuScanline", chkShowPpuScanline);
            _entityBinder.AddBinding("ShowRegisters", chkShowRegisters);
            _entityBinder.AddBinding("IndentCode", chkIndentCode);
            _entityBinder.AddBinding("UseLabels", chkUseLabels);
            _entityBinder.AddBinding("ExtendZeroPage", chkExtendZeroPage);
            _entityBinder.AddBinding("UseWindowsEol", chkUseWindowsEol);
            _entityBinder.AddBinding("StatusFormat", cboStatusFlagFormat);
            _entityBinder.AddBinding("OverrideFormat", chkOverrideFormat);
            _entityBinder.UpdateUI();

            this.toolTip.SetToolTip(this.picExpressionWarning, "Condition contains invalid syntax or symbols.");
            this.toolTip.SetToolTip(this.picHelp, "When a condition is given, instructions will only be logged by the trace logger if the condition returns a value not equal to 0 or false." + Environment.NewLine + Environment.NewLine + frmBreakpoint.GetConditionTooltip(false));
            this.toolTip.SetToolTip(this.picFormatHelp,
                                    "You can customize the trace logger's output by enabling the 'Override' option and altering the format." + Environment.NewLine + Environment.NewLine +
                                    "The following tags are available: " + Environment.NewLine +
                                    "[ByteCode]: The byte code for the instruction (1 to 3 bytes)." + Environment.NewLine +
                                    "[Disassembly]: The disassembly for the current instruction." + Environment.NewLine +
                                    "[EffectiveAddress]: The effective address used for indirect addressing modes." + Environment.NewLine +
                                    "[MemoryValue]: The value stored at the memory location referred to by the instruction." + Environment.NewLine +
                                    "[PC]: Program Counter" + Environment.NewLine +
                                    "[A]: A register" + Environment.NewLine +
                                    "[X]: X register" + Environment.NewLine +
                                    "[Y]: Y register" + Environment.NewLine +
                                    "[SP]: Stack Pointer" + Environment.NewLine +
                                    "[P]: Processor Flags" + Environment.NewLine +
                                    "[Cycle]: The current PPU cycle." + Environment.NewLine +
                                    "[Scanline]: The current PPU scanline." + Environment.NewLine +
                                    "[FrameCount]: The current PPU frame." + Environment.NewLine +
                                    "[CycleCount]: The current CPU cycle (32-bit signed value, resets to 0 at power on)" + Environment.NewLine + Environment.NewLine +
                                    "You can also specify some options by using a comma. e.g:" + Environment.NewLine +
                                    "[Cycle,3] will display the cycle and pad out the output to always be 3 characters wide." + Environment.NewLine +
                                    "[Scanline,h] will display the scanline in hexadecimal." + Environment.NewLine +
                                    "[Align,50]: Align is a special tag that is useful when trying to align some content. [Align,50] will make the next tag start on column 50."
                                    );

            this._initialized = true;
        }
Beispiel #3
0
 public ctrlDebuggerCode()
 {
     InitializeComponent();
     _tooltipManager = new CodeTooltipManager(this, this.ctrlCodeViewer);
 }