static void Main() { _path = Path.GetTempPath(); Console.WriteLine("Motion Detector"); Console.WriteLine("Detects motion in the integrated laptop webcam"); Console.WriteLine("Threshold level: " + _motionAlarmLevel); _motionDetector = new MotionDetector(new TwoFramesDifferenceDetector(), new MotionAreaHighlighting()); if (new FilterInfoCollection(FilterCategory.VideoInputDevice).Count > 0) { _path += "motions"; if (!Directory.Exists(_path)) { Directory.CreateDirectory(_path); } else { var dir = new DirectoryInfo(_path); foreach (var fi in dir.GetFiles()) { fi.Delete(); } } var videoDevice = new FilterInfoCollection(FilterCategory.VideoInputDevice)[0]; var videoCaptureDevice = new VideoCaptureDevice(videoDevice.MonikerString); var videoSourcePlayer = new AForge.Controls.VideoSourcePlayer(); videoSourcePlayer.NewFrame += VideoSourcePlayer_NewFrame; videoSourcePlayer.VideoSource = new AsyncVideoSource(videoCaptureDevice); videoSourcePlayer.Start(); } }
public FetchSample(Tld tld, Bitmap mapsource, AForge.Controls.VideoSourcePlayer vsPlayer) { pri_tld = tld; pri_bmp = mapsource; pri_player = vsPlayer; InitializeComponent(); // 设置双缓存绘图的属性 this.SetStyle(ControlStyles.OptimizedDoubleBuffer | ControlStyles.AllPaintingInWmPaint, true); }
private void Form1_FormClosing(object sender, FormClosingEventArgs e) { foreach (TabPage tab in TabCam.TabPages) { AForge.Controls.VideoSourcePlayer video = (AForge.Controls.VideoSourcePlayer)tab.Controls["VideoCam"]; if (video.VideoSource.IsRunning) { video.SignalToStop(); } } }
private void btnRecord_Click(object sender, EventArgs e) { if (recording_) { btnRecord.Text = "Record"; recording_ = false; recordingTimer_.Stop(); watch_.Stop(); StopRecording(); } else { if (GlobalData.GetInst().Cameras.Count == 0) { ErrorHandler.GetInst().PushError(new Exception("Cameras are required in order to start recording")); return; } foreach (IMocapRecorder rec in GlobalData.GetInst().Cameras) { if (rec.Calibration == null || !rec.Calibration.Valid()) { //ErrorHandler.GetInst().PushError(new Exception("Cannot record: " + rec.Name + ", requires calibration")); //return; } } recorder_ = new ThreadedRecorder(GlobalData.GetInst().Cameras, new AVIVideoWriter { FileName = "Test.avi", OutputSize = new Size(640 * 2, 480) }); btnRecord.Text = "Stop"; recording_ = true; recordingTimer_.Start(); watch_.Start(); foreach (IMocapRecorder rec in GlobalData.GetInst().Cameras) { AForge.Controls.VideoSourcePlayer player = new AForge.Controls.VideoSourcePlayer(); player.Width = 320; player.Height = 240; player.VideoSource = rec.GetSource(); videoFlow.Controls.Add(player); } recorder_.Start(); } }
private bool BuscaCam(Cam Camara) { Cam CamaraAux; bool existe = false; foreach (TabPage tab in TabCam.TabPages) { AForge.Controls.VideoSourcePlayer video = (AForge.Controls.VideoSourcePlayer)tab.Controls["VideoCam"]; CamaraAux = (Cam)video.Tag; if (Camara.NameCam == CamaraAux.NameCam) { existe = true; break; } } return(existe); }
private void Method_FormClosing(object sender, FormClosingEventArgs e) { try { for (int i = 0; i < this.Controls[0].Controls[0].Controls[0].Controls[0].Controls.Count; i++) { if (this.Controls[0].Controls[0].Controls[0].Controls[0].Controls[i].Name == "videPlayer") { AForge.Controls.VideoSourcePlayer tempvideo = (AForge.Controls.VideoSourcePlayer) this.Controls[0].Controls[0].Controls[0].Controls[0].Controls[i]; tempvideo.SignalToStop(); tempvideo.WaitForStop(); } } } catch (Exception) { } }
private void btnRecord_Click(object sender, EventArgs e) { if (recording_) { btnRecord.Text = "Record"; recording_ = false; recordingTimer_.Stop(); watch_.Stop(); StopRecording(); } else { if (GlobalData.GetInst().Cameras.Count == 0) { ErrorHandler.GetInst().PushError(new Exception("Cameras are required in order to start recording")); return; } foreach (IMocapRecorder rec in GlobalData.GetInst().Cameras) { if (rec.Calibration == null || !rec.Calibration.Valid()) { //ErrorHandler.GetInst().PushError(new Exception("Cannot record: " + rec.Name + ", requires calibration")); //return; } } recorder_ = new ThreadedRecorder(GlobalData.GetInst().Cameras, new AVIVideoWriter { FileName="Test.avi", OutputSize = new Size(640*2,480) } ); btnRecord.Text = "Stop"; recording_ = true; recordingTimer_.Start(); watch_.Start(); foreach (IMocapRecorder rec in GlobalData.GetInst().Cameras) { AForge.Controls.VideoSourcePlayer player = new AForge.Controls.VideoSourcePlayer(); player.Width = 320; player.Height = 240; player.VideoSource = rec.GetSource(); videoFlow.Controls.Add(player); } recorder_.Start(); } }
public CalibrationPage() { InitializeComponent(); button1.Click += btnLensCalibrate_Click; button2.Click += btnSpaceCalibrate_Click; player = new AForge.Controls.VideoSourcePlayer(); player.Dock = DockStyle.Fill; splitContainer2.Panel1.Controls.Add(player); reqTimer_ = new System.Timers.Timer(); reqTimer_.Interval = 500; reqTimer_.Elapsed += reqTimer__Elapsed; reqTimer_.Start(); Program.AddTimer(reqTimer_); btnAddUSB.Click += btnAddUSB_Click; btnAddIP.Click += btnAddIP_Click; btnDelete.Click += btnDelete_Click; GlobalData.GetInst().Cameras.CollectionChanged += Cameras_CollectionChanged; }
public CalibrationPage() { InitializeComponent(); button1.Click += btnLensCalibrate_Click; button2.Click += btnSpaceCalibrate_Click; player = new AForge.Controls.VideoSourcePlayer(); player.Dock = DockStyle.Fill; splitContainer2.Panel1.Controls.Add(player); reqTimer_ = new System.Timers.Timer(); reqTimer_.Interval = 500; reqTimer_.Elapsed += reqTimer__Elapsed; reqTimer_.Start(); Program.AddTimer(reqTimer_); btnAddUSB.Click += btnAddUSB_Click; btnAddIP.Click += btnAddIP_Click; btnDelete.Click += btnDelete_Click; GlobalData.GetInst().Cameras.CollectionChanged += Cameras_CollectionChanged; }
void InitializeVideoSourcePlayer(AForge.Video.DirectShow.VideoCaptureDevice videoSource) { this.videoSourcePlayer = new AForge.Controls.VideoSourcePlayer(); // // videoSourcePlayer // this.videoSourcePlayer.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.videoSourcePlayer.Location = new System.Drawing.Point(0, 0); this.videoSourcePlayer.Name = "videoSourcePlayer"; this.videoSourcePlayer.Size = new System.Drawing.Size(400, 400); this.videoSourcePlayer.TabIndex = 0; this.videoSourcePlayer.Text = "videoSourcePlayer"; this.videoSourcePlayer.VideoSource = videoSource; this.videoSourcePlayer.NewFrame += videoSourcePlayer_NewFrame; // // Add to client form // this.Controls.Add(this.videoSourcePlayer); }
/// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { this.components = new System.ComponentModel.Container(); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Form1)); this.camera1Combo = new System.Windows.Forms.ComboBox(); this.codecCombo = new System.Windows.Forms.ComboBox(); this.camera1ConfigureButton = new System.Windows.Forms.Button(); this.codecConfigureButton = new System.Windows.Forms.Button(); this.recordButton = new System.Windows.Forms.Button(); this.previewButton = new System.Windows.Forms.Button(); this.folderTextBox = new System.Windows.Forms.TextBox(); this.outputGroupBox = new System.Windows.Forms.GroupBox(); this.label2 = new System.Windows.Forms.Label(); this.captureTextBox = new System.Windows.Forms.TextBox(); this.label1 = new System.Windows.Forms.Label(); this.browseFolderButton = new System.Windows.Forms.Button(); this.folderBrowserDialog1 = new System.Windows.Forms.FolderBrowserDialog(); this.videoPlayer1 = new AForge.Controls.VideoSourcePlayer(); this.groupBox1 = new System.Windows.Forms.GroupBox(); this.groupBox2 = new System.Windows.Forms.GroupBox(); this.videoPlayer2 = new AForge.Controls.VideoSourcePlayer(); this.camera2Combo = new System.Windows.Forms.ComboBox(); this.camera2ConfigureButton = new System.Windows.Forms.Button(); this.outputGroupBox.SuspendLayout(); this.groupBox1.SuspendLayout(); this.groupBox2.SuspendLayout(); this.SuspendLayout(); // // camera1Combo // this.camera1Combo.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.camera1Combo.Location = new System.Drawing.Point(6, 19); this.camera1Combo.Name = "camera1Combo"; this.camera1Combo.Size = new System.Drawing.Size(256, 21); this.camera1Combo.TabIndex = 0; // // codecCombo // this.codecCombo.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.codecCombo.Location = new System.Drawing.Point(429, 15); this.codecCombo.Name = "codecCombo"; this.codecCombo.Size = new System.Drawing.Size(256, 21); this.codecCombo.TabIndex = 1; // // camera1ConfigureButton // this.camera1ConfigureButton.Location = new System.Drawing.Point(270, 16); this.camera1ConfigureButton.Name = "camera1ConfigureButton"; this.camera1ConfigureButton.Size = new System.Drawing.Size(120, 24); this.camera1ConfigureButton.TabIndex = 2; this.camera1ConfigureButton.Text = "Configure"; this.camera1ConfigureButton.Click += new System.EventHandler(this.VideoDeviceButton1_Click); // // codecConfigureButton // this.codecConfigureButton.Enabled = false; this.codecConfigureButton.Location = new System.Drawing.Point(693, 12); this.codecConfigureButton.Name = "codecConfigureButton"; this.codecConfigureButton.Size = new System.Drawing.Size(106, 24); this.codecConfigureButton.TabIndex = 3; this.codecConfigureButton.Text = "Configure"; this.codecConfigureButton.Click += new System.EventHandler(this.CodecButton_Click); // // recordButton // this.recordButton.Location = new System.Drawing.Point(693, 45); this.recordButton.Name = "recordButton"; this.recordButton.Size = new System.Drawing.Size(106, 23); this.recordButton.TabIndex = 11; this.recordButton.Text = "Record"; this.recordButton.Click += new System.EventHandler(this.RecordButton_Click); // // previewButton // this.previewButton.Location = new System.Drawing.Point(581, 45); this.previewButton.Name = "previewButton"; this.previewButton.Size = new System.Drawing.Size(106, 23); this.previewButton.TabIndex = 10; this.previewButton.Text = "Preview"; this.previewButton.Click += new System.EventHandler(this.previewButton_Click); // // folderTextBox // this.folderTextBox.Location = new System.Drawing.Point(66, 15); this.folderTextBox.Name = "folderTextBox"; this.folderTextBox.Size = new System.Drawing.Size(206, 20); this.folderTextBox.TabIndex = 6; // // outputGroupBox // this.outputGroupBox.Controls.Add(this.label2); this.outputGroupBox.Controls.Add(this.captureTextBox); this.outputGroupBox.Controls.Add(this.label1); this.outputGroupBox.Controls.Add(this.browseFolderButton); this.outputGroupBox.Controls.Add(this.folderTextBox); this.outputGroupBox.Controls.Add(this.codecCombo); this.outputGroupBox.Controls.Add(this.codecConfigureButton); this.outputGroupBox.Controls.Add(this.recordButton); this.outputGroupBox.Controls.Add(this.previewButton); this.outputGroupBox.Location = new System.Drawing.Point(8, 342); this.outputGroupBox.Name = "outputGroupBox"; this.outputGroupBox.Size = new System.Drawing.Size(805, 79); this.outputGroupBox.TabIndex = 11; this.outputGroupBox.TabStop = false; this.outputGroupBox.Text = "Capture"; // // label2 // this.label2.AutoSize = true; this.label2.Location = new System.Drawing.Point(11, 48); this.label2.Name = "label2"; this.label2.Size = new System.Drawing.Size(35, 13); this.label2.TabIndex = 14; this.label2.Text = "Name"; // // captureTextBox // this.captureTextBox.Location = new System.Drawing.Point(66, 45); this.captureTextBox.Name = "captureTextBox"; this.captureTextBox.Size = new System.Drawing.Size(318, 20); this.captureTextBox.TabIndex = 13; // // label1 // this.label1.AutoSize = true; this.label1.Location = new System.Drawing.Point(11, 18); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(36, 13); this.label1.TabIndex = 12; this.label1.Text = "Folder"; // // browseFolderButton // this.browseFolderButton.Location = new System.Drawing.Point(278, 13); this.browseFolderButton.Name = "browseFolderButton"; this.browseFolderButton.Size = new System.Drawing.Size(106, 23); this.browseFolderButton.TabIndex = 7; this.browseFolderButton.Text = "Browse"; this.browseFolderButton.UseVisualStyleBackColor = true; this.browseFolderButton.Click += new System.EventHandler(this.OutputButton_Click); // // folderBrowserDialog1 // this.folderBrowserDialog1.Description = "Select a folder to save video streams..."; // // videoPlayer1 // this.videoPlayer1.BackColor = System.Drawing.SystemColors.ControlDark; this.videoPlayer1.ForeColor = System.Drawing.Color.White; this.videoPlayer1.Location = new System.Drawing.Point(6, 46); this.videoPlayer1.Name = "videoPlayer1"; this.videoPlayer1.Size = new System.Drawing.Size(384, 272); this.videoPlayer1.TabIndex = 15; this.videoPlayer1.VideoSource = null; // // groupBox1 // this.groupBox1.Controls.Add(this.videoPlayer1); this.groupBox1.Controls.Add(this.camera1Combo); this.groupBox1.Controls.Add(this.camera1ConfigureButton); this.groupBox1.Location = new System.Drawing.Point(12, 12); this.groupBox1.Name = "groupBox1"; this.groupBox1.Size = new System.Drawing.Size(396, 324); this.groupBox1.TabIndex = 17; this.groupBox1.TabStop = false; this.groupBox1.Text = "Camera 1"; // // groupBox2 // this.groupBox2.Controls.Add(this.videoPlayer2); this.groupBox2.Controls.Add(this.camera2Combo); this.groupBox2.Controls.Add(this.camera2ConfigureButton); this.groupBox2.Location = new System.Drawing.Point(417, 12); this.groupBox2.Name = "groupBox2"; this.groupBox2.Size = new System.Drawing.Size(396, 324); this.groupBox2.TabIndex = 18; this.groupBox2.TabStop = false; this.groupBox2.Text = "Camera 2"; // // videoPlayer2 // this.videoPlayer2.BackColor = System.Drawing.SystemColors.ControlDark; this.videoPlayer2.ForeColor = System.Drawing.Color.White; this.videoPlayer2.Location = new System.Drawing.Point(6, 46); this.videoPlayer2.Name = "videoPlayer2"; this.videoPlayer2.Size = new System.Drawing.Size(384, 272); this.videoPlayer2.TabIndex = 15; this.videoPlayer2.VideoSource = null; // // camera2Combo // this.camera2Combo.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.camera2Combo.Location = new System.Drawing.Point(6, 19); this.camera2Combo.Name = "camera2Combo"; this.camera2Combo.Size = new System.Drawing.Size(256, 21); this.camera2Combo.TabIndex = 0; // // camera2ConfigureButton // this.camera2ConfigureButton.Location = new System.Drawing.Point(270, 16); this.camera2ConfigureButton.Name = "camera2ConfigureButton"; this.camera2ConfigureButton.Size = new System.Drawing.Size(120, 24); this.camera2ConfigureButton.TabIndex = 2; this.camera2ConfigureButton.Text = "Configure"; // // Form1 // this.AutoScaleBaseSize = new System.Drawing.Size(5, 13); this.ClientSize = new System.Drawing.Size(825, 433); this.Controls.Add(this.groupBox2); this.Controls.Add(this.groupBox1); this.Controls.Add(this.outputGroupBox); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle; this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); this.Name = "Form1"; this.Text = "Binocular Vision"; this.outputGroupBox.ResumeLayout(false); this.outputGroupBox.PerformLayout(); this.groupBox1.ResumeLayout(false); this.groupBox2.ResumeLayout(false); this.ResumeLayout(false); }
/// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent( ) { this.components = new System.ComponentModel.Container(); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainForm)); this.menuMenu = new System.Windows.Forms.MenuStrip(); this.fileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.openVideoFileusingDirectShowToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.localVideoCaptureDeviceToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.openJPEGURLToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.openMJPEGURLToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.openToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.toolStripMenuItem1 = new System.Windows.Forms.ToolStripSeparator(); this.exitToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.trackingToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.drawTrackingWindowToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.drawObjectAxisToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.drawObjectBoxToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator(); this.displayBackprojectionToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator(); this.defineObjectToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.autodetectToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.colorSpaceToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.rGBToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.hSLToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.mixedToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.toolsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.localVideoCaptureSettingsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.helpToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.aboutToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.openFileDialog = new System.Windows.Forms.OpenFileDialog(); this.timer = new System.Windows.Forms.Timer(this.components); this.statusBar = new System.Windows.Forms.StatusStrip(); this.fpsLabel = new System.Windows.Forms.ToolStripStatusLabel(); this.objectsCountLabel = new System.Windows.Forms.ToolStripStatusLabel(); this.panel1 = new System.Windows.Forms.Panel(); this.videoSourcePlayer = new AForge.Controls.VideoSourcePlayer(); this.menuMenu.SuspendLayout(); this.statusBar.SuspendLayout(); this.panel1.SuspendLayout(); this.SuspendLayout(); // // menuMenu // this.menuMenu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.fileToolStripMenuItem, this.trackingToolStripMenuItem, this.colorSpaceToolStripMenuItem, this.toolsToolStripMenuItem, this.helpToolStripMenuItem}); this.menuMenu.Location = new System.Drawing.Point(0, 0); this.menuMenu.Name = "menuMenu"; this.menuMenu.Size = new System.Drawing.Size(432, 24); this.menuMenu.TabIndex = 0; // // fileToolStripMenuItem // this.fileToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { this.openVideoFileusingDirectShowToolStripMenuItem, this.localVideoCaptureDeviceToolStripMenuItem, this.openJPEGURLToolStripMenuItem, this.openMJPEGURLToolStripMenuItem, this.openToolStripMenuItem, this.toolStripMenuItem1, this.exitToolStripMenuItem}); this.fileToolStripMenuItem.Name = "fileToolStripMenuItem"; this.fileToolStripMenuItem.Size = new System.Drawing.Size(37, 20); this.fileToolStripMenuItem.Text = "&File"; // // openVideoFileusingDirectShowToolStripMenuItem // this.openVideoFileusingDirectShowToolStripMenuItem.Name = "openVideoFileusingDirectShowToolStripMenuItem"; this.openVideoFileusingDirectShowToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.O))); this.openVideoFileusingDirectShowToolStripMenuItem.Size = new System.Drawing.Size(270, 22); this.openVideoFileusingDirectShowToolStripMenuItem.Text = "&Open"; this.openVideoFileusingDirectShowToolStripMenuItem.Click += new System.EventHandler(this.openVideoFileusingDirectShowToolStripMenuItem_Click); // // localVideoCaptureDeviceToolStripMenuItem // this.localVideoCaptureDeviceToolStripMenuItem.Name = "localVideoCaptureDeviceToolStripMenuItem"; this.localVideoCaptureDeviceToolStripMenuItem.Size = new System.Drawing.Size(270, 22); this.localVideoCaptureDeviceToolStripMenuItem.Text = "Local &Video Capture Device"; this.localVideoCaptureDeviceToolStripMenuItem.Click += new System.EventHandler(this.localVideoCaptureDeviceToolStripMenuItem_Click); // // openJPEGURLToolStripMenuItem // this.openJPEGURLToolStripMenuItem.Name = "openJPEGURLToolStripMenuItem"; this.openJPEGURLToolStripMenuItem.Size = new System.Drawing.Size(270, 22); this.openJPEGURLToolStripMenuItem.Text = "Open JPEG &URL"; this.openJPEGURLToolStripMenuItem.Click += new System.EventHandler(this.openJPEGURLToolStripMenuItem_Click); // // openMJPEGURLToolStripMenuItem // this.openMJPEGURLToolStripMenuItem.Name = "openMJPEGURLToolStripMenuItem"; this.openMJPEGURLToolStripMenuItem.Size = new System.Drawing.Size(270, 22); this.openMJPEGURLToolStripMenuItem.Text = "Open &MJPEG URL"; this.openMJPEGURLToolStripMenuItem.Click += new System.EventHandler(this.openMJPEGURLToolStripMenuItem_Click); // // openToolStripMenuItem // this.openToolStripMenuItem.Name = "openToolStripMenuItem"; this.openToolStripMenuItem.Size = new System.Drawing.Size(270, 22); this.openToolStripMenuItem.Text = "Open video file (using VFW interface)"; this.openToolStripMenuItem.Click += new System.EventHandler(this.openToolStripMenuItem_Click); // // toolStripMenuItem1 // this.toolStripMenuItem1.Name = "toolStripMenuItem1"; this.toolStripMenuItem1.Size = new System.Drawing.Size(267, 6); // // exitToolStripMenuItem // this.exitToolStripMenuItem.Name = "exitToolStripMenuItem"; this.exitToolStripMenuItem.Size = new System.Drawing.Size(270, 22); this.exitToolStripMenuItem.Text = "E&xit"; this.exitToolStripMenuItem.Click += new System.EventHandler(this.exitToolStripMenuItem_Click); // // trackingToolStripMenuItem // this.trackingToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { this.drawTrackingWindowToolStripMenuItem, this.drawObjectAxisToolStripMenuItem, this.drawObjectBoxToolStripMenuItem, this.toolStripSeparator1, this.displayBackprojectionToolStripMenuItem, this.toolStripSeparator2, this.defineObjectToolStripMenuItem, this.autodetectToolStripMenuItem}); this.trackingToolStripMenuItem.Name = "trackingToolStripMenuItem"; this.trackingToolStripMenuItem.Size = new System.Drawing.Size(65, 20); this.trackingToolStripMenuItem.Text = "Tracking"; // // drawTrackingWindowToolStripMenuItem // this.drawTrackingWindowToolStripMenuItem.Name = "drawTrackingWindowToolStripMenuItem"; this.drawTrackingWindowToolStripMenuItem.Size = new System.Drawing.Size(242, 22); this.drawTrackingWindowToolStripMenuItem.Text = "Show tracking window"; this.drawTrackingWindowToolStripMenuItem.Click += new System.EventHandler(this.drawTrackingWindowToolStripMenuItem_Click); // // drawObjectAxisToolStripMenuItem // this.drawObjectAxisToolStripMenuItem.Name = "drawObjectAxisToolStripMenuItem"; this.drawObjectAxisToolStripMenuItem.Size = new System.Drawing.Size(242, 22); this.drawObjectAxisToolStripMenuItem.Text = "Show object axis"; this.drawObjectAxisToolStripMenuItem.Click += new System.EventHandler(this.drawObjectAxisToolStripMenuItem_Click); // // drawObjectBoxToolStripMenuItem // this.drawObjectBoxToolStripMenuItem.Checked = true; this.drawObjectBoxToolStripMenuItem.CheckState = System.Windows.Forms.CheckState.Checked; this.drawObjectBoxToolStripMenuItem.Name = "drawObjectBoxToolStripMenuItem"; this.drawObjectBoxToolStripMenuItem.Size = new System.Drawing.Size(242, 22); this.drawObjectBoxToolStripMenuItem.Text = "Show object bounding box"; this.drawObjectBoxToolStripMenuItem.Click += new System.EventHandler(this.drawObjectBoxToolStripMenuItem_Click); // // toolStripSeparator1 // this.toolStripSeparator1.Name = "toolStripSeparator1"; this.toolStripSeparator1.Size = new System.Drawing.Size(239, 6); // // displayBackprojectionToolStripMenuItem // this.displayBackprojectionToolStripMenuItem.Name = "displayBackprojectionToolStripMenuItem"; this.displayBackprojectionToolStripMenuItem.Size = new System.Drawing.Size(242, 22); this.displayBackprojectionToolStripMenuItem.Text = "Show histogram backprojection"; this.displayBackprojectionToolStripMenuItem.Click += new System.EventHandler(this.displayBackprojectionToolStripMenuItem_Click); // // toolStripSeparator2 // this.toolStripSeparator2.Name = "toolStripSeparator2"; this.toolStripSeparator2.Size = new System.Drawing.Size(239, 6); // // defineObjectToolStripMenuItem // this.defineObjectToolStripMenuItem.Name = "defineObjectToolStripMenuItem"; this.defineObjectToolStripMenuItem.Size = new System.Drawing.Size(242, 22); this.defineObjectToolStripMenuItem.Text = "Define object"; this.defineObjectToolStripMenuItem.Click += new System.EventHandler(this.defineObjectToolStripMenuItem_Click); // // autodetectToolStripMenuItem // this.autodetectToolStripMenuItem.Name = "autodetectToolStripMenuItem"; this.autodetectToolStripMenuItem.Size = new System.Drawing.Size(242, 22); this.autodetectToolStripMenuItem.Text = "Detect faces"; this.autodetectToolStripMenuItem.Click += new System.EventHandler(this.autodetectToolStripMenuItem_Click); // // colorSpaceToolStripMenuItem // this.colorSpaceToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { this.rGBToolStripMenuItem, this.hSLToolStripMenuItem, this.mixedToolStripMenuItem}); this.colorSpaceToolStripMenuItem.Name = "colorSpaceToolStripMenuItem"; this.colorSpaceToolStripMenuItem.Size = new System.Drawing.Size(81, 20); this.colorSpaceToolStripMenuItem.Text = "Color space"; // // rGBToolStripMenuItem // this.rGBToolStripMenuItem.Checked = true; this.rGBToolStripMenuItem.CheckState = System.Windows.Forms.CheckState.Checked; this.rGBToolStripMenuItem.Name = "rGBToolStripMenuItem"; this.rGBToolStripMenuItem.Size = new System.Drawing.Size(106, 22); this.rGBToolStripMenuItem.Text = "RGB"; this.rGBToolStripMenuItem.Click += new System.EventHandler(this.rGBToolStripMenuItem_Click); // // hSLToolStripMenuItem // this.hSLToolStripMenuItem.Name = "hSLToolStripMenuItem"; this.hSLToolStripMenuItem.Size = new System.Drawing.Size(106, 22); this.hSLToolStripMenuItem.Text = "HSL"; this.hSLToolStripMenuItem.Click += new System.EventHandler(this.hSLToolStripMenuItem_Click); // // mixedToolStripMenuItem // this.mixedToolStripMenuItem.Name = "mixedToolStripMenuItem"; this.mixedToolStripMenuItem.Size = new System.Drawing.Size(106, 22); this.mixedToolStripMenuItem.Text = "Mixed"; this.mixedToolStripMenuItem.Click += new System.EventHandler(this.mixedToolStripMenuItem_Click); // // toolsToolStripMenuItem // this.toolsToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { this.localVideoCaptureSettingsToolStripMenuItem}); this.toolsToolStripMenuItem.Name = "toolsToolStripMenuItem"; this.toolsToolStripMenuItem.Size = new System.Drawing.Size(48, 20); this.toolsToolStripMenuItem.Text = "&Tools"; this.toolsToolStripMenuItem.DropDownOpening += new System.EventHandler(this.toolsToolStripMenuItem_DropDownOpening); // // localVideoCaptureSettingsToolStripMenuItem // this.localVideoCaptureSettingsToolStripMenuItem.Name = "localVideoCaptureSettingsToolStripMenuItem"; this.localVideoCaptureSettingsToolStripMenuItem.Size = new System.Drawing.Size(225, 22); this.localVideoCaptureSettingsToolStripMenuItem.Text = "Local &Video Capture Settings"; this.localVideoCaptureSettingsToolStripMenuItem.Click += new System.EventHandler(this.localVideoCaptureSettingsToolStripMenuItem_Click); // // helpToolStripMenuItem // this.helpToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { this.aboutToolStripMenuItem}); this.helpToolStripMenuItem.Name = "helpToolStripMenuItem"; this.helpToolStripMenuItem.Size = new System.Drawing.Size(44, 20); this.helpToolStripMenuItem.Text = "&Help"; // // aboutToolStripMenuItem // this.aboutToolStripMenuItem.Name = "aboutToolStripMenuItem"; this.aboutToolStripMenuItem.Size = new System.Drawing.Size(107, 22); this.aboutToolStripMenuItem.Text = "&About"; // // openFileDialog // this.openFileDialog.Filter = "AVI files (*.avi)|*.avi|All files (*.*)|*.*"; this.openFileDialog.Title = "Opem movie"; // // timer // this.timer.Interval = 1000; this.timer.Tick += new System.EventHandler(this.timer_Tick); // // statusBar // this.statusBar.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.fpsLabel, this.objectsCountLabel}); this.statusBar.Location = new System.Drawing.Point(0, 334); this.statusBar.Name = "statusBar"; this.statusBar.Size = new System.Drawing.Size(432, 22); this.statusBar.TabIndex = 3; // // fpsLabel // this.fpsLabel.AutoSize = false; this.fpsLabel.BorderSides = ((System.Windows.Forms.ToolStripStatusLabelBorderSides)((((System.Windows.Forms.ToolStripStatusLabelBorderSides.Left | System.Windows.Forms.ToolStripStatusLabelBorderSides.Top) | System.Windows.Forms.ToolStripStatusLabelBorderSides.Right) | System.Windows.Forms.ToolStripStatusLabelBorderSides.Bottom))); this.fpsLabel.BorderStyle = System.Windows.Forms.Border3DStyle.SunkenInner; this.fpsLabel.Name = "fpsLabel"; this.fpsLabel.Size = new System.Drawing.Size(150, 17); this.fpsLabel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // // objectsCountLabel // this.objectsCountLabel.BorderSides = ((System.Windows.Forms.ToolStripStatusLabelBorderSides)((((System.Windows.Forms.ToolStripStatusLabelBorderSides.Left | System.Windows.Forms.ToolStripStatusLabelBorderSides.Top) | System.Windows.Forms.ToolStripStatusLabelBorderSides.Right) | System.Windows.Forms.ToolStripStatusLabelBorderSides.Bottom))); this.objectsCountLabel.BorderStyle = System.Windows.Forms.Border3DStyle.SunkenInner; this.objectsCountLabel.Name = "objectsCountLabel"; this.objectsCountLabel.Size = new System.Drawing.Size(267, 17); this.objectsCountLabel.Spring = true; this.objectsCountLabel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // // panel1 // this.panel1.Controls.Add(this.videoSourcePlayer); this.panel1.Dock = System.Windows.Forms.DockStyle.Fill; this.panel1.Location = new System.Drawing.Point(0, 24); this.panel1.Name = "panel1"; this.panel1.Size = new System.Drawing.Size(432, 310); this.panel1.TabIndex = 4; // // videoSourcePlayer // this.videoSourcePlayer.AutoSizeControl = true; this.videoSourcePlayer.BackColor = System.Drawing.SystemColors.ControlDarkDark; this.videoSourcePlayer.ForeColor = System.Drawing.Color.White; this.videoSourcePlayer.Location = new System.Drawing.Point(55, 34); this.videoSourcePlayer.Name = "videoSourcePlayer"; this.videoSourcePlayer.Size = new System.Drawing.Size(322, 242); this.videoSourcePlayer.TabIndex = 0; this.videoSourcePlayer.VideoSource = null; this.videoSourcePlayer.Click += new System.EventHandler(this.videoSourcePlayer_Click); this.videoSourcePlayer.NewFrame += new AForge.Controls.VideoSourcePlayer.NewFrameHandler(this.videoSourcePlayer_NewFrame); // // MainForm // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.ClientSize = new System.Drawing.Size(432, 356); this.Controls.Add(this.panel1); this.Controls.Add(this.statusBar); this.Controls.Add(this.menuMenu); this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); this.MainMenuStrip = this.menuMenu; this.Name = "MainForm"; this.Text = "Face Tracking"; this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.MainForm_FormClosing); this.menuMenu.ResumeLayout(false); this.menuMenu.PerformLayout(); this.statusBar.ResumeLayout(false); this.statusBar.PerformLayout(); this.panel1.ResumeLayout(false); this.ResumeLayout(false); this.PerformLayout(); }
/// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { this.components = new System.ComponentModel.Container(); vspEntradaSalida = new AForge.Controls.VideoSourcePlayer(); this.btnIniciar = new System.Windows.Forms.Button(); this.btnParar = new System.Windows.Forms.Button(); this.btnVolver = new System.Windows.Forms.Button(); this.cbxSeleccionDipositivos = new System.Windows.Forms.ComboBox(); this.tmpCapture = new System.Windows.Forms.Timer(this.components); this.pnlDatosPersona = new System.Windows.Forms.Panel(); this.lblTipo = new System.Windows.Forms.Label(); this.pnlFoto = new System.Windows.Forms.PictureBox(); this.lblContador = new System.Windows.Forms.Label(); this.txtFechaIngreso = new System.Windows.Forms.TextBox(); this.lblFechaIngreso = new System.Windows.Forms.Label(); this.txtTipoDoc = new System.Windows.Forms.TextBox(); this.lblTipoDocumentoYNro = new System.Windows.Forms.Label(); this.txtNombreApellido = new System.Windows.Forms.TextBox(); this.lblNombreApellido = new System.Windows.Forms.Label(); this.lblTituloEntradaSalida = new System.Windows.Forms.Label(); this.pnlDatosPersona.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.pnlFoto)).BeginInit(); this.SuspendLayout(); // // vspEntradaSalida // vspEntradaSalida.Location = new System.Drawing.Point(12, 52); vspEntradaSalida.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); vspEntradaSalida.Name = "vspEntradaSalida"; vspEntradaSalida.Size = new System.Drawing.Size(252, 273); vspEntradaSalida.TabIndex = 0; vspEntradaSalida.Text = "videoSourcePlayer1"; vspEntradaSalida.VideoSource = null; vspEntradaSalida.Click += new System.EventHandler(vspEntradaSalida_Click); // // btnIniciar // this.btnIniciar.Font = new System.Drawing.Font("Century Gothic", 14.2F); this.btnIniciar.Location = new System.Drawing.Point(12, 338); this.btnIniciar.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); this.btnIniciar.Name = "btnIniciar"; this.btnIniciar.Size = new System.Drawing.Size(96, 46); this.btnIniciar.TabIndex = 1; this.btnIniciar.Text = "Iniciar"; this.btnIniciar.UseVisualStyleBackColor = true; this.btnIniciar.Click += new System.EventHandler(this.BtnIniciar_Click); // // btnParar // this.btnParar.Font = new System.Drawing.Font("Century Gothic", 14.2F); this.btnParar.Location = new System.Drawing.Point(12, 390); this.btnParar.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); this.btnParar.Name = "btnParar"; this.btnParar.Size = new System.Drawing.Size(96, 46); this.btnParar.TabIndex = 2; this.btnParar.Text = "Parar"; this.btnParar.UseVisualStyleBackColor = true; this.btnParar.Click += new System.EventHandler(this.btnParar_Click); // // btnVolver // this.btnVolver.Font = new System.Drawing.Font("Century Gothic", 14.2F); this.btnVolver.Location = new System.Drawing.Point(120, 390); this.btnVolver.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); this.btnVolver.Name = "btnVolver"; this.btnVolver.Size = new System.Drawing.Size(120, 46); this.btnVolver.TabIndex = 3; this.btnVolver.Text = "Volver"; this.btnVolver.UseVisualStyleBackColor = true; this.btnVolver.Click += new System.EventHandler(this.btnVolver_Click); // // cbxSeleccionDipositivos // this.cbxSeleccionDipositivos.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.cbxSeleccionDipositivos.Font = new System.Drawing.Font("Century Gothic", 14.2F); this.cbxSeleccionDipositivos.FormattingEnabled = true; this.cbxSeleccionDipositivos.Location = new System.Drawing.Point(120, 344); this.cbxSeleccionDipositivos.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); this.cbxSeleccionDipositivos.Name = "cbxSeleccionDipositivos"; this.cbxSeleccionDipositivos.Size = new System.Drawing.Size(121, 30); this.cbxSeleccionDipositivos.TabIndex = 4; // // tmpCapture // this.tmpCapture.Tick += new System.EventHandler(this.tmpCapture_Tick); // // pnlDatosPersona // this.pnlDatosPersona.Controls.Add(this.lblTipo); this.pnlDatosPersona.Controls.Add(this.pnlFoto); this.pnlDatosPersona.Controls.Add(this.lblContador); this.pnlDatosPersona.Controls.Add(this.txtFechaIngreso); this.pnlDatosPersona.Controls.Add(this.lblFechaIngreso); this.pnlDatosPersona.Controls.Add(this.txtTipoDoc); this.pnlDatosPersona.Controls.Add(this.lblTipoDocumentoYNro); this.pnlDatosPersona.Controls.Add(this.txtNombreApellido); this.pnlDatosPersona.Controls.Add(this.lblNombreApellido); this.pnlDatosPersona.Location = new System.Drawing.Point(270, 52); this.pnlDatosPersona.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); this.pnlDatosPersona.Name = "pnlDatosPersona"; this.pnlDatosPersona.Size = new System.Drawing.Size(324, 403); this.pnlDatosPersona.TabIndex = 4; // // lblTipo // this.lblTipo.AutoSize = true; this.lblTipo.Font = new System.Drawing.Font("Century Gothic", 12.2F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.lblTipo.Location = new System.Drawing.Point(6, 228); this.lblTipo.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); this.lblTipo.Name = "lblTipo"; this.lblTipo.Size = new System.Drawing.Size(230, 21); this.lblTipo.TabIndex = 5; this.lblTipo.Text = "TipoEmpleadoOCategoria"; // // pnlFoto // this.pnlFoto.Location = new System.Drawing.Point(150, 228); this.pnlFoto.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); this.pnlFoto.Name = "pnlFoto"; this.pnlFoto.Size = new System.Drawing.Size(168, 169); this.pnlFoto.TabIndex = 4; this.pnlFoto.TabStop = false; // // lblContador // this.lblContador.AutoSize = true; this.lblContador.Font = new System.Drawing.Font("Century Gothic", 30F); this.lblContador.Location = new System.Drawing.Point(48, 286); this.lblContador.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); this.lblContador.Name = "lblContador"; this.lblContador.Size = new System.Drawing.Size(66, 49); this.lblContador.TabIndex = 3; this.lblContador.Text = "00"; // // txtFechaIngreso // this.txtFechaIngreso.Font = new System.Drawing.Font("Century Gothic", 14.2F); this.txtFechaIngreso.Location = new System.Drawing.Point(12, 188); this.txtFechaIngreso.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); this.txtFechaIngreso.Name = "txtFechaIngreso"; this.txtFechaIngreso.Size = new System.Drawing.Size(301, 31); this.txtFechaIngreso.TabIndex = 1; // // lblFechaIngreso // this.lblFechaIngreso.AutoSize = true; this.lblFechaIngreso.Font = new System.Drawing.Font("Century Gothic", 14.2F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.lblFechaIngreso.Location = new System.Drawing.Point(12, 156); this.lblFechaIngreso.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); this.lblFechaIngreso.Name = "lblFechaIngreso"; this.lblFechaIngreso.Size = new System.Drawing.Size(140, 22); this.lblFechaIngreso.TabIndex = 0; this.lblFechaIngreso.Text = "Fecha Ingreso"; // // txtTipoDoc // this.txtTipoDoc.Font = new System.Drawing.Font("Century Gothic", 14.2F); this.txtTipoDoc.Location = new System.Drawing.Point(12, 117); this.txtTipoDoc.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); this.txtTipoDoc.Name = "txtTipoDoc"; this.txtTipoDoc.Size = new System.Drawing.Size(301, 31); this.txtTipoDoc.TabIndex = 1; // // lblTipoDocumentoYNro // this.lblTipoDocumentoYNro.AutoSize = true; this.lblTipoDocumentoYNro.Font = new System.Drawing.Font("Century Gothic", 14.2F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.lblTipoDocumentoYNro.Location = new System.Drawing.Point(12, 84); this.lblTipoDocumentoYNro.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); this.lblTipoDocumentoYNro.Name = "lblTipoDocumentoYNro"; this.lblTipoDocumentoYNro.Size = new System.Drawing.Size(233, 22); this.lblTipoDocumentoYNro.TabIndex = 0; this.lblTipoDocumentoYNro.Text = "Tipo de Documento y Nº"; // // txtNombreApellido // this.txtNombreApellido.Font = new System.Drawing.Font("Century Gothic", 14.2F); this.txtNombreApellido.Location = new System.Drawing.Point(12, 46); this.txtNombreApellido.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); this.txtNombreApellido.Name = "txtNombreApellido"; this.txtNombreApellido.Size = new System.Drawing.Size(301, 31); this.txtNombreApellido.TabIndex = 1; // // lblNombreApellido // this.lblNombreApellido.AutoSize = true; this.lblNombreApellido.Font = new System.Drawing.Font("Century Gothic", 14.2F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.lblNombreApellido.Location = new System.Drawing.Point(12, 13); this.lblNombreApellido.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); this.lblNombreApellido.Name = "lblNombreApellido"; this.lblNombreApellido.Size = new System.Drawing.Size(179, 22); this.lblNombreApellido.TabIndex = 0; this.lblNombreApellido.Text = "Nombre y Apellido"; // // lblTituloEntradaSalida // this.lblTituloEntradaSalida.AutoSize = true; this.lblTituloEntradaSalida.Font = new System.Drawing.Font("Century Gothic", 14.2F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.lblTituloEntradaSalida.Location = new System.Drawing.Point(66, 13); this.lblTituloEntradaSalida.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); this.lblTituloEntradaSalida.Name = "lblTituloEntradaSalida"; this.lblTituloEntradaSalida.Size = new System.Drawing.Size(146, 22); this.lblTituloEntradaSalida.TabIndex = 0; this.lblTituloEntradaSalida.Text = "Entrada/Salida"; // // InterfazEntradaSalida // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.ClientSize = new System.Drawing.Size(600, 462); this.Controls.Add(this.pnlDatosPersona); this.Controls.Add(this.cbxSeleccionDipositivos); this.Controls.Add(this.btnVolver); this.Controls.Add(this.btnParar); this.Controls.Add(this.btnIniciar); this.Controls.Add(this.lblTituloEntradaSalida); this.Controls.Add(vspEntradaSalida); this.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); this.Name = "InterfazEntradaSalida"; this.Text = "InterfazEntradaSalida"; this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.InterfazEntradaSalida_FormClosing); this.FormClosed += new System.Windows.Forms.FormClosedEventHandler(this.InterfazEntradaSalida_FormClosing); this.Load += new System.EventHandler(this.InterfazEntradaSalida_Load); this.pnlDatosPersona.ResumeLayout(false); this.pnlDatosPersona.PerformLayout(); ((System.ComponentModel.ISupportInitialize)(this.pnlFoto)).EndInit(); this.ResumeLayout(false); this.PerformLayout(); }
public 摄像头(AForge.Controls.VideoSourcePlayer _videoSourcePlayer) { videoSourcePlayer = _videoSourcePlayer; }
/// <summary> /// /// </summary> /// <param name="_videoSourcePlayer"></param> public void SetCameraPlayer(AForge.Controls.VideoSourcePlayer _videoSourcePlayer) { videoSourcePlayer = _videoSourcePlayer; }
/// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { this.panel1 = new System.Windows.Forms.Panel(); this.button1 = new System.Windows.Forms.Button(); this.videoSourcePlayer1 = new AForge.Controls.VideoSourcePlayer(); this.button2 = new System.Windows.Forms.Button(); this.button3 = new System.Windows.Forms.Button(); this.SuspendLayout(); // // panel1 // this.panel1.Location = new System.Drawing.Point(12, 21); this.panel1.Name = "panel1"; this.panel1.Size = new System.Drawing.Size(256, 191); this.panel1.TabIndex = 11; // // button1 // this.button1.Location = new System.Drawing.Point(289, 21); this.button1.Name = "button1"; this.button1.Size = new System.Drawing.Size(111, 62); this.button1.TabIndex = 7; this.button1.Text = "拍照"; this.button1.UseVisualStyleBackColor = true; this.button1.Click += new System.EventHandler(this.button1_Click); // // videoSourcePlayer1 // this.videoSourcePlayer1.Location = new System.Drawing.Point(12, 21); this.videoSourcePlayer1.Name = "videoSourcePlayer1"; this.videoSourcePlayer1.Size = new System.Drawing.Size(256, 191); this.videoSourcePlayer1.TabIndex = 12; this.videoSourcePlayer1.Text = "videoSourcePlayer1"; this.videoSourcePlayer1.VideoSource = null; // // button2 // this.button2.Location = new System.Drawing.Point(289, 96); this.button2.Name = "button2"; this.button2.Size = new System.Drawing.Size(111, 56); this.button2.TabIndex = 13; this.button2.Text = "确认"; this.button2.UseVisualStyleBackColor = true; this.button2.Click += new System.EventHandler(this.button2_Click); // // button3 // this.button3.Location = new System.Drawing.Point(289, 162); this.button3.Name = "button3"; this.button3.Size = new System.Drawing.Size(111, 50); this.button3.TabIndex = 14; this.button3.Text = "重拍"; this.button3.UseVisualStyleBackColor = true; this.button3.Click += new System.EventHandler(this.button3_Click); // // Camera_S // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.ClientSize = new System.Drawing.Size(414, 230); this.Controls.Add(this.videoSourcePlayer1); this.Controls.Add(this.button3); this.Controls.Add(this.button2); this.Controls.Add(this.panel1); this.Controls.Add(this.button1); this.Name = "Camera_S"; this.Text = "高拍仪单拍"; this.Load += new System.EventHandler(this.Camera_S_Load); this.FormClosed += new System.Windows.Forms.FormClosedEventHandler(this.Camera_S_FormClosed); this.ResumeLayout(false); }
/// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { this.components = new System.ComponentModel.Container(); this.textBox1 = new System.Windows.Forms.TextBox(); this.btn_UpdateItemData = new System.Windows.Forms.Button(); this.lbl_OrderIdhere = new System.Windows.Forms.Label(); this.label1 = new System.Windows.Forms.Label(); this.dgv_Orderlist = new System.Windows.Forms.DataGridView(); this.videoSourcePlayer1 = new AForge.Controls.VideoSourcePlayer(); this.btn_StartWebCam = new System.Windows.Forms.Button(); this.btn_StopWebCam = new System.Windows.Forms.Button(); this.comboBox1 = new System.Windows.Forms.ComboBox(); this.timer1 = new System.Windows.Forms.Timer(this.components); this.linkLabel1 = new System.Windows.Forms.LinkLabel(); ((System.ComponentModel.ISupportInitialize)(this.dgv_Orderlist)).BeginInit(); this.SuspendLayout(); // // textBox1 // this.textBox1.Location = new System.Drawing.Point(354, 37); this.textBox1.Name = "textBox1"; this.textBox1.Size = new System.Drawing.Size(125, 20); this.textBox1.TabIndex = 1; this.textBox1.TextChanged += new System.EventHandler(this.textBox1_TextChanged); this.textBox1.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.textBox1_KeyPress); // // btn_UpdateItemData // this.btn_UpdateItemData.BackColor = System.Drawing.SystemColors.Control; this.btn_UpdateItemData.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btn_UpdateItemData.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(222))); this.btn_UpdateItemData.Location = new System.Drawing.Point(358, 318); this.btn_UpdateItemData.Name = "btn_UpdateItemData"; this.btn_UpdateItemData.Size = new System.Drawing.Size(101, 31); this.btn_UpdateItemData.TabIndex = 3; this.btn_UpdateItemData.Text = "ดำเนินการ"; this.btn_UpdateItemData.UseVisualStyleBackColor = false; this.btn_UpdateItemData.Click += new System.EventHandler(this.UpdateITem_Click); // // lbl_OrderIdhere // this.lbl_OrderIdhere.AutoSize = true; this.lbl_OrderIdhere.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(222))); this.lbl_OrderIdhere.Location = new System.Drawing.Point(351, 14); this.lbl_OrderIdhere.Name = "lbl_OrderIdhere"; this.lbl_OrderIdhere.Size = new System.Drawing.Size(129, 20); this.lbl_OrderIdhere.TabIndex = 4; this.lbl_OrderIdhere.Text = "หมายเลขรายการ:"; // // label1 // this.label1.AutoSize = true; this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(222))); this.label1.Location = new System.Drawing.Point(353, 71); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(95, 20); this.label1.TabIndex = 5; this.label1.Text = "อุปกรณ์ที่ยืม:"; // // dgv_Orderlist // this.dgv_Orderlist.AllowUserToAddRows = false; this.dgv_Orderlist.AllowUserToDeleteRows = false; this.dgv_Orderlist.AllowUserToResizeColumns = false; this.dgv_Orderlist.AllowUserToResizeRows = false; this.dgv_Orderlist.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; this.dgv_Orderlist.Location = new System.Drawing.Point(358, 107); this.dgv_Orderlist.Name = "dgv_Orderlist"; this.dgv_Orderlist.ReadOnly = true; this.dgv_Orderlist.RowHeadersVisible = false; this.dgv_Orderlist.Size = new System.Drawing.Size(103, 185); this.dgv_Orderlist.TabIndex = 6; // // videoSourcePlayer1 // this.videoSourcePlayer1.BackColor = System.Drawing.SystemColors.Control; this.videoSourcePlayer1.Location = new System.Drawing.Point(12, 71); this.videoSourcePlayer1.Name = "videoSourcePlayer1"; this.videoSourcePlayer1.Size = new System.Drawing.Size(318, 221); this.videoSourcePlayer1.TabIndex = 7; this.videoSourcePlayer1.Text = "videoSourcePlayer1"; this.videoSourcePlayer1.VideoSource = null; // // btn_StartWebCam // this.btn_StartWebCam.BackColor = System.Drawing.SystemColors.Control; this.btn_StartWebCam.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btn_StartWebCam.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(222))); this.btn_StartWebCam.Location = new System.Drawing.Point(15, 15); this.btn_StartWebCam.Name = "btn_StartWebCam"; this.btn_StartWebCam.Size = new System.Drawing.Size(75, 41); this.btn_StartWebCam.TabIndex = 8; this.btn_StartWebCam.Text = "เริ่ม"; this.btn_StartWebCam.UseVisualStyleBackColor = false; this.btn_StartWebCam.Click += new System.EventHandler(this.btn_StartWebCam_Click); // // btn_StopWebCam // this.btn_StopWebCam.BackColor = System.Drawing.SystemColors.Control; this.btn_StopWebCam.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btn_StopWebCam.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(222))); this.btn_StopWebCam.Location = new System.Drawing.Point(111, 15); this.btn_StopWebCam.Name = "btn_StopWebCam"; this.btn_StopWebCam.Size = new System.Drawing.Size(75, 38); this.btn_StopWebCam.TabIndex = 8; this.btn_StopWebCam.Text = "หยุด"; this.btn_StopWebCam.UseVisualStyleBackColor = false; this.btn_StopWebCam.Click += new System.EventHandler(this.btn_StopWebCam_Click); // // comboBox1 // this.comboBox1.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.comboBox1.FormattingEnabled = true; this.comboBox1.Location = new System.Drawing.Point(204, 15); this.comboBox1.Name = "comboBox1"; this.comboBox1.Size = new System.Drawing.Size(126, 21); this.comboBox1.TabIndex = 9; // // timer1 // this.timer1.Tick += new System.EventHandler(this.timer1_Tick); // // linkLabel1 // this.linkLabel1.ActiveLinkColor = System.Drawing.Color.Blue; this.linkLabel1.AutoSize = true; this.linkLabel1.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(222))); this.linkLabel1.LinkColor = System.Drawing.Color.Blue; this.linkLabel1.Location = new System.Drawing.Point(12, 323); this.linkLabel1.Name = "linkLabel1"; this.linkLabel1.Size = new System.Drawing.Size(116, 20); this.linkLabel1.TabIndex = 10; this.linkLabel1.TabStop = true; this.linkLabel1.Text = "กลับไปยังหน้าแรก"; this.linkLabel1.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabel1_LinkClicked); // // ReceiveOrder // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.BackColor = System.Drawing.SystemColors.ActiveCaption; this.ClientSize = new System.Drawing.Size(491, 361); this.Controls.Add(this.linkLabel1); this.Controls.Add(this.comboBox1); this.Controls.Add(this.btn_StopWebCam); this.Controls.Add(this.btn_StartWebCam); this.Controls.Add(this.videoSourcePlayer1); this.Controls.Add(this.dgv_Orderlist); this.Controls.Add(this.label1); this.Controls.Add(this.lbl_OrderIdhere); this.Controls.Add(this.btn_UpdateItemData); this.Controls.Add(this.textBox1); this.Name = "ReceiveOrder"; this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.ReceiveOrder_FormClosing); this.Load += new System.EventHandler(this.ReceiveOrder_Load); ((System.ComponentModel.ISupportInitialize)(this.dgv_Orderlist)).EndInit(); this.ResumeLayout(false); this.PerformLayout(); }
/// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { this.button6 = new System.Windows.Forms.Button(); this.button5 = new System.Windows.Forms.Button(); this.panel1 = new System.Windows.Forms.Panel(); this.label2 = new System.Windows.Forms.Label(); this.label1 = new System.Windows.Forms.Label(); this.panel2 = new System.Windows.Forms.Panel(); this.textBox3 = new System.Windows.Forms.TextBox(); this.textBox1 = new System.Windows.Forms.TextBox(); this.textBox2 = new System.Windows.Forms.TextBox(); this.pictureBox3 = new System.Windows.Forms.PictureBox(); this.pictureBox2 = new System.Windows.Forms.PictureBox(); this.pictureBox1 = new System.Windows.Forms.PictureBox(); this.button2 = new System.Windows.Forms.Button(); this.button1 = new System.Windows.Forms.Button(); this.videoSourcePlayer1 = new AForge.Controls.VideoSourcePlayer(); this.button3 = new System.Windows.Forms.Button(); this.panel1.SuspendLayout(); this.panel2.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.pictureBox3)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit(); this.SuspendLayout(); // // button6 // this.button6.Location = new System.Drawing.Point(353, 48); this.button6.Name = "button6"; this.button6.Size = new System.Drawing.Size(74, 23); this.button6.TabIndex = 20; this.button6.Text = "下一页"; this.button6.UseVisualStyleBackColor = true; this.button6.Click += new System.EventHandler(this.button6_Click); // // button5 // this.button5.Location = new System.Drawing.Point(353, 19); this.button5.Name = "button5"; this.button5.Size = new System.Drawing.Size(74, 23); this.button5.TabIndex = 19; this.button5.Text = "上一页"; this.button5.UseVisualStyleBackColor = true; this.button5.Click += new System.EventHandler(this.button5_Click); // // panel1 // this.panel1.Controls.Add(this.label2); this.panel1.Controls.Add(this.button6); this.panel1.Controls.Add(this.label1); this.panel1.Controls.Add(this.button5); this.panel1.Controls.Add(this.panel2); this.panel1.Controls.Add(this.pictureBox3); this.panel1.Controls.Add(this.pictureBox2); this.panel1.Controls.Add(this.pictureBox1); this.panel1.Location = new System.Drawing.Point(19, 225); this.panel1.Name = "panel1"; this.panel1.Size = new System.Drawing.Size(438, 113); this.panel1.TabIndex = 18; // // label2 // this.label2.AutoSize = true; this.label2.Location = new System.Drawing.Point(416, 84); this.label2.Name = "label2"; this.label2.Size = new System.Drawing.Size(11, 12); this.label2.TabIndex = 14; this.label2.Text = "0"; // // label1 // this.label1.AutoSize = true; this.label1.Location = new System.Drawing.Point(351, 84); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(59, 12); this.label1.TabIndex = 13; this.label1.Text = "当前数量:"; // // panel2 // this.panel2.Controls.Add(this.textBox3); this.panel2.Controls.Add(this.textBox1); this.panel2.Controls.Add(this.textBox2); this.panel2.Location = new System.Drawing.Point(4, 77); this.panel2.Name = "panel2"; this.panel2.Size = new System.Drawing.Size(340, 28); this.panel2.TabIndex = 12; // // textBox3 // this.textBox3.BackColor = System.Drawing.SystemColors.Control; this.textBox3.BorderStyle = System.Windows.Forms.BorderStyle.None; this.textBox3.Location = new System.Drawing.Point(235, 7); this.textBox3.Name = "textBox3"; this.textBox3.ReadOnly = true; this.textBox3.Size = new System.Drawing.Size(105, 14); this.textBox3.TabIndex = 5; this.textBox3.KeyDown += new System.Windows.Forms.KeyEventHandler(this.textBox3_KeyDown); // // textBox1 // this.textBox1.BorderStyle = System.Windows.Forms.BorderStyle.None; this.textBox1.Location = new System.Drawing.Point(4, 10); this.textBox1.Name = "textBox1"; this.textBox1.ReadOnly = true; this.textBox1.Size = new System.Drawing.Size(108, 14); this.textBox1.TabIndex = 3; this.textBox1.KeyDown += new System.Windows.Forms.KeyEventHandler(this.textBox1_KeyDown); // // textBox2 // this.textBox2.BorderStyle = System.Windows.Forms.BorderStyle.None; this.textBox2.Location = new System.Drawing.Point(118, 10); this.textBox2.Name = "textBox2"; this.textBox2.ReadOnly = true; this.textBox2.Size = new System.Drawing.Size(111, 14); this.textBox2.TabIndex = 4; this.textBox2.KeyDown += new System.Windows.Forms.KeyEventHandler(this.textBox2_KeyDown); // // pictureBox3 // this.pictureBox3.Location = new System.Drawing.Point(239, 4); this.pictureBox3.Name = "pictureBox3"; this.pictureBox3.Size = new System.Drawing.Size(105, 70); this.pictureBox3.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom; this.pictureBox3.TabIndex = 2; this.pictureBox3.TabStop = false; this.pictureBox3.DoubleClick += new System.EventHandler(this.pictureBox3_DoubleClick); // // pictureBox2 // this.pictureBox2.Location = new System.Drawing.Point(122, 4); this.pictureBox2.Name = "pictureBox2"; this.pictureBox2.Size = new System.Drawing.Size(111, 70); this.pictureBox2.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom; this.pictureBox2.TabIndex = 1; this.pictureBox2.TabStop = false; this.pictureBox2.DoubleClick += new System.EventHandler(this.pictureBox2_DoubleClick); // // pictureBox1 // this.pictureBox1.Location = new System.Drawing.Point(4, 4); this.pictureBox1.Name = "pictureBox1"; this.pictureBox1.Size = new System.Drawing.Size(112, 70); this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom; this.pictureBox1.TabIndex = 0; this.pictureBox1.TabStop = false; this.pictureBox1.DoubleClick += new System.EventHandler(this.pictureBox1_DoubleClick); // // button2 // this.button2.Location = new System.Drawing.Point(350, 87); this.button2.Name = "button2"; this.button2.Size = new System.Drawing.Size(96, 56); this.button2.TabIndex = 14; this.button2.Text = "停止"; this.button2.UseVisualStyleBackColor = true; this.button2.Click += new System.EventHandler(this.button2_Click); // // button1 // this.button1.Location = new System.Drawing.Point(350, 12); this.button1.Name = "button1"; this.button1.Size = new System.Drawing.Size(96, 56); this.button1.TabIndex = 13; this.button1.Text = "拍照"; this.button1.UseVisualStyleBackColor = true; this.button1.Click += new System.EventHandler(this.button1_Click); // // videoSourcePlayer1 // this.videoSourcePlayer1.Location = new System.Drawing.Point(19, 12); this.videoSourcePlayer1.Name = "videoSourcePlayer1"; this.videoSourcePlayer1.Size = new System.Drawing.Size(297, 207); this.videoSourcePlayer1.TabIndex = 21; this.videoSourcePlayer1.VideoSource = null; // // button3 // this.button3.Location = new System.Drawing.Point(350, 163); this.button3.Name = "button3"; this.button3.Size = new System.Drawing.Size(96, 56); this.button3.TabIndex = 22; this.button3.Text = "重拍"; this.button3.UseVisualStyleBackColor = true; this.button3.Click += new System.EventHandler(this.button3_Click); // // Camera_M // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.ClientSize = new System.Drawing.Size(464, 348); this.Controls.Add(this.button3); this.Controls.Add(this.panel1); this.Controls.Add(this.button2); this.Controls.Add(this.button1); this.Controls.Add(this.videoSourcePlayer1); this.Name = "Camera_M"; this.Text = "高拍仪连拍"; this.Load += new System.EventHandler(this.Camera_M_Load); this.FormClosed += new System.Windows.Forms.FormClosedEventHandler(this.Muliti_FormClosed); this.panel1.ResumeLayout(false); this.panel1.PerformLayout(); this.panel2.ResumeLayout(false); this.panel2.PerformLayout(); ((System.ComponentModel.ISupportInitialize)(this.pictureBox3)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit(); this.ResumeLayout(false); }
/// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { this.components = new System.ComponentModel.Container(); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Form1)); this.camera1Combo = new System.Windows.Forms.ComboBox(); this.codecCombo = new System.Windows.Forms.ComboBox(); this.camera1ConfigureButton = new System.Windows.Forms.Button(); this.codecConfigureButton = new System.Windows.Forms.Button(); this.recordButton = new System.Windows.Forms.Button(); this.previewButton = new System.Windows.Forms.Button(); this.folderTextBox = new System.Windows.Forms.TextBox(); this.outputGroupBox = new System.Windows.Forms.GroupBox(); this.label2 = new System.Windows.Forms.Label(); this.captureTextBox = new System.Windows.Forms.TextBox(); this.label1 = new System.Windows.Forms.Label(); this.browseFolderButton = new System.Windows.Forms.Button(); this.folderBrowserDialog1 = new System.Windows.Forms.FolderBrowserDialog(); this.videoPlayer1 = new AForge.Controls.VideoSourcePlayer(); this.groupBox1 = new System.Windows.Forms.GroupBox(); this.groupBox2 = new System.Windows.Forms.GroupBox(); this.videoPlayer2 = new AForge.Controls.VideoSourcePlayer(); this.camera2Combo = new System.Windows.Forms.ComboBox(); this.camera2ConfigureButton = new System.Windows.Forms.Button(); this.outputGroupBox.SuspendLayout(); this.groupBox1.SuspendLayout(); this.groupBox2.SuspendLayout(); this.SuspendLayout(); // // camera1Combo // this.camera1Combo.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.camera1Combo.Location = new System.Drawing.Point(6, 19); this.camera1Combo.Name = "camera1Combo"; this.camera1Combo.Size = new System.Drawing.Size(256, 21); this.camera1Combo.TabIndex = 0; // // codecCombo // this.codecCombo.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.codecCombo.Location = new System.Drawing.Point(429, 15); this.codecCombo.Name = "codecCombo"; this.codecCombo.Size = new System.Drawing.Size(256, 21); this.codecCombo.TabIndex = 1; // // camera1ConfigureButton // this.camera1ConfigureButton.Location = new System.Drawing.Point(270, 16); this.camera1ConfigureButton.Name = "camera1ConfigureButton"; this.camera1ConfigureButton.Size = new System.Drawing.Size(120, 24); this.camera1ConfigureButton.TabIndex = 2; this.camera1ConfigureButton.Text = "Configure"; this.camera1ConfigureButton.Click += new System.EventHandler(this.VideoDeviceButton1_Click); // // codecConfigureButton // this.codecConfigureButton.Enabled = false; this.codecConfigureButton.Location = new System.Drawing.Point(693, 12); this.codecConfigureButton.Name = "codecConfigureButton"; this.codecConfigureButton.Size = new System.Drawing.Size(106, 24); this.codecConfigureButton.TabIndex = 3; this.codecConfigureButton.Text = "Configure"; this.codecConfigureButton.Click += new System.EventHandler(this.CodecButton_Click); // // recordButton // this.recordButton.Location = new System.Drawing.Point(693, 45); this.recordButton.Name = "recordButton"; this.recordButton.Size = new System.Drawing.Size(106, 23); this.recordButton.TabIndex = 11; this.recordButton.Text = "Record"; this.recordButton.Click += new System.EventHandler(this.RecordButton_Click); // // previewButton // this.previewButton.Location = new System.Drawing.Point(581, 45); this.previewButton.Name = "previewButton"; this.previewButton.Size = new System.Drawing.Size(106, 23); this.previewButton.TabIndex = 10; this.previewButton.Text = "Preview"; this.previewButton.Click += new System.EventHandler(this.previewButton_Click); // // folderTextBox // this.folderTextBox.Location = new System.Drawing.Point(66, 15); this.folderTextBox.Name = "folderTextBox"; this.folderTextBox.Size = new System.Drawing.Size(206, 20); this.folderTextBox.TabIndex = 6; // // outputGroupBox // this.outputGroupBox.Controls.Add(this.label2); this.outputGroupBox.Controls.Add(this.captureTextBox); this.outputGroupBox.Controls.Add(this.label1); this.outputGroupBox.Controls.Add(this.browseFolderButton); this.outputGroupBox.Controls.Add(this.folderTextBox); this.outputGroupBox.Controls.Add(this.codecCombo); this.outputGroupBox.Controls.Add(this.codecConfigureButton); this.outputGroupBox.Controls.Add(this.recordButton); this.outputGroupBox.Controls.Add(this.previewButton); this.outputGroupBox.Location = new System.Drawing.Point(8, 342); this.outputGroupBox.Name = "outputGroupBox"; this.outputGroupBox.Size = new System.Drawing.Size(805, 79); this.outputGroupBox.TabIndex = 11; this.outputGroupBox.TabStop = false; this.outputGroupBox.Text = "Capture"; // // label2 // this.label2.AutoSize = true; this.label2.Location = new System.Drawing.Point(11, 48); this.label2.Name = "label2"; this.label2.Size = new System.Drawing.Size(35, 13); this.label2.TabIndex = 14; this.label2.Text = "Name"; // // captureTextBox // this.captureTextBox.Location = new System.Drawing.Point(66, 45); this.captureTextBox.Name = "captureTextBox"; this.captureTextBox.Size = new System.Drawing.Size(318, 20); this.captureTextBox.TabIndex = 13; // // label1 // this.label1.AutoSize = true; this.label1.Location = new System.Drawing.Point(11, 18); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(36, 13); this.label1.TabIndex = 12; this.label1.Text = "Folder"; // // browseFolderButton // this.browseFolderButton.Location = new System.Drawing.Point(278, 13); this.browseFolderButton.Name = "browseFolderButton"; this.browseFolderButton.Size = new System.Drawing.Size(106, 23); this.browseFolderButton.TabIndex = 7; this.browseFolderButton.Text = "Browse"; this.browseFolderButton.UseVisualStyleBackColor = true; this.browseFolderButton.Click += new System.EventHandler(this.OutputButton_Click); // // folderBrowserDialog1 // this.folderBrowserDialog1.Description = "Select a folder to save video streams..."; // // videoPlayer1 // this.videoPlayer1.BackColor = System.Drawing.SystemColors.ControlDark; this.videoPlayer1.ForeColor = System.Drawing.Color.White; this.videoPlayer1.Location = new System.Drawing.Point(6, 46); this.videoPlayer1.Name = "videoPlayer1"; this.videoPlayer1.Size = new System.Drawing.Size(384, 272); this.videoPlayer1.TabIndex = 15; this.videoPlayer1.VideoSource = null; // // groupBox1 // this.groupBox1.Controls.Add(this.videoPlayer1); this.groupBox1.Controls.Add(this.camera1Combo); this.groupBox1.Controls.Add(this.camera1ConfigureButton); this.groupBox1.Location = new System.Drawing.Point(12, 12); this.groupBox1.Name = "groupBox1"; this.groupBox1.Size = new System.Drawing.Size(396, 324); this.groupBox1.TabIndex = 17; this.groupBox1.TabStop = false; this.groupBox1.Text = "Camera 1"; // // groupBox2 // this.groupBox2.Controls.Add(this.videoPlayer2); this.groupBox2.Controls.Add(this.camera2Combo); this.groupBox2.Controls.Add(this.camera2ConfigureButton); this.groupBox2.Location = new System.Drawing.Point(417, 12); this.groupBox2.Name = "groupBox2"; this.groupBox2.Size = new System.Drawing.Size(396, 324); this.groupBox2.TabIndex = 18; this.groupBox2.TabStop = false; this.groupBox2.Text = "Camera 2"; // // videoPlayer2 // this.videoPlayer2.BackColor = System.Drawing.SystemColors.ControlDark; this.videoPlayer2.ForeColor = System.Drawing.Color.White; this.videoPlayer2.Location = new System.Drawing.Point(6, 46); this.videoPlayer2.Name = "videoPlayer2"; this.videoPlayer2.Size = new System.Drawing.Size(384, 272); this.videoPlayer2.TabIndex = 15; this.videoPlayer2.VideoSource = null; // // camera2Combo // this.camera2Combo.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.camera2Combo.Location = new System.Drawing.Point(6, 19); this.camera2Combo.Name = "camera2Combo"; this.camera2Combo.Size = new System.Drawing.Size(256, 21); this.camera2Combo.TabIndex = 0; // // camera2ConfigureButton // this.camera2ConfigureButton.Location = new System.Drawing.Point(270, 16); this.camera2ConfigureButton.Name = "camera2ConfigureButton"; this.camera2ConfigureButton.Size = new System.Drawing.Size(120, 24); this.camera2ConfigureButton.TabIndex = 2; this.camera2ConfigureButton.Text = "Configure"; // // Form1 // this.AutoScaleBaseSize = new System.Drawing.Size(5, 13); this.ClientSize = new System.Drawing.Size(825, 433); this.Controls.Add(this.groupBox2); this.Controls.Add(this.groupBox1); this.Controls.Add(this.outputGroupBox); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle; this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); this.Name = "Form1"; this.Text = "Binocular Vision"; this.outputGroupBox.ResumeLayout(false); this.outputGroupBox.PerformLayout(); this.groupBox1.ResumeLayout(false); this.groupBox2.ResumeLayout(false); this.ResumeLayout(false); }
/// <summary> /// This method is required for Windows Forms designer support. /// Do not change the method contents inside the source code editor. The Forms designer might /// not be able to load this method if it was changed manually. /// </summary> private void InitializeComponent() { System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainForm)); this.videoSourcePlayer1 = new AForge.Controls.VideoSourcePlayer(); this.button1 = new System.Windows.Forms.Button(); this.button2 = new System.Windows.Forms.Button(); this.button3 = new System.Windows.Forms.Button(); this.textBox1 = new System.Windows.Forms.TextBox(); this.label1 = new System.Windows.Forms.Label(); this.button4 = new System.Windows.Forms.Button(); this.SuspendLayout(); // // videoSourcePlayer1 // this.videoSourcePlayer1.Location = new System.Drawing.Point(12, 12); this.videoSourcePlayer1.Name = "videoSourcePlayer1"; this.videoSourcePlayer1.Size = new System.Drawing.Size(476, 367); this.videoSourcePlayer1.TabIndex = 0; this.videoSourcePlayer1.Text = "videoSourcePlayer1"; this.videoSourcePlayer1.VideoSource = null; // // button1 // this.button1.Location = new System.Drawing.Point(19, 441); this.button1.Name = "button1"; this.button1.Size = new System.Drawing.Size(93, 23); this.button1.TabIndex = 1; this.button1.Text = "连接至摄像头"; this.button1.UseVisualStyleBackColor = true; this.button1.Click += new System.EventHandler(this.Button1Click); // // button2 // this.button2.Location = new System.Drawing.Point(219, 441); this.button2.Name = "button2"; this.button2.Size = new System.Drawing.Size(93, 23); this.button2.TabIndex = 2; this.button2.Text = "手动人脸抓拍"; this.button2.UseVisualStyleBackColor = true; this.button2.Click += new System.EventHandler(this.Button2Click); // // button3 // this.button3.Location = new System.Drawing.Point(384, 441); this.button3.Name = "button3"; this.button3.Size = new System.Drawing.Size(93, 23); this.button3.TabIndex = 3; this.button3.Text = "开启自动抓拍"; this.button3.UseVisualStyleBackColor = true; this.button3.Click += new System.EventHandler(this.Button3Click); // // textBox1 // this.textBox1.Location = new System.Drawing.Point(114, 391); this.textBox1.Name = "textBox1"; this.textBox1.Size = new System.Drawing.Size(207, 21); this.textBox1.TabIndex = 4; // // label1 // this.label1.Location = new System.Drawing.Point(12, 395); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(100, 23); this.label1.TabIndex = 5; this.label1.Text = "当前检测相似度:"; // // button4 // this.button4.Location = new System.Drawing.Point(372, 390); this.button4.Name = "button4"; this.button4.Size = new System.Drawing.Size(116, 23); this.button4.TabIndex = 6; this.button4.Text = "开启/关闭 预览"; this.button4.UseVisualStyleBackColor = true; this.button4.Click += new System.EventHandler(this.Button4Click); // // MainForm // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.ClientSize = new System.Drawing.Size(500, 489); this.Controls.Add(this.button4); this.Controls.Add(this.label1); this.Controls.Add(this.textBox1); this.Controls.Add(this.button3); this.Controls.Add(this.button2); this.Controls.Add(this.button1); this.Controls.Add(this.videoSourcePlayer1); this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); this.Name = "MainForm"; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; this.Text = "AutoWork By Red"; this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.MainFormClosed); this.ResumeLayout(false); this.PerformLayout(); }
public MainWindow() { KonamiCode[0] = Key.R; KonamiCode[1] = Key.R; KonamiCode[2] = Key.F; KonamiCode[3] = Key.F; KonamiCode[4] = Key.D; KonamiCode[5] = Key.G; KonamiCode[6] = Key.D; KonamiCode[7] = Key.G; KonamiCode[8] = Key.A; KonamiCode[9] = Key.S; KonamiCode[10] = Key.C; InitializeComponent(); _cabinetLights = CabinetLights.Off; _rootDirectory = ConfigurationManager.AppSettings["rootDirectory"]; _mameArgs = ConfigurationManager.AppSettings["MAME_Args"]; _logFile = Path.Combine(_rootDirectory, "log.txt"); _mameExe = Path.Combine(_rootDirectory, "MAME64.EXE"); _snapDirectory = Path.Combine(_rootDirectory, "snap"); _snapshots = new Dictionary <string, System.Windows.Media.ImageSource>(); _gamesJson = Path.Combine(_rootDirectory, "games.json"); _supportCamera = Boolean.Parse(ConfigurationManager.AppSettings["Support_Camera"]); _supportNusbio = Boolean.Parse(ConfigurationManager.AppSettings["Support_Nusbio"]); JUMPDISTANCE = Int32.Parse(ConfigurationManager.AppSettings["JUMPDISTANCE"]); _logger = new Logger(_logFile); Boolean.Parse(ConfigurationManager.AppSettings["Support_Nusbio"]); string errorText; if (!File.Exists(_mameExe)) { errorText = $"{_mameExe} does not exist."; MessageBox.Show(errorText, "Fatal Error"); _logger.LogException(errorText, new Exception("MAME executable not found")); Environment.Exit(1); } else if (!File.Exists(_gamesJson)) { GameListCreator glc = new GameListCreator(); glc.GenerateGameList(_mameExe, _gamesJson, _snapDirectory); } else if (!Directory.Exists(_snapDirectory)) { errorText = $"{_snapDirectory} does not exist."; MessageBox.Show(errorText, "Fatal Error"); _logger.LogException(errorText, new Exception("Snap directory not found")); Environment.Exit(1); } Application.Current.MainWindow.Left = 0; Application.Current.MainWindow.Top = 0; HideMouse(); _logger.LogInfo("==============================================================================="); _logger.LogInfo("Starting MAME"); _logger.LogInfo("==============================================================================="); Loaded += MainWindow_Loaded; _lastMotionDetectedTime = DateTime.Now.AddSeconds(20); if (_supportNusbio) { _whiteStripPWMIntensity = 254; nusbioPixel = ConnectToMCU(null, MAX_LED); if (nusbioPixel != null) { _logger.LogVerbose("About to turn on the cabinet lights at the beginning."); //FadeIn(); _logger.LogVerbose("Done with light initialization."); } //_logger.WriteToLogFile("FadeIn() complete"); //PlaySound really only makes sense during the FadeIn sequence. If there are no lights, don't play the sound PlaySound("startup.wav"); //_logger.WriteToLogFile("Intro sound was played"); } #region Load games from disk and bind to the ListView LoadGamesFromJSON(); lvGames.ItemsSource = GetUpdatedGameList(); CollectionView view = (CollectionView)CollectionViewSource.GetDefaultView(lvGames.ItemsSource); lvGames.Focus(); lvGames.SelectionMode = SelectionMode.Single; lvGames.SelectedIndex = 0; #endregion if (_supportCamera) { //Turn on the motion detection & voice recognition AForge.Controls.VideoSourcePlayer videoSourcePlayer2 = new AForge.Controls.VideoSourcePlayer(); // try // { // detector = GetDefaultMotionDetector(); // //videoSourcePlayer2.VideoSource = new VideoCaptureDevice(EnumerateVideoDevices().MonikerString); // videoSourcePlayer2.NewFrame += Cam_NewFrame2; //// videoSourcePlayer2.Start(); // //videoSourcePlayer2.Show(); // _localWebCam.Start(); // } // catch (Exception ex) // { // //Do nothing. There is probably no webcam hooked up. // } //this.LogRecognitionStart(); //if (this.micClient == null) //{ // this.CreateMicrophoneRecoClient(); //} } }
static void Main() { _path = Path.GetTempPath(); Console.WriteLine("Motion Detector"); Console.WriteLine("Detects motion in the integrated laptop webcam"); Console.WriteLine("Threshold level: " + _motionAlarmLevel); _motionDetector = new MotionDetector(new TwoFramesDifferenceDetector(), new MotionAreaHighlighting()); if (new FilterInfoCollection(FilterCategory.VideoInputDevice).Count > 0) { _path += "motions"; if (!Directory.Exists(_path)) { Directory.CreateDirectory(_path); } else { var dir = new DirectoryInfo(_path); foreach (var fi in dir.GetFiles()) { fi.Delete(); } } var videoDevice = new FilterInfoCollection(FilterCategory.VideoInputDevice)[0]; var videoCaptureDevice = new VideoCaptureDevice(videoDevice.MonikerString); var videoSourcePlayer = new AForge.Controls.VideoSourcePlayer(); videoSourcePlayer.NewFrame += VideoSourcePlayer_NewFrame; videoSourcePlayer.VideoSource = new AsyncVideoSource(videoCaptureDevice); videoSourcePlayer.Start(); } }