protected override void GoPrevious()
{
+ if (State == WorkoutState.Playing)
+ {
+ State = WorkoutState.Paused;
+ }
+
Services.NavigationService.Instance.NavigateToSummaryView(SummaryType.ChangeToPreviousWorkout, CurrentWorkout);
}
protected override void GoNext()
{
+ if (State == WorkoutState.Playing)
+ {
+ State = WorkoutState.Paused;
+ }
+
Services.NavigationService.Instance.NavigateToSummaryView(SummaryType.ChangeToNextWorkout, CurrentWorkout);
}
PauseView.Hide();
PlayingView.Show();
+ Preview.Play();
}
else
{
+ Preview.Pause();
PlayingView.Hide();
PauseView.Show();
{
UpdatePositionAndSize();
isInitialized = true;
+
+ LoadingView.Loaded += OnLoaded;
+ }
+
+ private void OnLoaded(object sender, System.EventArgs e)
+ {
+ Preview.Play();
}
private void UpdatePositionAndSize()
+using System;
using Fitness.Controls;
using Tizen.NUI;
using Tizen.NUI.BaseComponents;
CountingLabel.HeightSpecification = LayoutParamPolicies.MatchParent;
}
+ public event EventHandler Loaded;
+
private void CountingLabel_PropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e)
{
Services.Logger.Debug($"CountingLabel_PropertyChanged called for {e.PropertyName}. Text: {CountingLabel.Text}");
if (e.PropertyName == nameof(CountingLabel.Text) && CountingLabel.Text == string.Empty)
{
+ Loaded?.Invoke(this, EventArgs.Empty);
Hide();
}
}
<!--Layer-->
- <ImageView x:Name="Preview"
- ResourceUrl="*Resource*/layout/images/preview.png"/>
-
- <!--Layer-->
-
<ctrl:Camera x:Name="cameraView"
PreviewFps="Fps30"
PositionX="796"
<!--Layer-->
+ <VideoView x:Name="Preview"
+ Underlay="False"
+ ResourceUrl="{Binding CurrentWorkout.VideoUrl}"
+ Looping="True"/>
+
+ <!--Layer-->
+
<views:PauseView x:Name="PauseView"
BindingContext="{Binding Source={x:Reference Root}, Path=BindingContext}"/>
<!--Layer-->
-
+
<views:BarView BindingContext="{Binding Source={x:Reference Root}, Path=BindingContext}"
PrevCommand="{Binding PreviousWorkout}"
NextCommand="{Binding NextWorkout}"