public static void PaintGate(Graphics g, float gridSize, PointF position, PrimitiveGates gate, bool alert) { using (Pen pen = new Pen(alert ? Color.Red : Color.Black, 3)) { switch (gate) { case PrimitiveGates.And: PaintAndBody(g, pen, gridSize, position, false); break; case PrimitiveGates.Nand: PaintAndBody(g, pen, gridSize, position, true); break; case PrimitiveGates.Or: PaintOrBody(g, pen, gridSize, position, false); break; case PrimitiveGates.Nor: PaintOrBody(g, pen, gridSize, position, true); break; case PrimitiveGates.Xor: PaintXorBody(g, pen, gridSize, position, false); break; case PrimitiveGates.Xnor: PaintXorBody(g, pen, gridSize, position, true); break; case PrimitiveGates.Not: PaintNotBody(g, pen, gridSize, position); break; } } }
public BoardEditorAddGateTool(PrimitiveGates gate) { this.gate = gate; }
public LogicGate(PrimitiveGates gateType) { this.GateType = gateType; }