public SetFirstCommand(List <PrimitiveBox> realPrims, PrimitiveBox prim) { Primitive = prim; var prim0 = realPrims.FirstOrDefault(x => x.InstPtr == 0); Old0 = prim0; OldPtr = Primitive.InstPtr; FromFalse = new List <PrimitiveBox>(); FromTrue = new List <PrimitiveBox>(); FromFalse0 = new List <PrimitiveBox>(); FromTrue0 = new List <PrimitiveBox>(); foreach (var from in realPrims) { if (from.TrueUI == prim) { FromTrue.Add(from); } if (from.FalseUI == prim) { FromFalse.Add(from); } if (from.TrueUI == prim0) { FromTrue0.Add(from); } if (from.FalseUI == prim0) { FromFalse0.Add(from); } } }
public void SetActivePrimitive(PrimitiveBox prim) { if (InvokeRequired) { //HasGameThread = true; new Thread(() => { var del = new SetActiveDelegate(SetActivePrimitive); Invoke(del, new object[] { prim }); }).Start(); //HasGameThread = false; } else { if (prim == ActivePrim) { return; } var panel = OperandEditTable; panel.Controls.Clear(); panel.RowCount = 0; panel.RowStyles.Clear(); if (prim == null || prim.Descriptor == null) { return; } ActivePrim = prim; for (int i = 0; i < 10; i++) { panel.RowStyles.Add(new RowStyle(SizeType.AutoSize)); } prim.Descriptor.PopulateOperandView(this, EditorCont.Scope, panel); } }
public ChangePointerCommand(PrimitiveBox instUI, PrimitiveBox destUI, bool trueBranch) { InstUI = instUI; DestUI = destUI; OldDestUI = trueBranch ? instUI.TrueUI : instUI.FalseUI; TrueBranch = trueBranch; }
public UpdateBoxPosCommand(PrimitiveBox box) { Box = box; BeforePos = new Point(box.TreeBox.X, box.TreeBox.Y); BeforeSize = new Point(box.TreeBox.Width, box.TreeBox.Height); AfterPos = box.Position.ToPoint(); AfterSize = new Point(box.Width, box.Height); }
public RemovePrimCommand(List <PrimitiveBox> prims, PrimitiveBox prim) { Primitive = prim; FromFalse = new List <PrimitiveBox>(); FromTrue = new List <PrimitiveBox>(); foreach (var from in prims) { if (from.TrueUI == prim) { FromTrue.Add(from); } if (from.FalseUI == prim) { FromFalse.Add(from); } } }
public OpModifyCommand(PrimitiveBox prim, byte[] newOp) { Prim = prim; NewOp = newOp; OldOp = prim.Instruction.Operand; }
public AddPrimCommand(PrimitiveBox prim) { NewPrimitive = prim; }
public ToggleBreakpointCommand(PrimitiveBox instUI) { InstUI = instUI; }
public CommentModifyCommand(PrimitiveBox box, string value) { Box = box; OldComment = box.TreeBox.Comment; NewComment = value; }