Clean up code a bit
This commit is contained in:
1 parent
ec64a797f5
commit
8d50d9f8d1
2 files changed
+24
-32
No files matched your search
@@ -364,10 +364,7 @@ namespace VocaluxeLib.Menu.SongMenu
|
|||||||
if (_SelectionNr > 0 && moveAllowed)
|
if (_SelectionNr > 0 && moveAllowed)
|
||||||
{
|
{
|
||||||
_SelectionNr--;
|
_SelectionNr--;
|
||||||
if (CBase.Config.GetAutoplayPreviews() == EOffOn.TR_CONFIG_ON)
|
_AutoplayPreviewIfEnabled();
|
||||||
{
|
|
||||||
_PreviewNr = _SelectionNr;
|
|
||||||
}
|
|
||||||
keyEvent.Handled = true;
|
keyEvent.Handled = true;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@@ -376,10 +373,7 @@ namespace VocaluxeLib.Menu.SongMenu
|
|||||||
if (moveAllowed)
|
if (moveAllowed)
|
||||||
{
|
{
|
||||||
_SelectionNr++;
|
_SelectionNr++;
|
||||||
if (CBase.Config.GetAutoplayPreviews() == EOffOn.TR_CONFIG_ON)
|
_AutoplayPreviewIfEnabled();
|
||||||
{
|
|
||||||
_PreviewNr = _SelectionNr;
|
|
||||||
}
|
|
||||||
keyEvent.Handled = true;
|
keyEvent.Handled = true;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@@ -396,10 +390,7 @@ namespace VocaluxeLib.Menu.SongMenu
|
|||||||
else if (_SelectionNr >= 1 && moveAllowed)
|
else if (_SelectionNr >= 1 && moveAllowed)
|
||||||
{
|
{
|
||||||
_SelectionNr -= 1;
|
_SelectionNr -= 1;
|
||||||
if (CBase.Config.GetAutoplayPreviews() == EOffOn.TR_CONFIG_ON)
|
_AutoplayPreviewIfEnabled();
|
||||||
{
|
|
||||||
_PreviewNr = _SelectionNr;
|
|
||||||
}
|
|
||||||
keyEvent.Handled = true;
|
keyEvent.Handled = true;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@@ -416,10 +407,7 @@ namespace VocaluxeLib.Menu.SongMenu
|
|||||||
else if (moveAllowed)
|
else if (moveAllowed)
|
||||||
{
|
{
|
||||||
_SelectionNr += 1;
|
_SelectionNr += 1;
|
||||||
if(CBase.Config.GetAutoplayPreviews() == EOffOn.TR_CONFIG_ON)
|
_AutoplayPreviewIfEnabled();
|
||||||
{
|
|
||||||
_PreviewNr = _SelectionNr;
|
|
||||||
}
|
|
||||||
keyEvent.Handled = true;
|
keyEvent.Handled = true;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@@ -572,6 +560,14 @@ namespace VocaluxeLib.Menu.SongMenu
|
|||||||
_UpdateListIfRequired();
|
_UpdateListIfRequired();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void _AutoplayPreviewIfEnabled()
|
||||||
|
{
|
||||||
|
if(CBase.Config.GetAutoplayPreviews() == EOffOn.TR_CONFIG_ON)
|
||||||
|
{
|
||||||
|
_PreviewNr = _SelectionNr;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private void _NextCategory()
|
private void _NextCategory()
|
||||||
{
|
{
|
||||||
if (CBase.Songs.IsInCategory())
|
if (CBase.Songs.IsInCategory())
|
||||||
|
|||||||
@@ -355,10 +355,7 @@ namespace VocaluxeLib.Menu.SongMenu
|
|||||||
if (_SelectionNr > 0 && moveAllowed)
|
if (_SelectionNr > 0 && moveAllowed)
|
||||||
{
|
{
|
||||||
_SelectionNr--;
|
_SelectionNr--;
|
||||||
if (CBase.Config.GetAutoplayPreviews() == EOffOn.TR_CONFIG_ON)
|
_AutoplayPreviewIfEnabled();
|
||||||
{
|
|
||||||
_PreviewNr = _SelectionNr;
|
|
||||||
}
|
|
||||||
keyEvent.Handled = true;
|
keyEvent.Handled = true;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@@ -367,10 +364,7 @@ namespace VocaluxeLib.Menu.SongMenu
|
|||||||
if (moveAllowed)
|
if (moveAllowed)
|
||||||
{
|
{
|
||||||
_SelectionNr++;
|
_SelectionNr++;
|
||||||
if (CBase.Config.GetAutoplayPreviews() == EOffOn.TR_CONFIG_ON)
|
_AutoplayPreviewIfEnabled();
|
||||||
{
|
|
||||||
_PreviewNr = _SelectionNr;
|
|
||||||
}
|
|
||||||
keyEvent.Handled = true;
|
keyEvent.Handled = true;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@@ -387,10 +381,7 @@ namespace VocaluxeLib.Menu.SongMenu
|
|||||||
else if (_SelectionNr >= _NumW && moveAllowed)
|
else if (_SelectionNr >= _NumW && moveAllowed)
|
||||||
{
|
{
|
||||||
_SelectionNr -= _NumW;
|
_SelectionNr -= _NumW;
|
||||||
if (CBase.Config.GetAutoplayPreviews() == EOffOn.TR_CONFIG_ON)
|
_AutoplayPreviewIfEnabled();
|
||||||
{
|
|
||||||
_PreviewNr = _SelectionNr;
|
|
||||||
}
|
|
||||||
keyEvent.Handled = true;
|
keyEvent.Handled = true;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@@ -407,10 +398,7 @@ namespace VocaluxeLib.Menu.SongMenu
|
|||||||
else if (moveAllowed)
|
else if (moveAllowed)
|
||||||
{
|
{
|
||||||
_SelectionNr += _NumW;
|
_SelectionNr += _NumW;
|
||||||
if (CBase.Config.GetAutoplayPreviews() == EOffOn.TR_CONFIG_ON)
|
_AutoplayPreviewIfEnabled();
|
||||||
{
|
|
||||||
_PreviewNr = _SelectionNr;
|
|
||||||
}
|
|
||||||
keyEvent.Handled = true;
|
keyEvent.Handled = true;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@@ -535,6 +523,14 @@ namespace VocaluxeLib.Menu.SongMenu
|
|||||||
_UpdateListIfRequired();
|
_UpdateListIfRequired();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void _AutoplayPreviewIfEnabled()
|
||||||
|
{
|
||||||
|
if (CBase.Config.GetAutoplayPreviews() == EOffOn.TR_CONFIG_ON)
|
||||||
|
{
|
||||||
|
_PreviewNr = _SelectionNr;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private void _NextCategory()
|
private void _NextCategory()
|
||||||
{
|
{
|
||||||
if (CBase.Songs.IsInCategory())
|
if (CBase.Songs.IsInCategory())
|
||||||
|
|||||||
Reference in new issue
Block a user