Exemplo n.º 1
0
        public void InitHispeed()
        {
            try
            {
                contextMenuStrip1.Items.Clear();
                ToolStripMenuItem reloadItem = new ToolStripMenuItem();
                reloadItem.Text   = Lang.Restart;
                reloadItem.Name   = Lang.Restart;
                reloadItem.Click += new EventHandler(Reload_Click);
                contextMenuStrip1.Items.Add(reloadItem);
                DShowNET.Device.DsDevice[] devices = CameraCpature.GetDevices();
                foreach (DShowNET.Device.DsDevice de in devices)
                {
                    ToolStripMenuItem item = new ToolStripMenuItem();
                    item.Text   = de.Name;
                    item.Name   = de.Name;
                    item.Tag    = de;
                    item.Click += new EventHandler(item_Click);
                    contextMenuStrip1.Items.Add(item);
                }
                //capture1 = new CameraCpature(this.panelPreview);
                this.videoPanel.Controls.Add(CameraSingleton.Instance.PreviewPanel);
                CameraSingleton.Instance.PreviewPanel.Dock = DockStyle.Fill;
            }

            catch (Exception ex)
            {
                _logger.Error(ex.Message, ex);
            }
        }
Exemplo n.º 2
0
 private static void showCamera()
 {
     DShowNET.Device.DsDevice[] devices = CameraCpature.GetDevices();
     if (devices.Length > 0)
     {
         CameraSingleton.Instance.StartPreview(devices[0]);
     }
     else
     {
         MessageBox.Show(Lang.CameraInitializeError);
     }
 }
Exemplo n.º 3
0
 private void InitCamera()
 {
     previePanel = new Panel();
     camCapture  = new CameraCpature(this.previePanel);
 }
Exemplo n.º 4
0
 public DsDevice[] GetDevices()
 {
     return(CameraCpature.GetDevices());
 }