示例#1
0
 private MechanismInfo FindMechanismInfo(Mechanism m)
 {
     foreach (MechanismInfo mi in Mechanisms)
     {
         if (mi.mechanism == m)
         {
             return(mi);
         }
     }
     return(new MechanismInfo(null, null, null, null));
 }
示例#2
0
        private void CreateMechanismInfo(Mechanism m)
        {
            Timer timer = new Timer();

            timer.Interval = 10;
            if (m.Number == 8)
            {
                timer.Tick += new EventHandler(WhichMove);
            }
            Mechanisms.Add(new MechanismInfo(timer, null, null, m));
            CheckSize(m.ID, EventArgs.Empty);
        }
示例#3
0
        public MechanismInfo(Timer t, Graphics g, Form w, Mechanism m)
        {
            Timer     = t; G = g;
            mechanism = m;

            Window  = w;
            rotateY = 180;
            rotateZ = 0;
            state   = State.s3D;
            zoom    = 200;
            XRay    = false;
            if (m != null)
            {
                Number = m.Number;
            }
            else
            {
                Number = -1;
            }
            Timems = 0;
        }