Esempio n. 1
0
        private void RTSP_Vision_Load(object sender, EventArgs e)
        {
            m_rtspCam = RTSP_Cam.GetInstance();
            m_httpCam = HTTP_Cam.GetInstance();

            try
            {
                m_rtspCam.LoadIni();
                textBox_uri.Text                 = m_rtspCam.Uri;
                numericUpDown_timeout.Value      = Convert.ToDecimal(m_rtspCam.TimeOut);
                comboBox_transport.SelectedIndex = m_rtspCam.TransPort;

                if (!m_httpCam.SetInit())
                {
                    m_httpCam.LoadIni();
                }

                textBox_http_ip.Text             = m_httpCam.Address;
                textBox_http_stream_addr.Text    = m_httpCam.StreamAddress;
                textBox_http_id.Text             = m_httpCam.ID;
                textBox_http_pw.Text             = m_httpCam.PW;
                numericUpDown_http_timeout.Value = Convert.ToDecimal(m_httpCam.TimeOut);
            }
            catch (Exception E)
            {
                MessageBox.Show(E.ToString());
            }
        }
Esempio n. 2
0
        static public RTSP_Cam GetInstance()
        {
            if (m_rtsp_cam == null)
            {
                m_rtsp_cam = new RTSP_Cam();
            }

            return(m_rtsp_cam);
        }