예제 #1
0
        private MyDebugNode CreateDebugNode(IMyExecutable executable)
        {
            MyDebugNode result;

            if (executable is MyTask)
            {
                result = new MyDebugTaskNode(executable as MyTask);
            }
            else
            {
                result = new MyDebugNode(executable);
            }

            if (executable is MyExecutionBlock)
            {
                foreach (IMyExecutable child in (executable as MyExecutionBlock).Children)
                {
                    if (child is MySignalTask)
                    {
                        if (showSignalsButton.Checked)
                        {
                            result.Nodes.Add(CreateDebugNode(child));
                        }
                    }
                    else if (showDisabledTasksButton.Checked || child.Enabled)
                    {
                        result.Nodes.Add(CreateDebugNode(child));
                    }
                }
            }

            return(result);
        }
예제 #2
0
        private MyDebugNode CreateDebugNode(IMyExecutable executable)
        {
            MyDebugNode result;

            if (executable is MyTask)
            {
                result = new MyDebugTaskNode(executable as MyTask);
            }
            else
            {
                result = new MyDebugNode(executable);
            }

            if (executable is MyExecutionBlock)
            {
                foreach (IMyExecutable child in (executable as MyExecutionBlock).Children)
                {
                    if (child is MySignalTask)
                    {
                        if (showSignalsButton.Checked)
                        {
                            result.Nodes.Add(CreateDebugNode(child));
                        }
                    }
                    else if (showDisabledTasksButton.Checked || child.Enabled)
                    {
                        result.Nodes.Add(CreateDebugNode(child));
                    }
                }
            }

            return result;
        }
예제 #3
0
        private MyDebugNode CreateDebugNode(IMyExecutable executable)
        {
            MyDebugNode result;

            if (executable is MyTask)
            {
                result = new MyDebugTaskNode(executable as MyTask, () => m_mainForm.TaskView.RefreshView());
            }
            else
            {
                result = new MyDebugNode(executable);
            }

            var executableBlock = executable as MyExecutionBlock;

            if (executableBlock != null)
            {
                foreach (IMyExecutable child in executableBlock.Children)
                {
                    if (child is MySignalTask)
                    {
                        if (showSignalsButton.Checked)
                        {
                            result.Nodes.Add(CreateDebugNode(child));
                        }
                    }
                    else if (showDisabledTasksButton.Checked || child.Enabled)
                    {
                        result.Nodes.Add(CreateDebugNode(child));
                    }
                }
            }

            result.BreakpointStateChanged += OnBreakpointStateChanged;

            return(result);
        }
예제 #4
0
        private MyDebugNode CreateDebugNode(IMyExecutable executable)
        {
            MyDebugNode result;

            if (executable is MyTask)
            {
                result = new MyDebugTaskNode(executable as MyTask);
            }
            else
            {
                result = new MyDebugNode(executable);
            }

            var executableBlock = executable as MyExecutionBlock;
            if (executableBlock != null)
            {
                foreach (IMyExecutable child in executableBlock.Children)
                {
                    if (child is MySignalTask)
                    {
                        if (showSignalsButton.Checked)
                        {
                            result.Nodes.Add(CreateDebugNode(child));
                        }
                    }
                    else if (showDisabledTasksButton.Checked || child.Enabled)
                    {
                        result.Nodes.Add(CreateDebugNode(child));
                    }
                }
            }

            result.BreakpointStateChanged += OnBreakpointStateChanged;

            return result;
        }
예제 #5
0
 public BreakpointEventArgs(MyDebugNode node)
 {
     Node = node;
 }
예제 #6
0
 private void OnBreakpointStateChanged(object sender, MyDebugNode.BreakpointEventArgs args)
 {
     if (args.Node.Breakpoint)
         m_mainForm.Breakpoints.Add(args.Node.Executable);
     else
         m_mainForm.Breakpoints.Remove(args.Node.Executable);
 }
예제 #7
0
 public BreakpointEventArgs(MyDebugNode node)
 {
     Node = node;
 }