public G_ExportPin() : base(ContentView.GetNextIndex("P")) { Width = 1; Height = 4; Pin = new G_Pin(this, "IN"); Pins.Add(Pin); Direction = Direction.Left; }
public override object Clone() { var obj = new G_Pin(null, Name) { Position = Position, Direction = Direction }; return(obj); }
public G_Pulse() : base("Pulse") { Delay = 1; Color_Line = new Color4(0.8f, 0.5f, 0.2f, 1f); Width = 2; Height = 3; Pin = new G_Pin(this, "IN"); Pins.Add(Pin); OnMouseDownEvent += G_Switch_OnMouseDownEvent;; }
public G_Switch() : base("Switch") { Color_Switch_Unlighted = new Color4(0.7f, 0.8f, 0.7f, 1f); Color_Switch_Lighted = new Color4(0.8f, 0.5f, 0.2f, 1f); Width = 1; Height = 4; Pin = new G_Pin(this, "OUT"); Pins.Add(Pin); OnMouseDownEvent += G_Switch_OnMouseDownEvent;; }
public G_Detector() : base("Detector") { Color_Detector_Unlighted = new Color4(0.7f, 0.8f, 0.7f, 1f); Color_Detector_Lighted = new Color4(0.8f, 0.5f, 0.2f, 1f); Width = 1; Height = 4; Pin = new G_Pin(this, "IN"); Pins.Add(Pin); Direction = Direction.Left; }
public override void Unserialize(BinaryReader reader) { Name = reader.ReadString(); X = reader.ReadSingle(); Y = reader.ReadSingle(); Direction = (Direction)reader.ReadInt32(); Pins.Clear(); Pin = new G_Pin(this, ""); Pin.Unserialize(reader); Pins.Add(Pin); }
public override void Unserialize(BinaryReader reader) { Name = reader.ReadString(); Delay = reader.ReadInt32(); X = reader.ReadSingle(); Y = reader.ReadSingle(); Direction = (Direction)reader.ReadInt32(); Pins.Clear(); IN = new G_Pin(this, ""); IN.Unserialize(reader); Pins.Add(IN); OUT = new G_Pin(this, ""); OUT.Unserialize(reader); Pins.Add(OUT); }
public G_Delayer() : base("Delay") { Delay = 1; Width = 2; Height = 4; IN = new G_Pin(this, "IN") { Direction = Direction.Down }; OUT = new G_Pin(this, "OUT") { Direction = Direction.Up }; Pins.Add(IN); Pins.Add(OUT); }
public override void Unserialize(BinaryReader reader) { Name = reader.ReadString(); X = reader.ReadSingle(); Y = reader.ReadSingle(); Direction = (Direction)reader.ReadInt32(); P1 = ContentView.Components[reader.ReadInt32()].Pins[reader.ReadInt32()]; P2 = ContentView.Components[reader.ReadInt32()].Pins[reader.ReadInt32()]; int m = reader.ReadInt32(); Path.Clear(); for (int i = 0; i < m; i++) { Path.Add(new Vector2(reader.ReadSingle(), reader.ReadSingle())); } }
public G_Gate_Unitary(string name, string type, string nameroot) : base(name, type) { NameRoot = nameroot; Width = 2; Height = 4; IN = new G_Pin(this, "IN") { Direction = Direction.Down }; OUT = new G_Pin(this, "OUT") { Direction = Direction.Up }; Pins.Add(IN); Pins.Add(OUT); }
public override void Unserialize(BinaryReader reader) { GateType = reader.ReadString(); Name = reader.ReadString(); NameRoot = reader.ReadString(); X = reader.ReadSingle(); Y = reader.ReadSingle(); Direction = (Direction)reader.ReadInt32(); Pins.Clear(); IN_1 = new G_Pin(this, ""); IN_1.Unserialize(reader); Pins.Add(IN_1); IN_2 = new G_Pin(this, ""); IN_2.Unserialize(reader); Pins.Add(IN_2); OUT = new G_Pin(this, ""); OUT.Unserialize(reader); Pins.Add(OUT); }
public G_Gate_Binary(string name, string type, string nameroot) : base(name, type) { NameRoot = nameroot; Width = Height = 4; IN_1 = new G_Pin(this, "IN_1") { Direction = Direction.Down }; IN_2 = new G_Pin(this, "IN_2") { Direction = Direction.Down }; OUT = new G_Pin(this, "OUT") { Direction = Direction.Up }; Pins.Add(IN_1); Pins.Add(IN_2); Pins.Add(OUT); }