From 8cfeec628fb631f795148b34c7c0860d6ce07baa Mon Sep 17 00:00:00 2001 From: Flamefire Date: Wed, 22 May 2013 01:31:05 +0200 Subject: [PATCH] Fixed typo --- Vocaluxe/Base/CParty.cs | 20 ++++++++++---------- VocaluxeLib/Menu/CMenuParty.cs | 2 +- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/Vocaluxe/Base/CParty.cs b/Vocaluxe/Base/CParty.cs index 461f2269..32b283c8 100644 --- a/Vocaluxe/Base/CParty.cs +++ b/Vocaluxe/Base/CParty.cs @@ -68,7 +68,7 @@ namespace Vocaluxe.Base _IDs.Enqueue(i); //add dummy normal game mode and set it as default - SPartyMode pm = new SPartyMode {PartyMode = new CPartyModeNone(), ScreenFiles = new List()}; + var pm = new SPartyMode {PartyMode = new CPartyModeNone(), ScreenFiles = new List()}; pm.PartyMode.Initialize(); pm.PartyModeID = _IDs.Dequeue(); _NormalGameModeID = pm.PartyModeID; @@ -97,9 +97,9 @@ namespace Vocaluxe.Base public static List GetPartyModeInfos() { - List infos = new List(); + var infos = new List(); - int[] pmIDs = new int[_PartyModes.Count]; + var pmIDs = new int[_PartyModes.Count]; _PartyModes.Keys.CopyTo(pmIDs, 0); foreach (int pmID in pmIDs) @@ -111,7 +111,7 @@ namespace Vocaluxe.Base if (mode.PartyMode != null) { - SPartyModeInfos info = new SPartyModeInfos + var info = new SPartyModeInfos { Author = mode.Author, Description = mode.Description, @@ -219,7 +219,7 @@ namespace Vocaluxe.Base #region private stuff private static void _LoadPartyModes() { - List files = new List(); + var files = new List(); files.AddRange(CHelper.ListFiles(CSettings.FolderPartyModes, "*.xml", false, true)); foreach (string file in files) @@ -231,7 +231,7 @@ namespace Vocaluxe.Base private static SPartyMode _LoadPartyMode(string file) { - SPartyMode pm = new SPartyMode {PartyModeID = _IDs.Dequeue(), ScreenFiles = new List(), NoErrors = false}; + var pm = new SPartyMode {PartyModeID = _IDs.Dequeue(), ScreenFiles = new List(), NoErrors = false}; CXMLReader xmlReader = CXMLReader.OpenFile(file); @@ -272,7 +272,7 @@ namespace Vocaluxe.Base string pathToCode = Path.Combine(Path.Combine(CSettings.FolderPartyModes, pm.Folder), CSettings.FolderPartyModeCode); - List filesToCompile = new List(); + var filesToCompile = new List(); filesToCompile.AddRange(CHelper.ListFiles(pathToCode, "*.cs", false, true)); Assembly output = _CompileFiles(filesToCompile.ToArray()); @@ -304,7 +304,7 @@ namespace Vocaluxe.Base pm.PartyMode.Initialize(); pm.PartyMode.SetFolder(Path.Combine(Directory.GetCurrentDirectory(), Path.Combine(CSettings.FolderPartyModes, pm.Folder))); - if (!CTheme.AddTheme(Path.Combine(Directory.GetCurrentDirectory(), Path.Combine(Path.Combine(CSettings.FolderPartyModes, pm.Folder), "Theme.xml")), pm.PartyModeID)) + if (!CTheme.AddTheme(Path.Combine(pm.PartyMode.GetFolder(), "Theme.xml"),pm.PartyModeID)) return pm; int themeIndex = CTheme.GetThemeIndex(pm.PartyModeID); @@ -325,7 +325,7 @@ namespace Vocaluxe.Base if (screen != null) { screen.Init(); - screen.AssingPartyMode(pm.PartyMode); + screen.AssignPartyMode(pm.PartyMode); screen.SetPartyModeID(pm.PartyModeID); screen.LoadTheme(xmlPath); pm.PartyMode.AddScreen(screen, screenfile); @@ -343,7 +343,7 @@ namespace Vocaluxe.Base if (files == null || files.Length == 0) return null; - CompilerParameters compilerParams = new CompilerParameters(); + var compilerParams = new CompilerParameters(); compilerParams.ReferencedAssemblies.Add("System.Windows.Forms.dll"); compilerParams.ReferencedAssemblies.Add("System.Core.dll"); compilerParams.ReferencedAssemblies.Add("VocaluxeLib.dll"); diff --git a/VocaluxeLib/Menu/CMenuParty.cs b/VocaluxeLib/Menu/CMenuParty.cs index 965f6175..d57a9304 100644 --- a/VocaluxeLib/Menu/CMenuParty.cs +++ b/VocaluxeLib/Menu/CMenuParty.cs @@ -36,7 +36,7 @@ namespace VocaluxeLib.Menu _PartyModeID = partyModeID; } - public void AssingPartyMode(IPartyMode partyMode) + public void AssignPartyMode(IPartyMode partyMode) { _PartyMode = partyMode; }