public Form1() { InitializeComponent(); this.pipec = new Client(); vidPathFinal = @"C:\Videos"; pipec.MessageReceived += new Client.MessageReceivedHandler(pipeClient_MessageReceived); mytime.Interval = 1000; mytime.Tick += timing; if (Directory.Exists(vidPathFinal) == false) { Directory.CreateDirectory(vidPathFinal); } DsDevice[] _SystemCamereas = DsDevice.GetDevicesOfCat(FilterCategory.VideoInputDevice); WebCams = new Video_Device[_SystemCamereas.Length]; for (int i = 0; i < _SystemCamereas.Length; i++) { WebCams[i] = new Video_Device(i, _SystemCamereas[i].Name, _SystemCamereas[i].ClassID); //fill web cam array Camera_Selection.Items.Add(WebCams[i].ToString()); } if (Camera_Selection.Items.Count > 0) { Camera_Selection.SelectedIndex = 0; //Set the selected device the default } }
// System.IO.Ports.SerialPort serialPort1=new System.IO.Ports.SerialPort(); public Form1() { this.pipec = new Client(); pipec.MessageReceived += new Client.MessageReceivedHandler(pipeClient_MessageReceived); InitializeComponent(); }