Пример #1
0
 public override void AddComponentToManager()
 {
     //ComponentsManager.Remove(this);
     ID = ComponentsManager.GetFreeID();
     //ComponentsManager.Add(this);
     base.AddComponentToManager();
 }
Пример #2
0
 private void constructor()
 {
     ID              = ComponentsManager.GetFreeID();
     Logics          = new Logics.JointLogics();
     Graphics        = new Graphics.JointGraphics();
     Graphics.parent = this;
     Logics.parent   = this;
 }
Пример #3
0
        private void constructor()
        {
            ID              = ComponentsManager.GetFreeID();
            Logics          = new Logics.WireLogics();
            Graphics        = new Graphics.WireGraphics();
            Graphics.parent = this;
            Logics.parent   = this;

            if (J1 != null)
            {
                J1.ConnectedWires.Remove(this);
                J1.ConnectedWires.Add(this);
                J2.ConnectedWires.Remove(this);
                J2.ConnectedWires.Add(this);

                Statistics.WireLengthPlaced +=
                    Math.Sqrt(Math.Pow(J1.Graphics.Position.X - J2.Graphics.Position.X, 2) +
                              Math.Pow(J1.Graphics.Position.Y - J2.Graphics.Position.Y, 2));

                MicroWorld.Logics.CircuitManager.ScheduleReCreate();
            }

            ToolTip = new GUI.WireProperties();
        }
Пример #4
0
 public override void AddComponentToManager()
 {
     ID = ComponentsManager.GetFreeID();
     base.AddComponentToManager();
 }