コード例 #1
0
        public async Task SwapCameraAsync()
        {
            IsBusy = true;
            var successful = false;

            try
            {
                await streamingService.SwapCameraAsync();

                Settings.CameraPanel = streamingService.CameraPanel;

                successful = (streamingService.CurrentState == ScenarioState.Streaming);
            }
            catch
            { }
            finally
            {
                if (successful)
                {
                    await this.NotifyCameraPanelAsync();
                }
                else
                {
                    await this.NotifySwapCameraErrorAsync();
                }
            }

            IsBusy = false;
        }
コード例 #2
0
ファイル: MainViewModel.cs プロジェクト: matteobruni/See4Me
        public async Task SwapCameraAsync(SwipeDirection direction)
        {
            var successful = false;

            try
            {
                await streamingService.SwapCameraAsync();

                Settings.CameraPanel = streamingService.CameraPanel;

                successful = (streamingService.CurrentState == ScenarioState.Streaming);
            }
            catch
            { }
            finally
            {
                if (successful)
                {
                    await this.NotifyCameraPanelAsync();
                }
                else
                {
                    await this.NotifyInitializationErrorAsync();
                }
            }
        }