Skip to content

Commit

Permalink
Add repeat btn to thumbnail controls
Browse files Browse the repository at this point in the history
  • Loading branch information
janarez committed Sep 8, 2024
1 parent ba117ae commit 0d31a39
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
1 change: 1 addition & 0 deletions InOculus/MainWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
<TaskbarItemInfo.ThumbButtonInfos>
<ThumbButtonInfoCollection>
<ThumbButtonInfo x:Name="thmStart" DismissWhenClicked="False" Click="BtnStart_Click"/>
<ThumbButtonInfo x:Name="thmRepeat" DismissWhenClicked="False" Click="BtnRepeat_Click"/>
</ThumbButtonInfoCollection>
</TaskbarItemInfo.ThumbButtonInfos>
</TaskbarItemInfo>
Expand Down
9 changes: 8 additions & 1 deletion InOculus/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ private void InitializeColorTheme()
imgSrcPlay = (ImageSource)converter.Convert(Icons.Play, typeof(ImageSource), null, null);
imgSrcStop = (ImageSource)converter.Convert(Icons.Stop, typeof(ImageSource), null, null);
thmStart.ImageSource = imgSrcPlay;
thmRepeat.ImageSource = (ImageSource)converter.Convert(Icons.Repeat, typeof(ImageSource), null, null);
}

#region CountDownTimer
Expand All @@ -145,13 +146,19 @@ private void BtnStart_Click(object sender, EventArgs e)
}
}

private void BtnRepeat_Click(object sender, EventArgs e)
{
focusOn = false;
BtnStart_Click(sender, e);
}

private void SetState(AppState state)
{
switch (state)
{
case AppState.Focus:
((App)Application.Current).SetState(AppState.Focus);
icnPlay.Kind = Icons.Stop;
icnPlay.Kind = Icons.StopLg;
thmStart.ImageSource = imgSrcStop;
arcCountDown.Visibility = Visibility.Visible;
break;
Expand Down
4 changes: 3 additions & 1 deletion InOculus/Utilities/Icons.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ namespace InOculus.Utilities
public static class Icons
{
public const PackIconBootstrapIconsKind Play = PlayFill;
public const PackIconBootstrapIconsKind Stop = StopFill;
public const PackIconBootstrapIconsKind StopLg = StopFill;
public const PackIconBootstrapIconsKind Stop = StopCircle;
public const PackIconBootstrapIconsKind Repeat = ArrowRepeat;
public const PackIconBootstrapIconsKind Settings = GearFill;
public const PackIconBootstrapIconsKind Stats = BarChartLineFill;
public const PackIconBootstrapIconsKind Close = X;
Expand Down

0 comments on commit 0d31a39

Please sign in to comment.