예제 #1
0
        private void Click_item(object sender, RoutedEventArgs e)
        {
            Button      b    = sender as Button;
            WatchObject data = b.DataContext as WatchObject;

            editStackPanel.DataContext = data;
            ActiveWatch = data;
        }
예제 #2
0
        private void got_new_value(byte[] data, object obj)
        {
            WatchObject wo = obj as WatchObject;

            wo.m_value  = data[0];
            DataContext = null;
            DataContext = this;
            VICECOMManager vcom = VICECOMManager.getVICEComManager();

            vcom.addTextCommand("x", CommandStruct.eMode.DoCommandOnly, null, null, null);
        }
예제 #3
0
        public void yourBreakpointNumberIs(int number)
        {
            WatchObject n = ActiveWatch.clone();

            n.internalID = g_ID;
            g_ID++;
            n.breakpointNumber = number;

            m_watches.Add(n);
            m_breakpointToWatchMap.Add(number, n);
            DataContext = null;
            DataContext = this;
        }
예제 #4
0
 private void hitBreakpoint(String eventType, int number, int address)
 {
     try
     {
         WatchObject    obj  = m_breakpointToWatchMap[number];
         VICECOMManager vcom = VICECOMManager.getVICEComManager();
         vcom.addBinaryMemCommand(obj.m_address, obj.m_address + 0x0100, new CommandStruct.CS_BinaryDelegate(got_new_value), obj, this.Dispatcher);
     }
     catch (Exception)
     {
         VICECOMManager vcom = VICECOMManager.getVICEComManager();
         vcom.addTextCommand("x", CommandStruct.eMode.DoCommandOnly, null, null, null);
     }
 }
예제 #5
0
        public WatchObject clone()
        {
            WatchObject n = new WatchObject()
            {
                m_address          = m_address
                , m_value          = m_value
                , enabled          = enabled
                , mode             = mode
                , internalID       = internalID
                , breakpointNumber = breakpointNumber
            };

            return(n);
        }
예제 #6
0
        public LiveWatch()
        {
            m_watches = new List <WatchObject>();
            m_breakpointToWatchMap = new Dictionary <int, WatchObject>();

            //m_watches.Add(new WatchObject() { m_address = 0xD020, m_value = 0, enabled = true, internalID = 0, mode = EWatchObjectMode.normal });
            //m_watches.Add(new WatchObject() { m_address = 0xDC00, m_value = 0x7f, enabled = true, internalID = 1, mode = EWatchObjectMode.plusMinus });

            WatchObject Dummy = new WatchObject()
            {
                m_address = 0x0, m_value = 0, enabled = true, mode = EWatchObjectMode.normal
            };

            ActiveWatch = Dummy;
            DataContext = this;

            InitializeComponent();

            editStackPanel.DataContext = Dummy;
        }