Exemple #1
0
        private void OnBreakpointChanged(object sender, BreakpointChangedEventArgs e)
        {
            LadderNetworkViewModel        lnvmodel = (LadderNetworkViewModel)sender;
            LadderDiagramViewModel        ldvmodel = lnvmodel.LDVModel;
            IEnumerable <SimuBrpoElement> fit      = null;
            SimuBrpoElement ele = null;

            if (e.BPRect_old != null)
            {
                fit = items.Where((_ele) => { return(_ele.BPRect == e.BPRect_old); });
                if (fit.Count() > 0)
                {
                    ele = fit.First();
                    Unactive(ele);
                    items.Remove(ele);
                }
            }
            if (e.BPRect_new != null)
            {
                ele           = new SimuBrpoElement();
                ele.IsActive  = true;
                ele.LDVModel  = ldvmodel;
                ele.LNVModel  = lnvmodel;
                ele.BVModel   = e.BPRect_new.BVModel;
                ele.BPRect    = e.BPRect_new;
                ele.BreakTime = "1";
                items.Add(ele);
                Active(ele);
            }
            PropertyChanged(this, new PropertyChangedEventArgs("Items"));
            ifacade.MainWindow.LACBreakpoint.Show();
        }
Exemple #2
0
 private void CodeViewerBreakpointChangedHandler(object sender, BreakpointChangedEventArgs args)
 {
     if (args.State == BreakpointState.Added)
     {
         _breakpointIdentifiers[args.BreakpointData] = args.Breakpoint.Identifier;
     }
     else
     {
         _breakpointIdentifiers.Remove(args.BreakpointData);
     }
 }
Exemple #3
0
 private void Debugger_BreakpointChanged(object sender, BreakpointChangedEventArgs e)
 {
     UIManager.Dispatcher.InvokeAsync(() => {
         if (e.BreakpointId != uint.MaxValue)
         {
             var bp = _breakpoints.FirstOrDefault(b => b.Id == e.BreakpointId);
             if (bp != null)
             {
                 bp.Refresh();
             }
             else
             {
                 OnPropertyChanged(nameof(Breakpoints));
             }
         }
         else
         {
             OnPropertyChanged(nameof(Breakpoints));
         }
     });
 }
Exemple #4
0
        private async void on_BreakpointSet(object sender, BreakpointChangedEventArgs e)
        {
            if (FileName == null)
            {
                return;
            }
            ScriptView view = View as ScriptView;

            Core.Project.SetBreakpoints(FileName, view.Breakpoints);
            var debugger = Program.Form.Debugger;

            if (Program.Form.Debugger != null)
            {
                if (e.Active)
                {
                    await debugger.SetBreakpoint(FileName, e.LineNumber);
                }
                else
                {
                    await debugger.ClearBreakpoint(FileName, e.LineNumber);
                }
            }
        }
Exemple #5
0
 private void OnChanged(object sender, BreakpointChangedEventArgs e)
 {
     List.Items.Add($"Active breakpoint: {e.Width}px");
 }
Exemple #6
0
 internal void RaiseBreakpointChanged(BreakpointChangedEventArgs args)
 {
     BreakpointChanged?.Invoke(this, args);
 }