Example #1
0
 public Viewer()
 {
     this.InitializeComponent();
     this.vidview.Started += () =>
     {
         // We need to make sure components are initialized before hooking the buttons up,
         // or we'll get NREs if any dll or valid license for those components is missing.
         if (this.vidview.Snapshot != null)
         {
             this.snapshot.Click += (object sender, EventArgs e) =>
             {
                 if (this.vidview.Snapshot.Capture("original", this.locator = "file:///$(Pictures)/snapshot-$(Time:mmssfff).png") && this.checkBox1.Checked)
                 {
                     System.Diagnostics.Process.Start(locator.PlatformPath);
                 }
             };
         }
         // When the Vidview viewer is closed force shutdown of the full application.
         this.vidview.Closed += System.Windows.Forms.Application.Exit;
         // When the Vidview viewer is fully initialized open test://photo. In case of errors shut down the viewer and the application.
         if (!(this.vidview.Media != null && this.vidview.Media.Open("test://photo")))
         {
             this.vidview.Close();
         }
     };
 }
Example #2
0
		public Viewer()
		{
			this.InitializeComponent();
			this.vidview.Started += () =>
			{
				// We need to make sure components are initialized before hooking the buttons up, 
				// or we'll get NREs if any dll or valid license for those components is missing.
				if (this.vidview.Snapshot != null)
				{
					this.snapshot.Click += (object sender, EventArgs e) =>
					{
						if (this.vidview.Snapshot.Capture("original", this.locator = "file:///$(Pictures)/snapshot-$(Time:mmssfff).png") && this.checkBox1.Checked)
							System.Diagnostics.Process.Start(locator.PlatformPath);
					};
				}
				// When the Vidview viewer is closed force shutdown of the full application.
				this.vidview.Closed += System.Windows.Forms.Application.Exit;
				// When the Vidview viewer is fully initialized open test://photo. In case of errors shut down the viewer and the application.
				if (!(this.vidview.Media != null && this.vidview.Media.Open("test://photo")))
					this.vidview.Close();
			};
		}