Esempio n. 1
0
 public ctlUserPanel()
     : base()
 {
     bgndPanel.col       = Color.Navy;
     bgndPanel.imageName = null;
     mGLVisible          = false;
     SetStyle(ControlStyles.SupportsTransparentBackColor, true);
     mWinPlatform = UVDLPApp.RunningPlatform() == UVDLPApp.Platform.Windows;
 }
Esempio n. 2
0
        protected DeviceDriver()
        {
            m_serialport = new SerialPort();
            m_buffer     = new byte[8192];

            m_serialport.DataReceived += new SerialDataReceivedEventHandler(m_serialport_DataReceived);
            // Mono doesn't support the DataRecieved event, so we need to poll for the data
            if (UVDLPApp.RunningPlatform() != UVDLPApp.Platform.Windows)
            {
                // if we're not windows, we need to poll for data
                m_readthread        = new Thread(new ThreadStart(Mono_Serial_ReadThread));
                m_readthreadrunning = true;
                m_readthread.Start();
            }
        }