Esempio n. 1
0
        public DebuggerViewModel(Console console)
        {
            _enableDebugger        = true;
            _console               = console;
            _console.OnBreakpoint += OnBreakpoint;
            _mmuByteProvider       = new MmuByteProvider(_console.Mmu);

            Steps                   = 1;
            Breakpoints             = new ObservableCollection <ushort>();
            StepCommand             = new ActionCommand(Step);
            AddBreakpointCommand    = new ActionCommand(AddBreakpoint);
            RemoveBreakpointCommand = new ActionCommand(RemoveBreakpoint);
            Refresh();
        }
        public DebuggerViewModel(Console console)
        {
            _enableDebugger = true;
            _console = console;
            _console.OnBreakpoint += OnBreakpoint;
            _mmuByteProvider = new MmuByteProvider(_console.Mmu);

            Steps = 1;
            Breakpoints = new ObservableCollection<ushort>();
            StepCommand = new ActionCommand(Step);
            AddBreakpointCommand = new ActionCommand(AddBreakpoint);
            RemoveBreakpointCommand = new ActionCommand(RemoveBreakpoint);
            Refresh();
        }
        public DebuggerView(MmuByteProvider mmuByteProvider)
        {
            _hexBox = new HexBox
            {
                ReadOnly = false,
                AllowDrop = false,
                LineInfoVisible = true,
                ColumnInfoVisible = true,
                UseFixedBytesPerLine = true,
                VScrollBarVisible = true,
                BytesPerLine = 16,
                HexCasing = HexCasing.Lower,
                ByteCharConverter = new DefaultByteCharConverter(),
                Font = new Font(
                    System.Drawing.SystemFonts.MessageBoxFont.FontFamily,
                    System.Drawing.SystemFonts.MessageBoxFont.Size,
                    System.Drawing.SystemFonts.MessageBoxFont.Style),
                ByteProvider = mmuByteProvider
            };

            InitializeComponent();
        }