From 685bc019fd358a1a1a1f657ccf276823ef4307b1 Mon Sep 17 00:00:00 2001 From: Alexander Eckart Date: Mon, 6 May 2013 23:11:56 +0200 Subject: [PATCH 1/6] moved some files --- VocaluxeLib/{Menu => }/CHelper.cs | 0 VocaluxeLib/{Menu => }/CXMLReader.cs | 0 VocaluxeLib/{Menu => }/Enums.cs | 0 VocaluxeLib/{Menu => Game}/CBasic.cs | 0 VocaluxeLib/{Menu => Game}/CPoints.cs | 0 VocaluxeLib/{Menu/SongMenu => Songs}/CCategory.cs | 0 VocaluxeLib/{Menu/SingNotes => Songs}/CNotes.cs | 0 VocaluxeLib/{Menu/SongMenu => Songs}/CSong.cs | 0 VocaluxeLib/{Menu => }/Structs.cs | 0 9 files changed, 0 insertions(+), 0 deletions(-) rename VocaluxeLib/{Menu => }/CHelper.cs (100%) rename VocaluxeLib/{Menu => }/CXMLReader.cs (100%) rename VocaluxeLib/{Menu => }/Enums.cs (100%) rename VocaluxeLib/{Menu => Game}/CBasic.cs (100%) rename VocaluxeLib/{Menu => Game}/CPoints.cs (100%) rename VocaluxeLib/{Menu/SongMenu => Songs}/CCategory.cs (100%) rename VocaluxeLib/{Menu/SingNotes => Songs}/CNotes.cs (100%) rename VocaluxeLib/{Menu/SongMenu => Songs}/CSong.cs (100%) rename VocaluxeLib/{Menu => }/Structs.cs (100%) diff --git a/VocaluxeLib/Menu/CHelper.cs b/VocaluxeLib/CHelper.cs similarity index 100% rename from VocaluxeLib/Menu/CHelper.cs rename to VocaluxeLib/CHelper.cs diff --git a/VocaluxeLib/Menu/CXMLReader.cs b/VocaluxeLib/CXMLReader.cs similarity index 100% rename from VocaluxeLib/Menu/CXMLReader.cs rename to VocaluxeLib/CXMLReader.cs diff --git a/VocaluxeLib/Menu/Enums.cs b/VocaluxeLib/Enums.cs similarity index 100% rename from VocaluxeLib/Menu/Enums.cs rename to VocaluxeLib/Enums.cs diff --git a/VocaluxeLib/Menu/CBasic.cs b/VocaluxeLib/Game/CBasic.cs similarity index 100% rename from VocaluxeLib/Menu/CBasic.cs rename to VocaluxeLib/Game/CBasic.cs diff --git a/VocaluxeLib/Menu/CPoints.cs b/VocaluxeLib/Game/CPoints.cs similarity index 100% rename from VocaluxeLib/Menu/CPoints.cs rename to VocaluxeLib/Game/CPoints.cs diff --git a/VocaluxeLib/Menu/SongMenu/CCategory.cs b/VocaluxeLib/Songs/CCategory.cs similarity index 100% rename from VocaluxeLib/Menu/SongMenu/CCategory.cs rename to VocaluxeLib/Songs/CCategory.cs diff --git a/VocaluxeLib/Menu/SingNotes/CNotes.cs b/VocaluxeLib/Songs/CNotes.cs similarity index 100% rename from VocaluxeLib/Menu/SingNotes/CNotes.cs rename to VocaluxeLib/Songs/CNotes.cs diff --git a/VocaluxeLib/Menu/SongMenu/CSong.cs b/VocaluxeLib/Songs/CSong.cs similarity index 100% rename from VocaluxeLib/Menu/SongMenu/CSong.cs rename to VocaluxeLib/Songs/CSong.cs diff --git a/VocaluxeLib/Menu/Structs.cs b/VocaluxeLib/Structs.cs similarity index 100% rename from VocaluxeLib/Menu/Structs.cs rename to VocaluxeLib/Structs.cs From 99fb9b9fff9a657ba7a27f3e78333bf8d58087ae Mon Sep 17 00:00:00 2001 From: Alexander Eckart Date: Mon, 6 May 2013 23:13:35 +0200 Subject: [PATCH 2/6] moved one file more --- VocaluxeLib/{Game => }/CBasic.cs | 0 VocaluxeLib/VocaluxeLib.csproj | 18 +++++++++--------- 2 files changed, 9 insertions(+), 9 deletions(-) rename VocaluxeLib/{Game => }/CBasic.cs (100%) diff --git a/VocaluxeLib/Game/CBasic.cs b/VocaluxeLib/CBasic.cs similarity index 100% rename from VocaluxeLib/Game/CBasic.cs rename to VocaluxeLib/CBasic.cs diff --git a/VocaluxeLib/VocaluxeLib.csproj b/VocaluxeLib/VocaluxeLib.csproj index 93b1517f..02de35fe 100644 --- a/VocaluxeLib/VocaluxeLib.csproj +++ b/VocaluxeLib/VocaluxeLib.csproj @@ -112,10 +112,10 @@ - + - + @@ -125,20 +125,20 @@ - + - - + + - + - - + + @@ -146,7 +146,7 @@ - + From ed3047314b228aea95e552d3f3a961d12606e10c Mon Sep 17 00:00:00 2001 From: Alexander Eckart Date: Mon, 6 May 2013 23:18:02 +0200 Subject: [PATCH 3/6] finished moving around --- .../PartyModeChallengeMedley/CPartyModeChallengeMedley.cs | 3 ++- PartyModes/PartyModeTicTacToe/CPartyScreenTicTacToeMain.cs | 2 +- Vocaluxe/Base/CBackgroundMusic.cs | 4 ++-- Vocaluxe/Base/CConfig.cs | 1 + Vocaluxe/Base/CController.cs | 2 +- Vocaluxe/Base/CCover.cs | 1 + Vocaluxe/Base/CDataBase.cs | 4 ++-- Vocaluxe/Base/CDraw.cs | 1 + Vocaluxe/Base/CGame.cs | 6 +++--- Vocaluxe/Base/CGraphics.cs | 1 + Vocaluxe/Base/CLanguage.cs | 1 + Vocaluxe/Base/CMain.cs | 3 +++ Vocaluxe/Base/CParty.cs | 1 + Vocaluxe/Base/CPlaylists.cs | 3 ++- Vocaluxe/Base/CProfiles.cs | 3 ++- Vocaluxe/Base/CSettings.cs | 2 +- Vocaluxe/Base/CSongCategorizer.cs | 3 ++- Vocaluxe/Base/CSongFilter.cs | 4 ++-- Vocaluxe/Base/CSongSorter.cs | 4 ++-- Vocaluxe/Base/CSongs.cs | 2 ++ Vocaluxe/Base/CSound.cs | 2 +- Vocaluxe/Base/CTheme.cs | 1 + Vocaluxe/Base/CUtility.cs | 2 +- Vocaluxe/Base/CVideo.cs | 2 +- Vocaluxe/Base/CWebcam.cs | 2 +- Vocaluxe/Base/Font/CFont.cs | 1 + Vocaluxe/Base/Font/CFonts.cs | 1 + Vocaluxe/Base/Font/CGlyph.cs | 1 + Vocaluxe/GameModes/CGameMode.cs | 2 +- Vocaluxe/GameModes/CGameModes.cs | 4 ++-- Vocaluxe/GameModes/IGameMode.cs | 2 +- Vocaluxe/Lib/Draw/CDirect3D.cs | 1 + Vocaluxe/Lib/Draw/CDrawWinForm.cs | 1 + Vocaluxe/Lib/Draw/COpenGL.cs | 1 + Vocaluxe/Lib/Draw/IDraw.cs | 1 + Vocaluxe/Lib/Input/IController.cs | 2 +- Vocaluxe/Lib/Input/WiiMote/CWiiMote.cs | 2 +- Vocaluxe/Lib/Input/WiiMote/WiiMoteLib.cs | 2 +- Vocaluxe/Lib/Playlist/CPlaylistFile.cs | 3 ++- Vocaluxe/Lib/Video/CVideoDecoder.cs | 2 +- Vocaluxe/Lib/Video/CVideoDecoderFFmpeg.cs | 2 +- Vocaluxe/Lib/Video/CVideoDecoderGstreamer.cs | 2 +- Vocaluxe/Lib/Video/IVideoDecoder.cs | 2 +- Vocaluxe/Lib/Webcam/CAForgeNet.cs | 2 +- Vocaluxe/Lib/Webcam/IWebcam.cs | 2 +- Vocaluxe/Screens/CPopupScreenPlayerControl.cs | 1 + Vocaluxe/Screens/CPopupScreenVolumeControl.cs | 1 + Vocaluxe/Screens/CScreenCredits.cs | 1 + Vocaluxe/Screens/CScreenHighscore.cs | 4 +++- Vocaluxe/Screens/CScreenLoad.cs | 1 + Vocaluxe/Screens/CScreenMain.cs | 1 + Vocaluxe/Screens/CScreenNames.cs | 1 + Vocaluxe/Screens/CScreenOptions.cs | 1 + Vocaluxe/Screens/CScreenOptionsGame.cs | 1 + Vocaluxe/Screens/CScreenOptionsLyrics.cs | 1 + Vocaluxe/Screens/CScreenOptionsRecord.cs | 1 + Vocaluxe/Screens/CScreenOptionsSound.cs | 1 + Vocaluxe/Screens/CScreenOptionsTheme.cs | 1 + Vocaluxe/Screens/CScreenOptionsVideo.cs | 1 + Vocaluxe/Screens/CScreenParty.cs | 1 + Vocaluxe/Screens/CScreenProfiles.cs | 1 + Vocaluxe/Screens/CScreenScore.cs | 4 +++- Vocaluxe/Screens/CScreenSing.cs | 2 ++ Vocaluxe/Screens/CScreenSong.cs | 2 ++ Vocaluxe/Screens/CScreenTest.cs | 1 + Vocaluxe/SongQueue/CSongQueue.cs | 5 +++-- Vocaluxe/SongQueue/ISongQueue.cs | 5 +++-- VocaluxeLib/CBasic.cs | 4 +++- VocaluxeLib/CHelper.cs | 2 +- VocaluxeLib/CXMLReader.cs | 2 +- VocaluxeLib/Enums.cs | 2 +- VocaluxeLib/Game/CPoints.cs | 2 +- VocaluxeLib/Menu/CLyric.cs | 2 +- VocaluxeLib/Menu/CPlaylist.cs | 1 + VocaluxeLib/Menu/IMenu.cs | 3 +++ VocaluxeLib/Menu/SingNotes/CSingNotes.cs | 2 ++ VocaluxeLib/Menu/SongMenu/CSongMenuTileBoard.cs | 1 + VocaluxeLib/Songs/CCategory.cs | 3 ++- VocaluxeLib/Songs/CNotes.cs | 2 +- VocaluxeLib/Songs/CSong.cs | 3 +-- VocaluxeLib/Structs.cs | 4 ++-- 81 files changed, 113 insertions(+), 54 deletions(-) diff --git a/PartyModes/PartyModeChallengeMedley/CPartyModeChallengeMedley.cs b/PartyModes/PartyModeChallengeMedley/CPartyModeChallengeMedley.cs index aa743c90..eac5df8e 100644 --- a/PartyModes/PartyModeChallengeMedley/CPartyModeChallengeMedley.cs +++ b/PartyModes/PartyModeChallengeMedley/CPartyModeChallengeMedley.cs @@ -21,8 +21,9 @@ using System; using System.Collections.Generic; using System.Collections.ObjectModel; using System.Runtime.InteropServices; +using VocaluxeLib.Game; using VocaluxeLib.Menu; -using VocaluxeLib.Menu.SongMenu; +using VocaluxeLib.Songs; [assembly: ComVisible(false)] diff --git a/PartyModes/PartyModeTicTacToe/CPartyScreenTicTacToeMain.cs b/PartyModes/PartyModeTicTacToe/CPartyScreenTicTacToeMain.cs index a7dbf8e1..93093114 100644 --- a/PartyModes/PartyModeTicTacToe/CPartyScreenTicTacToeMain.cs +++ b/PartyModes/PartyModeTicTacToe/CPartyScreenTicTacToeMain.cs @@ -21,7 +21,7 @@ using System; using System.Collections.Generic; using System.Windows.Forms; using VocaluxeLib.Menu; -using VocaluxeLib.Menu.SongMenu; +using VocaluxeLib.Songs; namespace VocaluxeLib.PartyModes.TicTacToe { diff --git a/Vocaluxe/Base/CBackgroundMusic.cs b/Vocaluxe/Base/CBackgroundMusic.cs index bcf1f712..d52a6e97 100644 --- a/Vocaluxe/Base/CBackgroundMusic.cs +++ b/Vocaluxe/Base/CBackgroundMusic.cs @@ -23,8 +23,8 @@ using System.Diagnostics; using System.IO; using System.Linq; using Vocaluxe.Base; -using VocaluxeLib.Menu; -using VocaluxeLib.Menu.SongMenu; +using VocaluxeLib; +using VocaluxeLib.Songs; namespace Vocaluxe.Base { diff --git a/Vocaluxe/Base/CConfig.cs b/Vocaluxe/Base/CConfig.cs index baf4b93c..061664a2 100644 --- a/Vocaluxe/Base/CConfig.cs +++ b/Vocaluxe/Base/CConfig.cs @@ -28,6 +28,7 @@ using System.Windows.Forms; using System.Xml; using Vocaluxe.Lib.Sound; using Vocaluxe.Lib.Webcam; +using VocaluxeLib; using VocaluxeLib.Menu; namespace Vocaluxe.Base diff --git a/Vocaluxe/Base/CController.cs b/Vocaluxe/Base/CController.cs index 5014eef8..2e358acd 100644 --- a/Vocaluxe/Base/CController.cs +++ b/Vocaluxe/Base/CController.cs @@ -19,7 +19,7 @@ using Vocaluxe.Lib.Input; using Vocaluxe.Lib.Input.WiiMote; -using VocaluxeLib.Menu; +using VocaluxeLib; namespace Vocaluxe.Base { diff --git a/Vocaluxe/Base/CCover.cs b/Vocaluxe/Base/CCover.cs index 24f80d64..30c51ef2 100644 --- a/Vocaluxe/Base/CCover.cs +++ b/Vocaluxe/Base/CCover.cs @@ -23,6 +23,7 @@ using System.IO; using System.Linq; using System.Text; using System.Xml; +using VocaluxeLib; using VocaluxeLib.Menu; namespace Vocaluxe.Base diff --git a/Vocaluxe/Base/CDataBase.cs b/Vocaluxe/Base/CDataBase.cs index 79ae5999..ce58f110 100644 --- a/Vocaluxe/Base/CDataBase.cs +++ b/Vocaluxe/Base/CDataBase.cs @@ -35,8 +35,8 @@ using SQLiteCommand = Mono.Data.Sqlite.SqliteCommand; using SQLiteDataReader = Mono.Data.Sqlite.SqliteDataReader; #endif using Community.CsharpSqlite; -using VocaluxeLib.Menu; -using VocaluxeLib.Menu.SongMenu; +using VocaluxeLib; +using VocaluxeLib.Songs; namespace Vocaluxe.Base { diff --git a/Vocaluxe/Base/CDraw.cs b/Vocaluxe/Base/CDraw.cs index 0bed36e9..cdb77d55 100644 --- a/Vocaluxe/Base/CDraw.cs +++ b/Vocaluxe/Base/CDraw.cs @@ -22,6 +22,7 @@ using System.Drawing; using System.IO; using System.Windows.Forms; using Vocaluxe.Lib.Draw; +using VocaluxeLib; using VocaluxeLib.Menu; namespace Vocaluxe.Base diff --git a/Vocaluxe/Base/CGame.cs b/Vocaluxe/Base/CGame.cs index 58bc9c2d..c6b58e0e 100644 --- a/Vocaluxe/Base/CGame.cs +++ b/Vocaluxe/Base/CGame.cs @@ -20,9 +20,9 @@ using System; using System.Collections.Generic; using Vocaluxe.SongQueue; -using VocaluxeLib.Menu; -using VocaluxeLib.Menu.SingNotes; -using VocaluxeLib.Menu.SongMenu; +using VocaluxeLib; +using VocaluxeLib.Game; +using VocaluxeLib.Songs; namespace Vocaluxe.Base { diff --git a/Vocaluxe/Base/CGraphics.cs b/Vocaluxe/Base/CGraphics.cs index a7f03f65..b08f6373 100644 --- a/Vocaluxe/Base/CGraphics.cs +++ b/Vocaluxe/Base/CGraphics.cs @@ -24,6 +24,7 @@ using System.Drawing; using System.Windows.Forms; using Vocaluxe.Base.Font; using Vocaluxe.Screens; +using VocaluxeLib; using VocaluxeLib.Menu; using VocaluxeLib.PartyModes; diff --git a/Vocaluxe/Base/CLanguage.cs b/Vocaluxe/Base/CLanguage.cs index fa48225c..7482ffba 100644 --- a/Vocaluxe/Base/CLanguage.cs +++ b/Vocaluxe/Base/CLanguage.cs @@ -23,6 +23,7 @@ using System.IO; using System.Linq; using System.Text; using System.Xml; +using VocaluxeLib; using VocaluxeLib.Menu; namespace Vocaluxe.Base diff --git a/Vocaluxe/Base/CMain.cs b/Vocaluxe/Base/CMain.cs index 4f959225..5ba3ac82 100644 --- a/Vocaluxe/Base/CMain.cs +++ b/Vocaluxe/Base/CMain.cs @@ -22,8 +22,11 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Drawing; using Vocaluxe.Base.Font; +using VocaluxeLib; +using VocaluxeLib.Game; using VocaluxeLib.Menu; using VocaluxeLib.Menu.SongMenu; +using VocaluxeLib.Songs; namespace Vocaluxe.Base { diff --git a/Vocaluxe/Base/CParty.cs b/Vocaluxe/Base/CParty.cs index 1cbd1485..f2b87093 100644 --- a/Vocaluxe/Base/CParty.cs +++ b/Vocaluxe/Base/CParty.cs @@ -22,6 +22,7 @@ using System.CodeDom.Compiler; using System.Collections.Generic; using System.IO; using System.Reflection; +using VocaluxeLib; using VocaluxeLib.Menu; using VocaluxeLib.PartyModes; diff --git a/Vocaluxe/Base/CPlaylists.cs b/Vocaluxe/Base/CPlaylists.cs index f057b26c..8c6cb840 100644 --- a/Vocaluxe/Base/CPlaylists.cs +++ b/Vocaluxe/Base/CPlaylists.cs @@ -23,8 +23,9 @@ using System.Collections.ObjectModel; using System.IO; using System.Text; using Vocaluxe.Lib.Playlist; +using VocaluxeLib; using VocaluxeLib.Menu; -using VocaluxeLib.Menu.SongMenu; +using VocaluxeLib.Songs; namespace Vocaluxe.Base { diff --git a/Vocaluxe/Base/CProfiles.cs b/Vocaluxe/Base/CProfiles.cs index 2944b0e7..30c4282e 100644 --- a/Vocaluxe/Base/CProfiles.cs +++ b/Vocaluxe/Base/CProfiles.cs @@ -22,7 +22,8 @@ using System.Collections.Generic; using System.IO; using System.Text; using System.Xml; -using VocaluxeLib.Menu; +using VocaluxeLib; +using VocaluxeLib.Game; namespace Vocaluxe.Base { diff --git a/Vocaluxe/Base/CSettings.cs b/Vocaluxe/Base/CSettings.cs index 5fa38628..e762aa91 100644 --- a/Vocaluxe/Base/CSettings.cs +++ b/Vocaluxe/Base/CSettings.cs @@ -21,7 +21,7 @@ using System; using System.Collections.Generic; using System.IO; using System.Reflection; -using VocaluxeLib.Menu; +using VocaluxeLib; namespace Vocaluxe.Base { diff --git a/Vocaluxe/Base/CSongCategorizer.cs b/Vocaluxe/Base/CSongCategorizer.cs index db61fe26..7a43c210 100644 --- a/Vocaluxe/Base/CSongCategorizer.cs +++ b/Vocaluxe/Base/CSongCategorizer.cs @@ -20,8 +20,9 @@ using System; using System.Collections.Generic; using System.Text; -using VocaluxeLib.Menu; +using VocaluxeLib; using VocaluxeLib.Menu.SongMenu; +using VocaluxeLib.Songs; namespace Vocaluxe.Base { diff --git a/Vocaluxe/Base/CSongFilter.cs b/Vocaluxe/Base/CSongFilter.cs index 03744ab0..43777269 100644 --- a/Vocaluxe/Base/CSongFilter.cs +++ b/Vocaluxe/Base/CSongFilter.cs @@ -20,8 +20,8 @@ using System; using System.Collections.Generic; using System.Linq; -using VocaluxeLib.Menu; -using VocaluxeLib.Menu.SongMenu; +using VocaluxeLib; +using VocaluxeLib.Songs; namespace Vocaluxe.Base { diff --git a/Vocaluxe/Base/CSongSorter.cs b/Vocaluxe/Base/CSongSorter.cs index 743f9506..6409d833 100644 --- a/Vocaluxe/Base/CSongSorter.cs +++ b/Vocaluxe/Base/CSongSorter.cs @@ -20,8 +20,8 @@ using System; using System.Collections.Generic; using System.Reflection; -using VocaluxeLib.Menu; -using VocaluxeLib.Menu.SongMenu; +using VocaluxeLib; +using VocaluxeLib.Songs; namespace Vocaluxe.Base { diff --git a/Vocaluxe/Base/CSongs.cs b/Vocaluxe/Base/CSongs.cs index 3ce699ae..d49b5cef 100644 --- a/Vocaluxe/Base/CSongs.cs +++ b/Vocaluxe/Base/CSongs.cs @@ -22,8 +22,10 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.Threading; +using VocaluxeLib; using VocaluxeLib.Menu; using VocaluxeLib.Menu.SongMenu; +using VocaluxeLib.Songs; namespace Vocaluxe.Base { diff --git a/Vocaluxe/Base/CSound.cs b/Vocaluxe/Base/CSound.cs index 1ac824a7..a4dc3e5b 100644 --- a/Vocaluxe/Base/CSound.cs +++ b/Vocaluxe/Base/CSound.cs @@ -22,7 +22,7 @@ using System.Collections.ObjectModel; using System.Diagnostics; using System.IO; using Vocaluxe.Lib.Sound; -using VocaluxeLib.Menu; +using VocaluxeLib; namespace Vocaluxe.Base { diff --git a/Vocaluxe/Base/CTheme.cs b/Vocaluxe/Base/CTheme.cs index 30ce2f20..cb79c832 100644 --- a/Vocaluxe/Base/CTheme.cs +++ b/Vocaluxe/Base/CTheme.cs @@ -24,6 +24,7 @@ using System.Text; using System.Windows.Forms; using System.Xml; using Vocaluxe.Base.Font; +using VocaluxeLib; using VocaluxeLib.Menu; namespace Vocaluxe.Base diff --git a/Vocaluxe/Base/CUtility.cs b/Vocaluxe/Base/CUtility.cs index 17dfae81..27ad1db3 100644 --- a/Vocaluxe/Base/CUtility.cs +++ b/Vocaluxe/Base/CUtility.cs @@ -21,7 +21,7 @@ using System; using System.Collections.Generic; using System.Diagnostics; using System.Windows.Forms; -using VocaluxeLib.Menu; +using VocaluxeLib; namespace Vocaluxe.Base { diff --git a/Vocaluxe/Base/CVideo.cs b/Vocaluxe/Base/CVideo.cs index db7390fb..cd9e89f4 100644 --- a/Vocaluxe/Base/CVideo.cs +++ b/Vocaluxe/Base/CVideo.cs @@ -20,7 +20,7 @@ using System.Diagnostics; using System.Drawing; using Vocaluxe.Lib.Video; -using VocaluxeLib.Menu; +using VocaluxeLib; namespace Vocaluxe.Base { diff --git a/Vocaluxe/Base/CWebcam.cs b/Vocaluxe/Base/CWebcam.cs index 0a361c68..bfe48e78 100644 --- a/Vocaluxe/Base/CWebcam.cs +++ b/Vocaluxe/Base/CWebcam.cs @@ -19,7 +19,7 @@ using System.Drawing; using Vocaluxe.Lib.Webcam; -using VocaluxeLib.Menu; +using VocaluxeLib; namespace Vocaluxe.Base { diff --git a/Vocaluxe/Base/Font/CFont.cs b/Vocaluxe/Base/Font/CFont.cs index fb4fc0ee..64023bd8 100644 --- a/Vocaluxe/Base/Font/CFont.cs +++ b/Vocaluxe/Base/Font/CFont.cs @@ -21,6 +21,7 @@ using System; using System.Collections.Generic; using System.Drawing; using System.Drawing.Text; +using VocaluxeLib; using VocaluxeLib.Menu; namespace Vocaluxe.Base.Font diff --git a/Vocaluxe/Base/Font/CFonts.cs b/Vocaluxe/Base/Font/CFonts.cs index 21922d7a..df33720a 100644 --- a/Vocaluxe/Base/Font/CFonts.cs +++ b/Vocaluxe/Base/Font/CFonts.cs @@ -23,6 +23,7 @@ using System.IO; using System.Linq; using System.Text; using System.Xml; +using VocaluxeLib; using VocaluxeLib.Menu; namespace Vocaluxe.Base.Font diff --git a/Vocaluxe/Base/Font/CGlyph.cs b/Vocaluxe/Base/Font/CGlyph.cs index a8b5bdc8..1c863b74 100644 --- a/Vocaluxe/Base/Font/CGlyph.cs +++ b/Vocaluxe/Base/Font/CGlyph.cs @@ -22,6 +22,7 @@ using System.Drawing; using System.Drawing.Drawing2D; using System.Drawing.Text; using System.Windows.Forms; +using VocaluxeLib; using VocaluxeLib.Menu; namespace Vocaluxe.Base.Font diff --git a/Vocaluxe/GameModes/CGameMode.cs b/Vocaluxe/GameModes/CGameMode.cs index 31675f31..d945ca73 100644 --- a/Vocaluxe/GameModes/CGameMode.cs +++ b/Vocaluxe/GameModes/CGameMode.cs @@ -18,7 +18,7 @@ #endregion using Vocaluxe.Base; -using VocaluxeLib.Menu.SongMenu; +using VocaluxeLib.Songs; namespace Vocaluxe.GameModes { diff --git a/Vocaluxe/GameModes/CGameModes.cs b/Vocaluxe/GameModes/CGameModes.cs index 822d599e..5090ff44 100644 --- a/Vocaluxe/GameModes/CGameModes.cs +++ b/Vocaluxe/GameModes/CGameModes.cs @@ -19,8 +19,8 @@ using System.Collections.Generic; using Vocaluxe.Base; -using VocaluxeLib.Menu; -using VocaluxeLib.Menu.SongMenu; +using VocaluxeLib; +using VocaluxeLib.Songs; namespace Vocaluxe.GameModes { diff --git a/Vocaluxe/GameModes/IGameMode.cs b/Vocaluxe/GameModes/IGameMode.cs index 62277660..91504898 100644 --- a/Vocaluxe/GameModes/IGameMode.cs +++ b/Vocaluxe/GameModes/IGameMode.cs @@ -17,7 +17,7 @@ // */ #endregion -using VocaluxeLib.Menu.SongMenu; +using VocaluxeLib.Songs; namespace Vocaluxe.GameModes { diff --git a/Vocaluxe/Lib/Draw/CDirect3D.cs b/Vocaluxe/Lib/Draw/CDirect3D.cs index 37a09046..7cd083e6 100644 --- a/Vocaluxe/Lib/Draw/CDirect3D.cs +++ b/Vocaluxe/Lib/Draw/CDirect3D.cs @@ -32,6 +32,7 @@ using System.Windows.Forms; using SlimDX.Windows; using Vocaluxe.Base; using Vocaluxe.Base.Font; +using VocaluxeLib; using VocaluxeLib.Menu; namespace Vocaluxe.Lib.Draw diff --git a/Vocaluxe/Lib/Draw/CDrawWinForm.cs b/Vocaluxe/Lib/Draw/CDrawWinForm.cs index 6032aeb6..f76de4b4 100644 --- a/Vocaluxe/Lib/Draw/CDrawWinForm.cs +++ b/Vocaluxe/Lib/Draw/CDrawWinForm.cs @@ -28,6 +28,7 @@ using System.Threading; using System.Windows.Forms; using Vocaluxe.Base; using Vocaluxe.Base.Font; +using VocaluxeLib; using VocaluxeLib.Menu; namespace Vocaluxe.Lib.Draw diff --git a/Vocaluxe/Lib/Draw/COpenGL.cs b/Vocaluxe/Lib/Draw/COpenGL.cs index f04a87c0..0deb0595 100644 --- a/Vocaluxe/Lib/Draw/COpenGL.cs +++ b/Vocaluxe/Lib/Draw/COpenGL.cs @@ -31,6 +31,7 @@ using System.Runtime.InteropServices; using System.Windows.Forms; using Vocaluxe.Base; using Vocaluxe.Base.Font; +using VocaluxeLib; using VocaluxeLib.Menu; using BeginMode = OpenTK.Graphics.OpenGL.BeginMode; using BlendingFactorDest = OpenTK.Graphics.OpenGL.BlendingFactorDest; diff --git a/Vocaluxe/Lib/Draw/IDraw.cs b/Vocaluxe/Lib/Draw/IDraw.cs index 1230145c..8821a00b 100644 --- a/Vocaluxe/Lib/Draw/IDraw.cs +++ b/Vocaluxe/Lib/Draw/IDraw.cs @@ -19,6 +19,7 @@ using System; using System.Drawing; +using VocaluxeLib; using VocaluxeLib.Menu; namespace Vocaluxe.Lib.Draw diff --git a/Vocaluxe/Lib/Input/IController.cs b/Vocaluxe/Lib/Input/IController.cs index f54c25bf..2a361f40 100644 --- a/Vocaluxe/Lib/Input/IController.cs +++ b/Vocaluxe/Lib/Input/IController.cs @@ -20,7 +20,7 @@ using System; using System.Diagnostics; using System.Drawing; -using VocaluxeLib.Menu; +using VocaluxeLib; namespace Vocaluxe.Lib.Input { diff --git a/Vocaluxe/Lib/Input/WiiMote/CWiiMote.cs b/Vocaluxe/Lib/Input/WiiMote/CWiiMote.cs index 2ff404d1..6fffb49c 100644 --- a/Vocaluxe/Lib/Input/WiiMote/CWiiMote.cs +++ b/Vocaluxe/Lib/Input/WiiMote/CWiiMote.cs @@ -23,7 +23,7 @@ using System.Drawing; using System.Threading; using System.Windows.Forms; using Vocaluxe.Base; -using VocaluxeLib.Menu; +using VocaluxeLib; namespace Vocaluxe.Lib.Input.WiiMote { diff --git a/Vocaluxe/Lib/Input/WiiMote/WiiMoteLib.cs b/Vocaluxe/Lib/Input/WiiMote/WiiMoteLib.cs index 622f7f17..b4e234c9 100644 --- a/Vocaluxe/Lib/Input/WiiMote/WiiMoteLib.cs +++ b/Vocaluxe/Lib/Input/WiiMote/WiiMoteLib.cs @@ -21,7 +21,7 @@ using System; using System.Drawing; using System.Threading; using Vocaluxe.Base; -using VocaluxeLib.Menu; +using VocaluxeLib; namespace Vocaluxe.Lib.Input.WiiMote { diff --git a/Vocaluxe/Lib/Playlist/CPlaylistFile.cs b/Vocaluxe/Lib/Playlist/CPlaylistFile.cs index f0603d78..64c84e7a 100644 --- a/Vocaluxe/Lib/Playlist/CPlaylistFile.cs +++ b/Vocaluxe/Lib/Playlist/CPlaylistFile.cs @@ -23,8 +23,9 @@ using System.IO; using System.Text; using System.Xml; using Vocaluxe.Base; +using VocaluxeLib; using VocaluxeLib.Menu; -using VocaluxeLib.Menu.SongMenu; +using VocaluxeLib.Songs; namespace Vocaluxe.Lib.Playlist { diff --git a/Vocaluxe/Lib/Video/CVideoDecoder.cs b/Vocaluxe/Lib/Video/CVideoDecoder.cs index 53d96bef..34caba5a 100644 --- a/Vocaluxe/Lib/Video/CVideoDecoder.cs +++ b/Vocaluxe/Lib/Video/CVideoDecoder.cs @@ -19,7 +19,7 @@ using System.Collections.Generic; using System.Linq; -using VocaluxeLib.Menu; +using VocaluxeLib; namespace Vocaluxe.Lib.Video { diff --git a/Vocaluxe/Lib/Video/CVideoDecoderFFmpeg.cs b/Vocaluxe/Lib/Video/CVideoDecoderFFmpeg.cs index 135d3129..72d38fe5 100644 --- a/Vocaluxe/Lib/Video/CVideoDecoderFFmpeg.cs +++ b/Vocaluxe/Lib/Video/CVideoDecoderFFmpeg.cs @@ -25,7 +25,7 @@ using System.Runtime.InteropServices; using System.Threading; using Vocaluxe.Base; using Vocaluxe.Lib.Video.Acinerella; -using VocaluxeLib.Menu; +using VocaluxeLib; namespace Vocaluxe.Lib.Video { diff --git a/Vocaluxe/Lib/Video/CVideoDecoderGstreamer.cs b/Vocaluxe/Lib/Video/CVideoDecoderGstreamer.cs index ac5b15cf..9e9d0b89 100644 --- a/Vocaluxe/Lib/Video/CVideoDecoderGstreamer.cs +++ b/Vocaluxe/Lib/Video/CVideoDecoderGstreamer.cs @@ -20,7 +20,7 @@ using System; using Vocaluxe.Base; using Vocaluxe.Lib.Video.Gstreamer; -using VocaluxeLib.Menu; +using VocaluxeLib; namespace Vocaluxe.Lib.Video { diff --git a/Vocaluxe/Lib/Video/IVideoDecoder.cs b/Vocaluxe/Lib/Video/IVideoDecoder.cs index 4dc3905a..807361c8 100644 --- a/Vocaluxe/Lib/Video/IVideoDecoder.cs +++ b/Vocaluxe/Lib/Video/IVideoDecoder.cs @@ -17,7 +17,7 @@ // */ #endregion -using VocaluxeLib.Menu; +using VocaluxeLib; namespace Vocaluxe.Lib.Video { diff --git a/Vocaluxe/Lib/Webcam/CAForgeNet.cs b/Vocaluxe/Lib/Webcam/CAForgeNet.cs index c53b16c6..614a90c7 100644 --- a/Vocaluxe/Lib/Webcam/CAForgeNet.cs +++ b/Vocaluxe/Lib/Webcam/CAForgeNet.cs @@ -24,7 +24,7 @@ using System.Drawing; using System.Drawing.Imaging; using System.Runtime.InteropServices; using Vocaluxe.Base; -using VocaluxeLib.Menu; +using VocaluxeLib; namespace Vocaluxe.Lib.Webcam { diff --git a/Vocaluxe/Lib/Webcam/IWebcam.cs b/Vocaluxe/Lib/Webcam/IWebcam.cs index 32804bfc..75eb3fe4 100644 --- a/Vocaluxe/Lib/Webcam/IWebcam.cs +++ b/Vocaluxe/Lib/Webcam/IWebcam.cs @@ -19,7 +19,7 @@ using System.Collections.Generic; using System.Drawing; -using VocaluxeLib.Menu; +using VocaluxeLib; namespace Vocaluxe.Lib.Webcam { diff --git a/Vocaluxe/Screens/CPopupScreenPlayerControl.cs b/Vocaluxe/Screens/CPopupScreenPlayerControl.cs index 023ee4e2..6184d583 100644 --- a/Vocaluxe/Screens/CPopupScreenPlayerControl.cs +++ b/Vocaluxe/Screens/CPopupScreenPlayerControl.cs @@ -20,6 +20,7 @@ using System; using System.Windows.Forms; using Vocaluxe.Base; +using VocaluxeLib; using VocaluxeLib.Menu; namespace Vocaluxe.Screens diff --git a/Vocaluxe/Screens/CPopupScreenVolumeControl.cs b/Vocaluxe/Screens/CPopupScreenVolumeControl.cs index b3213950..8b75e482 100644 --- a/Vocaluxe/Screens/CPopupScreenVolumeControl.cs +++ b/Vocaluxe/Screens/CPopupScreenVolumeControl.cs @@ -18,6 +18,7 @@ #endregion using Vocaluxe.Base; +using VocaluxeLib; using VocaluxeLib.Menu; namespace Vocaluxe.Screens diff --git a/Vocaluxe/Screens/CScreenCredits.cs b/Vocaluxe/Screens/CScreenCredits.cs index b37fdeb3..146744f0 100644 --- a/Vocaluxe/Screens/CScreenCredits.cs +++ b/Vocaluxe/Screens/CScreenCredits.cs @@ -22,6 +22,7 @@ using System.Collections.Generic; using System.Diagnostics; using System.Windows.Forms; using Vocaluxe.Base; +using VocaluxeLib; using VocaluxeLib.Menu; enum EDirection diff --git a/Vocaluxe/Screens/CScreenHighscore.cs b/Vocaluxe/Screens/CScreenHighscore.cs index 3dc5ef1e..56e70ecf 100644 --- a/Vocaluxe/Screens/CScreenHighscore.cs +++ b/Vocaluxe/Screens/CScreenHighscore.cs @@ -22,8 +22,10 @@ using System.Collections.Generic; using System.Linq; using System.Windows.Forms; using Vocaluxe.Base; +using VocaluxeLib; +using VocaluxeLib.Game; using VocaluxeLib.Menu; -using VocaluxeLib.Menu.SongMenu; +using VocaluxeLib.Songs; namespace Vocaluxe.Screens { diff --git a/Vocaluxe/Screens/CScreenLoad.cs b/Vocaluxe/Screens/CScreenLoad.cs index 1f25f6d1..52d519fd 100644 --- a/Vocaluxe/Screens/CScreenLoad.cs +++ b/Vocaluxe/Screens/CScreenLoad.cs @@ -21,6 +21,7 @@ using System.Diagnostics; using System.Threading; using System.Windows.Forms; using Vocaluxe.Base; +using VocaluxeLib; using VocaluxeLib.Menu; namespace Vocaluxe.Screens diff --git a/Vocaluxe/Screens/CScreenMain.cs b/Vocaluxe/Screens/CScreenMain.cs index 977cb417..eddeda92 100644 --- a/Vocaluxe/Screens/CScreenMain.cs +++ b/Vocaluxe/Screens/CScreenMain.cs @@ -20,6 +20,7 @@ using System.Windows.Forms; using Vocaluxe.Base; using Vocaluxe.Base.Font; +using VocaluxeLib; using VocaluxeLib.Menu; namespace Vocaluxe.Screens diff --git a/Vocaluxe/Screens/CScreenNames.cs b/Vocaluxe/Screens/CScreenNames.cs index 99006246..0dec07a7 100644 --- a/Vocaluxe/Screens/CScreenNames.cs +++ b/Vocaluxe/Screens/CScreenNames.cs @@ -21,6 +21,7 @@ using System; using System.Collections.Generic; using System.Windows.Forms; using Vocaluxe.Base; +using VocaluxeLib; using VocaluxeLib.Menu; namespace Vocaluxe.Screens diff --git a/Vocaluxe/Screens/CScreenOptions.cs b/Vocaluxe/Screens/CScreenOptions.cs index ece463af..b8281ca3 100644 --- a/Vocaluxe/Screens/CScreenOptions.cs +++ b/Vocaluxe/Screens/CScreenOptions.cs @@ -19,6 +19,7 @@ using System.Windows.Forms; using Vocaluxe.Base; +using VocaluxeLib; using VocaluxeLib.Menu; namespace Vocaluxe.Screens diff --git a/Vocaluxe/Screens/CScreenOptionsGame.cs b/Vocaluxe/Screens/CScreenOptionsGame.cs index a350026a..8ba0f0ab 100644 --- a/Vocaluxe/Screens/CScreenOptionsGame.cs +++ b/Vocaluxe/Screens/CScreenOptionsGame.cs @@ -19,6 +19,7 @@ using System.Windows.Forms; using Vocaluxe.Base; +using VocaluxeLib; using VocaluxeLib.Menu; namespace Vocaluxe.Screens diff --git a/Vocaluxe/Screens/CScreenOptionsLyrics.cs b/Vocaluxe/Screens/CScreenOptionsLyrics.cs index 029923e2..1287a9f6 100644 --- a/Vocaluxe/Screens/CScreenOptionsLyrics.cs +++ b/Vocaluxe/Screens/CScreenOptionsLyrics.cs @@ -19,6 +19,7 @@ using System.Windows.Forms; using Vocaluxe.Base; +using VocaluxeLib; using VocaluxeLib.Menu; namespace Vocaluxe.Screens diff --git a/Vocaluxe/Screens/CScreenOptionsRecord.cs b/Vocaluxe/Screens/CScreenOptionsRecord.cs index 36e0c51e..36a7f66d 100644 --- a/Vocaluxe/Screens/CScreenOptionsRecord.cs +++ b/Vocaluxe/Screens/CScreenOptionsRecord.cs @@ -23,6 +23,7 @@ using System.Diagnostics; using System.Windows.Forms; using Vocaluxe.Base; using Vocaluxe.Lib.Sound; +using VocaluxeLib; using VocaluxeLib.Menu; namespace Vocaluxe.Screens diff --git a/Vocaluxe/Screens/CScreenOptionsSound.cs b/Vocaluxe/Screens/CScreenOptionsSound.cs index 8d6ddfa0..ef809fbb 100644 --- a/Vocaluxe/Screens/CScreenOptionsSound.cs +++ b/Vocaluxe/Screens/CScreenOptionsSound.cs @@ -19,6 +19,7 @@ using System.Windows.Forms; using Vocaluxe.Base; +using VocaluxeLib; using VocaluxeLib.Menu; namespace Vocaluxe.Screens diff --git a/Vocaluxe/Screens/CScreenOptionsTheme.cs b/Vocaluxe/Screens/CScreenOptionsTheme.cs index a0570294..27168bdf 100644 --- a/Vocaluxe/Screens/CScreenOptionsTheme.cs +++ b/Vocaluxe/Screens/CScreenOptionsTheme.cs @@ -20,6 +20,7 @@ using System.Windows.Forms; using Vocaluxe.Base; using Vocaluxe.Base.Font; +using VocaluxeLib; using VocaluxeLib.Menu; namespace Vocaluxe.Screens diff --git a/Vocaluxe/Screens/CScreenOptionsVideo.cs b/Vocaluxe/Screens/CScreenOptionsVideo.cs index 3367edc2..acbd2aea 100644 --- a/Vocaluxe/Screens/CScreenOptionsVideo.cs +++ b/Vocaluxe/Screens/CScreenOptionsVideo.cs @@ -21,6 +21,7 @@ using System; using System.Windows.Forms; using Vocaluxe.Base; using Vocaluxe.Lib.Webcam; +using VocaluxeLib; using VocaluxeLib.Menu; namespace Vocaluxe.Screens diff --git a/Vocaluxe/Screens/CScreenParty.cs b/Vocaluxe/Screens/CScreenParty.cs index 6b31fab1..8288c573 100644 --- a/Vocaluxe/Screens/CScreenParty.cs +++ b/Vocaluxe/Screens/CScreenParty.cs @@ -20,6 +20,7 @@ using System.Collections.Generic; using System.Windows.Forms; using Vocaluxe.Base; +using VocaluxeLib; using VocaluxeLib.Menu; namespace Vocaluxe.Screens diff --git a/Vocaluxe/Screens/CScreenProfiles.cs b/Vocaluxe/Screens/CScreenProfiles.cs index b3c3740e..2ee4cbcf 100644 --- a/Vocaluxe/Screens/CScreenProfiles.cs +++ b/Vocaluxe/Screens/CScreenProfiles.cs @@ -23,6 +23,7 @@ using System.Drawing.Imaging; using System.IO; using System.Windows.Forms; using Vocaluxe.Base; +using VocaluxeLib; using VocaluxeLib.Menu; namespace Vocaluxe.Screens diff --git a/Vocaluxe/Screens/CScreenScore.cs b/Vocaluxe/Screens/CScreenScore.cs index 57764cac..28af99ff 100644 --- a/Vocaluxe/Screens/CScreenScore.cs +++ b/Vocaluxe/Screens/CScreenScore.cs @@ -22,8 +22,10 @@ using System.Collections.Generic; using System.Diagnostics; using System.Windows.Forms; using Vocaluxe.Base; +using VocaluxeLib; +using VocaluxeLib.Game; using VocaluxeLib.Menu; -using VocaluxeLib.Menu.SongMenu; +using VocaluxeLib.Songs; namespace Vocaluxe.Screens { diff --git a/Vocaluxe/Screens/CScreenSing.cs b/Vocaluxe/Screens/CScreenSing.cs index b2c291ea..085d161c 100644 --- a/Vocaluxe/Screens/CScreenSing.cs +++ b/Vocaluxe/Screens/CScreenSing.cs @@ -26,9 +26,11 @@ using System.Linq; using System.Windows.Forms; using Vocaluxe.Base; using Vocaluxe.Base.Font; +using VocaluxeLib; using VocaluxeLib.Menu; using VocaluxeLib.Menu.SingNotes; using VocaluxeLib.Menu.SongMenu; +using VocaluxeLib.Songs; namespace Vocaluxe.Screens { diff --git a/Vocaluxe/Screens/CScreenSong.cs b/Vocaluxe/Screens/CScreenSong.cs index e04ad980..aaeb0e6e 100644 --- a/Vocaluxe/Screens/CScreenSong.cs +++ b/Vocaluxe/Screens/CScreenSong.cs @@ -22,9 +22,11 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Windows.Forms; using Vocaluxe.Base; +using VocaluxeLib; using VocaluxeLib.Menu; using VocaluxeLib.Menu.SongMenu; using VocaluxeLib.PartyModes; +using VocaluxeLib.Songs; namespace Vocaluxe.Screens { diff --git a/Vocaluxe/Screens/CScreenTest.cs b/Vocaluxe/Screens/CScreenTest.cs index 3fa3f2e4..e0d1aac0 100644 --- a/Vocaluxe/Screens/CScreenTest.cs +++ b/Vocaluxe/Screens/CScreenTest.cs @@ -20,6 +20,7 @@ using System; using System.Windows.Forms; using Vocaluxe.Base; +using VocaluxeLib; using VocaluxeLib.Menu; namespace Vocaluxe.Screens diff --git a/Vocaluxe/SongQueue/CSongQueue.cs b/Vocaluxe/SongQueue/CSongQueue.cs index eb32c0e5..62dbcdb5 100644 --- a/Vocaluxe/SongQueue/CSongQueue.cs +++ b/Vocaluxe/SongQueue/CSongQueue.cs @@ -20,8 +20,9 @@ using System.Collections.Generic; using Vocaluxe.Base; using Vocaluxe.GameModes; -using VocaluxeLib.Menu; -using VocaluxeLib.Menu.SongMenu; +using VocaluxeLib; +using VocaluxeLib.Game; +using VocaluxeLib.Songs; namespace Vocaluxe.SongQueue { diff --git a/Vocaluxe/SongQueue/ISongQueue.cs b/Vocaluxe/SongQueue/ISongQueue.cs index 05d48111..69f294a0 100644 --- a/Vocaluxe/SongQueue/ISongQueue.cs +++ b/Vocaluxe/SongQueue/ISongQueue.cs @@ -17,8 +17,9 @@ // */ #endregion -using VocaluxeLib.Menu; -using VocaluxeLib.Menu.SongMenu; +using VocaluxeLib; +using VocaluxeLib.Game; +using VocaluxeLib.Songs; namespace Vocaluxe.SongQueue { diff --git a/VocaluxeLib/CBasic.cs b/VocaluxeLib/CBasic.cs index 99fe0818..5c32807e 100644 --- a/VocaluxeLib/CBasic.cs +++ b/VocaluxeLib/CBasic.cs @@ -17,7 +17,9 @@ // */ #endregion -namespace VocaluxeLib.Menu +using VocaluxeLib.Menu; + +namespace VocaluxeLib { public static class CBase { diff --git a/VocaluxeLib/CHelper.cs b/VocaluxeLib/CHelper.cs index bdf1a007..22a7fbed 100644 --- a/VocaluxeLib/CHelper.cs +++ b/VocaluxeLib/CHelper.cs @@ -24,7 +24,7 @@ using System.Globalization; using System.IO; using System.Text; -namespace VocaluxeLib.Menu +namespace VocaluxeLib { public static class CHelper { diff --git a/VocaluxeLib/CXMLReader.cs b/VocaluxeLib/CXMLReader.cs index 6173699b..5b295bcb 100644 --- a/VocaluxeLib/CXMLReader.cs +++ b/VocaluxeLib/CXMLReader.cs @@ -21,7 +21,7 @@ using System; using System.Collections.Generic; using System.Xml.XPath; -namespace VocaluxeLib.Menu +namespace VocaluxeLib { public class CXMLReader { diff --git a/VocaluxeLib/Enums.cs b/VocaluxeLib/Enums.cs index 6f05dd61..7cf92845 100644 --- a/VocaluxeLib/Enums.cs +++ b/VocaluxeLib/Enums.cs @@ -19,7 +19,7 @@ using System; -namespace VocaluxeLib.Menu +namespace VocaluxeLib { #region Inputs diff --git a/VocaluxeLib/Game/CPoints.cs b/VocaluxeLib/Game/CPoints.cs index f6ab17fb..a0f82b90 100644 --- a/VocaluxeLib/Game/CPoints.cs +++ b/VocaluxeLib/Game/CPoints.cs @@ -19,7 +19,7 @@ using System; -namespace VocaluxeLib.Menu +namespace VocaluxeLib.Game { public class CPoints { diff --git a/VocaluxeLib/Menu/CLyric.cs b/VocaluxeLib/Menu/CLyric.cs index 2d18e6ec..547124e5 100644 --- a/VocaluxeLib/Menu/CLyric.cs +++ b/VocaluxeLib/Menu/CLyric.cs @@ -21,7 +21,7 @@ using System; using System.Collections.Generic; using System.Drawing; using System.Xml; -using VocaluxeLib.Menu.SingNotes; +using VocaluxeLib.Songs; namespace VocaluxeLib.Menu { diff --git a/VocaluxeLib/Menu/CPlaylist.cs b/VocaluxeLib/Menu/CPlaylist.cs index 29bb1943..acc1d704 100644 --- a/VocaluxeLib/Menu/CPlaylist.cs +++ b/VocaluxeLib/Menu/CPlaylist.cs @@ -22,6 +22,7 @@ using System.Collections.Generic; using System.Windows.Forms; using System.Xml; using VocaluxeLib.Menu.SongMenu; +using VocaluxeLib.Songs; namespace VocaluxeLib.Menu { diff --git a/VocaluxeLib/Menu/IMenu.cs b/VocaluxeLib/Menu/IMenu.cs index b698adaa..0ab9c611 100644 --- a/VocaluxeLib/Menu/IMenu.cs +++ b/VocaluxeLib/Menu/IMenu.cs @@ -21,8 +21,11 @@ using System; using System.Collections.Generic; using System.Collections.ObjectModel; using System.Drawing; +using VocaluxeLib; +using VocaluxeLib.Game; using VocaluxeLib.Menu.SongMenu; using VocaluxeLib.PartyModes; +using VocaluxeLib.Songs; namespace VocaluxeLib.Menu { diff --git a/VocaluxeLib/Menu/SingNotes/CSingNotes.cs b/VocaluxeLib/Menu/SingNotes/CSingNotes.cs index 457fb7fc..a31cc03b 100644 --- a/VocaluxeLib/Menu/SingNotes/CSingNotes.cs +++ b/VocaluxeLib/Menu/SingNotes/CSingNotes.cs @@ -22,6 +22,8 @@ using System.Collections.Generic; using System.Diagnostics; using System.Xml; +using VocaluxeLib.Songs; + namespace VocaluxeLib.Menu.SingNotes { struct SPlayerNotes diff --git a/VocaluxeLib/Menu/SongMenu/CSongMenuTileBoard.cs b/VocaluxeLib/Menu/SongMenu/CSongMenuTileBoard.cs index 542e4d67..7a7710f4 100644 --- a/VocaluxeLib/Menu/SongMenu/CSongMenuTileBoard.cs +++ b/VocaluxeLib/Menu/SongMenu/CSongMenuTileBoard.cs @@ -23,6 +23,7 @@ using System.Drawing; using System.Linq; using System.Windows.Forms; using VocaluxeLib.PartyModes; +using VocaluxeLib.Songs; namespace VocaluxeLib.Menu.SongMenu { diff --git a/VocaluxeLib/Songs/CCategory.cs b/VocaluxeLib/Songs/CCategory.cs index faa5a22a..2f863dc6 100644 --- a/VocaluxeLib/Songs/CCategory.cs +++ b/VocaluxeLib/Songs/CCategory.cs @@ -18,8 +18,9 @@ #endregion using System.Collections.Generic; +using VocaluxeLib; -namespace VocaluxeLib.Menu.SongMenu +namespace VocaluxeLib.Songs { public class CCategory { diff --git a/VocaluxeLib/Songs/CNotes.cs b/VocaluxeLib/Songs/CNotes.cs index de2da998..4f6fc017 100644 --- a/VocaluxeLib/Songs/CNotes.cs +++ b/VocaluxeLib/Songs/CNotes.cs @@ -21,7 +21,7 @@ using System; using System.Collections.Generic; using System.Linq; -namespace VocaluxeLib.Menu.SingNotes +namespace VocaluxeLib.Songs { public class CNotes { diff --git a/VocaluxeLib/Songs/CSong.cs b/VocaluxeLib/Songs/CSong.cs index c3598585..98275199 100644 --- a/VocaluxeLib/Songs/CSong.cs +++ b/VocaluxeLib/Songs/CSong.cs @@ -22,9 +22,8 @@ using System.Collections.Generic; using System.IO; using System.Text; using System.Text.RegularExpressions; -using VocaluxeLib.Menu.SingNotes; -namespace VocaluxeLib.Menu.SongMenu +namespace VocaluxeLib.Songs { public class CSongPointer { diff --git a/VocaluxeLib/Structs.cs b/VocaluxeLib/Structs.cs index 76dbc466..6df4a21d 100644 --- a/VocaluxeLib/Structs.cs +++ b/VocaluxeLib/Structs.cs @@ -20,9 +20,9 @@ using System; using System.Collections.Generic; using System.Windows.Forms; -using VocaluxeLib.Menu.SingNotes; +using VocaluxeLib.Songs; -namespace VocaluxeLib.Menu +namespace VocaluxeLib { #region Drawing From ec5bdb7742374a45788ab905b84859f8da5733da Mon Sep 17 00:00:00 2001 From: Alexander Eckart Date: Mon, 6 May 2013 23:29:31 +0200 Subject: [PATCH 4/6] SProfile => CProfile; SAvatar => CAvatar --- .../PartyModeChallenge/CPartyModeChallenge.cs | 3 +- .../CPartyScreenChallengeMain.cs | 9 ++- .../CPartyModeChallengeMedley.cs | 3 +- .../CPartyScreenChallengeMedleyMain.cs | 9 ++- .../PartyModeTicTacToe/CPartyModeTicTacToe.cs | 3 +- .../CPartyScreenTicTacToeMain.cs | 5 +- Vocaluxe/Base/CMain.cs | 3 +- Vocaluxe/Base/CProfiles.cs | 75 ++++++++++--------- Vocaluxe/Screens/CScreenNames.cs | 2 +- Vocaluxe/Screens/CScreenScore.cs | 2 +- Vocaluxe/Screens/CScreenSing.cs | 4 +- VocaluxeLib/Menu/IMenu.cs | 3 +- VocaluxeLib/Profile/CAvatar.cs | 21 ++++++ VocaluxeLib/Profile/CProfile.cs | 18 +++++ VocaluxeLib/Structs.cs | 27 ------- VocaluxeLib/VocaluxeLib.csproj | 2 + 16 files changed, 106 insertions(+), 83 deletions(-) create mode 100644 VocaluxeLib/Profile/CAvatar.cs create mode 100644 VocaluxeLib/Profile/CProfile.cs diff --git a/PartyModes/PartyModeChallenge/CPartyModeChallenge.cs b/PartyModes/PartyModeChallenge/CPartyModeChallenge.cs index 29ca14c1..df912434 100644 --- a/PartyModes/PartyModeChallenge/CPartyModeChallenge.cs +++ b/PartyModes/PartyModeChallenge/CPartyModeChallenge.cs @@ -21,6 +21,7 @@ using System; using System.Collections.Generic; using System.Runtime.InteropServices; using VocaluxeLib.Menu; +using VocaluxeLib.Profile; [assembly: ComVisible(false)] @@ -532,7 +533,7 @@ namespace VocaluxeLib.PartyModes.Challenge private void _SetTeamNames() { - SProfile[] profiles = CBase.Profiles.GetProfiles(); + CProfile[] profiles = CBase.Profiles.GetProfiles(); if (profiles == null) { diff --git a/PartyModes/PartyModeChallenge/CPartyScreenChallengeMain.cs b/PartyModes/PartyModeChallenge/CPartyScreenChallengeMain.cs index 21a40bc0..d78d9740 100644 --- a/PartyModes/PartyModeChallenge/CPartyScreenChallengeMain.cs +++ b/PartyModes/PartyModeChallenge/CPartyScreenChallengeMain.cs @@ -21,6 +21,7 @@ using System; using System.Collections.Generic; using System.Windows.Forms; using VocaluxeLib.Menu; +using VocaluxeLib.Profile; namespace VocaluxeLib.PartyModes.Challenge { @@ -379,7 +380,7 @@ namespace VocaluxeLib.PartyModes.Challenge if (_GameState.CurrentRoundNr <= _GameState.Combs.Count) { _Texts[_TextNextPlayerMessage].Visible = true; - SProfile[] profiles = CBase.Profiles.GetProfiles(); + CProfile[] profiles = CBase.Profiles.GetProfiles(); for (int i = 0; i < _GameState.NumPlayerAtOnce; i++) { int pid = _GameState.Combs[_GameState.CurrentRoundNr - 1].Player[i]; @@ -491,7 +492,7 @@ namespace VocaluxeLib.PartyModes.Challenge private void _UpdateRoundsTable() { - SProfile[] profile = CBase.Profiles.GetProfiles(); + CProfile[] profile = CBase.Profiles.GetProfiles(); for (int i = 0; i < _RoundsTable.Count; i++) { for (int p = 0; p < _RoundsTable[i].TextPlayer.Count; p++) @@ -585,7 +586,7 @@ namespace VocaluxeLib.PartyModes.Challenge private void _UpdatePlayerTable() { - SProfile[] profiles = CBase.Profiles.GetProfiles(); + CProfile[] profiles = CBase.Profiles.GetProfiles(); for (int i = 0; i < _PlayerTable.Count; i++) { @@ -657,7 +658,7 @@ namespace VocaluxeLib.PartyModes.Challenge private string _GetPlayerWinString() { string s = ""; - SProfile[] profiles = CBase.Profiles.GetProfiles(); + CProfile[] profiles = CBase.Profiles.GetProfiles(); for (int i = 0; i < _GameState.ResultTable.Count; i++) { diff --git a/PartyModes/PartyModeChallengeMedley/CPartyModeChallengeMedley.cs b/PartyModes/PartyModeChallengeMedley/CPartyModeChallengeMedley.cs index eac5df8e..7abd44db 100644 --- a/PartyModes/PartyModeChallengeMedley/CPartyModeChallengeMedley.cs +++ b/PartyModes/PartyModeChallengeMedley/CPartyModeChallengeMedley.cs @@ -24,6 +24,7 @@ using System.Runtime.InteropServices; using VocaluxeLib.Game; using VocaluxeLib.Menu; using VocaluxeLib.Songs; +using VocaluxeLib.Profile; [assembly: ComVisible(false)] @@ -578,7 +579,7 @@ namespace VocaluxeLib.PartyModes.ChallengeMedley private void _SetTeamNames() { - SProfile[] profiles = CBase.Profiles.GetProfiles(); + CProfile[] profiles = CBase.Profiles.GetProfiles(); if (profiles == null) { diff --git a/PartyModes/PartyModeChallengeMedley/CPartyScreenChallengeMedleyMain.cs b/PartyModes/PartyModeChallengeMedley/CPartyScreenChallengeMedleyMain.cs index 99046d1e..62016688 100644 --- a/PartyModes/PartyModeChallengeMedley/CPartyScreenChallengeMedleyMain.cs +++ b/PartyModes/PartyModeChallengeMedley/CPartyScreenChallengeMedleyMain.cs @@ -21,6 +21,7 @@ using System; using System.Collections.Generic; using System.Windows.Forms; using VocaluxeLib.Menu; +using VocaluxeLib.Profile; namespace VocaluxeLib.PartyModes.ChallengeMedley { @@ -379,7 +380,7 @@ namespace VocaluxeLib.PartyModes.ChallengeMedley if (_GameState.CurrentRoundNr <= _GameState.Combs.Count) { _Texts[_TextNextPlayerMessage].Visible = true; - SProfile[] profiles = CBase.Profiles.GetProfiles(); + CProfile[] profiles = CBase.Profiles.GetProfiles(); for (int i = 0; i < _GameState.NumPlayerAtOnce; i++) { int pid = _GameState.Combs[_GameState.CurrentRoundNr - 1].Player[i]; @@ -491,7 +492,7 @@ namespace VocaluxeLib.PartyModes.ChallengeMedley private void _UpdateRoundsTable() { - SProfile[] profile = CBase.Profiles.GetProfiles(); + CProfile[] profile = CBase.Profiles.GetProfiles(); for (int i = 0; i < _RoundsTable.Count; i++) { for (int p = 0; p < _RoundsTable[i].TextPlayer.Count; p++) @@ -585,7 +586,7 @@ namespace VocaluxeLib.PartyModes.ChallengeMedley private void _UpdatePlayerTable() { - SProfile[] profiles = CBase.Profiles.GetProfiles(); + CProfile[] profiles = CBase.Profiles.GetProfiles(); for (int i = 0; i < _PlayerTable.Count; i++) { @@ -657,7 +658,7 @@ namespace VocaluxeLib.PartyModes.ChallengeMedley private string _GetPlayerWinString() { string s = ""; - SProfile[] profiles = CBase.Profiles.GetProfiles(); + CProfile[] profiles = CBase.Profiles.GetProfiles(); for (int i = 0; i < _GameState.ResultTable.Count; i++) { diff --git a/PartyModes/PartyModeTicTacToe/CPartyModeTicTacToe.cs b/PartyModes/PartyModeTicTacToe/CPartyModeTicTacToe.cs index 649cce67..2f46b6dd 100644 --- a/PartyModes/PartyModeTicTacToe/CPartyModeTicTacToe.cs +++ b/PartyModes/PartyModeTicTacToe/CPartyModeTicTacToe.cs @@ -21,6 +21,7 @@ using System; using System.Collections.Generic; using System.Runtime.InteropServices; using VocaluxeLib.Menu; +using VocaluxeLib.Profile; [assembly: ComVisible(false)] @@ -725,7 +726,7 @@ namespace VocaluxeLib.PartyModes.TicTacToe if (players.Length < 2) return; - SProfile[] profiles = CBase.Profiles.GetProfiles(); + CProfile[] profiles = CBase.Profiles.GetProfiles(); CRound r = _GameData.Rounds[roundNr]; bool isDuet = CBase.Songs.GetSongByID(r.SongID).IsDuet; diff --git a/PartyModes/PartyModeTicTacToe/CPartyScreenTicTacToeMain.cs b/PartyModes/PartyModeTicTacToe/CPartyScreenTicTacToeMain.cs index 93093114..16eebf6e 100644 --- a/PartyModes/PartyModeTicTacToe/CPartyScreenTicTacToeMain.cs +++ b/PartyModes/PartyModeTicTacToe/CPartyScreenTicTacToeMain.cs @@ -22,6 +22,7 @@ using System.Collections.Generic; using System.Windows.Forms; using VocaluxeLib.Menu; using VocaluxeLib.Songs; +using VocaluxeLib.Profile; namespace VocaluxeLib.PartyModes.TicTacToe { @@ -513,7 +514,7 @@ namespace VocaluxeLib.PartyModes.TicTacToe _Texts[_TextNextPlayerT2].Visible = true; _Texts[_TextNextPlayerNameT1].Visible = true; _Texts[_TextNextPlayerNameT2].Visible = true; - SProfile[] profiles = CBase.Profiles.GetProfiles(); + CProfile[] profiles = CBase.Profiles.GetProfiles(); _Texts[_TextNextPlayerNameT1].Text = profiles[_GameData.ProfileIDsTeam1[_GameData.Rounds[_SelectedField].SingerTeam1]].PlayerName; _Texts[_TextNextPlayerNameT2].Text = profiles[_GameData.ProfileIDsTeam2[_GameData.Rounds[_SelectedField].SingerTeam2]].PlayerName; _Statics[_StaticAvatarT1].Visible = true; @@ -552,7 +553,7 @@ namespace VocaluxeLib.PartyModes.TicTacToe _Texts[_TextNextPlayerT2].Visible = true; _Texts[_TextNextPlayerNameT1].Visible = true; _Texts[_TextNextPlayerNameT2].Visible = true; - SProfile[] profiles = CBase.Profiles.GetProfiles(); + CProfile[] profiles = CBase.Profiles.GetProfiles(); _Texts[_TextNextPlayerNameT1].Text = profiles[_GameData.ProfileIDsTeam1[_GameData.Rounds[_SelectedField].SingerTeam1]].PlayerName; _Texts[_TextNextPlayerNameT2].Text = profiles[_GameData.ProfileIDsTeam2[_GameData.Rounds[_SelectedField].SingerTeam2]].PlayerName; _Statics[_StaticAvatarT1].Visible = true; diff --git a/Vocaluxe/Base/CMain.cs b/Vocaluxe/Base/CMain.cs index 5ba3ac82..7a3253c1 100644 --- a/Vocaluxe/Base/CMain.cs +++ b/Vocaluxe/Base/CMain.cs @@ -27,6 +27,7 @@ using VocaluxeLib.Game; using VocaluxeLib.Menu; using VocaluxeLib.Menu.SongMenu; using VocaluxeLib.Songs; +using VocaluxeLib.Profile; namespace Vocaluxe.Base { @@ -541,7 +542,7 @@ namespace Vocaluxe.Base class CBprofiles : IProfiles { - public SProfile[] GetProfiles() + public CProfile[] GetProfiles() { return CProfiles.Profiles; } diff --git a/Vocaluxe/Base/CProfiles.cs b/Vocaluxe/Base/CProfiles.cs index 30c4282e..983791d2 100644 --- a/Vocaluxe/Base/CProfiles.cs +++ b/Vocaluxe/Base/CProfiles.cs @@ -24,16 +24,17 @@ using System.Text; using System.Xml; using VocaluxeLib; using VocaluxeLib.Game; +using VocaluxeLib.Profile; namespace Vocaluxe.Base { static class CProfiles { private static readonly XmlWriterSettings _Settings = new XmlWriterSettings(); - private static List _Profiles; - private static readonly List _Avatars = new List(); + private static List _Profiles; + private static readonly List _Avatars = new List(); - public static SProfile[] Profiles + public static CProfile[] Profiles { get { return _Profiles.ToArray(); } } @@ -43,7 +44,7 @@ namespace Vocaluxe.Base get { return _Profiles.Count; } } - public static SAvatar[] Avatars + public static CAvatar[] Avatars { get { return _Avatars.ToArray(); } } @@ -65,7 +66,7 @@ namespace Vocaluxe.Base public static string GetPlayerName(int profileID, int playerNum = 0) { - if (IsProfileIDValid(profileID)) + if (ICProfileIDValid(profileID)) return _Profiles[profileID].PlayerName; string playerName = CLanguage.Translate("TR_SCREENNAMES_PLAYER"); if (playerNum > 0) @@ -75,11 +76,11 @@ namespace Vocaluxe.Base public static int NewProfile(string fileName = "") { - SProfile profile = new SProfile + CProfile profile = new CProfile { PlayerName = String.Empty, Difficulty = EGameDifficulty.TR_CONFIG_EASY, - Avatar = new SAvatar(-1), + Avatar = new CAvatar(-1), GuestProfile = EOffOn.TR_CONFIG_OFF, Active = EOffOn.TR_CONFIG_ON, ProfileFile = fileName != "" ? Path.Combine(CSettings.FolderProfiles, fileName) : String.Empty @@ -101,7 +102,7 @@ namespace Vocaluxe.Base public static void LoadProfiles() { - _Profiles = new List(); + _Profiles = new List(); List files = new List(); files.AddRange(CHelper.ListFiles(CSettings.FolderProfiles, "*.xml", true, true)); @@ -132,7 +133,7 @@ namespace Vocaluxe.Base if (tex.Index != -1) { - SAvatar avatar = new SAvatar {Texture = tex, FileName = Path.GetFileName(file)}; + CAvatar avatar = new CAvatar(-1) {Texture = tex, FileName = Path.GetFileName(file)}; _Avatars.Add(avatar); } } @@ -140,10 +141,10 @@ namespace Vocaluxe.Base public static string AddGetPlayerName(int profileID, char chr) { - if (!IsProfileIDValid(profileID)) + if (!ICProfileIDValid(profileID)) return String.Empty; - SProfile profile = _Profiles[profileID]; + CProfile profile = _Profiles[profileID]; profile.PlayerName += chr; _Profiles[profileID] = profile; @@ -152,10 +153,10 @@ namespace Vocaluxe.Base public static string GetDeleteCharInPlayerName(int profileID) { - if (!IsProfileIDValid(profileID)) + if (!ICProfileIDValid(profileID)) return String.Empty; - SProfile profile = _Profiles[profileID]; + CProfile profile = _Profiles[profileID]; if (profile.PlayerName != "") profile.PlayerName = profile.PlayerName.Remove(profile.PlayerName.Length - 1); _Profiles[profileID] = profile; @@ -163,58 +164,58 @@ namespace Vocaluxe.Base return profile.PlayerName; } - public static bool IsProfileIDValid(int profileID) + public static bool ICProfileIDValid(int profileID) { return profileID >= 0 && profileID < _Profiles.Count; } public static EGameDifficulty GetDifficulty(int profileID) { - return IsProfileIDValid(profileID) ? _Profiles[profileID].Difficulty : EGameDifficulty.TR_CONFIG_NORMAL; + return ICProfileIDValid(profileID) ? _Profiles[profileID].Difficulty : EGameDifficulty.TR_CONFIG_NORMAL; } public static void SetDifficulty(int profileID, EGameDifficulty difficulty) { - if (!IsProfileIDValid(profileID)) + if (!ICProfileIDValid(profileID)) return; - SProfile profile = _Profiles[profileID]; + CProfile profile = _Profiles[profileID]; profile.Difficulty = difficulty; _Profiles[profileID] = profile; } public static EOffOn GetGuestProfile(int profileID) { - return IsProfileIDValid(profileID) ? _Profiles[profileID].GuestProfile : EOffOn.TR_CONFIG_OFF; + return ICProfileIDValid(profileID) ? _Profiles[profileID].GuestProfile : EOffOn.TR_CONFIG_OFF; } public static EOffOn GetActive(int profileID) { - return IsProfileIDValid(profileID) ? _Profiles[profileID].Active : EOffOn.TR_CONFIG_OFF; + return ICProfileIDValid(profileID) ? _Profiles[profileID].Active : EOffOn.TR_CONFIG_OFF; } public static void SetGuestProfile(int profileID, EOffOn option) { - if (!IsProfileIDValid(profileID)) + if (!ICProfileIDValid(profileID)) return; - SProfile profile = _Profiles[profileID]; + CProfile profile = _Profiles[profileID]; profile.GuestProfile = option; _Profiles[profileID] = profile; } public static void SetActive(int profileID, EOffOn option) { - if (!IsProfileIDValid(profileID)) + if (!ICProfileIDValid(profileID)) return; - SProfile profile = _Profiles[profileID]; + CProfile profile = _Profiles[profileID]; profile.Active = option; _Profiles[profileID] = profile; } public static bool IsGuestProfile(int profileID) { - if (!IsProfileIDValid(profileID)) + if (!ICProfileIDValid(profileID)) return true; // this will prevent from saving dummy profiles to highscore db return _Profiles[profileID].GuestProfile == EOffOn.TR_CONFIG_ON; @@ -222,24 +223,24 @@ namespace Vocaluxe.Base public static bool IsActive(int profileID) { - if (!IsProfileIDValid(profileID)) + if (!ICProfileIDValid(profileID)) return false; return _Profiles[profileID].Active == EOffOn.TR_CONFIG_ON; } public static void SetAvatar(int profileID, int avatarNr) { - if (!IsProfileIDValid(profileID) || avatarNr < 0 || avatarNr >= _Avatars.Count) + if (!ICProfileIDValid(profileID) || avatarNr < 0 || avatarNr >= _Avatars.Count) return; - SProfile profile = _Profiles[profileID]; + CProfile profile = _Profiles[profileID]; profile.Avatar = _Avatars[avatarNr]; _Profiles[profileID] = profile; } public static int GetAvatarNr(int profileID) { - if (!IsProfileIDValid(profileID)) + if (!ICProfileIDValid(profileID)) return 0; for (int i = 0; i < _Avatars.Count; i++) @@ -253,7 +254,7 @@ namespace Vocaluxe.Base public static void DeleteProfile(int profileID) { - if (!IsProfileIDValid(profileID)) + if (!ICProfileIDValid(profileID)) return; if (_Profiles[profileID].ProfileFile == "") return; @@ -290,25 +291,25 @@ namespace Vocaluxe.Base _Profiles.Sort(_CompareByPlayerName); } - private static int _CompareByPlayerName(SProfile a, SProfile b) + private static int _CompareByPlayerName(CProfile a, CProfile b) { return String.CompareOrdinal(a.PlayerName, b.PlayerName); } #region private methods - private static SAvatar _GetAvatar(string fileName) + private static CAvatar _GetAvatar(string fileName) { - foreach (SAvatar avatar in _Avatars) + foreach (CAvatar avatar in _Avatars) { if (fileName == avatar.FileName) return avatar; } - return new SAvatar(-1); + return new CAvatar(-1); } private static void _SaveProfile(int profileID) { - if (!IsProfileIDValid(profileID)) + if (!ICProfileIDValid(profileID)) return; if (_Profiles[profileID].ProfileFile == "") @@ -331,7 +332,7 @@ namespace Vocaluxe.Base filename += i; } - SProfile profile = _Profiles[profileID]; + CProfile profile = _Profiles[profileID]; profile.ProfileFile = Path.Combine(CSettings.FolderProfiles, filename + ".xml"); _Profiles[profileID] = profile; } @@ -372,7 +373,7 @@ namespace Vocaluxe.Base private static void _LoadProfile(string fileName) { - SProfile profile = new SProfile {ProfileFile = Path.Combine(CSettings.FolderProfiles, fileName)}; + CProfile profile = new CProfile {ProfileFile = Path.Combine(CSettings.FolderProfiles, fileName)}; CXMLReader xmlReader = CXMLReader.OpenFile(profile.ProfileFile); if (xmlReader == null) @@ -386,7 +387,7 @@ namespace Vocaluxe.Base profile.Difficulty = EGameDifficulty.TR_CONFIG_EASY; xmlReader.TryGetEnumValue("//root/Info/Difficulty", ref profile.Difficulty); - profile.Avatar = new SAvatar(-1); + profile.Avatar = new CAvatar(-1); if (xmlReader.GetValue("//root/Info/Avatar", out value, value)) profile.Avatar = _GetAvatar(value); diff --git a/Vocaluxe/Screens/CScreenNames.cs b/Vocaluxe/Screens/CScreenNames.cs index 0dec07a7..d96476d1 100644 --- a/Vocaluxe/Screens/CScreenNames.cs +++ b/Vocaluxe/Screens/CScreenNames.cs @@ -623,7 +623,7 @@ namespace Vocaluxe.Screens for (int i = 0; i < CSettings.MaxNumPlayer; i++) { - _Statics[_StaticPlayerAvatar[i]].Texture = CProfiles.IsProfileIDValid(CGame.Players[i].ProfileID) ? + _Statics[_StaticPlayerAvatar[i]].Texture = CProfiles.ICProfileIDValid(CGame.Players[i].ProfileID) ? CProfiles.Profiles[CGame.Players[i].ProfileID].Avatar.Texture : _OriginalPlayerAvatarTextures[i]; _Texts[_TextPlayer[i]].Text = CProfiles.GetPlayerName(CGame.Players[i].ProfileID, i + 1); diff --git a/Vocaluxe/Screens/CScreenScore.cs b/Vocaluxe/Screens/CScreenScore.cs index 28af99ff..192cac34 100644 --- a/Vocaluxe/Screens/CScreenScore.cs +++ b/Vocaluxe/Screens/CScreenScore.cs @@ -333,7 +333,7 @@ namespace Vocaluxe.Screens _Statics[_StaticPointsBarBG[p, CGame.NumPlayer - 1]].Rect.Y - _Statics[_StaticPointsBar[p, CGame.NumPlayer - 1]].Rect.H; } - if (CProfiles.IsProfileIDValid(players[p].ProfileID)) + if (CProfiles.ICProfileIDValid(players[p].ProfileID)) _Statics[_StaticAvatar[p, CGame.NumPlayer - 1]].Texture = CProfiles.Profiles[players[p].ProfileID].Avatar.Texture; } diff --git a/Vocaluxe/Screens/CScreenSing.cs b/Vocaluxe/Screens/CScreenSing.cs index 085d161c..e34df75d 100644 --- a/Vocaluxe/Screens/CScreenSing.cs +++ b/Vocaluxe/Screens/CScreenSing.cs @@ -1383,7 +1383,7 @@ namespace Vocaluxe.Screens { for (int i = 0; i < CGame.NumPlayer; i++) { - if (CProfiles.IsProfileIDValid(CGame.Players[i].ProfileID)) + if (CProfiles.ICProfileIDValid(CGame.Players[i].ProfileID)) _Statics[_StaticAvatars[i, CGame.NumPlayer - 1]].Texture = CProfiles.Profiles[CGame.Players[i].ProfileID].Avatar.Texture; else _Statics[_StaticAvatars[i, CGame.NumPlayer - 1]].Visible = false; @@ -1394,7 +1394,7 @@ namespace Vocaluxe.Screens { for (int i = 0; i < CGame.NumPlayer; i++) { - if (CProfiles.IsProfileIDValid(CGame.Players[i].ProfileID)) + if (CProfiles.ICProfileIDValid(CGame.Players[i].ProfileID)) _Texts[_TextNames[i, CGame.NumPlayer - 1]].Text = CProfiles.Profiles[CGame.Players[i].ProfileID].PlayerName; else _Texts[_TextNames[i, CGame.NumPlayer - 1]].Visible = false; diff --git a/VocaluxeLib/Menu/IMenu.cs b/VocaluxeLib/Menu/IMenu.cs index 0ab9c611..2ab3557e 100644 --- a/VocaluxeLib/Menu/IMenu.cs +++ b/VocaluxeLib/Menu/IMenu.cs @@ -25,6 +25,7 @@ using VocaluxeLib; using VocaluxeLib.Game; using VocaluxeLib.Menu.SongMenu; using VocaluxeLib.PartyModes; +using VocaluxeLib.Profile; using VocaluxeLib.Songs; namespace VocaluxeLib.Menu @@ -236,7 +237,7 @@ namespace VocaluxeLib.Menu public interface IProfiles { - SProfile[] GetProfiles(); + CProfile[] GetProfiles(); EGameDifficulty GetDifficulty(int profileID); string GetPlayerName(int profileID, int playerNum = 0); } diff --git a/VocaluxeLib/Profile/CAvatar.cs b/VocaluxeLib/Profile/CAvatar.cs new file mode 100644 index 00000000..a7f71f82 --- /dev/null +++ b/VocaluxeLib/Profile/CAvatar.cs @@ -0,0 +1,21 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace VocaluxeLib.Profile +{ + public class CAvatar + { + public string FileName; + public STexture Texture; + + // ReSharper disable UnusedParameter.Local + public CAvatar(int dummy) + // ReSharper restore UnusedParameter.Local + { + FileName = String.Empty; + Texture = new STexture(-1); + } + } +} diff --git a/VocaluxeLib/Profile/CProfile.cs b/VocaluxeLib/Profile/CProfile.cs new file mode 100644 index 00000000..cfcd80ce --- /dev/null +++ b/VocaluxeLib/Profile/CProfile.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace VocaluxeLib.Profile +{ + public class CProfile + { + public string PlayerName; + public string ProfileFile; + + public EGameDifficulty Difficulty; + public CAvatar Avatar; + public EOffOn GuestProfile; + public EOffOn Active; + } +} diff --git a/VocaluxeLib/Structs.cs b/VocaluxeLib/Structs.cs index 6df4a21d..b3982c70 100644 --- a/VocaluxeLib/Structs.cs +++ b/VocaluxeLib/Structs.cs @@ -211,33 +211,6 @@ namespace VocaluxeLib } #endregion Inputs - #region Profiles - public struct SProfile - { - public string PlayerName; - public string ProfileFile; - - public EGameDifficulty Difficulty; - public SAvatar Avatar; - public EOffOn GuestProfile; - public EOffOn Active; - } - - public struct SAvatar - { - public string FileName; - public STexture Texture; - - // ReSharper disable UnusedParameter.Local - public SAvatar(int dummy) - // ReSharper restore UnusedParameter.Local - { - FileName = String.Empty; - Texture = new STexture(-1); - } - } - #endregion Profiles - #region Game public struct SPlayer { diff --git a/VocaluxeLib/VocaluxeLib.csproj b/VocaluxeLib/VocaluxeLib.csproj index 02de35fe..a1e5509d 100644 --- a/VocaluxeLib/VocaluxeLib.csproj +++ b/VocaluxeLib/VocaluxeLib.csproj @@ -134,6 +134,8 @@ + + From d6a57da73fa0b16d619bd3b085626f7bf09c8d89 Mon Sep 17 00:00:00 2001 From: Alexander Eckart Date: Mon, 6 May 2013 23:38:59 +0200 Subject: [PATCH 5/6] some reconstructions, there is still a lot to do --- Vocaluxe/Base/CConfig.cs | 2 +- Vocaluxe/Base/CProfiles.cs | 24 ++++++++++++------------ Vocaluxe/Screens/CScreenNames.cs | 10 +++++----- VocaluxeLib/Profile/CAvatar.cs | 14 ++++++++++---- VocaluxeLib/Profile/CProfile.cs | 2 +- 5 files changed, 29 insertions(+), 23 deletions(-) diff --git a/Vocaluxe/Base/CConfig.cs b/Vocaluxe/Base/CConfig.cs index 061664a2..03eb827d 100644 --- a/Vocaluxe/Base/CConfig.cs +++ b/Vocaluxe/Base/CConfig.cs @@ -807,7 +807,7 @@ namespace Vocaluxe.Base continue; for (int i = 0; i < CProfiles.Profiles.Length; i++) { - if (Path.GetFileName(CProfiles.Profiles[i].ProfileFile) == Players[j] && CProfiles.Profiles[i].Active == EOffOn.TR_CONFIG_ON) + if (Path.GetFileName(CProfiles.Profiles[i].FileName) == Players[j] && CProfiles.Profiles[i].Active == EOffOn.TR_CONFIG_ON) { //Update Game-infos with player CGame.Players[j].ProfileID = i; diff --git a/Vocaluxe/Base/CProfiles.cs b/Vocaluxe/Base/CProfiles.cs index 983791d2..448a378e 100644 --- a/Vocaluxe/Base/CProfiles.cs +++ b/Vocaluxe/Base/CProfiles.cs @@ -83,10 +83,10 @@ namespace Vocaluxe.Base Avatar = new CAvatar(-1), GuestProfile = EOffOn.TR_CONFIG_OFF, Active = EOffOn.TR_CONFIG_ON, - ProfileFile = fileName != "" ? Path.Combine(CSettings.FolderProfiles, fileName) : String.Empty + FileName = fileName != "" ? Path.Combine(CSettings.FolderProfiles, fileName) : String.Empty }; - if (File.Exists(profile.ProfileFile)) + if (File.Exists(profile.FileName)) return -1; _Profiles.Add(profile); @@ -256,20 +256,20 @@ namespace Vocaluxe.Base { if (!ICProfileIDValid(profileID)) return; - if (_Profiles[profileID].ProfileFile == "") + if (_Profiles[profileID].FileName == "") return; try { //Check if profile saved in config for (int i = 0; i < CConfig.Players.Length; i++) { - if (CConfig.Players[i] == _Profiles[profileID].ProfileFile) + if (CConfig.Players[i] == _Profiles[profileID].FileName) { CConfig.Players[i] = string.Empty; CConfig.SaveConfig(); } } - File.Delete(_Profiles[profileID].ProfileFile); + File.Delete(_Profiles[profileID].FileName); _Profiles.RemoveAt(profileID); //Check if profile is selected in game for (int i = 0; i < CGame.Players.Length; i++) @@ -282,7 +282,7 @@ namespace Vocaluxe.Base } catch (Exception) { - CLog.LogError("Can't delete Profile File " + _Profiles[profileID].ProfileFile + ".xml"); + CLog.LogError("Can't delete Profile File " + _Profiles[profileID].FileName + ".xml"); } } @@ -312,7 +312,7 @@ namespace Vocaluxe.Base if (!ICProfileIDValid(profileID)) return; - if (_Profiles[profileID].ProfileFile == "") + if (_Profiles[profileID].FileName == "") { string filename = string.Empty; foreach (char chr in _Profiles[profileID].PlayerName) @@ -333,18 +333,18 @@ namespace Vocaluxe.Base } CProfile profile = _Profiles[profileID]; - profile.ProfileFile = Path.Combine(CSettings.FolderProfiles, filename + ".xml"); + profile.FileName = Path.Combine(CSettings.FolderProfiles, filename + ".xml"); _Profiles[profileID] = profile; } XmlWriter writer; try { - writer = XmlWriter.Create(_Profiles[profileID].ProfileFile, _Settings); + writer = XmlWriter.Create(_Profiles[profileID].FileName, _Settings); } catch (Exception e) { - CLog.LogError("Error creating/opening Profile File " + _Profiles[profileID].ProfileFile + ": " + e.Message); + CLog.LogError("Error creating/opening Profile File " + _Profiles[profileID].FileName + ": " + e.Message); return; } try @@ -373,9 +373,9 @@ namespace Vocaluxe.Base private static void _LoadProfile(string fileName) { - CProfile profile = new CProfile {ProfileFile = Path.Combine(CSettings.FolderProfiles, fileName)}; + CProfile profile = new CProfile {FileName = Path.Combine(CSettings.FolderProfiles, fileName)}; - CXMLReader xmlReader = CXMLReader.OpenFile(profile.ProfileFile); + CXMLReader xmlReader = CXMLReader.OpenFile(profile.FileName); if (xmlReader == null) return; diff --git a/Vocaluxe/Screens/CScreenNames.cs b/Vocaluxe/Screens/CScreenNames.cs index d96476d1..28efb832 100644 --- a/Vocaluxe/Screens/CScreenNames.cs +++ b/Vocaluxe/Screens/CScreenNames.cs @@ -170,7 +170,7 @@ namespace Vocaluxe.Screens //Update Game-infos with new player CGame.Players[_SelectingFastPlayerNr - 1].ProfileID = _SelectedPlayerNr; //Update config for default players. - CConfig.Players[_SelectingFastPlayerNr - 1] = CProfiles.Profiles[_SelectedPlayerNr].ProfileFile; + CConfig.Players[_SelectingFastPlayerNr - 1] = CProfiles.Profiles[_SelectedPlayerNr].FileName; CConfig.SaveConfig(); //Update texture and name _Statics[_StaticPlayerAvatar[_SelectingFastPlayerNr - 1]].Texture = CProfiles.Profiles[_SelectedPlayerNr].Avatar.Texture; @@ -418,7 +418,7 @@ namespace Vocaluxe.Screens //Update Game-infos with new player CGame.Players[_SelectingSwitchNr].ProfileID = CGame.Players[i].ProfileID; //Update config for default players. - CConfig.Players[_SelectingSwitchNr] = CProfiles.Profiles[i].ProfileFile; + CConfig.Players[_SelectingSwitchNr] = CProfiles.Profiles[i].FileName; //Update texture and name _Statics[_StaticPlayerAvatar[_SelectingSwitchNr]].Texture = CProfiles.Profiles[CGame.Players[i].ProfileID].Avatar.Texture; _Texts[_TextPlayer[_SelectingSwitchNr]].Text = CProfiles.Profiles[CGame.Players[i].ProfileID].PlayerName; @@ -436,7 +436,7 @@ namespace Vocaluxe.Screens //Update Game-infos with new player CGame.Players[i].ProfileID = _SelectedPlayerNr; //Update config for default players. - CConfig.Players[i] = CProfiles.Profiles[_SelectedPlayerNr].ProfileFile; + CConfig.Players[i] = CProfiles.Profiles[_SelectedPlayerNr].FileName; CConfig.SaveConfig(); //Update texture and name _Statics[_StaticPlayerAvatar[i]].Texture = _ChooseAvatarStatic.Texture; @@ -476,7 +476,7 @@ namespace Vocaluxe.Screens //Update Game-infos with new player CGame.Players[_SelectingFastPlayerNr - 1].ProfileID = _SelectedPlayerNr; //Update config for default players. - CConfig.Players[_SelectingFastPlayerNr - 1] = CProfiles.Profiles[_SelectedPlayerNr].ProfileFile; + CConfig.Players[_SelectingFastPlayerNr - 1] = CProfiles.Profiles[_SelectedPlayerNr].FileName; CConfig.SaveConfig(); //Update texture and name _Statics[_StaticPlayerAvatar[_SelectingFastPlayerNr - 1]].Texture = CProfiles.Profiles[_SelectedPlayerNr].Avatar.Texture; @@ -519,7 +519,7 @@ namespace Vocaluxe.Screens //Update Game-infos with new player CGame.Players[i].ProfileID = _SelectedPlayerNr; //Update config for default players. - CConfig.Players[i] = CProfiles.Profiles[_SelectedPlayerNr].ProfileFile; + CConfig.Players[i] = CProfiles.Profiles[_SelectedPlayerNr].FileName; CConfig.SaveConfig(); //Update texture and name _Statics[_StaticPlayerAvatar[i]].Texture = CProfiles.Profiles[_SelectedPlayerNr].Avatar.Texture; diff --git a/VocaluxeLib/Profile/CAvatar.cs b/VocaluxeLib/Profile/CAvatar.cs index a7f71f82..ae8fc93e 100644 --- a/VocaluxeLib/Profile/CAvatar.cs +++ b/VocaluxeLib/Profile/CAvatar.cs @@ -7,13 +7,19 @@ namespace VocaluxeLib.Profile { public class CAvatar { - public string FileName; + private int _ID; + + public int ID + { + get { return _ID; } + } + + public string FileName { get; set; } public STexture Texture; - // ReSharper disable UnusedParameter.Local - public CAvatar(int dummy) - // ReSharper restore UnusedParameter.Local + public CAvatar(int ID) { + _ID = ID; FileName = String.Empty; Texture = new STexture(-1); } diff --git a/VocaluxeLib/Profile/CProfile.cs b/VocaluxeLib/Profile/CProfile.cs index cfcd80ce..a388eb01 100644 --- a/VocaluxeLib/Profile/CProfile.cs +++ b/VocaluxeLib/Profile/CProfile.cs @@ -8,7 +8,7 @@ namespace VocaluxeLib.Profile public class CProfile { public string PlayerName; - public string ProfileFile; + public string FileName; public EGameDifficulty Difficulty; public CAvatar Avatar; From bde99ff2aab915d95e2e43820594f018ea557c64 Mon Sep 17 00:00:00 2001 From: Alexander Eckart Date: Tue, 7 May 2013 00:23:44 +0200 Subject: [PATCH 6/6] some more reconstructions on avatars --- Vocaluxe/Base/CMain.cs | 5 + Vocaluxe/Base/CProfiles.cs | 66 +------- VocaluxeLib/IBasic.cs | 286 ++++++++++++++++++++++++++++++++ VocaluxeLib/Menu/IMenu.cs | 270 ------------------------------ VocaluxeLib/Profile/CAvatar.cs | 17 +- VocaluxeLib/Profile/CProfile.cs | 102 +++++++++++- VocaluxeLib/VocaluxeLib.csproj | 1 + 7 files changed, 413 insertions(+), 334 deletions(-) create mode 100644 VocaluxeLib/IBasic.cs diff --git a/Vocaluxe/Base/CMain.cs b/Vocaluxe/Base/CMain.cs index 7a3253c1..02bc2092 100644 --- a/Vocaluxe/Base/CMain.cs +++ b/Vocaluxe/Base/CMain.cs @@ -374,6 +374,11 @@ namespace Vocaluxe.Base CDraw.DrawTextureReflection(texture, rect, color, bounds, reflectionSpace, reflectionHeight); } + public STexture AddTexture(string fileName) + { + return CDraw.AddTexture(fileName); + } + public void RemoveTexture(ref STexture texture) { CDraw.RemoveTexture(ref texture); diff --git a/Vocaluxe/Base/CProfiles.cs b/Vocaluxe/Base/CProfiles.cs index 448a378e..7d1756be 100644 --- a/Vocaluxe/Base/CProfiles.cs +++ b/Vocaluxe/Base/CProfiles.cs @@ -30,7 +30,6 @@ namespace Vocaluxe.Base { static class CProfiles { - private static readonly XmlWriterSettings _Settings = new XmlWriterSettings(); private static List _Profiles; private static readonly List _Avatars = new List(); @@ -56,11 +55,6 @@ namespace Vocaluxe.Base public static void Init() { - _Settings.Indent = true; - _Settings.Encoding = Encoding.UTF8; - _Settings.ConformanceLevel = ConformanceLevel.Document; - - LoadAvatars(); LoadProfiles(); } @@ -102,6 +96,7 @@ namespace Vocaluxe.Base public static void LoadProfiles() { + LoadAvatars(); _Profiles = new List(); List files = new List(); files.AddRange(CHelper.ListFiles(CSettings.FolderProfiles, "*.xml", true, true)); @@ -337,70 +332,17 @@ namespace Vocaluxe.Base _Profiles[profileID] = profile; } - XmlWriter writer; - try - { - writer = XmlWriter.Create(_Profiles[profileID].FileName, _Settings); - } - catch (Exception e) - { - CLog.LogError("Error creating/opening Profile File " + _Profiles[profileID].FileName + ": " + e.Message); - return; - } - try - { - writer.WriteStartDocument(); - writer.WriteStartElement("root"); - - writer.WriteStartElement("Info"); - writer.WriteElementString("PlayerName", _Profiles[profileID].PlayerName); - writer.WriteElementString("Difficulty", Enum.GetName(typeof(EGameDifficulty), _Profiles[profileID].Difficulty)); - writer.WriteElementString("Avatar", _Profiles[profileID].Avatar.FileName); - writer.WriteElementString("GuestProfile", Enum.GetName(typeof(EOffOn), _Profiles[profileID].GuestProfile)); - writer.WriteElementString("Active", Enum.GetName(typeof(EOffOn), _Profiles[profileID].Active)); - writer.WriteEndElement(); - - writer.WriteEndElement(); //end of root - writer.WriteEndDocument(); - - writer.Flush(); - } - finally - { - writer.Close(); - } + _Profiles[profileID].SaveProfile(); } private static void _LoadProfile(string fileName) { CProfile profile = new CProfile {FileName = Path.Combine(CSettings.FolderProfiles, fileName)}; - - CXMLReader xmlReader = CXMLReader.OpenFile(profile.FileName); - if (xmlReader == null) - return; - - string value = String.Empty; - if (xmlReader.GetValue("//root/Info/PlayerName", out value, value)) + if (profile.LoadProfile()) { - profile.PlayerName = value; - - profile.Difficulty = EGameDifficulty.TR_CONFIG_EASY; - xmlReader.TryGetEnumValue("//root/Info/Difficulty", ref profile.Difficulty); - - profile.Avatar = new CAvatar(-1); - if (xmlReader.GetValue("//root/Info/Avatar", out value, value)) - profile.Avatar = _GetAvatar(value); - - profile.GuestProfile = EOffOn.TR_CONFIG_OFF; - xmlReader.TryGetEnumValue("//root/Info/GuestProfile", ref profile.GuestProfile); - - profile.Active = EOffOn.TR_CONFIG_ON; - xmlReader.TryGetEnumValue("//root/Info/Active", ref profile.Active); - + profile.Avatar = _GetAvatar(profile.AvatarFileName); _Profiles.Add(profile); } - else - CLog.LogError("Can't find PlayerName in Profile File: " + fileName); } #endregion private methods } diff --git a/VocaluxeLib/IBasic.cs b/VocaluxeLib/IBasic.cs new file mode 100644 index 00000000..990dff45 --- /dev/null +++ b/VocaluxeLib/IBasic.cs @@ -0,0 +1,286 @@ +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Drawing; +using System.Linq; +using System.Text; + +using VocaluxeLib.Game; +using VocaluxeLib.Menu; +using VocaluxeLib.PartyModes; +using VocaluxeLib.Profile; +using VocaluxeLib.Songs; + +namespace VocaluxeLib +{ + public interface IMenuParty + { + void SetPartyModeID(int partyModeID); + int GetPartyModeID(); + + void AssingPartyMode(IPartyMode partyMode); + void DataToScreen(Object data); + } + + public interface IConfig + { + void SetBackgroundMusicVolume(int newVolume); + int GetBackgroundMusicVolume(); + + int GetPreviewMusicVolume(); + + EOffOn GetVideosToBackground(); + EOffOn GetVideoBackgrounds(); + EOffOn GetVideoPreview(); + + ESongMenu GetSongMenuType(); + + EOffOn GetDrawNoteLines(); + EOffOn GetDrawToneHelper(); + + int GetCoverSize(); + + IEnumerable GetSongFolder(); + ESongSorting GetSongSorting(); + EOffOn GetTabs(); + EOffOn GetIgnoreArticles(); + + bool IsMicConfigured(int playerNr); + int GetMaxNumMics(); + } + + public interface ISettings + { + int GetRenderW(); + int GetRenderH(); + bool IsTabNavigation(); + + float GetZFar(); + float GetZNear(); + + EGameState GetGameState(); + + int GetToneMin(); + int GetToneMax(); + + int GetNumNoteLines(); + int GetMaxNumPlayer(); + + float GetDefaultMedleyFadeInTime(); + float GetDefaultMedleyFadeOutTime(); + int GetMedleyMinSeriesLength(); + float GetMedleyMinDuration(); + } + + public interface ITheme + { + string GetThemeScreensPath(int partyModeID); + int GetSkinIndex(int partyModeID); + STexture GetSkinTexture(string textureName, int partyModeID); + STexture GetSkinVideoTexture(string videoName, int partyModeID); + + void SkinVideoResume(string videoName, int partyModeID); + void SkinVideoPause(string videoName, int partyModeID); + + SColorF GetColor(string colorName, int partyModeID); + bool GetColor(string colorName, int skinIndex, out SColorF color); + SColorF GetPlayerColor(int playerNr); + + void UnloadSkins(); + void ListSkins(); + void LoadSkins(); + void LoadTheme(); + } + + public interface IBackgroundMusic + { + bool IsDisabled(); + bool IsPlaying(); + bool SongHasVideo(); + bool VideoEnabled(); + + void SetStatus(bool disabled); + void Next(); + void Previous(); + void Pause(); + void Play(); + + void ApplyVolume(); + + STexture GetVideoTexture(); + } + + public interface IDrawing + { + RectangleF GetTextBounds(CText text); + + void DrawTexture(STexture texture, SRectF rect); + void DrawTexture(STexture texture, SRectF rect, SColorF color); + void DrawTexture(STexture texture, SRectF rect, SColorF color, SRectF bounds); + void DrawTexture(STexture texture, SRectF rect, SColorF color, SRectF bounds, bool mirrored); + void DrawTextureReflection(STexture texture, SRectF rect, SColorF color, SRectF bounds, float reflectionSpace, float reflectionHeight); + + STexture AddTexture(string fileName); + void RemoveTexture(ref STexture texture); + + void DrawColor(SColorF color, SRectF rect); + void DrawColorReflection(SColorF color, SRectF rect, float space, float height); + } + + public interface IGraphics + { + void ReloadTheme(); + void SaveTheme(); + void FadeTo(EScreens nextScreen); + + float GetGlobalAlpha(); + } + + public interface ILog + { + void LogError(string errorText); + } + + public interface IFonts + { + void SetFont(string fontName); + void SetStyle(EStyle fontStyle); + + RectangleF GetTextBounds(CText text, float textHeight); + + void DrawText(string text, float textHeight, float x, float y, float z, SColorF color); + void DrawTextReflection(string text, float textHeight, float x, float y, float z, SColorF color, float reflectionSpace, float reflectionHeight); + void DrawText(string text, float textHeight, float x, float y, float z, SColorF color, float begin, float end); + } + + public interface ILanguage + { + string Translate(string keyWord); + string Translate(string keyWord, int partyModeID); + bool TranslationExists(string keyWord); + } + + public interface IGame + { + int GetNumPlayer(); + void SetNumPlayer(int numPlayer); + SPlayer[] GetPlayers(); + CPoints GetPoints(); + float GetMidBeatD(); + int GetCurrentBeatD(); + + int GetRandom(int max); + double GetRandomDouble(); + + float GetTimeFromBeats(float beat, float bpm); + + void AddSong(int songID, EGameMode gameMode); + void Reset(); + void ClearSongs(); + int GetNumSongs(); + } + + public interface IRecording + { + int GetToneAbs(int playerNr); + } + + public interface IProfiles + { + CProfile[] GetProfiles(); + EGameDifficulty GetDifficulty(int profileID); + string GetPlayerName(int profileID, int playerNum = 0); + } + + public interface ISongs + { + int GetNumSongs(); + int GetNumSongsVisible(); + int GetNumCategories(); + int NumSongsInCategory(int categoryIndex); + bool IsInCategory(); + + int GetCurrentCategoryIndex(); + EOffOn GetTabs(); + string GetSearchFilter(); + + void SetCategory(int categoryIndex); + void UpdateRandomSongList(); + + CSong GetVisibleSong(int visibleIndex); + CSong GetSongByID(int songID); + ReadOnlyCollection GetVisibleSongs(); + CCategory GetCategory(int index); + + void AddPartySongSung(int songID); + void ResetSongSung(int catIndex = -1); + + void SortSongs(ESongSorting sorting, EOffOn tabs, EOffOn ignoreArticles, String searchString, EDuetOptions duetOptions); + + void NextCategory(); + void PrevCategory(); + } + + public interface IVideo + { + int Load(string videoFileName); + bool Skip(int videoStream, float startPosition, float videoGap); + bool GetFrame(int videoStream, ref STexture videoTexture, float time, out float videoTime); + bool IsFinished(int videoStream); + bool Close(int videoStream); + } + + public interface ISound + { + int Load(string soundFile, bool prescan); + void SetPosition(int soundStream, float newPosition); + void Play(int soundStream); + void Fade(int soundStream, float targetVolume, float duration); + + bool IsFinished(int soundStream); + float GetPosition(int soundStream); + float GetLength(int soundStream); + void FadeAndStop(int soundStream, float targetVolume, float duration); + + void SetStreamVolume(int soundStream, float volume); + void SetStreamVolumeMax(int soundStream, float maxVolume); + } + + public interface ICover + { + STexture GetNoCover(); + } + + public interface IDataBase + { + bool GetCover(string fileName, ref STexture texture, int coverSize); + } + + public interface IControllers + { + void SetRumble(float duration); + } + + public interface IPlaylist + { + string GetPlaylistName(int playlistID); + List GetPlaylistNames(); + + void SetPlaylistName(int playlistID, string name); + void DeletePlaylist(int playlistID); + void SavePlaylist(int playlistID); + int GetNumPlaylists(); + + void AddPlaylistSong(int playlistID, int songID); + void AddPlaylistSong(int playlistID, int songID, EGameMode gameMode); + void InsertPlaylistSong(int playlistID, int positionIndex, int songID, EGameMode gameMode); + + void MovePlaylistSong(int playlistID, int sourceIndex, int destIndex); + void MovePlaylistSongDown(int playlistID, int songIndex); + void MovePlaylistSongUp(int playlistID, int songIndex); + void DeletePlaylistSong(int playlistID, int songIndex); + + int GetPlaylistSongCount(int playlistID); + CPlaylistSong GetPlaylistSong(int playlistID, int songIndex); + } +} diff --git a/VocaluxeLib/Menu/IMenu.cs b/VocaluxeLib/Menu/IMenu.cs index 2ab3557e..38f856b3 100644 --- a/VocaluxeLib/Menu/IMenu.cs +++ b/VocaluxeLib/Menu/IMenu.cs @@ -63,274 +63,4 @@ namespace VocaluxeLib.Menu void ProcessMouseClick(int x, int y); void ProcessMouseMove(int x, int y); } - - public interface IMenuParty - { - void SetPartyModeID(int partyModeID); - int GetPartyModeID(); - - void AssingPartyMode(IPartyMode partyMode); - void DataToScreen(Object data); - } - - public interface IConfig - { - void SetBackgroundMusicVolume(int newVolume); - int GetBackgroundMusicVolume(); - - int GetPreviewMusicVolume(); - - EOffOn GetVideosToBackground(); - EOffOn GetVideoBackgrounds(); - EOffOn GetVideoPreview(); - - ESongMenu GetSongMenuType(); - - EOffOn GetDrawNoteLines(); - EOffOn GetDrawToneHelper(); - - int GetCoverSize(); - - IEnumerable GetSongFolder(); - ESongSorting GetSongSorting(); - EOffOn GetTabs(); - EOffOn GetIgnoreArticles(); - - bool IsMicConfigured(int playerNr); - int GetMaxNumMics(); - } - - public interface ISettings - { - int GetRenderW(); - int GetRenderH(); - bool IsTabNavigation(); - - float GetZFar(); - float GetZNear(); - - EGameState GetGameState(); - - int GetToneMin(); - int GetToneMax(); - - int GetNumNoteLines(); - int GetMaxNumPlayer(); - - float GetDefaultMedleyFadeInTime(); - float GetDefaultMedleyFadeOutTime(); - int GetMedleyMinSeriesLength(); - float GetMedleyMinDuration(); - } - - public interface ITheme - { - string GetThemeScreensPath(int partyModeID); - int GetSkinIndex(int partyModeID); - STexture GetSkinTexture(string textureName, int partyModeID); - STexture GetSkinVideoTexture(string videoName, int partyModeID); - - void SkinVideoResume(string videoName, int partyModeID); - void SkinVideoPause(string videoName, int partyModeID); - - SColorF GetColor(string colorName, int partyModeID); - bool GetColor(string colorName, int skinIndex, out SColorF color); - SColorF GetPlayerColor(int playerNr); - - void UnloadSkins(); - void ListSkins(); - void LoadSkins(); - void LoadTheme(); - } - - public interface IBackgroundMusic - { - bool IsDisabled(); - bool IsPlaying(); - bool SongHasVideo(); - bool VideoEnabled(); - - void SetStatus(bool disabled); - void Next(); - void Previous(); - void Pause(); - void Play(); - - void ApplyVolume(); - - STexture GetVideoTexture(); - } - - public interface IDrawing - { - RectangleF GetTextBounds(CText text); - - void DrawTexture(STexture texture, SRectF rect); - void DrawTexture(STexture texture, SRectF rect, SColorF color); - void DrawTexture(STexture texture, SRectF rect, SColorF color, SRectF bounds); - void DrawTexture(STexture texture, SRectF rect, SColorF color, SRectF bounds, bool mirrored); - void DrawTextureReflection(STexture texture, SRectF rect, SColorF color, SRectF bounds, float reflectionSpace, float reflectionHeight); - - void RemoveTexture(ref STexture texture); - - void DrawColor(SColorF color, SRectF rect); - void DrawColorReflection(SColorF color, SRectF rect, float space, float height); - } - - public interface IGraphics - { - void ReloadTheme(); - void SaveTheme(); - void FadeTo(EScreens nextScreen); - - float GetGlobalAlpha(); - } - - public interface ILog - { - void LogError(string errorText); - } - - public interface IFonts - { - void SetFont(string fontName); - void SetStyle(EStyle fontStyle); - - RectangleF GetTextBounds(CText text, float textHeight); - - void DrawText(string text, float textHeight, float x, float y, float z, SColorF color); - void DrawTextReflection(string text, float textHeight, float x, float y, float z, SColorF color, float reflectionSpace, float reflectionHeight); - void DrawText(string text, float textHeight, float x, float y, float z, SColorF color, float begin, float end); - } - - public interface ILanguage - { - string Translate(string keyWord); - string Translate(string keyWord, int partyModeID); - bool TranslationExists(string keyWord); - } - - public interface IGame - { - int GetNumPlayer(); - void SetNumPlayer(int numPlayer); - SPlayer[] GetPlayers(); - CPoints GetPoints(); - float GetMidBeatD(); - int GetCurrentBeatD(); - - int GetRandom(int max); - double GetRandomDouble(); - - float GetTimeFromBeats(float beat, float bpm); - - void AddSong(int songID, EGameMode gameMode); - void Reset(); - void ClearSongs(); - int GetNumSongs(); - } - - public interface IRecording - { - int GetToneAbs(int playerNr); - } - - public interface IProfiles - { - CProfile[] GetProfiles(); - EGameDifficulty GetDifficulty(int profileID); - string GetPlayerName(int profileID, int playerNum = 0); - } - - public interface ISongs - { - int GetNumSongs(); - int GetNumSongsVisible(); - int GetNumCategories(); - int NumSongsInCategory(int categoryIndex); - bool IsInCategory(); - - int GetCurrentCategoryIndex(); - EOffOn GetTabs(); - string GetSearchFilter(); - - void SetCategory(int categoryIndex); - void UpdateRandomSongList(); - - CSong GetVisibleSong(int visibleIndex); - CSong GetSongByID(int songID); - ReadOnlyCollection GetVisibleSongs(); - CCategory GetCategory(int index); - - void AddPartySongSung(int songID); - void ResetSongSung(int catIndex = -1); - - void SortSongs(ESongSorting sorting, EOffOn tabs, EOffOn ignoreArticles, String searchString, EDuetOptions duetOptions); - - void NextCategory(); - void PrevCategory(); - } - - public interface IVideo - { - int Load(string videoFileName); - bool Skip(int videoStream, float startPosition, float videoGap); - bool GetFrame(int videoStream, ref STexture videoTexture, float time, out float videoTime); - bool IsFinished(int videoStream); - bool Close(int videoStream); - } - - public interface ISound - { - int Load(string soundFile, bool prescan); - void SetPosition(int soundStream, float newPosition); - void Play(int soundStream); - void Fade(int soundStream, float targetVolume, float duration); - - bool IsFinished(int soundStream); - float GetPosition(int soundStream); - float GetLength(int soundStream); - void FadeAndStop(int soundStream, float targetVolume, float duration); - - void SetStreamVolume(int soundStream, float volume); - void SetStreamVolumeMax(int soundStream, float maxVolume); - } - - public interface ICover - { - STexture GetNoCover(); - } - - public interface IDataBase - { - bool GetCover(string fileName, ref STexture texture, int coverSize); - } - - public interface IControllers - { - void SetRumble(float duration); - } - - public interface IPlaylist - { - string GetPlaylistName(int playlistID); - List GetPlaylistNames(); - - void SetPlaylistName(int playlistID, string name); - void DeletePlaylist(int playlistID); - void SavePlaylist(int playlistID); - int GetNumPlaylists(); - - void AddPlaylistSong(int playlistID, int songID); - void AddPlaylistSong(int playlistID, int songID, EGameMode gameMode); - void InsertPlaylistSong(int playlistID, int positionIndex, int songID, EGameMode gameMode); - - void MovePlaylistSong(int playlistID, int sourceIndex, int destIndex); - void MovePlaylistSongDown(int playlistID, int songIndex); - void MovePlaylistSongUp(int playlistID, int songIndex); - void DeletePlaylistSong(int playlistID, int songIndex); - - int GetPlaylistSongCount(int playlistID); - CPlaylistSong GetPlaylistSong(int playlistID, int songIndex); - } } \ No newline at end of file diff --git a/VocaluxeLib/Profile/CAvatar.cs b/VocaluxeLib/Profile/CAvatar.cs index ae8fc93e..466ceab8 100644 --- a/VocaluxeLib/Profile/CAvatar.cs +++ b/VocaluxeLib/Profile/CAvatar.cs @@ -3,6 +3,8 @@ using System.Collections.Generic; using System.Linq; using System.Text; +using VocaluxeLib.Menu; + namespace VocaluxeLib.Profile { public class CAvatar @@ -14,7 +16,7 @@ namespace VocaluxeLib.Profile get { return _ID; } } - public string FileName { get; set; } + public string FileName; public STexture Texture; public CAvatar(int ID) @@ -23,5 +25,18 @@ namespace VocaluxeLib.Profile FileName = String.Empty; Texture = new STexture(-1); } + + public void LoadFromFile(string NewFileName) + { + FileName = NewFileName; + CBase.Drawing.RemoveTexture(ref Texture); + Texture = CBase.Drawing.AddTexture(FileName); + } + + public void Reload() + { + CBase.Drawing.RemoveTexture(ref Texture); + Texture = CBase.Drawing.AddTexture(FileName); + } } } diff --git a/VocaluxeLib/Profile/CProfile.cs b/VocaluxeLib/Profile/CProfile.cs index a388eb01..fc9f19b4 100644 --- a/VocaluxeLib/Profile/CProfile.cs +++ b/VocaluxeLib/Profile/CProfile.cs @@ -1,18 +1,118 @@ using System; using System.Collections.Generic; +using System.IO; using System.Linq; using System.Text; +using System.Xml; namespace VocaluxeLib.Profile { public class CProfile { + private static readonly XmlWriterSettings _Settings = new XmlWriterSettings() + { + Indent = true, + Encoding = Encoding.UTF8, + ConformanceLevel = ConformanceLevel.Document + }; + + private int _ID; + private int _AvatarID; + + public int ID + { + get { return _ID; } + } + public string PlayerName; public string FileName; + public string AvatarFileName; public EGameDifficulty Difficulty; - public CAvatar Avatar; + public CAvatar Avatar; //should be removed! use avatar id + public EOffOn GuestProfile; public EOffOn Active; + + public CProfile() + { + PlayerName = String.Empty; + Difficulty = EGameDifficulty.TR_CONFIG_EASY; + Avatar = new CAvatar(-1); + GuestProfile = EOffOn.TR_CONFIG_OFF; + Active = EOffOn.TR_CONFIG_ON; + + AvatarFileName = String.Empty; + FileName = String.Empty; + } + + public bool LoadProfile() + { + return LoadProfile(FileName); + } + + public bool LoadProfile(string NewFileName) + { + FileName = NewFileName; + + CXMLReader xmlReader = CXMLReader.OpenFile(FileName); + if (xmlReader == null) + return false; + + string value = String.Empty; + if (xmlReader.GetValue("//root/Info/PlayerName", out value, value)) + { + PlayerName = value; + + xmlReader.TryGetEnumValue("//root/Info/Difficulty", ref Difficulty); + xmlReader.GetValue("//root/Info/Avatar", out AvatarFileName, String.Empty); + xmlReader.TryGetEnumValue("//root/Info/GuestProfile", ref GuestProfile); + xmlReader.TryGetEnumValue("//root/Info/Active", ref Active); + + return true; + } + + CBase.Log.LogError("Can't find PlayerName in Profile File: " + FileName); + return false; + } + + public void SaveProfile() + { + if (FileName == String.Empty) + return; + + XmlWriter writer; + try + { + writer = XmlWriter.Create(FileName, _Settings); + } + catch (Exception e) + { + CBase.Log.LogError("Error creating/opening Profile File " + FileName + ": " + e.Message); + return; + } + try + { + writer.WriteStartDocument(); + writer.WriteStartElement("root"); + + writer.WriteStartElement("Info"); + writer.WriteElementString("PlayerName", PlayerName); + writer.WriteElementString("Difficulty", Enum.GetName(typeof(EGameDifficulty), Difficulty)); + writer.WriteElementString("Avatar", Avatar.FileName); + writer.WriteElementString("GuestProfile", Enum.GetName(typeof(EOffOn), GuestProfile)); + writer.WriteElementString("Active", Enum.GetName(typeof(EOffOn), Active)); + writer.WriteEndElement(); + + writer.WriteEndElement(); //end of root + writer.WriteEndDocument(); + + writer.Flush(); + } + finally + { + writer.Close(); + } + } } } diff --git a/VocaluxeLib/VocaluxeLib.csproj b/VocaluxeLib/VocaluxeLib.csproj index a1e5509d..acfc3146 100644 --- a/VocaluxeLib/VocaluxeLib.csproj +++ b/VocaluxeLib/VocaluxeLib.csproj @@ -111,6 +111,7 @@ +