CaptureDeviceForm.cs ( File view )
From:PowerPoint Controler
Description:A s...
- By vaselly 2014-09-16
- View(s):40
- Download(s):0
- Point(s): 1
using System; using System.Drawing; using System.Collections; using System.ComponentModel; using System.Windows.Forms; using dshow; using dshow.Core; namespace motion { /// <summary> /// Summary description for CaptureDeviceForm. /// </summary> public class CaptureDeviceForm : System.Windows.Forms.Form { FilterCollection filters; private System.Windows.Forms.Label label1; private System.Windows.Forms.ComboBox deviceCombo; private System.Windows.Forms.Button cancelButton; private System.Windows.Forms.Button okButton; private string device; /// <summary> /// Required designer variable. /// </summary> private System.ComponentModel.Container components = null; // Device public string Device { get { return device; } } // Constructor public CaptureDeviceForm() { // // Required for Windows Form Designer support // InitializeComponent(); // try { filters = new FilterCollection(FilterCategory.VideoInputDevice); if (filters.Count == 0) throw new ApplicationException(); // add all devices to combo foreach (Filter filter in filters) { deviceCombo.Items.Add(filter.Name); } } catch (ApplicationException) { deviceCombo.Items.Add("No local capture devices"); deviceCombo.Enabled = false; okButton.Enabled = false; } deviceCombo.SelectedIndex = 0; } /// <summary> /// Clean up any resources being used. /// </summary> protected override void Dispose( bool disposing ) { if( disposing ) { if(components != null) { components.Dispose(); } } base.Dispose( disposing ); } #region Windows Form Designer generated code /// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { this.label1 = new System.Windows.Forms.Label(); this.deviceCombo = new System.Windows.Forms.ComboBox(); this.cancelButton = new System.Windows.Forms.Button(); this.okButton = new System.Windows.Forms.Button(); this.SuspendLayout(); // // label1 // this.label1.Location = new System.Drawing.Point(10, 10); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(156, 14); this.label1.TabIndex = 0; this.label1.Text = "Select capture device:"; // // deviceCombo // this.deviceCombo.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.deviceCombo.Location = new System.Drawing.Point(10, 30); this.deviceCombo.Name = "deviceCombo"; this.deviceCombo.Size = new System.Drawing.Size(325, 21); this.deviceCombo.TabIndex = 6; // // cancelButton // this.cancelButton.DialogResult = System.Windows.Forms.DialogResult.Cancel; this.cancelButton.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.cancelButton.Location = new System.Drawing.Point(180, 78); this.cancelButton.Name = "cancelButton"; this.cancelButton.TabIndex = 9; this.cancelButton.Text = "Cancel"; // // okButton // this.okButton.DialogResult = System.Windows.Forms.DialogResult.OK; this.okButton.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.okButton.Location = new System.Drawing.Point(90, 78); this.okButton.Name = "okButton"; this.okButton.TabIndex = 8; this.okButton.Text = "Ok"; this.okButton.Click += new System.EventHandler(this.okButton_Click); // // CaptureDeviceForm // this.AcceptButton = this.okButton; this.AutoScaleBaseSize = new System.Drawing.Size(5, 13); this.CancelButton = this.cancelButton; this.ClientSize = new System.Drawing.Size(344, 113); this.Controls.AddRange(new System.Windows.Forms.Control[] { this.cancelButton, this.okButton, this.deviceCombo, this.label1 }); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow; this.MaximizeBox = false; this.MinimizeBox = false; this.Name = "CaptureDeviceForm"; this.ShowInTaskbar = false; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; this.Text = "Open Local Capture Device"; this.ResumeLayout(false); } #endregion // On "Ok" button private void okButton_Click(object sender, System.EventArgs e) { device = filters[deviceCombo.SelectedIndex].MonikerString; } } }
...
Expand> <Close
Sponsored links
File list
Tips: You can preview the content of files by clicking file names^_^Name | Size | Date |
---|---|---|
0 | 1.96 kB | |
0 | 1.96 kB | |
AssemblyInfo.cs | 2.37 kB | 2006-04-11 11:57 |
0 | 1.96 kB | |
0 | 1.96 kB | |
dshow.dll | 32.00 kB | 2007-06-13 21:51 |
dshow.pdb | 25.50 kB | 2007-06-13 21:51 |
0 | 1.96 kB | |
dshow.dll | 32.00 kB | 2007-06-07 20:26 |
0 | 1.96 kB | |
1.txt | 45.00 B | 2006-04-11 11:57 |
IBaseFilter.cs | 2.14 kB | 2006-04-11 11:57 |
IBasicVideo.cs | 4.70 kB | 2006-04-11 11:57 |
ICreateDevEnum.cs | 592.00 B | 2006-04-11 11:57 |
IEnumPins.cs | 831.00 B | 2006-04-11 11:57 |
IFileSourceFilter.cs | 861.00 B | 2006-04-11 11:57 |
IFilterGraph.cs | 1.58 kB | 2006-04-11 11:57 |
IGraphBuilder.cs | 2.84 kB | 2006-04-11 11:57 |
IMediaControl.cs | 1.49 kB | 2006-04-11 11:57 |
IMediaEvent.cs | 3.06 kB | 2006-04-11 11:57 |
IMediaPosition.cs | 1.88 kB | 2006-04-11 11:57 |
IMediaSeeking.cs | 2.79 kB | 2006-04-11 11:57 |
IPin.cs | 2.36 kB | 2006-04-11 11:57 |
IPropertyBag.cs | 853.00 B | 2006-04-11 11:57 |
ISampleGrabber.cs | 2.21 kB | 2006-04-11 11:57 |
IVideoFrameStep.cs | 747.00 B | 2006-04-11 11:57 |
IVideoWindow.cs | 5.90 kB | 2006-04-11 11:57 |
Structures.cs | 4.37 kB | 2006-04-11 11:57 |
Uuids.cs | 4.87 kB | 2006-04-11 11:57 |
Win32.cs | 919.00 B | 2006-04-11 11:57 |
dshow.csproj | 5.38 kB | 2007-03-16 20:38 |
Filter.cs | 2.57 kB | 2006-04-11 11:57 |
FilterCollection.cs | 2.14 kB | 2006-04-11 11:57 |
0 | 1.96 kB | |
0 | 1.96 kB | |
dshow.dll | 32.00 kB | 2007-06-13 21:51 |
dshow.pdb | 25.50 kB | 2007-06-13 21:51 |
0 | 1.96 kB | |
dshow.csproj.FileList.txt | 216.00 B | 2007-06-15 15:17 |
0 | 1.96 kB | |
dshow.dll | 32.00 kB | 2007-06-07 20:26 |
0 | 1.96 kB | |
dshow.dll | 28.00 kB | 2007-06-07 18:09 |
0 | 1.96 kB | |
Tools.cs | 1.11 kB | 2006-04-11 11:57 |
motion.sln | 1.79 kB | 2007-03-16 20:38 |
motion.suo | 35.00 kB | 2007-06-15 15:08 |
0 | 1.96 kB | |
AboutForm.cs | 11.91 kB | 2007-06-15 15:17 |
AboutForm.resx | 9.77 kB | 2007-06-15 15:17 |
App.ico | 26.07 kB | 2006-04-11 11:57 |
AssemblyInfo.cs | 2.47 kB | 2007-03-20 08:40 |
0 | 1.96 kB | |
0 | 1.96 kB | |
AForge.dll | 20.00 kB | 2007-03-16 19:54 |
AForge.Imaging.dll | 108.00 kB | 2007-03-19 18:42 |
AForge.Math.dll | 28.00 kB | 2007-03-16 19:54 |
App.ico | 26.07 kB | 2006-04-11 11:57 |
dshow.dll | 32.00 kB | 2007-06-13 21:51 |
dshow.pdb | 25.50 kB | 2007-06-13 21:51 |
motion.exe | 132.00 kB | 2007-06-15 15:17 |
motion.exe.config | 147.00 B | 2007-03-19 09:20 |
motion.pdb | 181.50 kB | 2007-06-15 15:17 |
motion.vshost.exe | 5.50 kB | 2005-09-23 07:56 |
motion.vshost.exe.config | 147.00 B | 2007-03-19 09:20 |
Tiger.Video.VFW.dll | 24.00 kB | 2007-06-13 21:51 |
Tiger.Video.VFW.pdb | 27.50 kB | 2007-06-13 21:51 |
0 | 1.96 kB | |
AForge.dll | 20.00 kB | 2007-03-16 19:54 |
AForge.Imaging.dll | 108.00 kB | 2007-03-19 18:42 |
AForge.Math.dll | 28.00 kB | 2007-03-16 19:54 |
dshow.dll | 32.00 kB | 2007-06-07 20:26 |
motion.exe | 124.00 kB | 2007-06-07 20:40 |
motion.exe.config | 147.00 B | 2007-03-19 09:20 |
motion.vshost.exe | 5.50 kB | 2005-09-23 07:56 |
motion.vshost.exe.config | 147.00 B | 2007-03-19 09:20 |
Tiger.Video.VFW.dll | 24.00 kB | 2007-06-07 20:26 |
Camera.cs | 3.47 kB | 2006-04-11 11:57 |
CameraWindow.cs | 5.17 kB | 2006-04-11 11:57 |
CameraWindow.resx | 5.55 kB | 2006-04-11 11:57 |
CaptureDeviceForm.cs | 4.49 kB | 2007-06-15 15:17 |
CaptureDeviceForm.resx | 5.37 kB | 2006-04-11 11:57 |
ClassDiagram1.cd | 1.00 B | 2007-06-07 18:39 |
Copyright.txt | 913.00 B | 2007-06-15 15:17 |
IMotionDetector.cs | 785.00 B | 2007-06-07 20:36 |
MainForm.cs | 21.34 kB | 2007-06-13 21:54 |
MainForm.resx | 45.81 kB | 2007-06-13 21:51 |
motion.csproj | 7.33 kB | 2007-06-07 18:45 |
MotionDetector1.cs | 9.95 kB | 2007-06-07 20:37 |
MotionDetector2.cs | 4.44 kB | 2007-06-07 20:38 |
MotionDetector3.cs | 5.06 kB | 2007-06-07 20:38 |
MotionDetector3Optimized.cs | 6.57 kB | 2007-06-07 20:38 |
MotionDetector4.cs | 4.89 kB | 2007-06-07 20:38 |
0 | 1.96 kB | |
0 | 1.96 kB | |
motion.AboutForm.resources | 3.00 kB | 2007-06-15 15:17 |
motion.CameraWindow.resources | 581.00 B | 2007-06-13 21:51 |
motion.CaptureDeviceForm.resources | 279.00 B | 2007-06-13 21:51 |
motion.csproj.GenerateResource.Cache | 1.00 kB | 2007-06-15 15:17 |
motion.exe | 132.00 kB | 2007-06-15 15:17 |
motion.MainForm.resources | 26.62 kB | 2007-06-13 21:51 |
motion.pdb | 181.50 kB | 2007-06-15 15:17 |
motion.Resources.1.gif | 828.00 B | 2006-04-11 11:57 |
motion.Resources.2.gif | 822.00 B | 2006-04-11 11:57 |
motion.Resources.3.gif | 830.00 B | 2006-04-11 11:57 |
motion.Resources.4.gif | 822.00 B | 2006-04-11 11:57 |
motion.Resources.5.gif | 822.00 B | 2006-04-11 11:57 |
motion.Resources.6.gif | 830.00 B | 2006-04-11 11:57 |
motion.Resources.7.gif | 821.00 B | 2006-04-11 11:57 |
motion.Resources.8.gif | 822.00 B | 2006-04-11 11:57 |
motion.Resources.9.gif | 822.00 B | 2006-04-11 11:57 |
motion.URLForm.resources | 269.00 B | 2007-06-13 21:51 |
ResolveAssemblyReference.cache | 13.42 kB | 2007-06-15 14:58 |
0 | 1.96 kB | |
motion.csproj.FileList.txt | 1.64 kB | 2007-06-15 15:17 |
0 | 1.96 kB | |
motion.AboutForm.resources | 3.00 kB | 2007-06-07 20:26 |
motion.CameraWindow.resources | 581.00 B | 2007-06-07 20:26 |
motion.CaptureDeviceForm.resources | 279.00 B | 2007-06-07 20:26 |
motion.csproj.GenerateResource.Cache | 1.00 kB | 2007-06-07 20:27 |
motion.exe | 124.00 kB | 2007-06-07 20:40 |
motion.MainForm.resources | 26.62 kB | 2007-06-07 20:27 |
motion.Resources.1.gif | 828.00 B | 2006-04-11 11:57 |
motion.Resources.2.gif | 822.00 B | 2006-04-11 11:57 |
motion.Resources.3.gif | 830.00 B | 2006-04-11 11:57 |
motion.Resources.4.gif | 822.00 B | 2006-04-11 11:57 |
motion.Resources.5.gif | 822.00 B | 2006-04-11 11:57 |
motion.Resources.6.gif | 830.00 B | 2006-04-11 11:57 |
motion.Resources.7.gif | 821.00 B | 2006-04-11 11:57 |
motion.Resources.8.gif | 822.00 B | 2006-04-11 11:57 |
motion.Resources.9.gif | 822.00 B | 2006-04-11 11:57 |
motion.URLForm.resources | 269.00 B | 2007-06-07 20:26 |
0 | 1.96 kB | |
ResolveAssemblyReference.cache | 10.44 kB | 2007-06-07 20:26 |
0 | 1.96 kB | |
0 | 1.96 kB | |
1.gif | 828.00 B | 2006-04-11 11:57 |
2.gif | 822.00 B | 2006-04-11 11:57 |
3.gif | 830.00 B | 2006-04-11 11:57 |
4.gif | 822.00 B | 2006-04-11 11:57 |
5.gif | 822.00 B | 2006-04-11 11:57 |
6.gif | 830.00 B | 2006-04-11 11:57 |
7.gif | 821.00 B | 2006-04-11 11:57 |
8.gif | 822.00 B | 2006-04-11 11:57 |
9.gif | 822.00 B | 2006-04-11 11:57 |
UnsafeBitmap.cs | 2.76 kB | 2007-06-15 14:58 |
URLForm.cs | 3.98 kB | 2006-04-11 11:57 |
URLForm.resx | 5.36 kB | 2006-04-11 11:57 |
0 | 1.96 kB | |
ByteArrayUtils.cs | 1.25 kB | 2006-04-11 11:57 |
CameraEvents.cs | 626.00 B | 2006-04-11 11:57 |
CaptureDevice.cs | 8.15 kB | 2006-04-11 11:57 |
IVideoSource.cs | 1.57 kB | 2006-04-11 11:57 |
JPEGStream.cs | 6.89 kB | 2006-04-11 11:57 |
MJPEGStream.cs | 9.12 kB | 2006-04-11 11:57 |
VideoFileSource.cs | 3.45 kB | 2006-04-11 11:57 |
VideoStream.cs | 8.47 kB | 2006-04-11 11:57 |
0 | 1.96 kB | |
AForge.dll | 20.00 kB | 2007-03-16 19:54 |
AForge.Imaging.dll | 108.00 kB | 2007-03-19 18:42 |
AForge.Math.dll | 28.00 kB | 2007-03-16 19:54 |
0 | 1.96 kB | |
AssemblyInfo.cs | 2.37 kB | 2006-04-11 11:57 |
AVIReader.cs | 5.29 kB | 2006-04-11 11:57 |
AVIWriter.cs | 5.59 kB | 2006-04-11 11:57 |
0 | 1.96 kB | |
0 | 1.96 kB | |
Tiger.Video.VFW.dll | 24.00 kB | 2007-06-13 21:51 |
Tiger.Video.VFW.pdb | 27.50 kB | 2007-06-13 21:51 |
0 | 1.96 kB | |
Tiger.Video.VFW.dll | 24.00 kB | 2007-06-07 20:26 |
0 | 1.96 kB | |
0 | 1.96 kB | |
0 | 1.96 kB | |
Tiger.Video.VFW.dll | 24.00 kB | 2007-06-13 21:51 |
Tiger.Video.VFW.pdb | 27.50 kB | 2007-06-13 21:51 |
0 | 1.96 kB | |
0 | 1.96 kB | |
Tiger.Video.VFW.dll | 20.00 kB | 2007-06-07 18:09 |
0 | 1.96 kB | |
Tiger.Video.VFW.dll | 24.00 kB | 2007-06-07 20:26 |
vfw.csproj.FileList.txt | 276.00 B | 2007-06-15 15:17 |
vfw.csproj | 3.55 kB | 2007-03-16 20:38 |
Win32.cs | 9.81 kB | 2006-04-11 11:57 |
Sponsored links