Ejemplo n.º 1
0
        private void OnCommandC_Click(object sender, EventArgs e)
        {
            Cursor.Current = Cursors.WaitCursor;

            //Example command new configuration request, requires wait before allowing user to change config again
            if (m_objRFE != null && m_objRFE.PortConnected)
            {
                //ask device to change configuration
                m_bNewConfigurationReceived = false;
                m_objRFE.UpdateDeviceConfig(584.800, 587.575, 0f, -120f);
                //wait for device to reconfigure
                while (!m_bNewConfigurationReceived)
                {
                    Thread.Sleep(100);      //Wait 100ms
                    Application.DoEvents(); //process events to get new configuration
                }
                //ask device to change resolution
                m_bNewConfigurationReceived = false;
                m_objRFE.SendCommand_SweepDataPointsEx(5570);
                //wait for device to reconfigure
                while (!m_bNewConfigurationReceived)
                {
                    Thread.Sleep(100);      //Wait 100ms
                    Application.DoEvents(); //process events to get new configuration
                }
            }

            Cursor.Current = Cursors.Default;
        }