public MipsDebuggerViewModel(MachineViewModel machineVM)
            : base(machineVM)
        {
            m_Debugger = new MipsDebugger();
            Disassembly = new ObservableCollection<DisassembledInstruction>();

            WeakEventManager<MipsDebugger, EventArgs>.AddHandler(
            m_Debugger,
            "CodeScanned",
            (o, e) =>
            {
                Dispatcher.InvokeAsync(() =>
                {
                    Disassembly.Clear();

                    foreach (var l in m_Debugger.Disassembly)
                    {
                        Disassembly.Add(l);
                    }

                    Dispatcher.InvokeAsync(() =>
                    {
                        var e1 = Finished;

                        if (e1 != null)
                            e1(this, new EventArgs());

                    }, DispatcherPriority.Render);
                });
            });
        }
        public BreakpointsWindow()
        {
            InitializeComponent();

            MachineViewModel model = (MachineViewModel)FindResource("machineVM");
            m_Debugger = model.Cpu.Debugger.Debugger;

            WeakEventManager<MipsDebugger, PropertyChangedEventArgs>.AddHandler(m_Debugger, "PropertyChanged", MipsDebuggerPropertyChangedHandler);

            xaml_BreakpointListBox.ItemsSource = m_Debugger.Breakpoints;
        }
 public BreakpointToVisibilityConverter(MipsDebugger debugger)
 {
     m_Debugger = debugger;
 }