Example #1
0
        private void btnConnect3_Click(object sender, EventArgs e)
        {
            try
            {
                if (_mjpegConnection3 != null)
                {
                    _mjpegConnection3.Disconnect();
                }

                var config3 = new OzMJPEGClient_Config(bunifuMaterialTextbox9.Text, bunifuMaterialTextbox11.Text, bunifuMaterialTextbox12.Text);
                _mjpegConnection3 = new MJPEGConnection(config3);
                _mjpegConnection3.Connect();
                _connector3.Connect(_mjpegConnection3.VideoChannel, _bitmapSourceProvider3);
                _connector3.Connect(_mjpegConnection3.VideoChannel, _snapShot3);
                videoViewerWF3.Start();
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.Message);
                MessageBox.Show("Please enter IP, Username and Password !");
            }
        }
Example #2
0
 private void materialFlatButton1_Click(object sender, EventArgs e)
 {
     try
     {
         if (_mjpegConnection1 != null)
         {
             _mjpegConnection1.Disconnect();
         }
         var config1 = new OzMJPEGClient_Config(bunifuMaterialTextbox4.Text, bunifuMaterialTextbox1.Text, bunifuMaterialTextbox2.Text);
         _mjpegConnection1 = new MJPEGConnection(config1);
         _mjpegConnection1.Connect();
         _connector1.Connect(_mjpegConnection1.VideoChannel, _bitmapSourceProvider1);
         _connector1.Connect(_mjpegConnection1.VideoChannel, _snapShot1);
         _videoSender = _mjpegConnection1.VideoChannel;
         videoViewerWF1.Start();
     }
     catch (Exception ex)
     {
         Console.WriteLine(ex.Message);
         MessageBox.Show("Please enter IP, Username and Password !");
     }
 }