Skip to content

Instantly share code, notes, and snippets.

@mbmccormick
Created August 3, 2011 04:21
Show Gist options
  • Save mbmccormick/1121897 to your computer and use it in GitHub Desktop.
Save mbmccormick/1121897 to your computer and use it in GitHub Desktop.
public MainPage()
{
InitializeComponent();
CameraCaptureTask cct = new CameraCaptureTask(); // initalize task
cct.Completed += new System.EventHandler<PhotoResult>(this.PhotoChooserCompleted); // wire up the event
cct.Show(); // launch camera
}
private void PhotoChooserCompleted(object sender, PhotoResult e)
{
this.showInProgress = false;
if (e.TaskResult == TaskResult.OK) // if capture completed
{
this.StartOcrConversion(e.ChosenPhoto); // launch OCR service
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment