mirror of
https://github.com/Royce551/FRESHMusicPlayer.git
synced 2025-01-22 19:02:19 -05:00
stuff
This commit is contained in:
parent
b1a01d59d6
commit
a98af85088
2 changed files with 15 additions and 14 deletions
|
@ -115,6 +115,15 @@ namespace FRESHMusicPlayer
|
||||||
ProcessSettings(true);
|
ProcessSettings(true);
|
||||||
await UpdateHandler.UpdateApp();
|
await UpdateHandler.UpdateApp();
|
||||||
}
|
}
|
||||||
|
private void Window_Closed(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
App.Config.Volume = (int)VolumeBar.Value;
|
||||||
|
App.Config.CurrentMenu = SelectedMenu;
|
||||||
|
TrackingHandler?.Close();
|
||||||
|
ConfigurationHandler.Write(App.Config);
|
||||||
|
Libraryv2.Dispose();
|
||||||
|
Application.Current.Shutdown();
|
||||||
|
}
|
||||||
private void Smtc_ButtonPressed(SystemMediaTransportControls sender, SystemMediaTransportControlsButtonPressedEventArgs args)
|
private void Smtc_ButtonPressed(SystemMediaTransportControls sender, SystemMediaTransportControlsButtonPressedEventArgs args)
|
||||||
{
|
{
|
||||||
switch (args.Button)
|
switch (args.Button)
|
||||||
|
@ -426,11 +435,12 @@ namespace FRESHMusicPlayer
|
||||||
private void ProgressTimer_Tick(object sender, EventArgs e) => ProgressTick();
|
private void ProgressTimer_Tick(object sender, EventArgs e) => ProgressTick();
|
||||||
private void ProgressTick()
|
private void ProgressTick()
|
||||||
{
|
{
|
||||||
ProgressIndicator1.Text = Player.CurrentBackend.CurrentTime.ToString(@"mm\:ss");
|
var time = TimeSpan.FromSeconds(Math.Floor(Player.CurrentBackend.CurrentTime.TotalSeconds));
|
||||||
|
ProgressIndicator1.Text = time.ToString(@"mm\:ss");
|
||||||
if (App.Config.ShowRemainingProgress) ProgressIndicator2.Text
|
if (App.Config.ShowRemainingProgress) ProgressIndicator2.Text
|
||||||
= $"-{TimeSpan.FromSeconds(Player.CurrentBackend.TotalTime.TotalSeconds - Math.Floor(Player.CurrentBackend.CurrentTime.TotalSeconds)):mm\\:ss}";
|
= $"-{TimeSpan.FromSeconds(time.TotalSeconds - Math.Floor(Player.CurrentBackend.TotalTime.TotalSeconds)):mm\\:ss}";
|
||||||
if (App.Config.ShowTimeInWindow) Title = $"{Player.CurrentBackend.CurrentTime:mm\\:ss}/{Player.CurrentBackend.TotalTime:mm\\:ss} | FRESHMusicPlayer";
|
if (App.Config.ShowTimeInWindow) Title = $"{time:mm\\:ss}/{Player.CurrentBackend.TotalTime:mm\\:ss} | FRESHMusicPlayer";
|
||||||
if (!isDragging) ProgressBar.Value = Player.CurrentBackend.CurrentTime.TotalSeconds;
|
if (!isDragging) ProgressBar.Value = time.TotalSeconds;
|
||||||
Player.AvoidNextQueue = false;
|
Player.AvoidNextQueue = false;
|
||||||
}
|
}
|
||||||
private void TrackTitle_MouseLeftButtonDown(object sender, MouseButtonEventArgs e) => ShowAuxilliaryPane(SelectedAuxiliaryPane.TrackInfo, 235, true);
|
private void TrackTitle_MouseLeftButtonDown(object sender, MouseButtonEventArgs e) => ShowAuxilliaryPane(SelectedAuxiliaryPane.TrackInfo, 235, true);
|
||||||
|
@ -514,15 +524,6 @@ namespace FRESHMusicPlayer
|
||||||
Player.PlayMusic();
|
Player.PlayMusic();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void Window_Closed(object sender, EventArgs e)
|
|
||||||
{
|
|
||||||
App.Config.Volume = (int)VolumeBar.Value;
|
|
||||||
App.Config.CurrentMenu = SelectedMenu;
|
|
||||||
TrackingHandler?.Close();
|
|
||||||
ConfigurationHandler.Write(App.Config);
|
|
||||||
Application.Current.Shutdown();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void Window_PreviewKeyDown(object sender, KeyEventArgs e)
|
private void Window_PreviewKeyDown(object sender, KeyEventArgs e)
|
||||||
{
|
{
|
||||||
if (Keyboard.IsKeyDown(Key.LeftCtrl) || Keyboard.IsKeyDown(Key.RightCtrl))
|
if (Keyboard.IsKeyDown(Key.LeftCtrl) || Keyboard.IsKeyDown(Key.RightCtrl))
|
||||||
|
|
|
@ -58,7 +58,7 @@
|
||||||
<ComboBoxItem Content="Test2"/>
|
<ComboBoxItem Content="Test2"/>
|
||||||
</ComboBox>
|
</ComboBox>
|
||||||
</Grid>-->
|
</Grid>-->
|
||||||
<CheckBox x:Name="General_ProgressCheck" Content="{x:Static resx:Resources.SETTINGS_TIMEWINDOWTITLE}" FontSize="14" Foreground="{StaticResource PrimaryTextColor}" Checked="General_ProgressChanged" Unchecked="General_ProgressChanged"/>
|
<CheckBox x:Name="General_ProgressCheck" Content="{x:Static resx:Resources.SETTINGS_TIMEWINDOWTITLE}" FontSize="14" Foreground="{StaticResource PrimaryTextColor}" Checked="General_ProgressChanged" Unchecked="General_ProgressChanged" Margin="0,0,0,5"/>
|
||||||
<CheckBox x:Name="General_TrackingCheck" Content="Playback Tracking" FontSize="14" Foreground="{StaticResource PrimaryTextColor}" Checked="General_TrackingChanged" Unchecked="General_TrackingChanged"/>
|
<CheckBox x:Name="General_TrackingCheck" Content="Playback Tracking" FontSize="14" Foreground="{StaticResource PrimaryTextColor}" Checked="General_TrackingChanged" Unchecked="General_TrackingChanged"/>
|
||||||
<TextBlock Text="{x:Static resx:Resources.SETTINGS_INTEGRATION}" Foreground="{StaticResource PrimaryTextColor}" FontSize="16" FontWeight="Bold" Padding="0,0,0,5" Margin="-10,0,0,0"/>
|
<TextBlock Text="{x:Static resx:Resources.SETTINGS_INTEGRATION}" Foreground="{StaticResource PrimaryTextColor}" FontSize="16" FontWeight="Bold" Padding="0,0,0,5" Margin="-10,0,0,0"/>
|
||||||
<CheckBox x:Name="Integration_DiscordRPCCheck" Content="Discord Rich Presence" FontSize="14" Foreground="{StaticResource PrimaryTextColor}" Margin="0,0,0,5" Checked="General_DiscordRPCChanged" Unchecked="General_DiscordRPCChanged"/>
|
<CheckBox x:Name="Integration_DiscordRPCCheck" Content="Discord Rich Presence" FontSize="14" Foreground="{StaticResource PrimaryTextColor}" Margin="0,0,0,5" Checked="General_DiscordRPCChanged" Unchecked="General_DiscordRPCChanged"/>
|
||||||
|
|
Loading…
Reference in a new issue