示例#1
0
 private async void ShutterButton_Click(object sender, RoutedEventArgs e)
 {
     if (CameraStatusUtility.IsContinuousShootingMode(target))
     {
         await StopContShooting();
     }
 }
示例#2
0
 private async void ShutterButton_Holding(object sender, HoldingRoutedEventArgs e)
 {
     if (CameraStatusUtility.IsContinuousShootingMode(target))
     {
         await StartContShooting();
     }
     else
     {
         ShutterButtonPressed();
     }
 }
示例#3
0
 private async void HardwareButtons_CameraPressed(object sender, CameraEventArgs e)
 {
     if (CameraStatusUtility.IsContinuousShootingMode(target))
     {
         await StartContShooting();
     }
     else
     {
         ShutterButtonPressed();
     }
 }
示例#4
0
 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();
     }
 }
示例#5
0
        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);
        }
示例#6
0
 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")
             });
         }
     }
 }
示例#7
0
 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")
             });
         }
     }
 }