Пример #1
0
        private void break_callback(string reply, object userData)
        {
            string[] lines = reply.Split('\r');

            mBreakPointDisplay.ItemsSource = null;
            foreach (string line in lines)
            {
                try
                {
                    Match match = RegexMan.BreakPointResult.Match(line);
                    if (match.Success)
                    {
                        int Number = Int32.Parse(match.Groups[(int)RegexMan.eBreakPointResult.number].Value);
                        //we don't want to have Asserts mixed in with breakpoints so make sure the number is high enough
                        if (Number > mAssertList.Count)
                        {
                            BreakPointDataSource test = new BreakPointDataSource();
                            test.setFromMatch(match);
                            mBreakPoints.Add(test);
                        }
                    }

                    mBreakPointDisplay.ItemsSource = mBreakPoints;
                    mBreakPointDisplay.Items.Refresh(); // make sure the other thread knows we changed stuff
                }
                catch
                {
                }
            }
        }
Пример #2
0
        private void mBreakpointEnabledCheckbox_Unchecked(object sender, RoutedEventArgs e)
        {
            CheckBox             cb = sender as CheckBox;
            BreakPointDataSource ds = cb.DataContext as BreakPointDataSource;
            int breakNum            = ds.Number;

            dispatchCommand("disable " + breakNum);
        }
Пример #3
0
        private void removeButton_Click(object sender, RoutedEventArgs e)
        {
            Button button           = sender as Button;
            BreakPointDataSource ds = button.DataContext as BreakPointDataSource;
            int breakNum            = ds.Number;

            dispatchCommand("del " + breakNum);
            mBreakPoints.Remove(ds);
            mBreakPointDisplay.ItemsSource = null;
            mBreakPointDisplay.ItemsSource = mBreakPoints;
        }