示例#1
0
            public CachedFormatting(DisassemblyControl control, Graphics g, int x, int y, int height, Instruction instruction)
            {
                int left = x;
                int top  = y;

                this.Instruction = instruction;

                x += 5;

                this.Opcode = new CachedOpcode(control, g, x, y, height, this.Instruction.Opcode);
                x          += OpStart;

                List <CachedOperand> ops = new List <CachedOperand>(this.Instruction.Operands.Length);

                foreach (Operand op in this.Instruction.Operands)
                {
                    CachedOperand cop = new CachedOperand(control, g, x, y, height, op);
                    x += ( int )cop.Bounds.Width + (OpSepWidth / 2) + 2;
                    ops.Add(cop);
                }
                this.Operands = ops.ToArray();

                this.Bounds = new RectangleF(left, top, x, height);
            }
示例#2
0
 public CachedOperand(DisassemblyControl control, Graphics g, int x, int y, int height, Operand operand)
 {
     this.Operand = operand;
     this.Bounds  = new RectangleF(x, y,
                                   ( int )(g.MeasureString(operand.ToString(), control._instrFont).Width) + 1, height);
 }