private async void ShutterButton_Click(object sender, RoutedEventArgs e) { if (CameraStatusUtility.IsContinuousShootingMode(target)) { await StopContShooting(); } }
private async void ShutterButton_Holding(object sender, HoldingRoutedEventArgs e) { if (CameraStatusUtility.IsContinuousShootingMode(target)) { await StartContShooting(); } else { ShutterButtonPressed(); } }
private async void HardwareButtons_CameraPressed(object sender, CameraEventArgs e) { if (CameraStatusUtility.IsContinuousShootingMode(target)) { await StartContShooting(); } else { ShutterButtonPressed(); } }
private void ShutterButton_Tapped(object sender, TappedRoutedEventArgs e) { if (CameraStatusUtility.IsContinuousShootingMode(target)) { AppShell.Current.Toast.PushToast(new ToastContent { Text = SystemUtil.GetStringResource("Message_ContinuousShootingGuide") }); } else { ShutterButtonPressed(); } }
private bool StartStopContShooting() { if (CameraStatusUtility.IsContinuousShootingMode(target)) { if (target?.Status?.Status == EventParam.Idle) { StartContShooting(); return(true); } else if (target?.Status?.Status == EventParam.StCapturing) { StopContShooting(); return(true); } } return(false); }
private async Task StopContShooting() { if (target == null) { return; } if ((PeriodicalShootingTask == null || !PeriodicalShootingTask.IsRunning) && CameraStatusUtility.IsContinuousShootingMode(target)) { try { await SequentialOperation.StopContinuousShooting(target.Api); } catch (RemoteApiException ex) { DebugUtil.Log(() => ex.StackTrace); AppShell.Current.Toast.PushToast(new ToastContent { Text = SystemUtil.GetStringResource("Error_StopContinuousShooting") }); } } }
private async Task StartContShooting() { if (target == null) { return; } if ((PeriodicalShootingTask == null || !PeriodicalShootingTask.IsRunning) && CameraStatusUtility.IsContinuousShootingMode(target)) { try { await target?.Api?.Camera?.StartContShootingAsync(); } catch (RemoteApiException ex) { DebugUtil.Log(() => ex.StackTrace); AppShell.Current.Toast.PushToast(new ToastContent { Text = SystemUtil.GetStringResource("ErrorMessage_shootingFailure") }); } } }