Exemplo n.º 1
0
        private void AddCamera(string addr, ManufacturersManufacturer m, ManufacturersManufacturerUrl u)
        {
            string st = m.name + ":";

            if (!String.IsNullOrEmpty(u.version))
            {
                st += u.version;
            }
            else
            {
                st += "Other";
            }
            string source = u.Source;

            if (source == "VLC" && !_vlc)
            {
                source = "FFMPEG";
            }
            st += ": " + source + " " + addr.Replace("&", "&&");

            var rb = new RadioButton {
                Text = st, AutoSize = true, Tag = u
            };

            if (u.Source == "FFMPEG" || u.Source == "VLC")
            {
                rb.Font = new Font(rb.Font, FontStyle.Bold);
            }

            UISync.Execute(() => pnlOptions.Controls.Add(rb));
        }
Exemplo n.º 2
0
 public void ScanCamera(ManufacturersManufacturer m)
 {
     var l = new List<ManufacturersManufacturer> { m };
     var luri = new List<Uri>();
     Urlscanner = new Thread(() => ListCameras(l, ref luri));
     Urlscanner.Start();
 }
Exemplo n.º 3
0
        public void ScanCamera(ManufacturersManufacturer m)
        {
            var l = new List <ManufacturersManufacturer> {
                m
            };
            var luri = new List <Uri>();

            Urlscanner = new Thread(() => ListCameras(l, ref luri));
            Urlscanner.Start();
        }
Exemplo n.º 4
0
        public void ScanCamera(ManufacturersManufacturer mm)
        {
            Stop();
            var l = new List <ManufacturersManufacturer>();

            if (mm != null)
            {
                l.Add(mm);
            }
            else
            {
                //scan all
                l.AddRange(MainForm.Sources);
            }
            _lp   = new List <Uri>();
            _quit = false;
            Finished.Reset();

            Urlscanner = new Thread(() => ListCameras(l, Model));
            Urlscanner.Start();
        }
Exemplo n.º 5
0
        private void AddConnections(Uri uri)
        {
            pnlOptions.Controls.Clear();
            tsslCurrent.Text      = "Initialising...";
            pnlOptions.AutoScroll = true;
            ShowPanel(pnlConnect);

            string make  = txtMake.Text;
            string model = txtModel.Text;

            if (MainForm.IPLISTED)
            {
                var mm = txtFindModel.Text.Split(':');

                make = mm[0].Trim();
                if (mm.Length > 1)
                {
                    model = mm[1].Trim().ToUpper();
                }
            }

            ManufacturersManufacturer m = null;

            if (!string.IsNullOrEmpty(make) && make.ToLowerInvariant() != "unlisted")
            {
                m    = MainForm.Sources.FirstOrDefault(p => string.Equals(p.name, make, StringComparison.InvariantCultureIgnoreCase));
                make = m != null ? m.name : "";
            }

            _devicescanResults    = new List <ConnectionOption>();
            DeviceScanner.Channel = 0;
            int.TryParse(txtChannel.Text, out DeviceScanner.Channel);
            DeviceScanner.Make     = make;
            DeviceScanner.Model    = model;
            DeviceScanner.Username = txtUsername.Text;
            DeviceScanner.Password = txtPassword.Text;
            DeviceScanner.Uri      = uri;
            DeviceScanner.ScanCamera(m);
        }
Exemplo n.º 6
0
        private void AddCamera(string addr, ManufacturersManufacturer m,  ManufacturersManufacturerUrl u)
        {
            string st = m.name+":";
            if (!String.IsNullOrEmpty(u.version))
                st += u.version;
            else
                st += "Other";
            string source = u.Source;
            if (source == "VLC" && !_vlc)
                source = "FFMPEG";
            st += ": " + source +" " + addr.Replace("&", "&&");

            var rb = new RadioButton { Text = st, AutoSize = true, Tag = u };
            if (u.Source == "FFMPEG" || u.Source == "VLC")
                rb.Font = new Font(rb.Font, FontStyle.Bold);

            UISync.Execute(() => pnlOptions.Controls.Add(rb));
        }