コード例 #1
0
ファイル: GatePainter.cs プロジェクト: vczh-codeplex/vlpp
        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;
                }
            }
        }
コード例 #2
0
 public BoardEditorAddGateTool(PrimitiveGates gate)
 {
     this.gate = gate;
 }
コード例 #3
0
ファイル: LogicGate.cs プロジェクト: vczh-codeplex/vlpp
 public LogicGate(PrimitiveGates gateType)
 {
     this.GateType = gateType;
 }