Exemplo n.º 1
0
        public MainForm()
        {
            InitializeComponent();

            //Code for sending orientation data
            //Initialize Send class
            Send oSend = new Send();

            //Create thread object for X
            Thread oThreadOrientation = new Thread(new ThreadStart(oSend.sendOrientation));
            oThreadOrientation.IsBackground = true;

            //Start thread
            oThreadOrientation.Start();

            //Wait until data has begun sending
            while (oThreadOrientation.IsAlive == false)
            {
                Thread.Sleep(10);
            }

            CaptureSelection captureSelectionDialog = new CaptureSelection();

            captureSelectionDialog.ShowDialog();
            m_leftEyeDevicePath = captureSelectionDialog.leftEyeDevicePath;
            m_rightEyeDevicePath = captureSelectionDialog.rightEyeDevicePath;

            lock (m_csSceneLock)
            {
                m_Scene = new Scene(this.pbView, captureSelectionDialog.displayId, captureSelectionDialog.fullScreen);
            }
        }
Exemplo n.º 2
0
 private void MainForm_FormClosing(object sender, FormClosingEventArgs e)
 {
     if (m_capture != null)
     {
         m_capture.Dispose();
         m_capture = null;
     }
     if (m_Scene != null)
     {
         m_Scene.Dispose();
         m_Scene = null;
     }
     Send send = new Send();
     send.RequestStop();
 }