Advertisement
Guest User

Untitled

a guest
Nov 9th, 2014
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. using System;
  2. using System.Collections.Generic;
  3. using System.IO;
  4. using System.Linq;
  5. using System.Runtime.InteropServices.WindowsRuntime;
  6. using Windows.Foundation;
  7. using Windows.Foundation.Collections;
  8. using Windows.UI.Xaml;
  9. using Windows.UI.Xaml.Controls;
  10. using Windows.UI.Xaml.Controls.Primitives;
  11. using Windows.UI.Xaml.Data;
  12. using Windows.UI.Xaml.Input;
  13. using Windows.UI.Xaml.Media;
  14. using Windows.UI.Xaml.Navigation;
  15.  
  16. // The Blank Page item template is documented at http://go.microsoft.com/fwlink/?LinkId=234238
  17.  
  18. namespace Night_Vision
  19. {
  20.     /// <summary>
  21.     /// An empty page that can be used on its own or navigated to within a Frame.
  22.     /// </summary>
  23.     public sealed partial class MainPage : Page
  24.     {
  25.         NightVision camera;
  26.  
  27.         public MainPage()
  28.         {
  29.             this.InitializeComponent();
  30.             this.Loaded += MainPage_Loaded;
  31.         }
  32.  
  33.         void MainPage_Loaded(object sender, RoutedEventArgs e)
  34.         {
  35.             camera = NightVision.GetDefault();
  36.             camera.InitPreview(capturePreview);
  37.         }
  38.     }
  39. }
  40.  
  41.  
  42.  
  43. //////////////////////////////////////////mainpage.xaml///////////////////////////////////////////////
  44. <Page
  45.     x:Class="Night_Vision.MainPage"
  46.     xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  47.     xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  48.     xmlns:local="using:Night_Vision"
  49.     xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  50.     xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  51.     mc:Ignorable="d">
  52.  
  53.     <Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
  54.         <CaptureElement Name="capturePreview" VerticalAlignment="Center"/>
  55.     </Grid>
  56. </Page>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement