diff --git a/PartyModes/PartyModeChallenge/CPartyModeChallenge.cs b/PartyModes/PartyModeChallenge/CPartyModeChallenge.cs index 500c3551..e1e74466 100644 --- a/PartyModes/PartyModeChallenge/CPartyModeChallenge.cs +++ b/PartyModes/PartyModeChallenge/CPartyModeChallenge.cs @@ -636,7 +636,8 @@ namespace VocaluxeLib.PartyModes.Challenge int pos = 1; int lastPoints = 0; int lastSingPoints = 0; - foreach (CResultTableRow resultRow in _GameData.ResultTable) { + foreach (CResultTableRow resultRow in _GameData.ResultTable) + { if (lastPoints > resultRow.NumGamePoints || lastSingPoints > resultRow.NumSingPoints) pos++; resultRow.Position = pos; diff --git a/PartyModes/PartyModeChallenge/CPartyScreenChallengeMain.cs b/PartyModes/PartyModeChallenge/CPartyScreenChallengeMain.cs index edd15420..85730d80 100644 --- a/PartyModes/PartyModeChallenge/CPartyScreenChallengeMain.cs +++ b/PartyModes/PartyModeChallenge/CPartyScreenChallengeMain.cs @@ -409,7 +409,8 @@ namespace VocaluxeLib.PartyModes.Challenge _RoundsTable.Add(rtr); } //Create statics and texts for rounds - foreach (CRoundsTableRow roundRow in _RoundsTable) { + foreach (CRoundsTableRow roundRow in _RoundsTable) + { //Round-number CText text = GetNewText(_Texts[_TextRoundNumber]); _AddText(text); @@ -451,7 +452,8 @@ namespace VocaluxeLib.PartyModes.Challenge float delta = _Texts[_TextRoundNumber].Height; //Update statics and texts for rounds - foreach (CRoundsTableRow roundRow in _RoundsTable) { + foreach (CRoundsTableRow roundRow in _RoundsTable) + { //Round-number roundRow.Number.X = numberX; roundRow.Number.Y = numberY; diff --git a/PartyModes/PartyModeChallengeMedley/CChallengeRounds.cs b/PartyModes/PartyModeChallengeMedley/CChallengeRounds.cs index 2a3bc286..4114320b 100644 --- a/PartyModes/PartyModeChallengeMedley/CChallengeRounds.cs +++ b/PartyModes/PartyModeChallengeMedley/CChallengeRounds.cs @@ -157,21 +157,15 @@ namespace VocaluxeLib.PartyModes.ChallengeMedley //filter against PlayerNrDemand List combsFiltered = new List(); if (playerNrDemand != null) - { combsFiltered.AddRange(_Combs.Where(t => t.IsAvailableAll(playerNrDemand))); - } //1st fallback if (playerNrDemand != null && combsFiltered.Count == 0) - { combsFiltered.AddRange(_Combs.Where(t => t.IsAvailableSomeone(playerNrDemand))); - } //2nd fallback if (combsFiltered.Count == 0) - { combsFiltered.AddRange(_Combs); - } int num = combsFiltered.Count; int rand = _Rand.Next(num); diff --git a/PartyModes/PartyModeChallengeMedley/CPartyModeChallengeMedley.cs b/PartyModes/PartyModeChallengeMedley/CPartyModeChallengeMedley.cs index 76d3fd64..409ee742 100644 --- a/PartyModes/PartyModeChallengeMedley/CPartyModeChallengeMedley.cs +++ b/PartyModes/PartyModeChallengeMedley/CPartyModeChallengeMedley.cs @@ -702,7 +702,8 @@ namespace VocaluxeLib.PartyModes.ChallengeMedley int pos = 1; int lastPoints = 0; int lastSingPoints = 0; - foreach (CResultTableRow resultRow in _GameData.ResultTable) { + foreach (CResultTableRow resultRow in _GameData.ResultTable) + { if (lastPoints > resultRow.NumGamePoints || lastSingPoints > resultRow.NumSingPoints) pos++; resultRow.Position = pos; diff --git a/PartyModes/PartyModeChallengeMedley/CPartyScreenChallengeMedleyMain.cs b/PartyModes/PartyModeChallengeMedley/CPartyScreenChallengeMedleyMain.cs index aa5b60a8..02343aa0 100644 --- a/PartyModes/PartyModeChallengeMedley/CPartyScreenChallengeMedleyMain.cs +++ b/PartyModes/PartyModeChallengeMedley/CPartyScreenChallengeMedleyMain.cs @@ -409,7 +409,8 @@ namespace VocaluxeLib.PartyModes.ChallengeMedley _RoundsTable.Add(rtr); } //Create statics and texts for rounds - foreach (CRoundsTableRow roundRow in _RoundsTable) { + foreach (CRoundsTableRow roundRow in _RoundsTable) + { //Round-number CText text = GetNewText(_Texts[_TextRoundNumber]); _AddText(text); @@ -451,7 +452,8 @@ namespace VocaluxeLib.PartyModes.ChallengeMedley float delta = _Texts[_TextRoundNumber].Height; //Update statics and texts for rounds - foreach (CRoundsTableRow roundRow in _RoundsTable) { + foreach (CRoundsTableRow roundRow in _RoundsTable) + { //Round-number roundRow.Number.X = numberX; roundRow.Number.Y = numberY; diff --git a/PartyModes/PartyModeChallengeMedley/CPartyScreenChallengeMedleyNames.cs b/PartyModes/PartyModeChallengeMedley/CPartyScreenChallengeMedleyNames.cs index 8ca5bfec..e073f362 100644 --- a/PartyModes/PartyModeChallengeMedley/CPartyScreenChallengeMedleyNames.cs +++ b/PartyModes/PartyModeChallengeMedley/CPartyScreenChallengeMedleyNames.cs @@ -453,7 +453,8 @@ namespace VocaluxeLib.PartyModes.ChallengeMedley private bool _OnAdd() { - foreach (CPlayerChooseButton chooseButton in _PlayerChooseButtons) { + foreach (CPlayerChooseButton chooseButton in _PlayerChooseButtons) + { if (chooseButton.Button.Selected && chooseButton.ProfileID != -1) { if (_Data.ScreenNames.ProfileIDs.Count < _NumPlayer) diff --git a/PartyModes/PartyModeTicTacToe/CPartyScreenTicTacToeNames.cs b/PartyModes/PartyModeTicTacToe/CPartyScreenTicTacToeNames.cs index 588cc22f..9e29b916 100644 --- a/PartyModes/PartyModeTicTacToe/CPartyScreenTicTacToeNames.cs +++ b/PartyModes/PartyModeTicTacToe/CPartyScreenTicTacToeNames.cs @@ -173,7 +173,8 @@ namespace VocaluxeLib.PartyModes.TicTacToe _OldMouseX = mouseEvent.X; _OldMouseY = mouseEvent.Y; //Check if mouse if over tile - foreach (CPlayerChooseButton chooseButton in _PlayerChooseButtons) { + foreach (CPlayerChooseButton chooseButton in _PlayerChooseButtons) + { if (chooseButton.Button.Selected) { _SelectedPlayerNr = chooseButton.ProfileID; @@ -445,9 +446,7 @@ namespace VocaluxeLib.PartyModes.TicTacToe bool visible = false; //Show profile only if active if (CBase.Profiles.GetProfiles()[i].Active == EOffOn.TR_CONFIG_ON) - { visible = _Data.ScreenNames.ProfileIDsTeam1.All(t => t != i) && _Data.ScreenNames.ProfileIDsTeam2.All(t => t != i); - } if (visible) _PlayerChooseButtonsVisibleProfiles.Add(i); } diff --git a/Vocaluxe/Base/CConfig.cs b/Vocaluxe/Base/CConfig.cs index 32f00ea8..bb43c7a2 100644 --- a/Vocaluxe/Base/CConfig.cs +++ b/Vocaluxe/Base/CConfig.cs @@ -121,13 +121,14 @@ namespace Vocaluxe.Base public static int BackgroundMusicVolume { get { return _BackgroundMusicVolume; } - set { - if (value < 0) - _BackgroundMusicVolume = 0; - else if (value > 100) - _BackgroundMusicVolume = 100; - else - _BackgroundMusicVolume = value; + set + { + if (value < 0) + _BackgroundMusicVolume = 0; + else if (value > 100) + _BackgroundMusicVolume = 100; + else + _BackgroundMusicVolume = value; SaveConfig(); } } diff --git a/Vocaluxe/Base/CDataBase.cs b/Vocaluxe/Base/CDataBase.cs index 25bd8251..a06ea759 100644 --- a/Vocaluxe/Base/CDataBase.cs +++ b/Vocaluxe/Base/CDataBase.cs @@ -1223,7 +1223,7 @@ namespace Vocaluxe.Base } //If you want to add an image to db, call this method! -/* + /* private static bool _AddImageToCreditsDB(String imagePath) { bool result = false; @@ -1353,7 +1353,7 @@ namespace Vocaluxe.Base return true; } -/* + /* private static void _CreateCreditsRessourcesDB() { using (SQLiteConnection connection = new SQLiteConnection()) diff --git a/Vocaluxe/Base/CFont.cs b/Vocaluxe/Base/CFont.cs index 68a8b44d..7b9b8cf0 100644 --- a/Vocaluxe/Base/CFont.cs +++ b/Vocaluxe/Base/CFont.cs @@ -557,7 +557,7 @@ namespace Vocaluxe.Base { //return TextRenderer.MeasureText(text, GetFont()).Height; CFont font = _GetCurrentFont(); - return text==""?0:text.Select(font.GetHeight).Max(); + return text == "" ? 0 : text.Select(font.GetHeight).Max(); } private static void _LoadFontFiles(CXMLReader xmlReader, string fontFolder, string themeName = "", int partyModeId = -1) diff --git a/Vocaluxe/Base/CGraphics.cs b/Vocaluxe/Base/CGraphics.cs index a6743486..b228a042 100644 --- a/Vocaluxe/Base/CGraphics.cs +++ b/Vocaluxe/Base/CGraphics.cs @@ -265,7 +265,8 @@ namespace Vocaluxe.Base CLog.StopBenchmark(1, "Load Theme " + Enum.GetNames(typeof(EScreens))[i]); } - foreach (IMenu popup in _PopupScreens) { + foreach (IMenu popup in _PopupScreens) + { popup.Init(); popup.LoadTheme(CTheme.GetThemeScreensPath(-1)); } diff --git a/Vocaluxe/Base/CMain.cs b/Vocaluxe/Base/CMain.cs index 59e7d962..47d6c0f3 100644 --- a/Vocaluxe/Base/CMain.cs +++ b/Vocaluxe/Base/CMain.cs @@ -58,7 +58,7 @@ namespace Vocaluxe.Base { public void SetBackgroundMusicVolume(int newVolume) { - CConfig.BackgroundMusicVolume = newVolume; + CConfig.BackgroundMusicVolume = newVolume; } public int GetBackgroundMusicVolume() diff --git a/Vocaluxe/Base/CParty.cs b/Vocaluxe/Base/CParty.cs index 9d9baee4..1cbd1485 100644 --- a/Vocaluxe/Base/CParty.cs +++ b/Vocaluxe/Base/CParty.cs @@ -101,7 +101,8 @@ namespace Vocaluxe.Base int[] pmIDs = new int[_PartyModes.Count]; _PartyModes.Keys.CopyTo(pmIDs, 0); - foreach (int pmID in pmIDs) { + foreach (int pmID in pmIDs) + { if (pmID != _NormalGameModeID) { SPartyMode mode; diff --git a/Vocaluxe/Base/CPlaylists.cs b/Vocaluxe/Base/CPlaylists.cs index 7611d242..78d4343f 100644 --- a/Vocaluxe/Base/CPlaylists.cs +++ b/Vocaluxe/Base/CPlaylists.cs @@ -262,7 +262,8 @@ namespace Vocaluxe.Base string artist = line.Substring(0, pos - 1).Trim(); string title = line.Substring(pos + 1, line.Length - pos - 1).Trim(); bool found = false; - foreach (CSong song in allSongs) { + foreach (CSong song in allSongs) + { if (song.Artist == artist && song.Title == title) { pl.AddSong(song.ID); diff --git a/Vocaluxe/Base/CSettings.cs b/Vocaluxe/Base/CSettings.cs index 9ac6659c..5fa38628 100644 --- a/Vocaluxe/Base/CSettings.cs +++ b/Vocaluxe/Base/CSettings.cs @@ -47,7 +47,6 @@ namespace Vocaluxe.Base public static EGameState GameState = EGameState.Start; - //Adjusting of programName and version now in the assembly config. //I'd use the major and minor for Main releases, build number for every public release and revision for every bugfix version without any features //As it is different than before, this is open for discussion. diff --git a/Vocaluxe/Base/CSongSorter.cs b/Vocaluxe/Base/CSongSorter.cs index 96e39b3d..6d10957b 100644 --- a/Vocaluxe/Base/CSongSorter.cs +++ b/Vocaluxe/Base/CSongSorter.cs @@ -92,7 +92,7 @@ namespace Vocaluxe.Base if (_IgnoreArticles == EOffOn.TR_CONFIG_ON) { res = String.Compare(CSongs.Songs[s1.SongID].ArtistSorting, CSongs.Songs[s2.SongID].ArtistSorting, StringComparison.OrdinalIgnoreCase); - return res != 0 ? res: String.Compare(CSongs.Songs[s1.SongID].TitleSorting, CSongs.Songs[s2.SongID].TitleSorting, StringComparison.OrdinalIgnoreCase); + return res != 0 ? res : String.Compare(CSongs.Songs[s1.SongID].TitleSorting, CSongs.Songs[s2.SongID].TitleSorting, StringComparison.OrdinalIgnoreCase); } res = String.Compare(CSongs.Songs[s1.SongID].Artist, CSongs.Songs[s2.SongID].Artist, StringComparison.OrdinalIgnoreCase); return res != 0 ? res : String.Compare(CSongs.Songs[s1.SongID].Title, CSongs.Songs[s2.SongID].Title, StringComparison.OrdinalIgnoreCase); diff --git a/Vocaluxe/Base/CSongs.cs b/Vocaluxe/Base/CSongs.cs index bdde132d..b2780e53 100644 --- a/Vocaluxe/Base/CSongs.cs +++ b/Vocaluxe/Base/CSongs.cs @@ -89,10 +89,7 @@ namespace Vocaluxe.Base public static int NumVisibleSongs { - get - { - return Sorter.SortedSongs.Count(sp => sp.Visible); - } + get { return Sorter.SortedSongs.Count(sp => sp.Visible); } } public static int NumCategories diff --git a/Vocaluxe/Base/CUtility.cs b/Vocaluxe/Base/CUtility.cs index d811eee6..5751a797 100644 --- a/Vocaluxe/Base/CUtility.cs +++ b/Vocaluxe/Base/CUtility.cs @@ -171,9 +171,9 @@ namespace Vocaluxe.Base _KeyPressed = true; } -// ReSharper disable UnusedParameter.Global + // ReSharper disable UnusedParameter.Global public void KeyUp(KeyEventArgs e) -// ReSharper restore UnusedParameter.Global + // ReSharper restore UnusedParameter.Global { _CheckModifiers(); _KeyPressed = false; @@ -288,9 +288,9 @@ namespace Vocaluxe.Base e.Button == MouseButtons.Middle, false); } -// ReSharper disable UnusedParameter.Global + // ReSharper disable UnusedParameter.Global public void MouseUp(MouseEventArgs e) -// ReSharper restore UnusedParameter.Global + // ReSharper restore UnusedParameter.Global { //CheckModifiers(); //Add(_ModALT, _ModSHIFT, _ModCTRL, e.X, e.Y, e.Button == MouseButtons.Left, e.Button == MouseButtons.Right, e.Delta); diff --git a/Vocaluxe/Lib/Input/CHIDAPI.cs b/Vocaluxe/Lib/Input/CHIDAPI.cs index cfdc847b..d90e50d7 100644 --- a/Vocaluxe/Lib/Input/CHIDAPI.cs +++ b/Vocaluxe/Lib/Input/CHIDAPI.cs @@ -26,7 +26,7 @@ namespace Vocaluxe.Lib.Input [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)] public struct SHIDDeviceInfo { -// ReSharper disable MemberCanBePrivate.Global + // ReSharper disable MemberCanBePrivate.Global [MarshalAs(UnmanagedType.LPTStr)] public readonly String Path; public readonly ushort VendorString; public readonly ushort ProductID; diff --git a/Vocaluxe/Lib/Sound/CGstreamerAudio.cs b/Vocaluxe/Lib/Sound/CGstreamerAudio.cs index 0d033842..cc207e3e 100644 --- a/Vocaluxe/Lib/Sound/CGstreamerAudio.cs +++ b/Vocaluxe/Lib/Sound/CGstreamerAudio.cs @@ -28,7 +28,6 @@ namespace Vocaluxe.Lib.Sound //static float LastPosition; #region log - private static void _LogHandler(string text) { CLog.LogError(text); diff --git a/Vocaluxe/Lib/Sound/IRecord.cs b/Vocaluxe/Lib/Sound/IRecord.cs index 6d618901..2246f3e3 100644 --- a/Vocaluxe/Lib/Sound/IRecord.cs +++ b/Vocaluxe/Lib/Sound/IRecord.cs @@ -46,9 +46,9 @@ namespace Vocaluxe.Lib.Sound public string InputName; public int Channel; -// ReSharper disable UnusedParameter.Local + // ReSharper disable UnusedParameter.Local public SMicConfig(int dummy) -// ReSharper restore UnusedParameter.Local + // ReSharper restore UnusedParameter.Local { DeviceName = String.Empty; DeviceDriver = String.Empty; diff --git a/Vocaluxe/Lib/Sound/Portaudio/PortAudio.cs b/Vocaluxe/Lib/Sound/Portaudio/PortAudio.cs index a69b6a18..8b357690 100644 --- a/Vocaluxe/Lib/Sound/Portaudio/PortAudio.cs +++ b/Vocaluxe/Lib/Sound/Portaudio/PortAudio.cs @@ -29,8 +29,8 @@ namespace Vocaluxe.Lib.Sound.PortAudio */ // ReSharper disable UnusedMember.Global // ReSharper disable FieldCanBeMadeReadOnly.Global -// ReSharper disable MemberCanBePrivate.Global - + // ReSharper disable MemberCanBePrivate.Global + public static class CPortAudio { #region **** PORTAUDIO CALLBACKS **** @@ -52,8 +52,7 @@ namespace Vocaluxe.Lib.Sound.PortAudio public struct SPaDeviceInfo { public int StructVersion; - [MarshalAs(UnmanagedType.LPStr)] - public string Name; + [MarshalAs(UnmanagedType.LPStr)] public string Name; public int HostApi; public int MaxInputChannels; public int MaxOutputChannels; @@ -554,8 +553,8 @@ namespace Vocaluxe.Lib.Sound.PortAudio public static extern void Pa_Sleep(int msec); #endregion } + // ReSharper restore UnusedMember.Global // ReSharper restore FieldCanBeMadeReadOnly.Global // ReSharper restore MemberCanBePrivate.Global - } \ No newline at end of file diff --git a/Vocaluxe/Screens/CScreenCredits.cs b/Vocaluxe/Screens/CScreenCredits.cs index d8a17f78..2105392e 100644 --- a/Vocaluxe/Screens/CScreenCredits.cs +++ b/Vocaluxe/Screens/CScreenCredits.cs @@ -201,7 +201,8 @@ namespace Vocaluxe.Screens //Prepare Text int lastY = 280; - foreach (string[] paragraph in _Paragraphs) { + foreach (string[] paragraph in _Paragraphs) + { string line = ""; for (int e = 0; e < paragraph.Length; e++) { diff --git a/Vocaluxe/Screens/CScreenSing.cs b/Vocaluxe/Screens/CScreenSing.cs index 6b297c31..d507ab2f 100644 --- a/Vocaluxe/Screens/CScreenSing.cs +++ b/Vocaluxe/Screens/CScreenSing.cs @@ -631,9 +631,7 @@ namespace Vocaluxe.Screens if (CGame.GetNumSongs() > 1) { for (int i = 0; i < CGame.NumPlayer; i++) - { - CGame.Player[i].LineNr = (i+1) % 2; - } + CGame.Player[i].LineNr = (i + 1) % 2; } else { @@ -644,9 +642,7 @@ namespace Vocaluxe.Screens _SetDuetLyricsVisibility(song.IsDuet); for (int p = 0; p < CGame.NumPlayer; p++) - { - _NoteLines[p] = _SingNotes[_SingBars].AddPlayer(_SingNotes[_SingBars].BarPos[p, CGame.NumPlayer - 1],CTheme.GetPlayerColor(p + 1),p); - } + _NoteLines[p] = _SingNotes[_SingBars].AddPlayer(_SingNotes[_SingBars].BarPos[p, CGame.NumPlayer - 1], CTheme.GetPlayerColor(p + 1), p); /* case 4: diff --git a/Vocaluxe/Screens/CScreenSong.cs b/Vocaluxe/Screens/CScreenSong.cs index b626d906..054fddf3 100644 --- a/Vocaluxe/Screens/CScreenSong.cs +++ b/Vocaluxe/Screens/CScreenSong.cs @@ -802,9 +802,7 @@ namespace Vocaluxe.Screens if (_AvailableGameModes.Count >= _SelectSlides[_SelectSlideOptionsMode].Selection) gm = _AvailableGameModes[_SelectSlides[_SelectSlideOptionsMode].Selection]; else - { gm = CSongs.VisibleSongs[songNr].IsDuet ? EGameMode.TR_GAMEMODE_DUET : EGameMode.TR_GAMEMODE_NORMAL; - } CGame.Reset(); CGame.ClearSongs(); diff --git a/Vocaluxe/Screens/CScreenTest.cs b/Vocaluxe/Screens/CScreenTest.cs index fbc91fbb..3fa3f2e4 100644 --- a/Vocaluxe/Screens/CScreenTest.cs +++ b/Vocaluxe/Screens/CScreenTest.cs @@ -32,7 +32,7 @@ namespace Vocaluxe.Screens get { return 1; } } -/* + /* private int _TestMusic = -1; */ diff --git a/VocaluxeLib/Menu/CNameSelection.cs b/VocaluxeLib/Menu/CNameSelection.cs index 5ed4a934..29a2e73e 100644 --- a/VocaluxeLib/Menu/CNameSelection.cs +++ b/VocaluxeLib/Menu/CNameSelection.cs @@ -106,10 +106,12 @@ namespace VocaluxeLib.Menu { _PrepareTiles(); - _PlayerSelector = new CStatic(_PartyModeID) { - Texture = _TextureTileSelected, - Rect = new SRectF(0, 0, _TileW + 6, _TileH + 6, Rect.Z - 0.5f), - Visible = false}; + _PlayerSelector = new CStatic(_PartyModeID) + { + Texture = _TextureTileSelected, + Rect = new SRectF(0, 0, _TileW + 6, _TileH + 6, Rect.Z - 0.5f), + Visible = false + }; _UpdateVisibleProfiles(); diff --git a/VocaluxeLib/Menu/CPlaylist.cs b/VocaluxeLib/Menu/CPlaylist.cs index b1a4184e..95f02019 100644 --- a/VocaluxeLib/Menu/CPlaylist.cs +++ b/VocaluxeLib/Menu/CPlaylist.cs @@ -500,24 +500,27 @@ namespace VocaluxeLib.Menu { if (keyEvent.KeyPressed && !Char.IsControl(keyEvent.Unicode)) _Theme.ButtonPlaylistName.Text.Text = _Theme.ButtonPlaylistName.Text.Text + keyEvent.Unicode; - else switch (keyEvent.Key) + else { - case Keys.Enter: - CBase.Playlist.SetPlaylistName(ActivePlaylistID, _Theme.ButtonPlaylistName.Text.Text); - CBase.Playlist.SavePlaylist(ActivePlaylistID); - EditMode = EEditMode.None; - _Theme.ButtonPlaylistName.EditMode = false; - break; - case Keys.Escape: - _Theme.ButtonPlaylistName.Text.Text = CBase.Playlist.GetPlaylistName(ActivePlaylistID); - EditMode = EEditMode.None; - _Theme.ButtonPlaylistName.EditMode = false; - break; - case Keys.Delete: - case Keys.Back: - if (_Theme.ButtonPlaylistName.Text.Text != "") - _Theme.ButtonPlaylistName.Text.Text = _Theme.ButtonPlaylistName.Text.Text.Remove(_Theme.ButtonPlaylistName.Text.Text.Length - 1); - break; + switch (keyEvent.Key) + { + case Keys.Enter: + CBase.Playlist.SetPlaylistName(ActivePlaylistID, _Theme.ButtonPlaylistName.Text.Text); + CBase.Playlist.SavePlaylist(ActivePlaylistID); + EditMode = EEditMode.None; + _Theme.ButtonPlaylistName.EditMode = false; + break; + case Keys.Escape: + _Theme.ButtonPlaylistName.Text.Text = CBase.Playlist.GetPlaylistName(ActivePlaylistID); + EditMode = EEditMode.None; + _Theme.ButtonPlaylistName.EditMode = false; + break; + case Keys.Delete: + case Keys.Back: + if (_Theme.ButtonPlaylistName.Text.Text != "") + _Theme.ButtonPlaylistName.Text.Text = _Theme.ButtonPlaylistName.Text.Text.Remove(_Theme.ButtonPlaylistName.Text.Text.Length - 1); + break; + } } return true; } @@ -786,7 +789,7 @@ namespace VocaluxeLib.Menu case Keys.PageDown: _SetSelectionToLastEntry(); break; - case Keys.PageUp: + case Keys.PageUp: _SetSelectionToFirstEntry(); break; } diff --git a/VocaluxeLib/Menu/Enums.cs b/VocaluxeLib/Menu/Enums.cs index adb7e4a7..469b2084 100644 --- a/VocaluxeLib/Menu/Enums.cs +++ b/VocaluxeLib/Menu/Enums.cs @@ -95,7 +95,7 @@ namespace VocaluxeLib.Menu public enum EColorDepth { -// ReSharper disable UnusedMember.Global + // ReSharper disable UnusedMember.Global Bit8 = 8, Bit16 = 16, Bit24 = 24, @@ -127,9 +127,9 @@ namespace VocaluxeLib.Menu // ReSharper disable InconsistentNaming // don't change the order! TR_CONFIG_OFF, //no debug infos -// ReSharper disable UnusedMember.Global + // ReSharper disable UnusedMember.Global TR_CONFIG_ONLY_FPS, -// ReSharper restore UnusedMember.Global + // ReSharper restore UnusedMember.Global TR_CONFIG_LEVEL1, TR_CONFIG_LEVEL2, TR_CONFIG_LEVEL3, @@ -216,9 +216,9 @@ namespace VocaluxeLib.Menu public enum ECoverLoading { // ReSharper disable InconsistentNaming -// ReSharper disable UnusedMember.Global + // ReSharper disable UnusedMember.Global TR_CONFIG_COVERLOADING_ONDEMAND, -// ReSharper restore UnusedMember.Global + // ReSharper restore UnusedMember.Global TR_CONFIG_COVERLOADING_ATSTART, TR_CONFIG_COVERLOADING_DYNAMIC // ReSharper restore InconsistentNaming @@ -231,7 +231,7 @@ namespace VocaluxeLib.Menu TR_CONFIG_EASY, TR_CONFIG_NORMAL, TR_CONFIG_HARD -// ReSharper restore UnusedMember.Global + // ReSharper restore UnusedMember.Global // ReSharper restore InconsistentNaming } @@ -267,9 +267,9 @@ namespace VocaluxeLib.Menu TR_CONFIG_PLAYERINFO_BOTH, TR_CONFIG_PLAYERINFO_NAME, TR_CONFIG_PLAYERINFO_AVATAR, -// ReSharper disable UnusedMember.Global + // ReSharper disable UnusedMember.Global TR_CONFIG_PLAYERINFO_OFF -// ReSharper restore UnusedMember.Global + // ReSharper restore UnusedMember.Global // ReSharper restore InconsistentNaming } diff --git a/VocaluxeLib/Menu/SingNotes/CNotes.cs b/VocaluxeLib/Menu/SingNotes/CNotes.cs index 3dd5a648..db10fa90 100644 --- a/VocaluxeLib/Menu/SingNotes/CNotes.cs +++ b/VocaluxeLib/Menu/SingNotes/CNotes.cs @@ -597,10 +597,7 @@ namespace VocaluxeLib.Menu.SingNotes public int NumLinesWithPoints { - get - { - return _Lines.Count(line => line.Points > 0f); - } + get { return _Lines.Count(line => line.Points > 0f); } } #region Methods diff --git a/VocaluxeLib/Menu/SongMenu/CSong.cs b/VocaluxeLib/Menu/SongMenu/CSong.cs index fdfb37cf..c30535c5 100644 --- a/VocaluxeLib/Menu/SongMenu/CSong.cs +++ b/VocaluxeLib/Menu/SongMenu/CSong.cs @@ -100,9 +100,9 @@ namespace VocaluxeLib.Menu.SongMenu public float FadeInTime; public float FadeOutTime; -// ReSharper disable UnusedParameter.Local + // ReSharper disable UnusedParameter.Local public SMedley(int dummy) -// ReSharper restore UnusedParameter.Local + // ReSharper restore UnusedParameter.Local { Source = EMedleySource.None; StartBeat = 0; @@ -883,9 +883,7 @@ namespace VocaluxeLib.Menu.SongMenu // build sentences list List sentences = new List(); foreach (CLine line in lines.Line) - { sentences.Add(line.Points != 0 ? line.Lyrics : String.Empty); - } // find equal sentences series List series = new List(); diff --git a/VocaluxeLib/Menu/Structs.cs b/VocaluxeLib/Menu/Structs.cs index daaf1eed..6d0fefbe 100644 --- a/VocaluxeLib/Menu/Structs.cs +++ b/VocaluxeLib/Menu/Structs.cs @@ -181,7 +181,7 @@ namespace VocaluxeLib.Menu public readonly bool MB; //middle button click public readonly bool LBH; //left button hold (when moving) -// ReSharper disable MemberCanBePrivate.Global + // ReSharper disable MemberCanBePrivate.Global public readonly bool RBH; //right button hold (when moving) public readonly bool MBH; //middle button hold (when moving) // ReSharper restore MemberCanBePrivate.Global @@ -228,9 +228,9 @@ namespace VocaluxeLib.Menu public string FileName; public STexture Texture; -// ReSharper disable UnusedParameter.Local + // ReSharper disable UnusedParameter.Local public SAvatar(int dummy) -// ReSharper restore UnusedParameter.Local + // ReSharper restore UnusedParameter.Local { FileName = String.Empty; Texture = new STexture(-1);