Example #1
0
        private void SelectStackFrame(int forceFrame)
        {
            if (forceFrame == -1 && StackView.SelectedItems.Count == 0)
            {
                return;
            }
            var frame = DebugEntity.Thread.Stack[(forceFrame != -1) ? forceFrame:StackView.Items.IndexOf(StackView.SelectedItems[0])];

            if (bhav != null && bhav.ChunkID == frame.Routine.Chunk.ChunkID && frame == Editor.DebugFrame)
            {
                return;
            }
            SetActivePrimitive(null);
            this.bhav          = frame.Routine.Chunk;
            Scope              = new EditorScope(frame.CodeOwner, frame.Routine.Chunk);
            Scope.CallerObject = DebugEntity.Object;
            Scope.StackObject  = (frame.StackObject == null)?null:frame.StackObject.Object;

            EditorControl.InitBHAV(bhav, Scope, DebugEntity, frame, SelectionChanged);

            ObjectDataGrid.SelectedObject = new PropGridVMData(Scope, DebugEntity, frame, Editor);
            ObjectDataGrid.Refresh();

            PrimGroupChange(AllBtn, null);
        }
Example #2
0
        public BHAVEditor(BHAV bhav, EditorScope scope) : this()
        {
            DebugMode = false;
            MainTable.ColumnStyles[2].SizeType = SizeType.Absolute;
            MainTable.ColumnStyles[2].Width    = 0;

            Scope     = scope;
            this.bhav = bhav;

            Text = scope.GetFilename(scope.GetScopeFromID(bhav.ChunkID)) + "::" + bhav.ChunkLabel;
            EditorControl.InitBHAV(bhav, scope, null, null, SelectionChanged);
            Editor.DisableDebugger += DisableDebugger;

            PrimGroupChange(AllBtn, null);
        }