Exemplo n.º 1
0
    private void GunTrackOn()
    {
      if (cameraWindow1.Camera != null && cameraWindow1.Camera.MotionDetector != null)
      {

        //sentry activated sound    
        if (soundOn)
        {
          PlaySound(pwd + "\\Sounds\\Sentry Sounds\\Bootup\\sentry_mode_activated.wav", IntPtr.Zero, SoundFlags.SND_FILENAME | SoundFlags.SND_ASYNC);
        }

        TrackingTimer.Start();
        aimDot.Visible = true;
        //servos = new Servos(1600, 1477, cameraWindow1.Width / 2, cameraWindow1.Height / 2);
        //servos = new Servos(1600, 1477);

        GunTrackButton.Text = "ON";
        GunTrackButton.BackColor = Color.Green;
        GunFireButton.Enabled = true;
        MotionDetectionButton.Enabled = false;
      }
      else
      {
        MessageBox.Show("No Active Camera w/ Active Motion Detector!");
      }
    }
Exemplo n.º 2
0
            public override void OnResponse(NetState state, int index)
            {
                if (m_List == null || index < 0 || index >= m_List.Count)
                {
                    return;
                }

                Mobile m = m_List[index] as Mobile;

                if (m == null || m.Deleted)
                {
                    return;
                }

                Timer timer = m_Table[m] as Timer;

                if (timer != null && timer.Running)
                {
                    timer.Stop();
                }
                m_Table[m] = timer = new TrackingTimer(m, state.Mobile);
                timer.Start();
            }
Exemplo n.º 3
0
            public override void OnResponse(NetState state, int index)
            {
                if ( m_List == null || index < 0 || index >= m_List.Count )
                    return;

                Mobile m = m_List[index] as Mobile;
                if ( m == null || m.Deleted )
                    return;

                Timer timer = m_Table[m] as Timer;
                if ( timer != null && timer.Running )
                    timer.Stop();
                m_Table[m] = timer = new TrackingTimer( m, state.Mobile );
                timer.Start();
            }