Fix some resharper warnings and errors
This commit is contained in:
1 parent
167202e8ff
commit
cd59b82b7b
35 files changed
+82
-174
No files matched your search
@@ -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
|
||||
|
||||
@@ -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()))
|
||||
|
||||
@@ -138,8 +138,7 @@ namespace ServerLib
|
||||
|
||||
return CServer.GetProfileData(profileId, isReadonly);
|
||||
}
|
||||
else
|
||||
return new SProfileData();
|
||||
return new SProfileData();
|
||||
}
|
||||
|
||||
public SProfileData[] GetProfileList()
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
@@ -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
|
||||
}
|
||||
}
|
||||
@@ -3,6 +3,7 @@
|
||||
<s:String x:Key="/Default/CodeEditing/GenerateMemberBody/MethodImplementationKind/@EntryValue">NotCompiledCode</s:String>
|
||||
<s:Boolean x:Key="/Default/CodeEditing/Intellisense/CodeCompletion/IntelliSenseCompletingCharacters/IntelliSenseCompletingCharactersSettingCSharp/UpgradedFromVSSettings/@EntryValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/CodeEditing/Intellisense/LookupWindow/ShowSignatures/@EntryValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/CodeInspection/ExcludedFiles/FileMasksToSkip/=_002A_002Ejs/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:String x:Key="/Default/CodeInspection/Highlighting/AnalysisEnabled/@EntryValue">SOLUTION</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=EmptyGeneralCatchClause/@EntryIndexedValue">DO_NOT_SHOW</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=RedundantExplicitArrayCreation/@EntryIndexedValue">DO_NOT_SHOW</s:String>
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -20,7 +20,6 @@
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Vocaluxe.Screens;
|
||||
using Vocaluxe.SongQueue;
|
||||
using VocaluxeLib;
|
||||
using VocaluxeLib.Game;
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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<int> 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)
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -63,7 +63,6 @@ namespace Vocaluxe.Lib.Webcam
|
||||
/// <summary>
|
||||
/// Gets the last captured frame as a bitma
|
||||
/// </summary>
|
||||
/// <param name="frame"></param>
|
||||
/// <returns>Null if no frame was captured, the bitmap otherwise</returns>
|
||||
Bitmap GetBitmap();
|
||||
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -84,7 +84,6 @@ namespace VocaluxeLib.Menu
|
||||
_PartyModeID = partyModeID;
|
||||
|
||||
ThemeLoaded = true;
|
||||
LoadSkin();
|
||||
}
|
||||
#endregion Constructors
|
||||
|
||||
|
||||
@@ -122,7 +122,6 @@ namespace VocaluxeLib.Menu
|
||||
EditMode = false;
|
||||
|
||||
ThemeLoaded = true;
|
||||
LoadSkin();
|
||||
}
|
||||
|
||||
public CButton(CButton button)
|
||||
|
||||
@@ -95,7 +95,6 @@ namespace VocaluxeLib.Menu
|
||||
_Theme = theme;
|
||||
|
||||
ThemeLoaded = true;
|
||||
LoadSkin();
|
||||
}
|
||||
|
||||
public bool LoadTheme(string xmlPath, string elementName, CXmlReader xmlReader)
|
||||
|
||||
@@ -33,7 +33,7 @@ namespace VocaluxeLib.Menu
|
||||
ParticleEffect
|
||||
}
|
||||
|
||||
class CInteraction
|
||||
public class CInteraction
|
||||
{
|
||||
public readonly int Num;
|
||||
public readonly EType Type;
|
||||
|
||||
@@ -103,7 +103,6 @@ namespace VocaluxeLib.Menu
|
||||
LyricStyle = ELyricStyle.Fill;
|
||||
|
||||
ThemeLoaded = true;
|
||||
LoadSkin();
|
||||
}
|
||||
|
||||
public bool LoadTheme(string xmlPath, string elementName, CXmlReader xmlReader)
|
||||
|
||||
+20
-83
@@ -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<IThemeable>())
|
||||
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<CSelectSlide>(_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<IThemeable>())
|
||||
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<IThemeable>())
|
||||
el.UnloadSkin();
|
||||
}
|
||||
|
||||
public virtual void ReloadTheme(string xmlPath)
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
// along with Vocaluxe. If not, see <http://www.gnu.org/licenses/>.
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
using VocaluxeLib.PartyModes;
|
||||
|
||||
namespace VocaluxeLib.Menu
|
||||
|
||||
@@ -136,7 +136,6 @@ namespace VocaluxeLib.Menu
|
||||
_UsedProfiles = new List<int>();
|
||||
|
||||
ThemeLoaded = true;
|
||||
LoadSkin();
|
||||
}
|
||||
|
||||
public void Init()
|
||||
|
||||
@@ -27,7 +27,7 @@ namespace VocaluxeLib.Menu
|
||||
{
|
||||
public abstract class CObjectInteractions
|
||||
{
|
||||
private readonly List<CInteraction> _Elements = new List<CInteraction>();
|
||||
protected readonly List<CInteraction> _Elements = new List<CInteraction>();
|
||||
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)
|
||||
{
|
||||
|
||||
@@ -125,7 +125,6 @@ namespace VocaluxeLib.Menu
|
||||
Visible = true;
|
||||
|
||||
ThemeLoaded = true;
|
||||
LoadSkin();
|
||||
}
|
||||
|
||||
public bool LoadTheme(string xmlPath, string elementName, CXmlReader xmlReader)
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -264,7 +264,6 @@ namespace VocaluxeLib.Menu
|
||||
_ValuePartyModeIDs = new List<int>();
|
||||
|
||||
ThemeLoaded = true;
|
||||
LoadSkin();
|
||||
}
|
||||
|
||||
public bool LoadTheme(string xmlPath, string elementName, CXmlReader xmlReader)
|
||||
|
||||
@@ -111,8 +111,6 @@ namespace VocaluxeLib.Menu
|
||||
_PartyModeID = partyModeID;
|
||||
_Theme = theme;
|
||||
ThemeLoaded = true;
|
||||
|
||||
LoadSkin();
|
||||
}
|
||||
|
||||
public bool LoadTheme(string xmlPath, string elementName, CXmlReader xmlReader)
|
||||
|
||||
@@ -292,7 +292,6 @@ namespace VocaluxeLib.Menu
|
||||
_ButtonText = buttonText;
|
||||
|
||||
ThemeLoaded = true;
|
||||
LoadSkin();
|
||||
}
|
||||
|
||||
public bool LoadTheme(string xmlPath, string elementName, CXmlReader xmlReader)
|
||||
|
||||
@@ -84,7 +84,6 @@ namespace VocaluxeLib.Menu.SingNotes
|
||||
_BarPos = new SRectF[CBase.Settings.GetMaxNumPlayer(),CBase.Settings.GetMaxNumPlayer()];
|
||||
|
||||
ThemeLoaded = true;
|
||||
LoadSkin();
|
||||
}
|
||||
|
||||
public string GetThemeName()
|
||||
|
||||
@@ -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
|
||||
/// </summary>
|
||||
/// <param name="partyModeID"></param>
|
||||
/// <returns></returns>
|
||||
public static ISongMenu GetSongMenu(int partyModeID)
|
||||
public static ISongMenu CreateSongMenu(int partyModeID)
|
||||
{
|
||||
switch (CBase.Config.GetSongMenuType())
|
||||
{
|
||||
|
||||
@@ -157,7 +157,6 @@ namespace VocaluxeLib.Menu.SongMenu
|
||||
_Theme = theme;
|
||||
|
||||
ThemeLoaded = true;
|
||||
LoadSkin();
|
||||
}
|
||||
|
||||
#region Theme
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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")]
|
||||
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user