Beispiel #1
0
        public void ProcessEvent(FLParsedObject obj)
        {
            FLProgram rt = obj.Root;

            if (Debuggers.ContainsKey(rt))
            {
                Debuggers[rt].ProcessEvent(obj);
            }
        }
        public void ProcessEvent(FLParsedObject obj)
        {
            if (nohalt)
            {
                return;
            }

            instrTimer.Stop();
            totalTimer.Stop();
            double millis      = instrTimer.Elapsed.TotalMilliseconds;
            double totalMillis = totalTimer.Elapsed.TotalMilliseconds;
            int    line        = GetLineOfObject(obj);


            string newLine =
                $"{clbCode.Items[line].ToString().TrimEnd()}\t| {Math.Round(totalMillis, 4)} ms ({Math.Round(millis, 4)} ms)";

            clbCode.Items[line] = newLine;

            clbCode.Invalidate();

            if (!clbCode.GetItemChecked(line))
            {
                instrTimer.Restart();
                totalTimer.Start();
                return;
            }

            btnContinue.Text = "Start";

            UpdateSidePanel();
            btnContinue.Enabled = true;
            btnRunToEnd.Enabled = true;
            MarkInstruction(line);
            clbCode.Invalidate();

            continueEx = false;
            Text       = "IN HALT MODE";
            while (!continueEx && !nohalt)
            {
                Application.DoEvents();
            }

            btnContinue.Enabled = false;
            btnRunToEnd.Enabled = true;

            Text = "Debugging";
            instrTimer.Restart();
            totalTimer.Start();
        }
Beispiel #3
0
 private int GetLineOfObject(FLParsedObject obj)
 {
     return(marks[obj]);
 }