diff --git a/Vocaluxe/Base/CConfig.cs b/Vocaluxe/Base/CConfig.cs index 7d12b96c..2629cc8a 100644 --- a/Vocaluxe/Base/CConfig.cs +++ b/Vocaluxe/Base/CConfig.cs @@ -45,7 +45,7 @@ namespace Vocaluxe.Base #pragma warning disable 649 // ReSharper disable MemberCanBePrivate.Global public struct SConfigInfo - // ReSharper restore MemberCanBePrivate.Global + // ReSharper restore MemberCanBePrivate.Global { // ReSharper disable NotAccessedField.Global // ReSharper disable NotAccessedField.Local @@ -63,110 +63,173 @@ namespace Vocaluxe.Base public struct SConfigDebug { - [DefaultValue(EDebugLevel.TR_CONFIG_OFF)] public EDebugLevel DebugLevel; - [DefaultValue(EOffOn.TR_CONFIG_OFF)] public EOffOn SaveModifiedSongs; + [DefaultValue(EDebugLevel.TR_CONFIG_OFF)] + public EDebugLevel DebugLevel; + [DefaultValue(EOffOn.TR_CONFIG_OFF)] + public EOffOn SaveModifiedSongs; } public struct SConfigGraphics { #if WIN - [DefaultValue(ERenderer.TR_CONFIG_DIRECT3D)] public ERenderer Renderer; + [DefaultValue(ERenderer.TR_CONFIG_DIRECT3D)] + public ERenderer Renderer; #else [DefaultValue(ERenderer.TR_CONFIG_OPENGL)] public ERenderer Renderer; #endif - [DefaultValue(ETextureQuality.TR_CONFIG_TEXTURE_MEDIUM)] public ETextureQuality TextureQuality; - [XmlRanged(32, 1024), DefaultValue(256)] public int CoverSize; + [DefaultValue(ETextureQuality.TR_CONFIG_TEXTURE_MEDIUM)] + public ETextureQuality TextureQuality; + [XmlRanged(32, 1024), DefaultValue(256)] + public int CoverSize; - [DefaultValue(1024)] public int ScreenW; - [DefaultValue(576)] public int ScreenH; - [DefaultValue(EGeneralAlignment.Middle)] public EGeneralAlignment ScreenAlignment; - [DefaultValue(0)] public int BorderLeft; - [DefaultValue(0)] public int BorderRight; - [DefaultValue(0)] public int BorderTop; - [DefaultValue(0)] public int BorderBottom; - [DefaultValue(EAntiAliasingModes.X0)] public EAntiAliasingModes AAMode; - [DefaultValue(60f)] public float MaxFPS; - [DefaultValue(EOffOn.TR_CONFIG_ON)] public EOffOn VSync; - [DefaultValue(EOffOn.TR_CONFIG_ON)] public EOffOn FullScreen; - [DefaultValue(EOffOn.TR_CONFIG_OFF)] public EOffOn Stretch; - [DefaultValue(0.4f), XmlRanged(0, 3)] public float FadeTime; + [DefaultValue(1024)] + public int ScreenW; + [DefaultValue(576)] + public int ScreenH; + [DefaultValue(EGeneralAlignment.Middle)] + public EGeneralAlignment ScreenAlignment; + [DefaultValue(0)] + public int BorderLeft; + [DefaultValue(0)] + public int BorderRight; + [DefaultValue(0)] + public int BorderTop; + [DefaultValue(0)] + public int BorderBottom; + [DefaultValue(EAntiAliasingModes.X0)] + public EAntiAliasingModes AAMode; + [DefaultValue(60f)] + public float MaxFPS; + [DefaultValue(EOffOn.TR_CONFIG_ON)] + public EOffOn VSync; + [DefaultValue(EOffOn.TR_CONFIG_ON)] + public EOffOn FullScreen; + [DefaultValue(EOffOn.TR_CONFIG_OFF)] + public EOffOn Stretch; + [DefaultValue(0.4f), XmlRanged(0, 3)] + public float FadeTime; } public struct SConfigTheme { - [XmlElement("Name"), DefaultValue("Ambient")] public string Theme; - [DefaultValue("Blue")] public string Skin; - [XmlElement("Cover"), DefaultValue("Ambient Blue")] public string CoverTheme; - [DefaultValue(EOffOn.TR_CONFIG_ON)] public EOffOn DrawNoteLines; - [DefaultValue(EOffOn.TR_CONFIG_ON)] public EOffOn DrawToneHelper; - [DefaultValue(ETimerLook.TR_CONFIG_TIMERLOOK_EXPANDED)] public ETimerLook TimerLook; - [DefaultValue(EPlayerInfo.TR_CONFIG_PLAYERINFO_BOTH)] public EPlayerInfo PlayerInfo; - [DefaultValue(EFadePlayerInfo.TR_CONFIG_FADEPLAYERINFO_OFF)] public EFadePlayerInfo FadePlayerInfo; - [DefaultValue(ECoverLoading.TR_CONFIG_COVERLOADING_DYNAMIC)] public ECoverLoading CoverLoading; - [DefaultValue(ELyricStyle.TR_CONFIG_LYRICSTYLE_SLIDE)] public ELyricStyle LyricStyle; + [XmlElement("Name"), DefaultValue("Ambient")] + public string Theme; + [DefaultValue("Blue")] + public string Skin; + [XmlElement("Cover"), DefaultValue("Ambient Blue")] + public string CoverTheme; + [DefaultValue(EOffOn.TR_CONFIG_ON)] + public EOffOn DrawNoteLines; + [DefaultValue(EOffOn.TR_CONFIG_ON)] + public EOffOn DrawToneHelper; + [DefaultValue(ETimerLook.TR_CONFIG_TIMERLOOK_EXPANDED)] + public ETimerLook TimerLook; + [DefaultValue(EPlayerInfo.TR_CONFIG_PLAYERINFO_BOTH)] + public EPlayerInfo PlayerInfo; + [DefaultValue(EFadePlayerInfo.TR_CONFIG_FADEPLAYERINFO_OFF)] + public EFadePlayerInfo FadePlayerInfo; + [DefaultValue(ECoverLoading.TR_CONFIG_COVERLOADING_DYNAMIC)] + public ECoverLoading CoverLoading; + [DefaultValue(ELyricStyle.TR_CONFIG_LYRICSTYLE_SLIDE)] + public ELyricStyle LyricStyle; } public struct SConfigSound { - [DefaultValue(EPlaybackLib.GstreamerSharp)] public EPlaybackLib PlayBackLib; - [DefaultValue(ERecordLib.PortAudio)] public ERecordLib RecordLib; - [DefaultValue(EBufferSize.B2048)] public EBufferSize AudioBufferSize; - [XmlRanged(-500, 500)] public int AudioLatency; + [DefaultValue(EPlaybackLib.GstreamerSharp)] + public EPlaybackLib PlayBackLib; + [DefaultValue(ERecordLib.PortAudio)] + public ERecordLib RecordLib; + [DefaultValue(EBufferSize.B2048)] + public EBufferSize AudioBufferSize; + [XmlRanged(-500, 500)] + public int AudioLatency; // ReSharper disable MemberHidesStaticFromOuterClass - [DefaultValue(EBackgroundMusicOffOn.TR_CONFIG_ON)] public EBackgroundMusicOffOn BackgroundMusic; - [XmlRanged(0, 100), DefaultValue(30)] public int BackgroundMusicVolume; - [DefaultValue(EBackgroundMusicSource.TR_CONFIG_NO_OWN_MUSIC)] public EBackgroundMusicSource BackgroundMusicSource; - [DefaultValue(EOffOn.TR_CONFIG_ON)] public EOffOn BackgroundMusicUseStart; - [XmlRanged(0, 100), DefaultValue(50)] public int PreviewMusicVolume; - [XmlRanged(0, 100), DefaultValue(80)] public int GameMusicVolume; - [DefaultValue(EOffOn.TR_CONFIG_OFF)] public EOffOn KaraokeEffect; - [XmlRanged(0, 1), DefaultValue(1.0f)] public float KaraokeEffectLevel; + [DefaultValue(EBackgroundMusicOffOn.TR_CONFIG_ON)] + public EBackgroundMusicOffOn BackgroundMusic; + [XmlRanged(0, 100), DefaultValue(30)] + public int BackgroundMusicVolume; + [DefaultValue(EBackgroundMusicSource.TR_CONFIG_NO_OWN_MUSIC)] + public EBackgroundMusicSource BackgroundMusicSource; + [DefaultValue(EOffOn.TR_CONFIG_ON)] + public EOffOn BackgroundMusicUseStart; + [XmlRanged(0, 100), DefaultValue(50)] + public int PreviewMusicVolume; + [XmlRanged(0, 100), DefaultValue(80)] + public int GameMusicVolume; + [DefaultValue(EOffOn.TR_CONFIG_OFF)] + public EOffOn KaraokeEffect; + [XmlRanged(0, 1), DefaultValue(1.0f)] + public float KaraokeEffectLevel; // ReSharper restore MemberHidesStaticFromOuterClass } public struct SConfigGame { - [DefaultValue(CSettings.FallbackLanguage)] public string Language; + [DefaultValue(CSettings.FallbackLanguage)] + public string Language; public string[] SongFolder; // ReSharper disable MemberHidesStaticFromOuterClass - [DefaultValue(ESongMenu.TR_CONFIG_TILE_BOARD)] public ESongMenu SongMenu; + [DefaultValue(ESongMenu.TR_CONFIG_TILE_BOARD)] + public ESongMenu SongMenu; // ReSharper restore MemberHidesStaticFromOuterClass - [DefaultValue(ESongSorting.TR_CONFIG_ARTIST)] public ESongSorting SongSorting; - [DefaultValue(EOffOn.TR_CONFIG_ON)] public EOffOn IgnoreArticles; - [DefaultValue(10)] public float ScoreAnimationTime; - [DefaultValue(ETimerMode.TR_CONFIG_TIMERMODE_REMAINING)] public ETimerMode TimerMode; - [XmlAltName("NumPlayer"), DefaultValue(2)] public int NumPlayers; - [DefaultValue(EOffOn.TR_CONFIG_OFF)] public EOffOn Tabs; - [DefaultValue(ELyricsPosition.TR_CONFIG_LYRICSPOSITION_BOTTOM)] public ELyricsPosition LyricsPosition; - [DefaultValue(0.1f)] public float MinLineBreakTime; //Minimum time to show the text before it is (to be) sung (if possible) - [XmlArrayItem("Player"), XmlArray] public string[] Players; - [DefaultValue(EHighscoreStyle.TR_CONFIG_HIGHSCORE_LIST_BEST)] public EHighscoreStyle HighscoreStyle; + [DefaultValue(ESongSorting.TR_CONFIG_ARTIST)] + public ESongSorting SongSorting; + [DefaultValue(EOffOn.TR_CONFIG_ON)] + public EOffOn IgnoreArticles; + [DefaultValue(10)] + public float ScoreAnimationTime; + [DefaultValue(ETimerMode.TR_CONFIG_TIMERMODE_REMAINING)] + public ETimerMode TimerMode; + [XmlAltName("NumPlayer"), DefaultValue(2)] + public int NumPlayers; + [DefaultValue(EOffOn.TR_CONFIG_OFF)] + public EOffOn Tabs; + [DefaultValue(ELyricsPosition.TR_CONFIG_LYRICSPOSITION_BOTTOM)] + public ELyricsPosition LyricsPosition; + [DefaultValue(0.1f)] + public float MinLineBreakTime; //Minimum time to show the text before it is (to be) sung (if possible) + [XmlArrayItem("Player"), XmlArray] + public string[] Players; + [DefaultValue(EHighscoreStyle.TR_CONFIG_HIGHSCORE_LIST_BEST)] + public EHighscoreStyle HighscoreStyle; } public struct SConfigVideo { - [DefaultValue(EVideoDecoder.FFmpeg)] public EVideoDecoder VideoDecoder; - [DefaultValue(EOffOn.TR_CONFIG_ON)] public EOffOn VideoBackgrounds; - [DefaultValue(EOffOn.TR_CONFIG_ON)] public EOffOn VideoPreview; - [DefaultValue(EOffOn.TR_CONFIG_ON)] public EOffOn VideosInSongs; - [DefaultValue(EOffOn.TR_CONFIG_OFF)] public EOffOn VideosToBackground; - [DefaultValue(EWebcamLib.AForgeNet)] public EWebcamLib WebcamLib; + [DefaultValue(EVideoDecoder.FFmpeg)] + public EVideoDecoder VideoDecoder; + [DefaultValue(EOffOn.TR_CONFIG_ON)] + public EOffOn VideoBackgrounds; + [DefaultValue(EOffOn.TR_CONFIG_ON)] + public EOffOn VideoPreview; + [DefaultValue(EOffOn.TR_CONFIG_ON)] + public EOffOn VideosInSongs; + [DefaultValue(EOffOn.TR_CONFIG_OFF)] + public EOffOn VideosToBackground; + [DefaultValue(EWebcamLib.AForgeNet)] + public EWebcamLib WebcamLib; public SWebcamConfig? WebcamConfig; } public struct SConfigRecord { public SMicConfig[] MicConfig; - [DefaultValue(200)] public int MicDelay; //[ms] + [DefaultValue(200)] + public int MicDelay; //[ms] } public struct SConfigServer { - [DefaultValue(EOffOn.TR_CONFIG_OFF)] public EOffOn ServerActive; - [DefaultValue(EOffOn.TR_CONFIG_OFF)] public EOffOn ServerEncryption; - [DefaultValue(3000)] public int ServerPort; - [DefaultValue(70)] public int SongCountCoverThreshold; + [DefaultValue(EOffOn.TR_CONFIG_OFF)] + public EOffOn ServerActive; + [DefaultValue(EOffOn.TR_CONFIG_OFF)] + public EOffOn ServerEncryption; + [DefaultValue(3000)] + public int ServerPort; + [DefaultValue(70)] + public int SongCountCoverThreshold; } #pragma warning restore 649 // ReSharper restore UnassignedField.Global @@ -369,16 +432,16 @@ namespace Vocaluxe.Base Config.Server.ServerPort = 3000; Config.Info = new SConfigInfo - { - Version = CSettings.GetFullVersionText(), - Time = DateTime.Now.ToString(), - Platform = Environment.OSVersion.Platform.ToString(), - OSVersion = Environment.OSVersion.ToString(), - ProcessorCount = Environment.ProcessorCount, - Screens = Screen.AllScreens.Length, - PrimaryScreenResolution = Screen.PrimaryScreen.Bounds.Size.ToString(), - Directory = CSettings.ProgramFolder - }; + { + Version = CSettings.GetFullVersionText(), + Time = DateTime.Now.ToString(), + Platform = Environment.OSVersion.Platform.ToString(), + OSVersion = Environment.OSVersion.ToString(), + ProcessorCount = Environment.ProcessorCount, + Screens = Screen.AllScreens.Length, + PrimaryScreenResolution = Screen.PrimaryScreen.Bounds.Size.ToString(), + Directory = CSettings.ProgramFolder + }; } private static readonly List _CommentsGot = new List(); @@ -542,7 +605,7 @@ namespace Vocaluxe.Base return devices.Any(t => t.PlayerChannel.Contains(player)); for (int p = 0; p < CSettings.MaxNumPlayer; ++p) - if (devices.Any(t => t.PlayerChannel.Contains(p+1))) + if (devices.Any(t => t.PlayerChannel.Contains(p + 1))) { return true; } @@ -647,7 +710,7 @@ namespace Vocaluxe.Base switch (parts.Length) { - //Only found a parameter + //Only found a parameter case 1: if (parts[0] != "") { @@ -660,7 +723,7 @@ namespace Vocaluxe.Base break; - //Found parameter and value + //Found parameter and value case 2: if (parts[0] != "") { diff --git a/Vocaluxe/Base/CSettings.cs b/Vocaluxe/Base/CSettings.cs index 05c52e2c..774af072 100644 --- a/Vocaluxe/Base/CSettings.cs +++ b/Vocaluxe/Base/CSettings.cs @@ -54,11 +54,11 @@ namespace Vocaluxe.Base public static EProgramState ProgramState = EProgramState.Start; //Adjusting of programName and version now in the assembly config. - private static readonly Dictionary _CodeNames = new Dictionary() + private static readonly Dictionary _CodeNames = new Dictionary() { {"0.3.", "Shining Heaven"}, {"0.4.", "Blue Sunrise"} - }; + }; private static string _ProgramCodeName { @@ -233,7 +233,7 @@ namespace Vocaluxe.Base public static string GetFullVersionText() { string version = ProgramName; - + if (_ProgramCodeName != "") version += " \"" + _ProgramCodeName + "\""; diff --git a/Vocaluxe/Base/CUtility.cs b/Vocaluxe/Base/CUtility.cs index ee766dc5..ee6fa27c 100644 --- a/Vocaluxe/Base/CUtility.cs +++ b/Vocaluxe/Base/CUtility.cs @@ -31,14 +31,14 @@ namespace Vocaluxe.Base // ReSharper disable MemberCanBePrivate.Global public static void Reset() - // ReSharper restore MemberCanBePrivate.Global + // ReSharper restore MemberCanBePrivate.Global { _Stopwatch.Reset(); } // ReSharper disable MemberCanBePrivate.Global public static void Start() - // ReSharper restore MemberCanBePrivate.Global + // ReSharper restore MemberCanBePrivate.Global { _Stopwatch.Start(); } @@ -127,7 +127,7 @@ namespace Vocaluxe.Base { _KeysPool.Add(pool); } - catch (Exception) {} + catch (Exception) { } } _Timer.Reset(); @@ -173,7 +173,7 @@ namespace Vocaluxe.Base // ReSharper disable UnusedParameter.Global public void KeyUp(KeyEventArgs e) - // ReSharper restore UnusedParameter.Global + // ReSharper restore UnusedParameter.Global { _CheckModifiers(); _KeyPressed = false; @@ -290,7 +290,7 @@ namespace Vocaluxe.Base // ReSharper disable UnusedParameter.Global public void MouseUp(MouseEventArgs e) - // ReSharper restore UnusedParameter.Global + // ReSharper restore UnusedParameter.Global { //CheckModifiers(); //Add(_ModALT, _ModSHIFT, _ModCTRL, e.X, e.Y, e.Button == MouseButtons.Left, e.Button == MouseButtons.Right, e.Delta); diff --git a/Vocaluxe/Lib/Draw/CDirect3D.cs b/Vocaluxe/Lib/Draw/CDirect3D.cs index fc58ebb1..78d64ee3 100644 --- a/Vocaluxe/Lib/Draw/CDirect3D.cs +++ b/Vocaluxe/Lib/Draw/CDirect3D.cs @@ -86,7 +86,7 @@ namespace Vocaluxe.Lib.Draw /// public CDirect3D() { - _Form = new CRenderFormHook {ClientSize = new Size(CConfig.Config.Graphics.ScreenW, CConfig.Config.Graphics.ScreenH)}; + _Form = new CRenderFormHook { ClientSize = new Size(CConfig.Config.Graphics.ScreenW, CConfig.Config.Graphics.ScreenH) }; try { @@ -110,15 +110,15 @@ namespace Vocaluxe.Lib.Draw _Form.MouseEnter += _OnMouseEnter; _PresentParameters = new PresentParameters - { - Windowed = true, - SwapEffect = SwapEffect.Discard, - BackBufferHeight = CConfig.Config.Graphics.ScreenH, - BackBufferWidth = CConfig.Config.Graphics.ScreenW, - BackBufferFormat = _D3D.Adapters.DefaultAdapter.CurrentDisplayMode.Format, - Multisample = MultisampleType.None, - MultisampleQuality = 0 - }; + { + Windowed = true, + SwapEffect = SwapEffect.Discard, + BackBufferHeight = CConfig.Config.Graphics.ScreenH, + BackBufferWidth = CConfig.Config.Graphics.ScreenW, + BackBufferFormat = _D3D.Adapters.DefaultAdapter.CurrentDisplayMode.Format, + Multisample = MultisampleType.None, + MultisampleQuality = 0 + }; //Apply antialiasing and check if antialiasing mode is supported diff --git a/Vocaluxe/Lib/Draw/CDrawWinForm.cs b/Vocaluxe/Lib/Draw/CDrawWinForm.cs index 6a1b94a7..7f81b6b2 100644 --- a/Vocaluxe/Lib/Draw/CDrawWinForm.cs +++ b/Vocaluxe/Lib/Draw/CDrawWinForm.cs @@ -259,7 +259,7 @@ namespace Vocaluxe.Lib.Draw { base.Close(); } - catch {} + catch { } Dispose(); } @@ -308,9 +308,9 @@ namespace Vocaluxe.Lib.Draw _Backbuffer.Save(file, ImageFormat.Png); } - public void DrawRect(SColorF color, SRectF rect) {} + public void DrawRect(SColorF color, SRectF rect) { } - public void DrawRectReflection(SColorF color, SRectF rect, float space, float height) {} + public void DrawRectReflection(SColorF color, SRectF rect, float space, float height) { } public CTextureRef AddTexture(Bitmap bmp) { @@ -433,9 +433,9 @@ namespace Vocaluxe.Lib.Draw coloredBitmap.Dispose(); } - public void DrawTexture(CTextureRef texture, SRectF rect, SColorF color, float begin, float end) {} + public void DrawTexture(CTextureRef texture, SRectF rect, SColorF color, float begin, float end) { } - public void DrawTextureReflection(CTextureRef texture, SRectF rect, SColorF color, SRectF bounds, float space, float height) {} + public void DrawTextureReflection(CTextureRef texture, SRectF rect, SColorF color, SRectF bounds, float space, float height) { } public int GetTextureCount() { @@ -448,7 +448,7 @@ namespace Vocaluxe.Lib.Draw using (Graphics g = Graphics.FromImage(newBitmap)) { - var cm = new ColorMatrix {Matrix33 = color.A, Matrix00 = color.R, Matrix11 = color.G, Matrix22 = color.B, Matrix44 = 1}; + var cm = new ColorMatrix { Matrix33 = color.A, Matrix00 = color.R, Matrix11 = color.G, Matrix22 = color.B, Matrix44 = 1 }; using (var ia = new ImageAttributes()) { diff --git a/Vocaluxe/Lib/Draw/COpenGL.cs b/Vocaluxe/Lib/Draw/COpenGL.cs index 46cb7d15..bb006118 100644 --- a/Vocaluxe/Lib/Draw/COpenGL.cs +++ b/Vocaluxe/Lib/Draw/COpenGL.cs @@ -100,7 +100,7 @@ namespace Vocaluxe.Lib.Draw public COpenGL() { - _Form = new CFormHook {ClientSize = new Size(CConfig.Config.Graphics.ScreenW, CConfig.Config.Graphics.ScreenH)}; + _Form = new CFormHook { ClientSize = new Size(CConfig.Config.Graphics.ScreenW, CConfig.Config.Graphics.ScreenH) }; //OpenGL needs that here but D3D needs it in the constructor, so do NOT unify! //Check AA Mode @@ -109,11 +109,11 @@ namespace Vocaluxe.Lib.Draw bool ok = false; try { - #if WIN +#if WIN var gm = new GraphicsMode(32, 24, 0, (int)CConfig.Config.Graphics.AAMode); - #else +#else var gm = new GraphicsMode(24, 24, 0, (int)CConfig.Config.Graphics.AAMode); - #endif +#endif _Control = new GLControl(gm, 2, 1, GraphicsContextFlags.Default); if (_Control.GraphicsMode != null) ok = true; diff --git a/Vocaluxe/Screens/CScreenSing.cs b/Vocaluxe/Screens/CScreenSing.cs index 7bf7e042..0da54667 100644 --- a/Vocaluxe/Screens/CScreenSing.cs +++ b/Vocaluxe/Screens/CScreenSing.cs @@ -129,7 +129,7 @@ namespace Vocaluxe.Screens { base.Init(); - var texts = new List {_TextSongName, _TextTime, _TextPause, _TextDuetName1, _TextDuetName2, _TextMedleyCountdown}; + var texts = new List { _TextSongName, _TextTime, _TextPause, _TextDuetName1, _TextDuetName2, _TextMedleyCountdown }; _BuildTextStrings(texts); _ThemeTexts = texts.ToArray(); @@ -152,9 +152,9 @@ namespace Vocaluxe.Screens _BuildStaticStrings(ref statics); _ThemeStatics = statics.ToArray(); - _ThemeButtons = new string[] {_ButtonCancel, _ButtonContinue, _ButtonSkip}; - _ThemeLyrics = new string[] {_LyricMain, _LyricSub, _LyricMainDuet, _LyricSubDuet, _LyricMainTop, _LyricSubTop}; - _ThemeSingNotes = new string[] {_SingBars}; + _ThemeButtons = new string[] { _ButtonCancel, _ButtonContinue, _ButtonSkip }; + _ThemeLyrics = new string[] { _LyricMain, _LyricSub, _LyricMainDuet, _LyricSubDuet, _LyricMainTop, _LyricSubTop }; + _ThemeSingNotes = new string[] { _SingBars }; _TimeRects = new List(); _TimerSongText = new Stopwatch(); @@ -577,8 +577,8 @@ namespace Vocaluxe.Screens } else { - for (int i = 0; i < CGame.NumPlayers; i++) - CGame.Players [i].VoiceNr = voiceAssignments [i]; + for (int i = 0; i < CGame.NumPlayers; i++) + CGame.Players[i].VoiceNr = voiceAssignments[i]; } } @@ -804,8 +804,8 @@ namespace Vocaluxe.Screens private void _BuildTextStrings(List texts) { - _TextScores = new string[CSettings.MaxNumPlayer,CSettings.MaxNumPlayer]; - _TextNames = new string[CSettings.MaxNumPlayer,CSettings.MaxNumPlayer]; + _TextScores = new string[CSettings.MaxNumPlayer, CSettings.MaxNumPlayer]; + _TextNames = new string[CSettings.MaxNumPlayer, CSettings.MaxNumPlayer]; for (int numplayer = 0; numplayer < CSettings.MaxNumPlayer; numplayer++) { @@ -826,8 +826,8 @@ namespace Vocaluxe.Screens private void _BuildStaticStrings(ref List statics) { - _StaticScores = new string[CSettings.MaxNumPlayer,CSettings.MaxNumPlayer]; - _StaticAvatars = new string[CSettings.MaxNumPlayer,CSettings.MaxNumPlayer]; + _StaticScores = new string[CSettings.MaxNumPlayer, CSettings.MaxNumPlayer]; + _StaticAvatars = new string[CSettings.MaxNumPlayer, CSettings.MaxNumPlayer]; for (int numplayer = 0; numplayer < CSettings.MaxNumPlayer; numplayer++) { @@ -860,30 +860,30 @@ namespace Vocaluxe.Screens _Texts[_TextDuetName1].Visible = false; _Texts[_TextDuetName2].Visible = false; - List staticsExtra = new List (); - List textsExtra = new List (); + List staticsExtra = new List(); + List textsExtra = new List(); //Everything Static or Text with Extra should be only visible //If Player-Number matches CGame.NumPlayers - foreach(CStatic st in _Statics) - if(st.GetThemeName().StartsWith("StaticExtra")) + foreach (CStatic st in _Statics) + if (st.GetThemeName().StartsWith("StaticExtra")) staticsExtra.Add(st.GetThemeName()); - foreach(CText tx in _Texts) - if(tx.GetThemeName().StartsWith("TextExtra")) + foreach (CText tx in _Texts) + if (tx.GetThemeName().StartsWith("TextExtra")) textsExtra.Add(tx.GetThemeName()); - string curN = "N"+(CGame.NumPlayers); - foreach (string st in staticsExtra) + string curN = "N" + (CGame.NumPlayers); + foreach (string st in staticsExtra) { string n = st.Substring(st.Length - 2); - _Statics[st].Visible = n == curN; + _Statics[st].Visible = n == curN; } - foreach (string tx in textsExtra) + foreach (string tx in textsExtra) { string n = tx.Substring(tx.Length - 2); - _Texts[tx].Visible = n == curN; + _Texts[tx].Visible = n == curN; } for (int numplayer = 0; numplayer < CSettings.MaxNumPlayer; numplayer++) @@ -1333,7 +1333,7 @@ namespace Vocaluxe.Screens { foreach (CSongLine line in voice.Lines.Where(line => line.VisibleInTimeLine)) { - var trect = new STimeRect {StartBeat = line.FirstNoteBeat, EndBeat = line.EndBeat}; + var trect = new STimeRect { StartBeat = line.FirstNoteBeat, EndBeat = line.EndBeat }; trect.Rect = GetNewStatic(null, new SColorF(1f, 1f, 1f, 1f), new SRectF( diff --git a/VocaluxeLib/Menu/CParticleEffect.cs b/VocaluxeLib/Menu/CParticleEffect.cs index 0638db52..88ddd2cb 100644 --- a/VocaluxeLib/Menu/CParticleEffect.cs +++ b/VocaluxeLib/Menu/CParticleEffect.cs @@ -27,7 +27,8 @@ namespace VocaluxeLib.Menu [XmlType("ParticleEffect")] public struct SThemeParticleEffect { - [XmlAttribute(AttributeName = "Name")] public string Name; + [XmlAttribute(AttributeName = "Name")] + public string Name; public string Skin; public SRectF Rect; diff --git a/VocaluxeLib/Menu/CStatic.cs b/VocaluxeLib/Menu/CStatic.cs index c655ddab..bd4e06eb 100644 --- a/VocaluxeLib/Menu/CStatic.cs +++ b/VocaluxeLib/Menu/CStatic.cs @@ -26,7 +26,8 @@ namespace VocaluxeLib.Menu [XmlType("Static")] public struct SThemeStatic { - [XmlAttribute(AttributeName = "Name")] public string Name; + [XmlAttribute(AttributeName = "Name")] + public string Name; public string Skin; public SThemeColor Color; public SRectF Rect; @@ -187,7 +188,7 @@ namespace VocaluxeLib.Menu CBase.Drawing.DrawRect(new SColorF(1f, 1f, 1f, 0.5f), rect); } - public void UnloadSkin() {} + public void UnloadSkin() { } public void LoadSkin() { diff --git a/VocaluxeLib/Menu/CText.cs b/VocaluxeLib/Menu/CText.cs index 3a923a6d..2adc07c2 100644 --- a/VocaluxeLib/Menu/CText.cs +++ b/VocaluxeLib/Menu/CText.cs @@ -25,19 +25,24 @@ namespace VocaluxeLib.Menu [XmlType("Text")] public struct SThemeText { - [XmlAttribute(AttributeName = "Name")] public string Name; + [XmlAttribute(AttributeName = "Name")] + public string Name; public float X; public float Y; public float Z; - [XmlElement("H")] public float FontHeight; - [XmlElement("MaxW")] public float MaxWidth; + [XmlElement("H")] + public float FontHeight; + [XmlElement("MaxW")] + public float MaxWidth; public SThemeColor Color; public SThemeColor SelColor; //for Buttons public EAlignment Align; public EHAlignment ResizeAlign; - [XmlElement("Style")] public EStyle FontStyle; - [XmlElement("Font")] public string FontFamily; + [XmlElement("Style")] + public EStyle FontStyle; + [XmlElement("Font")] + public string FontFamily; public string Text; public SReflection? Reflection; } @@ -428,7 +433,7 @@ namespace VocaluxeLib.Menu Y -= ry; } - public void UnloadSkin() {} + public void UnloadSkin() { } public void LoadSkin() {