diff --git a/PartyModes/PartyModeChallengeMedley/CPartyModeChallengeMedley.cs b/PartyModes/PartyModeChallengeMedley/CPartyModeChallengeMedley.cs
index 27f162f3..78dacac6 100644
--- a/PartyModes/PartyModeChallengeMedley/CPartyModeChallengeMedley.cs
+++ b/PartyModes/PartyModeChallengeMedley/CPartyModeChallengeMedley.cs
@@ -18,6 +18,7 @@
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
+using System.Linq;
using System.Runtime.InteropServices;
using VocaluxeLib.Game;
using VocaluxeLib.Menu;
@@ -386,9 +387,7 @@ namespace VocaluxeLib.PartyModes.ChallengeMedley
}
//Calc avarage sing-count
- int totalCounts = 0;
- foreach (CSong song in visibleSongs)
- totalCounts += song.NumPlayedSession;
+ int totalCounts = visibleSongs.Sum(song => song.NumPlayedSession);
int averageCount = totalCounts / visibleSongs.Count;
// ReSharper disable LoopCanBeConvertedToQuery
diff --git a/ServerLib/CDiscover.cs b/ServerLib/CDiscover.cs
index d78bc19b..1fef7ac1 100644
--- a/ServerLib/CDiscover.cs
+++ b/ServerLib/CDiscover.cs
@@ -104,8 +104,9 @@ namespace ServerLib
IPEndPoint groupEp = new IPEndPoint(IPAddress.Any, _Port);
listener.Client.ReceiveTimeout = timeout;
- byte[] bytes = listener.Receive(ref groupEp);
- string message = Encoding.UTF8.GetString(bytes, 0, bytes.Length);
+ //byte[] bytes =
+ listener.Receive(ref groupEp);
+ //string message = Encoding.UTF8.GetString(bytes, 0, bytes.Length);
foundSomething = true;
if (!knownServer.Contains(groupEp.Address.ToString()))
diff --git a/ServerLib/CWebservice.cs b/ServerLib/CWebservice.cs
index 0e97c20a..fc385e89 100644
--- a/ServerLib/CWebservice.cs
+++ b/ServerLib/CWebservice.cs
@@ -138,8 +138,7 @@ namespace ServerLib
return CServer.GetProfileData(profileId, isReadonly);
}
- else
- return new SProfileData();
+ return new SProfileData();
}
public SProfileData[] GetProfileList()
diff --git a/ServerLib/DataStructs.cs b/ServerLib/DataStructs.cs
index d0541f67..11942ac9 100644
--- a/ServerLib/DataStructs.cs
+++ b/ServerLib/DataStructs.cs
@@ -69,9 +69,10 @@ namespace ServerLib
[DataContract]
public class CBase64Image
{
+ // ReSharper disable InconsistentNaming
[DataMember] private string base64Data = "";
-
[DataMember] private string imageId = "";
+ // ReSharper restore InconsistentNaming
public CBase64Image(Image img, ImageFormat format)
{
diff --git a/ServerLib/UserRoles.cs b/ServerLib/UserRoles.cs
index 860b9d7f..bc3c9d37 100644
--- a/ServerLib/UserRoles.cs
+++ b/ServerLib/UserRoles.cs
@@ -22,6 +22,7 @@ namespace ServerLib
[Flags]
enum EUserRoles
{
+ // ReSharper disable InconsistentNaming
TR_USERROLE_GUEST = 0,
TR_USERROLE_NORMAL = 1,
TR_USERROLE_ADMIN = 2,
@@ -29,5 +30,6 @@ namespace ServerLib
TR_USERROLE_ADDSONGSUSER = 8,
TR_USERROLE_PLAYLISTEDITOR = 16,
TR_USERROLE_PROFILEEDITOR = 32
+ // ReSharper restore InconsistentNaming
}
}
\ No newline at end of file
diff --git a/Vocaluxe.sln.DotSettings b/Vocaluxe.sln.DotSettings
index 9330a5ef..a260a4fb 100644
--- a/Vocaluxe.sln.DotSettings
+++ b/Vocaluxe.sln.DotSettings
@@ -3,6 +3,7 @@
NotCompiledCode
True
True
+ True
SOLUTION
DO_NOT_SHOW
DO_NOT_SHOW
diff --git a/Vocaluxe/Base/CBackgroundMusic.cs b/Vocaluxe/Base/CBackgroundMusic.cs
index 119d73e8..1e38e42b 100644
--- a/Vocaluxe/Base/CBackgroundMusic.cs
+++ b/Vocaluxe/Base/CBackgroundMusic.cs
@@ -162,8 +162,7 @@ namespace Vocaluxe.Base
_SongPlayer = new CSongPlayer();
- _PreviewPlayer = new CSongPlayer();
- _PreviewPlayer.RepeatSong = true;
+ _PreviewPlayer = new CSongPlayer {RepeatSong = true};
_VideoEnabled = (CConfig.Config.Video.VideoBackgrounds == EOffOn.TR_CONFIG_ON && CConfig.Config.Video.VideosToBackground == EOffOn.TR_CONFIG_ON);
SetMusicSource(CConfig.Config.Sound.BackgroundMusicSource);
@@ -339,8 +338,10 @@ namespace Vocaluxe.Base
if (song == null)
return;
+ // ReSharper disable CompareOfFloatsByEqualityOperator
if (start == 0f)
start = song.Preview.StartTime;
+ // ReSharper restore CompareOfFloatsByEqualityOperator
_PlaysPreview = true;
CSound.SetGlobalVolume(CConfig.PreviewMusicVolume);
diff --git a/Vocaluxe/Base/CConfig.cs b/Vocaluxe/Base/CConfig.cs
index a3e1ad2e..f01abaa2 100644
--- a/Vocaluxe/Base/CConfig.cs
+++ b/Vocaluxe/Base/CConfig.cs
@@ -19,7 +19,6 @@ using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
-using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Text.RegularExpressions;
diff --git a/Vocaluxe/Base/CGame.cs b/Vocaluxe/Base/CGame.cs
index 24f58688..187ac2bf 100644
--- a/Vocaluxe/Base/CGame.cs
+++ b/Vocaluxe/Base/CGame.cs
@@ -20,7 +20,6 @@
using System;
using System.Collections.Generic;
-using Vocaluxe.Screens;
using Vocaluxe.SongQueue;
using VocaluxeLib;
using VocaluxeLib.Game;
diff --git a/Vocaluxe/Base/CWebcam.cs b/Vocaluxe/Base/CWebcam.cs
index 689cca3e..a73e1fd0 100644
--- a/Vocaluxe/Base/CWebcam.cs
+++ b/Vocaluxe/Base/CWebcam.cs
@@ -69,23 +69,20 @@ namespace Vocaluxe.Base
public static void Pause()
{
- if (_Webcam == null)
- return;
- _Webcam.Pause();
+ if (_Webcam != null)
+ _Webcam.Pause();
}
public static void Start()
{
- if (_Webcam == null)
- return;
- _Webcam.Start();
+ if (_Webcam != null)
+ _Webcam.Start();
}
public static void Stop()
{
- if (_Webcam == null)
- return;
- _Webcam.Stop();
+ if (_Webcam != null)
+ _Webcam.Stop();
}
public static bool Select(SWebcamConfig c)
@@ -95,9 +92,8 @@ namespace Vocaluxe.Base
public static void DeSelect()
{
- if (_Webcam == null)
- return;
- _Webcam.DeSelect();
+ if (_Webcam != null)
+ _Webcam.DeSelect();
}
public static SWebcamDevice[] GetDevices()
diff --git a/Vocaluxe/Base/Server/CVocaluxeServer.cs b/Vocaluxe/Base/Server/CVocaluxeServer.cs
index 0af844d2..ca21b90e 100644
--- a/Vocaluxe/Base/Server/CVocaluxeServer.cs
+++ b/Vocaluxe/Base/Server/CVocaluxeServer.cs
@@ -190,7 +190,7 @@ namespace Vocaluxe.Base.Server
{
bool result = false;
- foreach (char key in keyString.ToCharArray())
+ foreach (char key in keyString)
{
Controller.AddKeyEvent(new SKeyEvent(ESender.Keyboard, isAltPressed,
Char.IsUpper(key) || isShiftPressed,
@@ -695,10 +695,14 @@ namespace Vocaluxe.Base.Server
IEnumerable playerIds = (from p in CProfiles.GetProfiles()
where String.Equals(p.PlayerName, username, StringComparison.OrdinalIgnoreCase)
select p.ID);
- if (!playerIds.Any())
+ try
+ {
+ return playerIds.First();
+ }
+ catch (InvalidOperationException)
+ {
throw new ArgumentException("Invalid playername");
-
- return playerIds.First();
+ }
}
private static byte[] _Hash(byte[] password, byte[] salt)
diff --git a/Vocaluxe/COSFunctions.cs b/Vocaluxe/COSFunctions.cs
index 33faab37..91f451a9 100644
--- a/Vocaluxe/COSFunctions.cs
+++ b/Vocaluxe/COSFunctions.cs
@@ -16,7 +16,6 @@
#endregion
using System;
-using System.Drawing;
using System.Runtime.InteropServices;
namespace Vocaluxe
@@ -24,29 +23,14 @@ namespace Vocaluxe
static class COSFunctions
{
#if WIN
- private static bool _DefaultDllDirSet;
- private static bool _UsePath;
- private static bool _UseSetDllDir;
-
private static class CWindowsFunctions
{
- [DllImport("kernel32.dll", CharSet = CharSet.Auto, CallingConvention = CallingConvention.StdCall)]
- public static extern void AddDllDirectory(string lpPathName);
-
- [DllImport("kernel32.dll", CharSet = CharSet.Auto, CallingConvention = CallingConvention.StdCall)]
- public static extern void SetDllDirectory(string lpPathName);
-
+ // ReSharper disable MemberHidesStaticFromOuterClass
[DllImport("user32.dll", CallingConvention = CallingConvention.StdCall)]
[return: MarshalAs(UnmanagedType.Bool)]
public static extern bool SetForegroundWindow(IntPtr hWnd);
- [DllImport("kernel32.dll", CallingConvention = CallingConvention.StdCall)]
- [return: MarshalAs(UnmanagedType.Bool)]
- public static extern bool SetDefaultDllDirectories(int directoryFlags);
-
- // ReSharper disable InconsistentNaming
- public const int LOAD_LIBRARY_SEARCH_DEFAULT_DIRS = 0x00001000;
- // ReSharper restore InconsistentNaming
+ // ReSharper restore MemberHidesStaticFromOuterClass
}
#endif
diff --git a/Vocaluxe/Lib/Webcam/IWebcam.cs b/Vocaluxe/Lib/Webcam/IWebcam.cs
index 9960b979..289b51f5 100644
--- a/Vocaluxe/Lib/Webcam/IWebcam.cs
+++ b/Vocaluxe/Lib/Webcam/IWebcam.cs
@@ -63,7 +63,6 @@ namespace Vocaluxe.Lib.Webcam
///
/// Gets the last captured frame as a bitma
///
- ///
/// Null if no frame was captured, the bitmap otherwise
Bitmap GetBitmap();
diff --git a/Vocaluxe/Screens/CScreenOptionsVideo.cs b/Vocaluxe/Screens/CScreenOptionsVideo.cs
index 754e88e2..d8ff7710 100644
--- a/Vocaluxe/Screens/CScreenOptionsVideo.cs
+++ b/Vocaluxe/Screens/CScreenOptionsVideo.cs
@@ -257,8 +257,8 @@ namespace Vocaluxe.Screens
_Config.Height = d.Capabilities[_CapabilityNr].Height;
_Config.Framerate = d.Capabilities[_CapabilityNr].Framerate;
- CWebcam.Select(_Config);
- CWebcam.Start();
+ if (CWebcam.Select(_Config))
+ CWebcam.Start();
}
}
diff --git a/VocaluxeLib/CFont.cs b/VocaluxeLib/CFont.cs
index 88982ee5..15df7ee1 100644
--- a/VocaluxeLib/CFont.cs
+++ b/VocaluxeLib/CFont.cs
@@ -27,9 +27,11 @@ namespace VocaluxeLib
public struct SThemeFont
{
+ // ReSharper disable UnassignedField.Global
public string Name;
public EStyle Style;
public float Size;
+ // ReSharper restore UnassignedField.Global
}
public class CFont
diff --git a/VocaluxeLib/Menu/CBackground.cs b/VocaluxeLib/Menu/CBackground.cs
index 90ccfb86..efbbccd9 100644
--- a/VocaluxeLib/Menu/CBackground.cs
+++ b/VocaluxeLib/Menu/CBackground.cs
@@ -84,7 +84,6 @@ namespace VocaluxeLib.Menu
_PartyModeID = partyModeID;
ThemeLoaded = true;
- LoadSkin();
}
#endregion Constructors
diff --git a/VocaluxeLib/Menu/CButton.cs b/VocaluxeLib/Menu/CButton.cs
index cdf2c8f7..fad72b20 100644
--- a/VocaluxeLib/Menu/CButton.cs
+++ b/VocaluxeLib/Menu/CButton.cs
@@ -122,7 +122,6 @@ namespace VocaluxeLib.Menu
EditMode = false;
ThemeLoaded = true;
- LoadSkin();
}
public CButton(CButton button)
diff --git a/VocaluxeLib/Menu/CEqualizer.cs b/VocaluxeLib/Menu/CEqualizer.cs
index a1ad1a54..6b14778d 100644
--- a/VocaluxeLib/Menu/CEqualizer.cs
+++ b/VocaluxeLib/Menu/CEqualizer.cs
@@ -95,7 +95,6 @@ namespace VocaluxeLib.Menu
_Theme = theme;
ThemeLoaded = true;
- LoadSkin();
}
public bool LoadTheme(string xmlPath, string elementName, CXmlReader xmlReader)
diff --git a/VocaluxeLib/Menu/CInteraction.cs b/VocaluxeLib/Menu/CInteraction.cs
index 6b9414d0..b2214075 100644
--- a/VocaluxeLib/Menu/CInteraction.cs
+++ b/VocaluxeLib/Menu/CInteraction.cs
@@ -33,7 +33,7 @@ namespace VocaluxeLib.Menu
ParticleEffect
}
- class CInteraction
+ public class CInteraction
{
public readonly int Num;
public readonly EType Type;
diff --git a/VocaluxeLib/Menu/CLyric.cs b/VocaluxeLib/Menu/CLyric.cs
index aee0feae..7ada94b3 100644
--- a/VocaluxeLib/Menu/CLyric.cs
+++ b/VocaluxeLib/Menu/CLyric.cs
@@ -103,7 +103,6 @@ namespace VocaluxeLib.Menu
LyricStyle = ELyricStyle.Fill;
ThemeLoaded = true;
- LoadSkin();
}
public bool LoadTheme(string xmlPath, string elementName, CXmlReader xmlReader)
diff --git a/VocaluxeLib/Menu/CMenu.cs b/VocaluxeLib/Menu/CMenu.cs
index 3d575c10..dfc66cce 100644
--- a/VocaluxeLib/Menu/CMenu.cs
+++ b/VocaluxeLib/Menu/CMenu.cs
@@ -201,13 +201,27 @@ namespace VocaluxeLib.Menu
_AddSingNote(new CSingNotes(sb, PartyModeID), sb.Name);
foreach (SThemeSongMenu sm in Theme.SongMenus)
- _AddSongMenu(CSongMenuFactory.GetSongMenu(sm, PartyModeID), sm.Name);
+ _AddSongMenu(CSongMenuFactory.CreateSongMenu(sm, PartyModeID), sm.Name);
foreach (SThemeStatic st in Theme.Statics)
_AddStatic(new CStatic(st, PartyModeID), st.Name);
foreach (SThemeText te in Theme.Texts)
_AddText(new CText(te, PartyModeID), te.Name);
+
+ if (_ScreenVersion != Theme.Informations.ScreenVersion)
+ {
+ string msg = "Can't load screen file of screen \"" + ThemeName + "\", ";
+ if (Theme.Informations.ScreenVersion < _ScreenVersion)
+ msg += "the file ist outdated! ";
+ else
+ msg += "the file is for newer program versions! ";
+
+ msg += "Current screen version is " + _ScreenVersion;
+ CBase.Log.LogError(msg);
+ }
+ foreach (IThemeable el in _Elements.Select(_GetElement).OfType())
+ el.LoadSkin();
}
catch (InvalidOperationException)
{
@@ -217,17 +231,6 @@ namespace VocaluxeLib.Menu
{
CBase.Log.LogError(e.Message + e.StackTrace, true, true);
}
- if (_ScreenVersion != Theme.Informations.ScreenVersion)
- {
- string msg = "Can't load screen file of screen \"" + ThemeName + "\", ";
- if (Theme.Informations.ScreenVersion < _ScreenVersion)
- msg += "the file ist outdated! ";
- else
- msg += "the file is for newer program versions! ";
-
- msg += "Current screen version is " + _ScreenVersion;
- CBase.Log.LogError(msg);
- }
}
private void _AddScreenSetting(CScreenSetting screenSetting, string name)
@@ -257,7 +260,7 @@ namespace VocaluxeLib.Menu
_LoadThemeElement(_ThemeSelectSlides, _AddSelectSlide, xmlReader);
foreach (string elName in _ThemeSongMenus)
{
- ISongMenu element = CSongMenuFactory.GetSongMenu(PartyModeID);
+ ISongMenu element = CSongMenuFactory.CreateSongMenu(PartyModeID);
if (element.LoadTheme("//root/" + ThemeName, elName, xmlReader))
_AddSongMenu(element, elName);
else
@@ -338,80 +341,14 @@ namespace VocaluxeLib.Menu
public virtual void ReloadSkin()
{
- foreach (CBackground background in _Backgrounds)
- background.ReloadSkin();
-
- foreach (CButton button in _Buttons)
- button.ReloadSkin();
-
- foreach (CText text in _Texts)
- text.ReloadSkin();
-
- foreach (CStatic stat in _Statics)
- stat.ReloadSkin();
-
- foreach (CSelectSlide slide in _SelectSlides)
- slide.ReloadSkin();
-
- foreach (CSongMenuFramework sm in _SongMenus)
- sm.ReloadSkin();
-
- foreach (CLyric lyric in _Lyrics)
- lyric.ReloadSkin();
-
- foreach (CSingNotes sn in _SingNotes)
- sn.ReloadSkin();
-
- foreach (CNameSelection ns in _NameSelections)
- ns.ReloadSkin();
-
- foreach (CEqualizer eq in _Equalizers)
- eq.ReloadSkin();
-
- foreach (CPlaylist pls in _Playlists)
- pls.ReloadSkin();
-
- foreach (CParticleEffect pe in _ParticleEffects)
- pe.ReloadSkin();
+ foreach (IThemeable el in _Elements.Select(_GetElement).OfType())
+ el.ReloadSkin();
}
public virtual void UnloadSkin()
{
- foreach (CBackground background in _Backgrounds)
- background.UnloadSkin();
-
- foreach (CButton button in _Buttons)
- button.UnloadSkin();
-
- foreach (CText text in _Texts)
- text.UnloadSkin();
-
- foreach (CStatic stat in _Statics)
- stat.UnloadSkin();
-
- foreach (CSelectSlide slide in _SelectSlides)
- slide.UnloadSkin();
-
- foreach (CSongMenuFramework sm in _SongMenus)
- sm.UnloadSkin();
-
- foreach (CLyric lyric in _Lyrics)
- lyric.UnloadSkin();
-
- foreach (CSingNotes sn in _SingNotes)
- sn.UnloadSkin();
-
- foreach (CNameSelection ns in _NameSelections)
- ns.UnloadSkin();
-
- foreach (CPlaylist pls in _Playlists)
- pls.UnloadSkin();
-
- foreach (CEqualizer eq in _Equalizers)
- eq.UnloadSkin();
-
- foreach (CParticleEffect pe in _ParticleEffects)
- pe.UnloadSkin();
+ foreach (IThemeable el in _Elements.Select(_GetElement).OfType())
+ el.UnloadSkin();
}
public virtual void ReloadTheme(string xmlPath)
diff --git a/VocaluxeLib/Menu/CMenuParty.cs b/VocaluxeLib/Menu/CMenuParty.cs
index 4a5aeae6..1e65a45b 100644
--- a/VocaluxeLib/Menu/CMenuParty.cs
+++ b/VocaluxeLib/Menu/CMenuParty.cs
@@ -15,7 +15,6 @@
// along with Vocaluxe. If not, see .
#endregion
-using System;
using VocaluxeLib.PartyModes;
namespace VocaluxeLib.Menu
diff --git a/VocaluxeLib/Menu/CNameSelection.cs b/VocaluxeLib/Menu/CNameSelection.cs
index 9da34173..37806b5f 100644
--- a/VocaluxeLib/Menu/CNameSelection.cs
+++ b/VocaluxeLib/Menu/CNameSelection.cs
@@ -136,7 +136,6 @@ namespace VocaluxeLib.Menu
_UsedProfiles = new List();
ThemeLoaded = true;
- LoadSkin();
}
public void Init()
diff --git a/VocaluxeLib/Menu/CObjectInteractions.cs b/VocaluxeLib/Menu/CObjectInteractions.cs
index f46a2d00..0520e451 100644
--- a/VocaluxeLib/Menu/CObjectInteractions.cs
+++ b/VocaluxeLib/Menu/CObjectInteractions.cs
@@ -27,7 +27,7 @@ namespace VocaluxeLib.Menu
{
public abstract class CObjectInteractions
{
- private readonly List _Elements = new List();
+ protected readonly List _Elements = new List();
private int _Selection;
private Point _PrevMouse;
@@ -245,7 +245,7 @@ namespace VocaluxeLib.Menu
return _Selection >= 0 && _Selection < _Elements.Count;
}
- private IMenuElement _GetElement(CInteraction element)
+ protected IMenuElement _GetElement(CInteraction element)
{
switch (element.Type)
{
diff --git a/VocaluxeLib/Menu/CParticleEffect.cs b/VocaluxeLib/Menu/CParticleEffect.cs
index 059f64ca..0638db52 100644
--- a/VocaluxeLib/Menu/CParticleEffect.cs
+++ b/VocaluxeLib/Menu/CParticleEffect.cs
@@ -125,7 +125,6 @@ namespace VocaluxeLib.Menu
Visible = true;
ThemeLoaded = true;
- LoadSkin();
}
public bool LoadTheme(string xmlPath, string elementName, CXmlReader xmlReader)
diff --git a/VocaluxeLib/Menu/CPlaylist.cs b/VocaluxeLib/Menu/CPlaylist.cs
index e78dc8d6..1280c513 100644
--- a/VocaluxeLib/Menu/CPlaylist.cs
+++ b/VocaluxeLib/Menu/CPlaylist.cs
@@ -253,14 +253,6 @@ namespace VocaluxeLib.Menu
_ButtonPlaylistSing = new CButton(_Theme.ButtonPlaylistSing, _PartyModeID);
_SelectSlideGameMode = new CSelectSlide(_Theme.SelectSlideGameMode, _PartyModeID);
- Visible = false;
- Selected = false;
- ThemeLoaded = true;
- }
-
- public override void Init()
- {
- base.Init();
_AddStatic(_StaticPlaylistFooter);
_AddStatic(_StaticPlaylistHeader);
_AddButton(_ButtonPlaylistName);
@@ -268,7 +260,10 @@ namespace VocaluxeLib.Menu
_AddButton(_ButtonPlaylistDelete);
_AddButton(_ButtonPlaylistSave);
_AddButton(_ButtonPlaylistSing);
- LoadSkin();
+
+ Visible = false;
+ Selected = false;
+ ThemeLoaded = true;
}
public bool LoadTheme(string xmlPath, string elementName, CXmlReader xmlReader)
@@ -886,11 +881,13 @@ namespace VocaluxeLib.Menu
if (_ChangeOrderSource >= _PlaylistElementContents.Count)
return true;
- _ChangeOrderElement = new CPlaylistElement(_PlaylistElements[_CurrentPlaylistElement]);
- _ChangeOrderElement.Background.Z = CBase.Settings.GetZNear();
- _ChangeOrderElement.Cover.Z = CBase.Settings.GetZNear();
- _ChangeOrderElement.SelectSlide.Z = CBase.Settings.GetZNear();
- _ChangeOrderElement.Text1.Z = CBase.Settings.GetZNear();
+ _ChangeOrderElement = new CPlaylistElement(_PlaylistElements[_CurrentPlaylistElement])
+ {
+ Background = {Z = CBase.Settings.GetZNear()},
+ Cover = {Z = CBase.Settings.GetZNear()},
+ SelectSlide = {Z = CBase.Settings.GetZNear()},
+ Text1 = {Z = CBase.Settings.GetZNear()}
+ };
_ChangeOrderElement.Background.Texture = CBase.Themes.GetSkinTexture(_Theme.SkinBackground, _PartyModeID);
_ChangeOrderElement.Background.Color = _BackgroundColor;
diff --git a/VocaluxeLib/Menu/CSelectSlide.cs b/VocaluxeLib/Menu/CSelectSlide.cs
index 38d4412e..f5a876b0 100644
--- a/VocaluxeLib/Menu/CSelectSlide.cs
+++ b/VocaluxeLib/Menu/CSelectSlide.cs
@@ -264,7 +264,6 @@ namespace VocaluxeLib.Menu
_ValuePartyModeIDs = new List();
ThemeLoaded = true;
- LoadSkin();
}
public bool LoadTheme(string xmlPath, string elementName, CXmlReader xmlReader)
diff --git a/VocaluxeLib/Menu/CStatic.cs b/VocaluxeLib/Menu/CStatic.cs
index 82328426..c655ddab 100644
--- a/VocaluxeLib/Menu/CStatic.cs
+++ b/VocaluxeLib/Menu/CStatic.cs
@@ -111,8 +111,6 @@ namespace VocaluxeLib.Menu
_PartyModeID = partyModeID;
_Theme = theme;
ThemeLoaded = true;
-
- LoadSkin();
}
public bool LoadTheme(string xmlPath, string elementName, CXmlReader xmlReader)
diff --git a/VocaluxeLib/Menu/CText.cs b/VocaluxeLib/Menu/CText.cs
index cad2c505..4f63e1e6 100644
--- a/VocaluxeLib/Menu/CText.cs
+++ b/VocaluxeLib/Menu/CText.cs
@@ -292,7 +292,6 @@ namespace VocaluxeLib.Menu
_ButtonText = buttonText;
ThemeLoaded = true;
- LoadSkin();
}
public bool LoadTheme(string xmlPath, string elementName, CXmlReader xmlReader)
diff --git a/VocaluxeLib/Menu/SingNotes/CSingNotes.cs b/VocaluxeLib/Menu/SingNotes/CSingNotes.cs
index 2c7c7270..4d072af0 100644
--- a/VocaluxeLib/Menu/SingNotes/CSingNotes.cs
+++ b/VocaluxeLib/Menu/SingNotes/CSingNotes.cs
@@ -84,7 +84,6 @@ namespace VocaluxeLib.Menu.SingNotes
_BarPos = new SRectF[CBase.Settings.GetMaxNumPlayer(),CBase.Settings.GetMaxNumPlayer()];
ThemeLoaded = true;
- LoadSkin();
}
public string GetThemeName()
diff --git a/VocaluxeLib/Menu/SongMenu/CSongMenuFactory.cs b/VocaluxeLib/Menu/SongMenu/CSongMenuFactory.cs
index faa523a5..e512721d 100644
--- a/VocaluxeLib/Menu/SongMenu/CSongMenuFactory.cs
+++ b/VocaluxeLib/Menu/SongMenu/CSongMenuFactory.cs
@@ -21,7 +21,7 @@ namespace VocaluxeLib.Menu.SongMenu
{
public static class CSongMenuFactory
{
- public static ISongMenu GetSongMenu(SThemeSongMenu theme, int partyModeID)
+ public static ISongMenu CreateSongMenu(SThemeSongMenu theme, int partyModeID)
{
switch (CBase.Config.GetSongMenuType())
{
@@ -47,7 +47,7 @@ namespace VocaluxeLib.Menu.SongMenu
///
///
///
- public static ISongMenu GetSongMenu(int partyModeID)
+ public static ISongMenu CreateSongMenu(int partyModeID)
{
switch (CBase.Config.GetSongMenuType())
{
diff --git a/VocaluxeLib/Menu/SongMenu/CSongMenuFramework.cs b/VocaluxeLib/Menu/SongMenu/CSongMenuFramework.cs
index b12c35a0..2f3e1793 100644
--- a/VocaluxeLib/Menu/SongMenu/CSongMenuFramework.cs
+++ b/VocaluxeLib/Menu/SongMenu/CSongMenuFramework.cs
@@ -157,7 +157,6 @@ namespace VocaluxeLib.Menu.SongMenu
_Theme = theme;
ThemeLoaded = true;
- LoadSkin();
}
#region Theme
diff --git a/VocaluxeLib/Songs/CSongLoader.cs b/VocaluxeLib/Songs/CSongLoader.cs
index 14793541..0539a00e 100644
--- a/VocaluxeLib/Songs/CSongLoader.cs
+++ b/VocaluxeLib/Songs/CSongLoader.cs
@@ -416,7 +416,9 @@ namespace VocaluxeLib.Songs
{
//PreviewStart is not set or <=0
_Song.Preview.StartTime = (headerFlags & EHeaderFlags.MedleyStartBeat) != 0 ? CBase.Game.GetTimeFromBeats(_Song.Medley.StartBeat, _Song.BPM) : 0f;
+ // ReSharper disable CompareOfFloatsByEqualityOperator
_Song.Preview.Source = _Song.Preview.StartTime == 0 ? EDataSource.None : EDataSource.Calculated;
+ // ReSharper restore CompareOfFloatsByEqualityOperator
}
if ((headerFlags & EHeaderFlags.MedleyStartBeat) != 0 && (headerFlags & EHeaderFlags.MedleyEndBeat) != 0)
diff --git a/VocaluxeTests/Properties/AssemblyInfo.cs b/VocaluxeTests/Properties/AssemblyInfo.cs
index 5f2bcc95..6001c0da 100644
--- a/VocaluxeTests/Properties/AssemblyInfo.cs
+++ b/VocaluxeTests/Properties/AssemblyInfo.cs
@@ -1,10 +1,10 @@
using System.Reflection;
-using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// Allgemeine Informationen über eine Assembly werden über folgende
// Attribute gesteuert. Ändern Sie diese Attributwerte, um die Informationen zu ändern,
// die einer Assembly zugeordnet sind.
+
[assembly: AssemblyTitle("VocaluxeTests")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
@@ -17,9 +17,11 @@ using System.Runtime.InteropServices;
// Wenn ComVisible auf "false" festgelegt wird, sind die Typen innerhalb dieser Assembly
// für COM-Komponenten unsichtbar. Wenn Sie auf einen Typ in dieser Assembly von
// COM aus zugreifen müssen, sollten Sie das ComVisible-Attribut für diesen Typ auf "True" festlegen.
+
[assembly: ComVisible(false)]
// Die folgende GUID bestimmt die ID der Typbibliothek, wenn dieses Projekt für COM verfügbar gemacht wird
+
[assembly: Guid("3bdc6da5-a651-452e-903c-deec310288ad")]
// Versionsinformationen für eine Assembly bestehen aus den folgenden vier Werten:
@@ -32,5 +34,6 @@ using System.Runtime.InteropServices;
// Sie können alle Werte angeben oder die standardmäßigen Build- und Revisionsnummern
// durch Einsatz von '*', wie in nachfolgendem Beispiel:
// [Assembly: AssemblyVersion("1.0.*")]
+
[assembly: AssemblyVersion("1.0.0.0")]
-[assembly: AssemblyFileVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
\ No newline at end of file
diff --git a/WebserverInitalConfig/HttpApi.cs b/WebserverInitalConfig/HttpApi.cs
index 6473afea..5d62b305 100644
--- a/WebserverInitalConfig/HttpApi.cs
+++ b/WebserverInitalConfig/HttpApi.cs
@@ -498,8 +498,7 @@ namespace WebserverInitalConfig
{
if (String.IsNullOrEmpty(networkURL))
throw new ArgumentNullException("networkURL");
- HTTP_SERVICE_CONFIG_URLACL_SET res = new HTTP_SERVICE_CONFIG_URLACL_SET();
- res.KeyDesc = new HTTP_SERVICE_CONFIG_URLACL_KEY("");
+ HTTP_SERVICE_CONFIG_URLACL_SET res = new HTTP_SERVICE_CONFIG_URLACL_SET {KeyDesc = new HTTP_SERVICE_CONFIG_URLACL_KEY("")};
CallHttpApi(
delegate
{
@@ -539,9 +538,7 @@ namespace WebserverInitalConfig
ThrowWin32ExceptionIfError(retVal);
res = (HTTP_SERVICE_CONFIG_URLACL_SET)Marshal.PtrToStructure(pOutputConfigInfo, typeof(HTTP_SERVICE_CONFIG_URLACL_SET));
}
- else if (ERROR_FILE_NOT_FOUND == retVal)
- return;
- else
+ else if (ERROR_FILE_NOT_FOUND != retVal)
ThrowWin32ExceptionIfError(retVal);
}
finally
@@ -604,9 +601,7 @@ namespace WebserverInitalConfig
HTTP_SERVICE_CONFIG_URLACL_KEY keyDesc = new HTTP_SERVICE_CONFIG_URLACL_KEY(networkURL);
HTTP_SERVICE_CONFIG_URLACL_PARAM paramDesc = new HTTP_SERVICE_CONFIG_URLACL_PARAM(securityDescriptor);
- HTTP_SERVICE_CONFIG_URLACL_SET inputConfigInfoSet = new HTTP_SERVICE_CONFIG_URLACL_SET();
- inputConfigInfoSet.KeyDesc = keyDesc;
- inputConfigInfoSet.ParamDesc = paramDesc;
+ HTTP_SERVICE_CONFIG_URLACL_SET inputConfigInfoSet = new HTTP_SERVICE_CONFIG_URLACL_SET {KeyDesc = keyDesc, ParamDesc = paramDesc};
IntPtr pInputConfigInfo = Marshal.AllocCoTaskMem(Marshal.SizeOf(typeof(HTTP_SERVICE_CONFIG_URLACL_SET)));
Marshal.StructureToPtr(inputConfigInfoSet, pInputConfigInfo, false);