Skip to content

Commit

Permalink
Add: 随机播放
Browse files Browse the repository at this point in the history
  • Loading branch information
kengwang committed Feb 25, 2021
1 parent c3fe8a6 commit 4354ec5
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
7 changes: 4 additions & 3 deletions HyPlayer/Controls/PlayBar.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -273,19 +273,20 @@
<ColumnDefinition />
<ColumnDefinition />
</Grid.ColumnDefinitions>
<Button
Style="{StaticResource ButtonRevealStyle}"
<ToggleButton
Style="{StaticResource ToggleButtonRevealStyle}"
Width="45"
Height="45"
CornerRadius="30"
Background="Transparent"
Grid.Column="2"
Name="BtnPlayRollType"
Click="BtnPlayRollType_OnClick"
VerticalAlignment="Center">
<FontIcon
FontFamily="{StaticResource SymbolThemeFontFamily}"
Glyph="&#xE14B;"></FontIcon>
</Button>
</ToggleButton>
<Button
Style="{StaticResource ButtonRevealStyle}"
Width="45"
Expand Down
6 changes: 6 additions & 0 deletions HyPlayer/Controls/PlayBar.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,12 @@ private void PlayListRemove_OnClick(object sender, RoutedEventArgs e)
catch { }

}

private void BtnPlayRollType_OnClick(object sender, RoutedEventArgs e)
{
HyPlayList.PlaybackList.ShuffleEnabled = !HyPlayList.PlaybackList.ShuffleEnabled;
BtnPlayRollType.IsChecked = HyPlayList.PlaybackList.ShuffleEnabled;
}
}


Expand Down

0 comments on commit 4354ec5

Please sign in to comment.