void LoadShooter(CameraType type) { primaryShooter = new CameraShooter(type); primaryCapture.Children.Add(primaryShooter); Canvas.SetLeft(primaryShooter, 5); Canvas.SetTop(primaryShooter, 5); primaryShooter.InitWidth = 600; primaryShooter.InitHeight = 0.75 * primaryShooter.InitWidth; primaryShooter.ListenTap(); primaryShooter.Captured += primaryShooter_Captured; primaryShooter.Initialized += primaryShooter_Initialized; primaryShooter.Start(); }
void LoadShooter(CameraType type) { primaryShooter = new CameraShooter(type); primaryCapture.Children.Add(primaryShooter); Canvas.SetLeft(primaryShooter, 5); Canvas.SetTop(primaryShooter, 5); primaryShooter.InitWidth = 600; primaryShooter.InitHeight = 0.75 * primaryShooter.InitWidth; primaryShooter.ListenTap(); primaryShooter.Captured += primaryShooter_Captured; primaryShooter.Initialized += primaryShooter_Initialized; primaryShooter.Start(); primaryShooter.Mute = true; maskImage.Tap += primaryCapture_Tap; this.Hold += AskToShare; }
void MainPage_Loaded(object sender, RoutedEventArgs e) { primaryShooter = new CameraShooter(CameraType.Primary); primaryCapture.Children.Add(primaryShooter); primaryShooter.InitWidth = 650; primaryShooter.InitHeight = 0.75 * primaryShooter.InitWidth; primaryShooter.ListenTap(); primaryShooter.Captured += primaryShooter_Captured; primaryShooter.Initialized += primaryShooter_Initialized; primaryShooter.Start(); secondShooter = new CameraShooter(CameraType.FrontFacing); secondCapture.Children.Add(secondShooter); secondShooter.InitWidth = 650; secondShooter.InitHeight = 0.75 * secondShooter.InitWidth; secondShooter.Captured += secondShooter_Captured; finalPicture.Tap += MovePhotographerTo; MainPage_OrientationChanged(null, null); this.OrientationChanged += MainPage_OrientationChanged; }