Compare commits
No commits in common. "6e4ed82211c91f195da43e87861537b2b979381a" and "e4b63073d86efb084b666a7a486a1d64e76a4ec1" have entirely different histories.
6e4ed82211
...
e4b63073d8
@ -28,7 +28,6 @@ namespace unison
|
|||||||
private const uint VK_MEDIA_PLAY_PAUSE = 0xB3;
|
private const uint VK_MEDIA_PLAY_PAUSE = 0xB3;
|
||||||
private const uint VK_VOLUME_UP = 0xAF;
|
private const uint VK_VOLUME_UP = 0xAF;
|
||||||
private const uint VK_VOLUME_DOWN = 0xAE;
|
private const uint VK_VOLUME_DOWN = 0xAE;
|
||||||
private const uint VK_VOLUME_MUTE = 0xAD;
|
|
||||||
private const uint VK_ENTER = 0x0D;
|
private const uint VK_ENTER = 0x0D;
|
||||||
|
|
||||||
private MainWindow _appWindow;
|
private MainWindow _appWindow;
|
||||||
@ -55,7 +54,6 @@ namespace unison
|
|||||||
RegisterHotKey(_windowHandle, HOTKEY_ID, MOD_CONTROL, VK_MEDIA_PLAY_PAUSE);
|
RegisterHotKey(_windowHandle, HOTKEY_ID, MOD_CONTROL, VK_MEDIA_PLAY_PAUSE);
|
||||||
RegisterHotKey(_windowHandle, HOTKEY_ID, MOD_CONTROL, VK_VOLUME_UP);
|
RegisterHotKey(_windowHandle, HOTKEY_ID, MOD_CONTROL, VK_VOLUME_UP);
|
||||||
RegisterHotKey(_windowHandle, HOTKEY_ID, MOD_CONTROL, VK_VOLUME_DOWN);
|
RegisterHotKey(_windowHandle, HOTKEY_ID, MOD_CONTROL, VK_VOLUME_DOWN);
|
||||||
RegisterHotKey(_windowHandle, HOTKEY_ID, MOD_CONTROL, VK_VOLUME_MUTE);
|
|
||||||
RegisterHotKey(_windowHandle, HOTKEY_ID, MOD_CONTROL | MOD_ALT, VK_ENTER);
|
RegisterHotKey(_windowHandle, HOTKEY_ID, MOD_CONTROL | MOD_ALT, VK_ENTER);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -81,9 +79,6 @@ namespace unison
|
|||||||
case VK_VOLUME_UP:
|
case VK_VOLUME_UP:
|
||||||
_mpd.VolumeUp();
|
_mpd.VolumeUp();
|
||||||
break;
|
break;
|
||||||
case VK_VOLUME_MUTE:
|
|
||||||
_mpd.VolumeMute();
|
|
||||||
break;
|
|
||||||
case VK_MEDIA_PLAY_PAUSE:
|
case VK_MEDIA_PLAY_PAUSE:
|
||||||
_mpd.PlayPause();
|
_mpd.PlayPause();
|
||||||
break;
|
break;
|
||||||
|
@ -25,7 +25,6 @@ namespace unison
|
|||||||
private bool _connected;
|
private bool _connected;
|
||||||
public string _version;
|
public string _version;
|
||||||
private int _currentVolume;
|
private int _currentVolume;
|
||||||
private int _previousVolume;
|
|
||||||
private bool _currentRandom;
|
private bool _currentRandom;
|
||||||
private bool _currentRepeat;
|
private bool _currentRepeat;
|
||||||
private bool _currentSingle;
|
private bool _currentSingle;
|
||||||
@ -450,21 +449,6 @@ namespace unison
|
|||||||
SetVolume(_currentVolume);
|
SetVolume(_currentVolume);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void VolumeMute()
|
|
||||||
{
|
|
||||||
if (_currentVolume == 0)
|
|
||||||
{
|
|
||||||
_currentVolume = _previousVolume;
|
|
||||||
_previousVolume = 0;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
_previousVolume = _currentVolume;
|
|
||||||
_currentVolume = 0;
|
|
||||||
}
|
|
||||||
SetVolume(_currentVolume);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void ClearQueue() => SendCommand(new ClearCommand());
|
public void ClearQueue() => SendCommand(new ClearCommand());
|
||||||
public void PlayCommand() => SendCommand(new PlayCommand(0));
|
public void PlayCommand() => SendCommand(new PlayCommand(0));
|
||||||
|
|
||||||
|
9
Resources/Resources.Designer.cs
generated
9
Resources/Resources.Designer.cs
generated
@ -420,15 +420,6 @@ namespace unison.Resources {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Looks up a localized string similar to Volume mute.
|
|
||||||
/// </summary>
|
|
||||||
public static string Settings_VolumeMute {
|
|
||||||
get {
|
|
||||||
return ResourceManager.GetString("Settings_VolumeMute", resourceCulture);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized string similar to Volume offset.
|
/// Looks up a localized string similar to Volume offset.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -237,9 +237,6 @@
|
|||||||
<data name="Settings_VolumeDown" xml:space="preserve">
|
<data name="Settings_VolumeDown" xml:space="preserve">
|
||||||
<value>Baisse de volume</value>
|
<value>Baisse de volume</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="Settings_VolumeMute" xml:space="preserve">
|
|
||||||
<value>Volume en sourdine</value>
|
|
||||||
</data>
|
|
||||||
<data name="Settings_VolumeOffset" xml:space="preserve">
|
<data name="Settings_VolumeOffset" xml:space="preserve">
|
||||||
<value>Écart de volume</value>
|
<value>Écart de volume</value>
|
||||||
</data>
|
</data>
|
||||||
|
@ -237,9 +237,6 @@
|
|||||||
<data name="Settings_VolumeDown" xml:space="preserve">
|
<data name="Settings_VolumeDown" xml:space="preserve">
|
||||||
<value>Volume down</value>
|
<value>Volume down</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="Settings_VolumeMute" xml:space="preserve">
|
|
||||||
<value>Volume mute</value>
|
|
||||||
</data>
|
|
||||||
<data name="Settings_VolumeOffset" xml:space="preserve">
|
<data name="Settings_VolumeOffset" xml:space="preserve">
|
||||||
<value>Volume offset</value>
|
<value>Volume offset</value>
|
||||||
</data>
|
</data>
|
||||||
|
@ -117,7 +117,7 @@
|
|||||||
<TextBlock x:Name="SnapcastText" Text="{x:Static properties:Resources.StartSnapcast}" Margin="5, 0, 0, 0"/>
|
<TextBlock x:Name="SnapcastText" Text="{x:Static properties:Resources.StartSnapcast}" Margin="5, 0, 0, 0"/>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</Button>
|
</Button>
|
||||||
<Button x:Name="Radio" Padding="5, 2" HorizontalAlignment="Left" Click="Radios_Clicked" Margin="5,0,10,0" Background="{DynamicResource {x:Static SystemColors.ControlBrushKey}}" FocusVisualStyle="{x:Null}">
|
<Button x:Name="Radio" Padding="5, 2" HorizontalAlignment="Left" Click="Radios_Clicked" Margin="5,0,10,0" Background="{DynamicResource {x:Static SystemColors.ControlBrushKey}}">
|
||||||
<StackPanel Orientation="Horizontal">
|
<StackPanel Orientation="Horizontal">
|
||||||
<emoji:TextBlock Text="📻" Padding="0,0,0,2"/>
|
<emoji:TextBlock Text="📻" Padding="0,0,0,2"/>
|
||||||
<TextBlock Text="{x:Static properties:Resources.Radios}" Margin="5, 0, 0, 0"/>
|
<TextBlock Text="{x:Static properties:Resources.Radios}" Margin="5, 0, 0, 0"/>
|
||||||
|
@ -162,7 +162,9 @@ namespace unison
|
|||||||
private void SearchHandler(object sender, KeyEventArgs e)
|
private void SearchHandler(object sender, KeyEventArgs e)
|
||||||
{
|
{
|
||||||
if (e.Key == Key.Return)
|
if (e.Key == Key.Return)
|
||||||
|
{
|
||||||
Search_Clicked(null, null);
|
Search_Clicked(null, null);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void Window_Closing(object sender, CancelEventArgs e)
|
private void Window_Closing(object sender, CancelEventArgs e)
|
||||||
|
@ -25,12 +25,12 @@
|
|||||||
<StackPanel>
|
<StackPanel>
|
||||||
<StackPanel>
|
<StackPanel>
|
||||||
<TextBlock Text="{x:Static properties:Resources.Settings_Host}" TextWrapping="Wrap" Margin="5,0,0,0"/>
|
<TextBlock Text="{x:Static properties:Resources.Settings_Host}" TextWrapping="Wrap" Margin="5,0,0,0"/>
|
||||||
<TextBox x:Name="MpdHost" KeyDown="ConnectHandler" TextWrapping="Wrap" Width="250" Margin="10,2,0,0"/>
|
<TextBox x:Name="MpdHost" TextWrapping="Wrap" Width="250" Margin="10,2,0,0"/>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|
||||||
<StackPanel Margin="0,5,0,0">
|
<StackPanel Margin="0,5,0,0">
|
||||||
<TextBlock Text="{x:Static properties:Resources.Settings_Port}" TextWrapping="Wrap" Margin="5,0,0,0"/>
|
<TextBlock Text="{x:Static properties:Resources.Settings_Port}" TextWrapping="Wrap" Margin="5,0,0,0"/>
|
||||||
<TextBox x:Name="MpdPort" KeyDown="ConnectHandler" MaxLength="5" PreviewTextInput="NumberValidationTextBox" TextWrapping="Wrap" Width="250" Margin="10,2,0,0"/>
|
<TextBox x:Name="MpdPort" MaxLength="5" PreviewTextInput="NumberValidationTextBox" TextWrapping="Wrap" Width="250" Margin="10,2,0,0"/>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|
||||||
<!--<StackPanel Margin="0,5,0,0">
|
<!--<StackPanel Margin="0,5,0,0">
|
||||||
@ -107,23 +107,20 @@
|
|||||||
<RowDefinition/>
|
<RowDefinition/>
|
||||||
<RowDefinition/>
|
<RowDefinition/>
|
||||||
<RowDefinition/>
|
<RowDefinition/>
|
||||||
<RowDefinition/>
|
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
<TextBlock Text="{x:Static properties:Resources.Settings_NextTrack}" TextWrapping="Wrap" Grid.Column="0" Grid.Row="0" Margin="1"/>
|
<TextBlock Text="{x:Static properties:Resources.Settings_NextTrack}" TextWrapping="Wrap" Grid.Column="0" Grid.Row="0" Margin="1"/>
|
||||||
<TextBlock Text="{x:Static properties:Resources.Settings_PreviousTrack}" TextWrapping="Wrap" Grid.Column="0" Grid.Row="1" Margin="1"/>
|
<TextBlock Text="{x:Static properties:Resources.Settings_PreviousTrack}" TextWrapping="Wrap" Grid.Column="0" Grid.Row="1" Margin="1"/>
|
||||||
<TextBlock Text="{x:Static properties:Resources.Settings_PlayPause}" TextWrapping="Wrap" Grid.Column="0" Grid.Row="2" Margin="1"/>
|
<TextBlock Text="{x:Static properties:Resources.Settings_PlayPause}" TextWrapping="Wrap" Grid.Column="0" Grid.Row="2" Margin="1"/>
|
||||||
<TextBlock Text="{x:Static properties:Resources.Settings_VolumeUp}" TextWrapping="Wrap" Grid.Column="0" Grid.Row="3" Margin="1"/>
|
<TextBlock Text="{x:Static properties:Resources.Settings_VolumeUp}" TextWrapping="Wrap" Grid.Column="0" Grid.Row="3" Margin="1"/>
|
||||||
<TextBlock Text="{x:Static properties:Resources.Settings_VolumeDown}" TextWrapping="Wrap" Grid.Column="0" Grid.Row="4" Margin="1"/>
|
<TextBlock Text="{x:Static properties:Resources.Settings_VolumeDown}" TextWrapping="Wrap" Grid.Column="0" Grid.Row="4" Margin="1"/>
|
||||||
<TextBlock Text="{x:Static properties:Resources.Settings_VolumeMute}" TextWrapping="Wrap" Grid.Column="0" Grid.Row="5" Margin="1"/>
|
<TextBlock Text="{x:Static properties:Resources.Settings_ShowWindow}" TextWrapping="Wrap" Grid.Column="0" Grid.Row="5" Margin="1"/>
|
||||||
<TextBlock Text="{x:Static properties:Resources.Settings_ShowWindow}" TextWrapping="Wrap" Grid.Column="0" Grid.Row="6" Margin="1"/>
|
|
||||||
|
|
||||||
<TextBlock Text="ctrl + media_next" TextWrapping="Wrap" Grid.Column="1" Grid.Row="0" Margin="1" HorizontalAlignment="Right" FontWeight="Bold"/>
|
<TextBlock Text="ctrl + media_next" TextWrapping="Wrap" Grid.Column="1" Grid.Row="0" Margin="1" HorizontalAlignment="Right" FontWeight="Bold"/>
|
||||||
<TextBlock Text="ctrl + media_prev" TextWrapping="Wrap" Grid.Column="1" Grid.Row="1" Margin="1" HorizontalAlignment="Right" FontWeight="Bold"/>
|
<TextBlock Text="ctrl + media_prev" TextWrapping="Wrap" Grid.Column="1" Grid.Row="1" Margin="1" HorizontalAlignment="Right" FontWeight="Bold"/>
|
||||||
<TextBlock Text="ctrl + media_play" TextWrapping="Wrap" Grid.Column="1" Grid.Row="2" Margin="1" HorizontalAlignment="Right" FontWeight="Bold"/>
|
<TextBlock Text="ctrl + media_play" TextWrapping="Wrap" Grid.Column="1" Grid.Row="2" Margin="1" HorizontalAlignment="Right" FontWeight="Bold"/>
|
||||||
<TextBlock Text="ctrl + volume_up" TextWrapping="Wrap" Grid.Column="1" Grid.Row="3" Margin="1" HorizontalAlignment="Right" FontWeight="Bold"/>
|
<TextBlock Text="ctrl + volume_up" TextWrapping="Wrap" Grid.Column="1" Grid.Row="3" Margin="1" HorizontalAlignment="Right" FontWeight="Bold"/>
|
||||||
<TextBlock Text="ctrl + volume_down" TextWrapping="Wrap" Grid.Column="1" Grid.Row="4" Margin="1" HorizontalAlignment="Right" FontWeight="Bold"/>
|
<TextBlock Text="ctrl + volume_down" TextWrapping="Wrap" Grid.Column="1" Grid.Row="4" Margin="1" HorizontalAlignment="Right" FontWeight="Bold"/>
|
||||||
<TextBlock Text="ctrl + volume_mute" TextWrapping="Wrap" Grid.Column="1" Grid.Row="5" Margin="1" HorizontalAlignment="Right" FontWeight="Bold"/>
|
<TextBlock Text="ctrl + alt + enter" TextWrapping="Wrap" Grid.Column="1" Grid.Row="5" Margin="1" HorizontalAlignment="Right" FontWeight="Bold"/>
|
||||||
<TextBlock Text="ctrl + alt + enter" TextWrapping="Wrap" Grid.Column="1" Grid.Row="6" Margin="1" HorizontalAlignment="Right" FontWeight="Bold"/>
|
|
||||||
</Grid>
|
</Grid>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
@ -101,12 +101,6 @@ namespace unison
|
|||||||
Properties.Settings.Default.Save();
|
Properties.Settings.Default.Save();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void ConnectHandler(object sender, KeyEventArgs e)
|
|
||||||
{
|
|
||||||
if (e.Key == Key.Return)
|
|
||||||
MPDConnect_Clicked(null, null);
|
|
||||||
}
|
|
||||||
|
|
||||||
private void Window_Closing(object sender, CancelEventArgs e)
|
private void Window_Closing(object sender, CancelEventArgs e)
|
||||||
{
|
{
|
||||||
e.Cancel = true;
|
e.Cancel = true;
|
||||||
|
Loading…
Reference in New Issue
Block a user