Changed string comparisons to easier != "" syntax
This commit is contained in:
1 parent
1540be9120
commit
cf39a4b107
74 files changed
+318
-338
No files matched your search
@@ -118,7 +118,7 @@ namespace VocaluxeLib.Menu
|
||||
|
||||
writer.WriteComment("<Color>: Background color for type \"Color\" from ColorScheme (high priority)");
|
||||
writer.WriteComment("or <R>, <G>, <B>, <A> (lower priority)");
|
||||
if (_Theme.ColorName.Length > 0)
|
||||
if (_Theme.ColorName != "")
|
||||
writer.WriteElementString("Color", _Theme.ColorName);
|
||||
else
|
||||
{
|
||||
@@ -139,13 +139,13 @@ namespace VocaluxeLib.Menu
|
||||
|
||||
public void Resume()
|
||||
{
|
||||
if (_Theme.Type == EBackgroundTypes.Video && _Theme.VideoName.Length > 0 && CBase.Config.GetVideoBackgrounds() == EOffOn.TR_CONFIG_ON)
|
||||
if (_Theme.Type == EBackgroundTypes.Video && _Theme.VideoName != "" && CBase.Config.GetVideoBackgrounds() == EOffOn.TR_CONFIG_ON)
|
||||
CBase.Theme.SkinVideoResume(_Theme.VideoName, _PartyModeID);
|
||||
}
|
||||
|
||||
public void Pause()
|
||||
{
|
||||
if (_Theme.VideoName.Length > 0)
|
||||
if (_Theme.VideoName != "")
|
||||
CBase.Theme.SkinVideoPause(_Theme.VideoName, _PartyModeID);
|
||||
}
|
||||
|
||||
@@ -165,7 +165,7 @@ namespace VocaluxeLib.Menu
|
||||
ok = _DrawVideo();
|
||||
}
|
||||
|
||||
if (_Theme.TextureName.Length > 0 &&
|
||||
if (_Theme.TextureName != "" &&
|
||||
(_Theme.Type == EBackgroundTypes.Texture ||
|
||||
(_Theme.Type == EBackgroundTypes.Video && (CBase.Config.GetVideoBackgrounds() == EOffOn.TR_CONFIG_OFF || !ok))))
|
||||
ok = _DrawTexture();
|
||||
@@ -181,7 +181,7 @@ namespace VocaluxeLib.Menu
|
||||
|
||||
public void LoadTextures()
|
||||
{
|
||||
if (_Theme.ColorName.Length > 0)
|
||||
if (_Theme.ColorName != "")
|
||||
Color = CBase.Theme.GetColor(_Theme.ColorName, _PartyModeID);
|
||||
}
|
||||
|
||||
|
||||
@@ -239,7 +239,7 @@ namespace VocaluxeLib.Menu
|
||||
|
||||
writer.WriteComment("<Color>: Button color from ColorScheme (high priority)");
|
||||
writer.WriteComment("or <R>, <G>, <B>, <A> (lower priority)");
|
||||
if (_Theme.ColorName.Length > 0)
|
||||
if (_Theme.ColorName != "")
|
||||
writer.WriteElementString("Color", _Theme.ColorName);
|
||||
else
|
||||
{
|
||||
@@ -251,7 +251,7 @@ namespace VocaluxeLib.Menu
|
||||
|
||||
writer.WriteComment("<SColor>: Selected button color from ColorScheme (high priority)");
|
||||
writer.WriteComment("or <SR>, <SG>, <SB>, <SA> (lower priority)");
|
||||
if (_Theme.SelColorName.Length > 0)
|
||||
if (_Theme.SelColorName != "")
|
||||
writer.WriteElementString("SColor", _Theme.SelColorName);
|
||||
else
|
||||
{
|
||||
@@ -378,10 +378,10 @@ namespace VocaluxeLib.Menu
|
||||
{
|
||||
Text.LoadTextures();
|
||||
|
||||
if (_Theme.ColorName.Length > 0)
|
||||
if (_Theme.ColorName != "")
|
||||
Color = CBase.Theme.GetColor(_Theme.ColorName, _PartyModeID);
|
||||
|
||||
if (_Theme.SelColorName.Length > 0)
|
||||
if (_Theme.SelColorName != "")
|
||||
SelColor = CBase.Theme.GetColor(_Theme.SelColorName, _PartyModeID);
|
||||
}
|
||||
|
||||
|
||||
@@ -175,7 +175,7 @@ namespace VocaluxeLib.Menu
|
||||
|
||||
writer.WriteComment("<Color>: Equalizer color from ColorScheme (high priority)");
|
||||
writer.WriteComment("or <R>, <G>, <B>, <A> (lower priority)");
|
||||
if (_Theme.ColorName.Length > 0)
|
||||
if (_Theme.ColorName != "")
|
||||
writer.WriteElementString("Color", _Theme.ColorName);
|
||||
else
|
||||
{
|
||||
@@ -186,7 +186,7 @@ namespace VocaluxeLib.Menu
|
||||
}
|
||||
writer.WriteComment("<MaxColor>: Equalizer color for maximal volume from ColorScheme (high priority)");
|
||||
writer.WriteComment("or <MaxR>, <MaxG>, <MaxB>, <MaxA> (lower priority)");
|
||||
if (_Theme.ColorName.Length > 0)
|
||||
if (_Theme.ColorName != "")
|
||||
writer.WriteElementString("MaxColor", _Theme.ColorName);
|
||||
else
|
||||
{
|
||||
@@ -241,7 +241,7 @@ namespace VocaluxeLib.Menu
|
||||
|
||||
public void Draw()
|
||||
{
|
||||
if (_Bars == null || _Theme.Style!=EEqualizerStyle.Collums)
|
||||
if (_Bars == null || _Theme.Style != EEqualizerStyle.Collums)
|
||||
return;
|
||||
|
||||
float dx = Rect.W / _Bars.Length;
|
||||
@@ -274,10 +274,10 @@ namespace VocaluxeLib.Menu
|
||||
|
||||
public void LoadTextures()
|
||||
{
|
||||
if (_Theme.ColorName.Length > 0)
|
||||
if (_Theme.ColorName != "")
|
||||
Color = CBase.Theme.GetColor(_Theme.ColorName, _PartyModeID);
|
||||
|
||||
if (_Theme.MaxColorName.Length > 0)
|
||||
if (_Theme.MaxColorName != "")
|
||||
MaxColor = CBase.Theme.GetColor(_Theme.MaxColorName, _PartyModeID);
|
||||
}
|
||||
|
||||
|
||||
@@ -157,9 +157,7 @@ namespace VocaluxeLib.Menu
|
||||
try
|
||||
{
|
||||
foreach (FileInfo file in dir.GetFiles(cast))
|
||||
{
|
||||
files.Add(!fullpath ? file.Name : file.FullName);
|
||||
}
|
||||
|
||||
if (recursive)
|
||||
{
|
||||
|
||||
@@ -172,7 +172,7 @@ namespace VocaluxeLib.Menu
|
||||
|
||||
writer.WriteComment("<Color>: Lyric text color from ColorScheme (high priority)");
|
||||
writer.WriteComment("or <R>, <G>, <B>, <A> (lower priority)");
|
||||
if (_Theme.ColorName.Length > 0)
|
||||
if (_Theme.ColorName != "")
|
||||
writer.WriteElementString("Color", _Theme.ColorName);
|
||||
else
|
||||
{
|
||||
@@ -184,7 +184,7 @@ namespace VocaluxeLib.Menu
|
||||
|
||||
writer.WriteComment("<SColor>: Highlighted lyric color from ColorScheme (high priority)");
|
||||
writer.WriteComment("or <SR>, <SG>, <SB>, <SA> (lower priority)");
|
||||
if (_Theme.SelColorName.Length > 0)
|
||||
if (_Theme.SelColorName != "")
|
||||
writer.WriteElementString("SColor", _Theme.SelColorName);
|
||||
else
|
||||
{
|
||||
@@ -525,10 +525,10 @@ namespace VocaluxeLib.Menu
|
||||
|
||||
public void LoadTextures()
|
||||
{
|
||||
if (_Theme.ColorName.Length > 0)
|
||||
if (_Theme.ColorName != "")
|
||||
_Color = CBase.Theme.GetColor(_Theme.ColorName, _PartyModeID);
|
||||
|
||||
if (_Theme.SelColorName.Length > 0)
|
||||
if (_Theme.SelColorName != "")
|
||||
_ColorProcessed = CBase.Theme.GetColor(_Theme.SelColorName, _PartyModeID);
|
||||
}
|
||||
|
||||
|
||||
@@ -194,7 +194,7 @@ namespace VocaluxeLib.Menu
|
||||
|
||||
public virtual void SaveTheme()
|
||||
{
|
||||
if (_ThemePath.Length == 0)
|
||||
if (_ThemePath == "")
|
||||
return;
|
||||
|
||||
XmlWriterSettings settings = new XmlWriterSettings {Indent = true, Encoding = Encoding.UTF8, ConformanceLevel = ConformanceLevel.Document};
|
||||
@@ -357,7 +357,7 @@ namespace VocaluxeLib.Menu
|
||||
|
||||
public virtual void ReloadTheme(string xmlPath)
|
||||
{
|
||||
if (_ThemePath.Length == 0)
|
||||
if (_ThemePath == "")
|
||||
return;
|
||||
|
||||
UnloadTextures();
|
||||
@@ -436,7 +436,7 @@ namespace VocaluxeLib.Menu
|
||||
#region ElementHandler
|
||||
|
||||
#region Create Elements
|
||||
// ReSharper disable UnusedMember.Global
|
||||
// ReSharper disable UnusedMember.Global
|
||||
// ReSharper disable MemberCanBeProtected.Global
|
||||
public CButton GetNewButton()
|
||||
{
|
||||
@@ -527,6 +527,7 @@ namespace VocaluxeLib.Menu
|
||||
{
|
||||
return new CParticleEffect(_PartyModeID, maxNumber, color, area, texture, size, type);
|
||||
}
|
||||
|
||||
// ReSharper restore MemberCanBeProtected.Global
|
||||
// ReSharper restore UnusedMember.Global
|
||||
#endregion Create Elements
|
||||
@@ -793,7 +794,7 @@ namespace VocaluxeLib.Menu
|
||||
#endregion Drawing
|
||||
|
||||
#region Elements
|
||||
// ReSharper disable MemberCanBePrivate.Global
|
||||
// ReSharper disable MemberCanBePrivate.Global
|
||||
protected void _AddBackground(CBackground bg, String key = null)
|
||||
{
|
||||
_AddInteraction(_Backgrounds.Add(bg, key), EType.Background);
|
||||
@@ -858,6 +859,7 @@ namespace VocaluxeLib.Menu
|
||||
{
|
||||
_ScreenSettings.Add(se, key);
|
||||
}
|
||||
|
||||
// ReSharper restore MemberCanBePrivate.Global
|
||||
#endregion Elements
|
||||
|
||||
@@ -1515,7 +1517,7 @@ namespace VocaluxeLib.Menu
|
||||
}
|
||||
}
|
||||
|
||||
// ReSharper disable UnusedMember.Local
|
||||
// ReSharper disable UnusedMember.Local
|
||||
private void _ToggleHighlighted()
|
||||
{
|
||||
if (_Selection >= _Interactions.Count || _Selection < 0)
|
||||
@@ -1532,6 +1534,7 @@ namespace VocaluxeLib.Menu
|
||||
|
||||
return _Interactions[_Selection].Type == EType.SelectSlide && _SelectSlides[_Interactions[_Selection].Num].Highlighted;
|
||||
}
|
||||
|
||||
// ReSharper restore UnusedMember.Local
|
||||
|
||||
private bool _IsVisible(int interaction)
|
||||
|
||||
@@ -190,7 +190,7 @@ namespace VocaluxeLib.Menu
|
||||
|
||||
writer.WriteComment("<ColorEmptyTile>: Static color from ColorScheme (high priority)");
|
||||
writer.WriteComment("or <R>, <G>, <B>, <A> (lower priority)");
|
||||
if (_Theme.ColorEmptyTileName.Length > 0)
|
||||
if (_Theme.ColorEmptyTileName != "")
|
||||
writer.WriteElementString("ColorEmptyTile", _Theme.ColorEmptyTileName);
|
||||
else
|
||||
{
|
||||
@@ -221,7 +221,7 @@ namespace VocaluxeLib.Menu
|
||||
writer.WriteComment("<Font>: Text font name");
|
||||
writer.WriteElementString("Font", _Theme.NameFont);
|
||||
writer.WriteComment("<Color>: Text color from ColorScheme (high priority)");
|
||||
if (_Theme.NameColorName.Length > 0)
|
||||
if (_Theme.NameColorName != "")
|
||||
writer.WriteElementString("Color", _Theme.NameColorName);
|
||||
else
|
||||
{
|
||||
@@ -455,10 +455,10 @@ namespace VocaluxeLib.Menu
|
||||
_TextureEmptyTile = CBase.Theme.GetSkinTexture(_Theme.TextureEmptyTileName, _PartyModeID);
|
||||
_TextureTileSelected = CBase.Theme.GetSkinTexture(_Theme.TextureTileSelectedName, _PartyModeID);
|
||||
|
||||
if (_Theme.ColorEmptyTileName.Length > 0)
|
||||
if (_Theme.ColorEmptyTileName != "")
|
||||
ColorEmptyTile = CBase.Theme.GetColor(_Theme.ColorEmptyTileName, _PartyModeID);
|
||||
|
||||
if (_Theme.NameColorName.Length > 0)
|
||||
if (_Theme.NameColorName != "")
|
||||
_Theme.NameColor = CBase.Theme.GetColor(_Theme.NameColorName, _PartyModeID);
|
||||
}
|
||||
|
||||
|
||||
@@ -297,7 +297,7 @@ namespace VocaluxeLib.Menu
|
||||
|
||||
public void Draw()
|
||||
{
|
||||
if (_TextureName.Length > 0)
|
||||
if (_TextureName != "")
|
||||
CBase.Drawing.DrawTexture(CBase.Theme.GetSkinTexture(_TextureName, _PartyModeID), _Rect, new SColorF(_Color.R, _Color.G, _Color.B, _Color.A * Alpha2 * _Alpha));
|
||||
else
|
||||
CBase.Drawing.DrawTexture(_Texture, _Rect, new SColorF(_Color.R, _Color.G, _Color.B, _Color.A * Alpha2 * _Alpha));
|
||||
@@ -433,7 +433,7 @@ namespace VocaluxeLib.Menu
|
||||
|
||||
writer.WriteComment("<Color>: ParticleEffect color from ColorScheme (high priority)");
|
||||
writer.WriteComment("or <R>, <G>, <B>, <A> (lower priority)");
|
||||
if (_Theme.ColorName.Length > 0)
|
||||
if (_Theme.ColorName != "")
|
||||
writer.WriteElementString("Color", _Theme.ColorName);
|
||||
else
|
||||
{
|
||||
@@ -544,7 +544,7 @@ namespace VocaluxeLib.Menu
|
||||
h = 0;
|
||||
|
||||
CParticle star;
|
||||
if (_Theme.TextureName.Length > 0)
|
||||
if (_Theme.TextureName != "")
|
||||
{
|
||||
star = new CParticle(_PartyModeID, _Theme.TextureName, Color,
|
||||
CBase.Game.GetRandom(w) + Rect.X - size / 4f,
|
||||
@@ -605,9 +605,9 @@ namespace VocaluxeLib.Menu
|
||||
|
||||
public void LoadTextures()
|
||||
{
|
||||
if (_Theme.ColorName.Length > 0)
|
||||
if (_Theme.ColorName != "")
|
||||
Color = CBase.Theme.GetColor(_Theme.ColorName, _PartyModeID);
|
||||
if (_Theme.TextureName.Length > 0)
|
||||
if (_Theme.TextureName != "")
|
||||
Texture = CBase.Theme.GetSkinTexture(_Theme.TextureName, _PartyModeID);
|
||||
}
|
||||
|
||||
|
||||
@@ -370,7 +370,7 @@ namespace VocaluxeLib.Menu
|
||||
|
||||
writer.WriteComment("<ColorBackground>: Button color from ColorScheme (high priority)");
|
||||
writer.WriteComment("or <BackgroundR>, <BackgroundG>, <BackgroundB>, <BackgroundA> (lower priority)");
|
||||
if (_Theme.ColorBackgroundName.Length > 0)
|
||||
if (_Theme.ColorBackgroundName != "")
|
||||
writer.WriteElementString("ColorBackground", _Theme.ColorBackgroundName);
|
||||
else
|
||||
{
|
||||
@@ -382,7 +382,7 @@ namespace VocaluxeLib.Menu
|
||||
|
||||
writer.WriteComment("<SColorBackground>: Selected paylist-entry color from ColorScheme (high priority)");
|
||||
writer.WriteComment("or <SBackgroundR>, <SBackgroundG>, <SBackgroundB>, <SBackgroundA> (lower priority)");
|
||||
if (_Theme.SelColorBackgroundName.Length > 0)
|
||||
if (_Theme.SelColorBackgroundName != "")
|
||||
writer.WriteElementString("SColorBackground", _Theme.SelColorBackgroundName);
|
||||
else
|
||||
{
|
||||
@@ -471,10 +471,10 @@ namespace VocaluxeLib.Menu
|
||||
|
||||
public void LoadTextures()
|
||||
{
|
||||
if (_Theme.ColorBackgroundName.Length > 0)
|
||||
if (_Theme.ColorBackgroundName != "")
|
||||
BackgroundColor = CBase.Theme.GetColor(_Theme.ColorBackgroundName, _PartyModeID);
|
||||
|
||||
if (_Theme.SelColorBackgroundName.Length > 0)
|
||||
if (_Theme.SelColorBackgroundName != "")
|
||||
BackgroundSelColor = CBase.Theme.GetColor(_Theme.SelColorBackgroundName, _PartyModeID);
|
||||
|
||||
_Theme.Text1.LoadTextures();
|
||||
@@ -523,7 +523,7 @@ namespace VocaluxeLib.Menu
|
||||
}
|
||||
else if (keyEvent.Key == Keys.Back || keyEvent.Key == Keys.Delete)
|
||||
{
|
||||
if (_Theme.ButtonPlaylistName.Text.Text.Length > 0)
|
||||
if (_Theme.ButtonPlaylistName.Text.Text != "")
|
||||
_Theme.ButtonPlaylistName.Text.Text = _Theme.ButtonPlaylistName.Text.Text.Remove(_Theme.ButtonPlaylistName.Text.Text.Length - 1);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -37,10 +37,10 @@ namespace VocaluxeLib.Menu
|
||||
public ESettingType Type;
|
||||
}
|
||||
|
||||
// ReSharper disable ClassNeverInstantiated.Global
|
||||
// ReSharper disable ClassNeverInstantiated.Global
|
||||
//Instantiated by reflection
|
||||
public class CScreenSetting : IMenuElement
|
||||
// ReSharper restore ClassNeverInstantiated.Global
|
||||
// ReSharper restore ClassNeverInstantiated.Global
|
||||
{
|
||||
private readonly int _PartyModeID;
|
||||
|
||||
|
||||
@@ -417,7 +417,7 @@ namespace VocaluxeLib.Menu
|
||||
|
||||
writer.WriteComment("<Color>: SelectSlide color from ColorScheme (high priority)");
|
||||
writer.WriteComment("or <R>, <G>, <B>, <A> (lower priority)");
|
||||
if (_Theme.ColorName.Length > 0)
|
||||
if (_Theme.ColorName != "")
|
||||
writer.WriteElementString("Color", _Theme.ColorName);
|
||||
else
|
||||
{
|
||||
@@ -429,7 +429,7 @@ namespace VocaluxeLib.Menu
|
||||
|
||||
writer.WriteComment("<SColor>: Selected SelectSlide color from ColorScheme (high priority)");
|
||||
writer.WriteComment("or <SR>, <SG>, <SB>, <SA> (lower priority)");
|
||||
if (_Theme.SelColorName.Length > 0)
|
||||
if (_Theme.SelColorName != "")
|
||||
writer.WriteElementString("SColor", _Theme.SelColorName);
|
||||
else
|
||||
{
|
||||
@@ -441,7 +441,7 @@ namespace VocaluxeLib.Menu
|
||||
|
||||
writer.WriteComment("<HColor>: Highlighted SelectSlide color from ColorScheme (high priority)");
|
||||
writer.WriteComment("or <HR>, <HG>, <HB>, <HA> (lower priority)");
|
||||
if (_Theme.HighlightColorName.Length > 0)
|
||||
if (_Theme.HighlightColorName != "")
|
||||
writer.WriteElementString("HColor", _Theme.HighlightColorName);
|
||||
else
|
||||
{
|
||||
@@ -453,7 +453,7 @@ namespace VocaluxeLib.Menu
|
||||
|
||||
writer.WriteComment("<ArrowColor>: Arrow color from ColorScheme (high priority)");
|
||||
writer.WriteComment("or <ArrowR>, <ArrowG>, <ArrowB>, <ArrowA> (lower priority)");
|
||||
if (_Theme.ArrowColorName.Length > 0)
|
||||
if (_Theme.ArrowColorName != "")
|
||||
writer.WriteElementString("ArrowColor", _Theme.ArrowColorName);
|
||||
else
|
||||
{
|
||||
@@ -465,7 +465,7 @@ namespace VocaluxeLib.Menu
|
||||
|
||||
writer.WriteComment("<ArrowSColor>: Selected arrow color from ColorScheme (high priority)");
|
||||
writer.WriteComment("or <ArrowSR>, <ArrowSG>, <ArrowSB>, <ArrowSA> (lower priority)");
|
||||
if (_Theme.SelArrowColorName.Length > 0)
|
||||
if (_Theme.SelArrowColorName != "")
|
||||
writer.WriteElementString("ArrowSColor", _Theme.SelArrowColorName);
|
||||
else
|
||||
{
|
||||
@@ -477,7 +477,7 @@ namespace VocaluxeLib.Menu
|
||||
|
||||
writer.WriteComment("<TextColor>: Text color from ColorScheme (high priority)");
|
||||
writer.WriteComment("or <TextR>, <TextG>, <TextB>, <TextA> (lower priority)");
|
||||
if (_Theme.TextColorName.Length > 0)
|
||||
if (_Theme.TextColorName != "")
|
||||
writer.WriteElementString("TextColor", _Theme.TextColorName);
|
||||
else
|
||||
{
|
||||
@@ -489,7 +489,7 @@ namespace VocaluxeLib.Menu
|
||||
|
||||
writer.WriteComment("<TextSColor>: Selected text color from ColorScheme (high priority)");
|
||||
writer.WriteComment("or <TextSR>, <TextSG>, <TextSB>, <TextSA> (lower priority)");
|
||||
if (_Theme.SelTextColorName.Length > 0)
|
||||
if (_Theme.SelTextColorName != "")
|
||||
writer.WriteElementString("TextSColor", _Theme.SelTextColorName);
|
||||
else
|
||||
{
|
||||
@@ -797,25 +797,25 @@ namespace VocaluxeLib.Menu
|
||||
|
||||
public void LoadTextures()
|
||||
{
|
||||
if (_Theme.ColorName.Length > 0)
|
||||
if (_Theme.ColorName != "")
|
||||
Color = CBase.Theme.GetColor(_Theme.ColorName, _PartyModeID);
|
||||
|
||||
if (_Theme.SelColorName.Length > 0)
|
||||
if (_Theme.SelColorName != "")
|
||||
SelColor = CBase.Theme.GetColor(_Theme.SelColorName, _PartyModeID);
|
||||
|
||||
if (_Theme.HighlightColorName.Length > 0)
|
||||
if (_Theme.HighlightColorName != "")
|
||||
HighlightColor = CBase.Theme.GetColor(_Theme.HighlightColorName, _PartyModeID);
|
||||
|
||||
if (_Theme.ArrowColorName.Length > 0)
|
||||
if (_Theme.ArrowColorName != "")
|
||||
ColorArrow = CBase.Theme.GetColor(_Theme.ArrowColorName, _PartyModeID);
|
||||
|
||||
if (_Theme.SelArrowColorName.Length > 0)
|
||||
if (_Theme.SelArrowColorName != "")
|
||||
SelColorArrow = CBase.Theme.GetColor(_Theme.SelArrowColorName, _PartyModeID);
|
||||
|
||||
if (_Theme.TextColorName.Length > 0)
|
||||
if (_Theme.TextColorName != "")
|
||||
TextColor = CBase.Theme.GetColor(_Theme.TextColorName, _PartyModeID);
|
||||
|
||||
if (_Theme.SelColorName.Length > 0)
|
||||
if (_Theme.SelColorName != "")
|
||||
SelTextColor = CBase.Theme.GetColor(_Theme.SelTextColorName, _PartyModeID);
|
||||
}
|
||||
|
||||
|
||||
@@ -201,7 +201,7 @@ namespace VocaluxeLib.Menu
|
||||
|
||||
writer.WriteComment("<Color>: Static color from ColorScheme (high priority)");
|
||||
writer.WriteComment("or <R>, <G>, <B>, <A> (lower priority)");
|
||||
if (_Theme.ColorName.Length > 0)
|
||||
if (_Theme.ColorName != "")
|
||||
writer.WriteElementString("Color", _Theme.ColorName);
|
||||
else
|
||||
{
|
||||
@@ -293,7 +293,7 @@ namespace VocaluxeLib.Menu
|
||||
|
||||
public void LoadTextures()
|
||||
{
|
||||
if (_Theme.ColorName.Length > 0)
|
||||
if (_Theme.ColorName != "")
|
||||
Color = CBase.Theme.GetColor(_Theme.ColorName, _PartyModeID);
|
||||
}
|
||||
|
||||
|
||||
@@ -541,7 +541,7 @@ namespace VocaluxeLib.Menu
|
||||
|
||||
writer.WriteComment("<Color>: Text color from ColorScheme (high priority)");
|
||||
writer.WriteComment("or <R>, <G>, <B>, <A> (lower priority)");
|
||||
if (_Theme.ColorName.Length > 0)
|
||||
if (_Theme.ColorName != "")
|
||||
writer.WriteElementString("Color", _Theme.ColorName);
|
||||
else
|
||||
{
|
||||
@@ -553,7 +553,7 @@ namespace VocaluxeLib.Menu
|
||||
|
||||
writer.WriteComment("<SColor>: Selected Text color from ColorScheme (high priority)");
|
||||
writer.WriteComment("or <SR>, <SG>, <SB>, <SA> (lower priority)");
|
||||
if (_Theme.SelColorName.Length > 0)
|
||||
if (_Theme.SelColorName != "")
|
||||
writer.WriteElementString("SColor", _Theme.SelColorName);
|
||||
else
|
||||
{
|
||||
@@ -776,10 +776,10 @@ namespace VocaluxeLib.Menu
|
||||
|
||||
public void LoadTextures()
|
||||
{
|
||||
if (_Theme.ColorName.Length > 0)
|
||||
if (_Theme.ColorName != "")
|
||||
Color = CBase.Theme.GetColor(_Theme.ColorName, _PartyModeID);
|
||||
|
||||
if (_Theme.SelColorName.Length > 0)
|
||||
if (_Theme.SelColorName != "")
|
||||
SelColor = CBase.Theme.GetColor(_Theme.SelColorName, _PartyModeID);
|
||||
}
|
||||
|
||||
@@ -806,7 +806,7 @@ namespace VocaluxeLib.Menu
|
||||
|
||||
private void _UpdateTextPosition()
|
||||
{
|
||||
if (_Text.Length == 0)
|
||||
if (_Text == "")
|
||||
return;
|
||||
|
||||
CBase.Fonts.SetFont(Font);
|
||||
|
||||
@@ -112,7 +112,7 @@ namespace VocaluxeLib.Menu
|
||||
resultCt++;
|
||||
}
|
||||
|
||||
if (resultCt!=1)
|
||||
if (resultCt != 1)
|
||||
{
|
||||
value = defaultValue;
|
||||
return false;
|
||||
|
||||
@@ -136,7 +136,7 @@ namespace VocaluxeLib.Menu
|
||||
|
||||
public enum EBufferSize
|
||||
{
|
||||
// ReSharper disable UnusedMember.Global
|
||||
// ReSharper disable UnusedMember.Global
|
||||
B0 = 0,
|
||||
B512 = 512,
|
||||
B1024 = 1024,
|
||||
|
||||
@@ -245,7 +245,7 @@ namespace VocaluxeLib.Menu.SingNotes
|
||||
|
||||
SPlayerNotes notes = _PlayerNotes[n];
|
||||
|
||||
if (line.Length == 0 || line.Length <= lineNr)
|
||||
if (line.Length <= lineNr)
|
||||
return;
|
||||
|
||||
notes.Lines = line;
|
||||
|
||||
@@ -369,7 +369,7 @@ namespace VocaluxeLib.Menu.SongMenu
|
||||
while (!sr.EndOfStream)
|
||||
{
|
||||
string line = sr.ReadLine();
|
||||
if (line.Length == 0)
|
||||
if (line == "")
|
||||
continue;
|
||||
if (!line[0].ToString().Equals("#"))
|
||||
break;
|
||||
@@ -381,7 +381,7 @@ namespace VocaluxeLib.Menu.SongMenu
|
||||
string identifier = line.Substring(1, pos - 1).Trim().ToUpper();
|
||||
string value = line.Substring(pos + 1, line.Length - pos - 1).Trim();
|
||||
|
||||
if (value.Length > 0)
|
||||
if (value != "")
|
||||
{
|
||||
switch (identifier)
|
||||
{
|
||||
@@ -395,7 +395,7 @@ namespace VocaluxeLib.Menu.SongMenu
|
||||
while (!sr.EndOfStream)
|
||||
{
|
||||
line = sr.ReadLine();
|
||||
if (line.Length == 0)
|
||||
if (line == "")
|
||||
continue;
|
||||
if (!line[0].ToString().Equals("#"))
|
||||
break;
|
||||
@@ -411,33 +411,33 @@ namespace VocaluxeLib.Menu.SongMenu
|
||||
}
|
||||
break;
|
||||
case "TITLE":
|
||||
if (value.Length > 0)
|
||||
if (value != "")
|
||||
{
|
||||
Title = value;
|
||||
headerFlags |= EHeaderFlags.Title;
|
||||
}
|
||||
break;
|
||||
case "ARTIST":
|
||||
if (value.Length > 0)
|
||||
if (value != "")
|
||||
{
|
||||
Artist = value;
|
||||
headerFlags |= EHeaderFlags.Artist;
|
||||
}
|
||||
break;
|
||||
case "TITLE-ON-SORTING":
|
||||
if (value.Length > 0)
|
||||
if (value != "")
|
||||
TitleSorting = value;
|
||||
break;
|
||||
case "ARTIST-ON-SORTING":
|
||||
if (value.Length > 0)
|
||||
if (value != "")
|
||||
ArtistSorting = value;
|
||||
break;
|
||||
case "P1":
|
||||
if (value.Length > 0)
|
||||
if (value != "")
|
||||
DuetPart1 = value;
|
||||
break;
|
||||
case "P2":
|
||||
if (value.Length > 0)
|
||||
if (value != "")
|
||||
DuetPart2 = value;
|
||||
break;
|
||||
case "MP3":
|
||||
@@ -608,10 +608,10 @@ namespace VocaluxeLib.Menu.SongMenu
|
||||
_CheckFiles();
|
||||
|
||||
//Before saving this tags to .txt: Check, if ArtistSorting and Artist are equal, then don't save this tag.
|
||||
if (ArtistSorting.Length == 0)
|
||||
if (ArtistSorting == "")
|
||||
ArtistSorting = Artist;
|
||||
|
||||
if (TitleSorting.Length == 0)
|
||||
if (TitleSorting == "")
|
||||
TitleSorting = Title;
|
||||
|
||||
return true;
|
||||
@@ -821,7 +821,7 @@ namespace VocaluxeLib.Menu.SongMenu
|
||||
{
|
||||
if (_CoverSmallLoaded)
|
||||
return;
|
||||
if (CoverFileName.Length > 0)
|
||||
if (CoverFileName != "")
|
||||
{
|
||||
if (!CBase.DataBase.GetCover(Path.Combine(Folder, CoverFileName), ref _CoverTextureSmall, CBase.Config.GetCoverSize()))
|
||||
_CoverTextureSmall = CBase.Cover.GetNoCover();
|
||||
@@ -834,7 +834,7 @@ namespace VocaluxeLib.Menu.SongMenu
|
||||
|
||||
private void _CheckFiles()
|
||||
{
|
||||
if (CoverFileName.Length == 0)
|
||||
if (CoverFileName == "")
|
||||
{
|
||||
List<string> files = CHelper.ListFiles(Folder, "*.jpg", false);
|
||||
files.AddRange(CHelper.ListFiles(Folder, "*.png", false));
|
||||
@@ -846,7 +846,7 @@ namespace VocaluxeLib.Menu.SongMenu
|
||||
}
|
||||
}
|
||||
|
||||
if (BackgroundFileName.Length == 0)
|
||||
if (BackgroundFileName == "")
|
||||
{
|
||||
List<string> files = CHelper.ListFiles(Folder, "*.jpg", false);
|
||||
files.AddRange(CHelper.ListFiles(Folder, "*.png", false));
|
||||
@@ -861,12 +861,12 @@ namespace VocaluxeLib.Menu.SongMenu
|
||||
|
||||
private void _CheckDuet()
|
||||
{
|
||||
if (DuetPart1.Length == 0)
|
||||
if (DuetPart1 == "")
|
||||
{
|
||||
DuetPart1 = "Part 1";
|
||||
CBase.Log.LogError("Warning: Can't find #P1-tag for duets in \"" + Artist + " - " + Title + "\".");
|
||||
}
|
||||
if (DuetPart2.Length == 0)
|
||||
if (DuetPart2 == "")
|
||||
{
|
||||
DuetPart2 = "Part 2";
|
||||
CBase.Log.LogError("Warning: Can't find #P2-tag for duets in \"" + Artist + " - " + Title + "\".");
|
||||
@@ -915,7 +915,7 @@ namespace VocaluxeLib.Menu.SongMenu
|
||||
|
||||
for (int k = 1; k <= max; k++)
|
||||
{
|
||||
if (sentences[i + k] == sentences[j + k] && sentences[i + k]!="")
|
||||
if (sentences[i + k] == sentences[j + k] && sentences[i + k] != "")
|
||||
tempSeries.End = i + k;
|
||||
else
|
||||
break;
|
||||
|
||||
@@ -44,7 +44,7 @@ namespace VocaluxeLib.Menu.SongMenu
|
||||
public CSongMenuDreidel(int partyModeID)
|
||||
: base(partyModeID) {}
|
||||
|
||||
// ReSharper disable RedundantOverridenMember
|
||||
// ReSharper disable RedundantOverridenMember
|
||||
public override void Init()
|
||||
{
|
||||
base.Init();
|
||||
@@ -59,6 +59,7 @@ namespace VocaluxeLib.Menu.SongMenu
|
||||
_SongLength = _Theme.songMenuDreidel.TextSongLength;
|
||||
**/
|
||||
}
|
||||
// ReSharper restore RedundantOverridenMember
|
||||
|
||||
// ReSharper restore RedundantOverridenMember
|
||||
}
|
||||
}
|
||||
@@ -349,7 +349,7 @@ namespace VocaluxeLib.Menu.SongMenu
|
||||
|
||||
writer.WriteComment("<Color>: Tile color from ColorScheme (high priority)");
|
||||
writer.WriteComment("or <R>, <G>, <B>, <A> (lower priority)");
|
||||
if (_Theme.ColorName.Length > 0)
|
||||
if (_Theme.ColorName != "")
|
||||
writer.WriteElementString("Color", _Theme.ColorName);
|
||||
else
|
||||
{
|
||||
@@ -481,13 +481,9 @@ namespace VocaluxeLib.Menu.SongMenu
|
||||
_SelectedInternal = _SelectedPending;
|
||||
}
|
||||
|
||||
public virtual void HandleInput(ref SKeyEvent keyEvent, SScreenSongOptions songOptions)
|
||||
{
|
||||
}
|
||||
public virtual void HandleInput(ref SKeyEvent keyEvent, SScreenSongOptions songOptions) {}
|
||||
|
||||
public virtual void HandleMouse(ref SMouseEvent mouseEvent, SScreenSongOptions songOptions)
|
||||
{
|
||||
}
|
||||
public virtual void HandleMouse(ref SMouseEvent mouseEvent, SScreenSongOptions songOptions) {}
|
||||
|
||||
public virtual void Draw()
|
||||
{
|
||||
@@ -531,17 +527,11 @@ namespace VocaluxeLib.Menu.SongMenu
|
||||
return -1;
|
||||
}
|
||||
|
||||
public virtual void SetSelectedSong(int visibleSongNr)
|
||||
{
|
||||
}
|
||||
public virtual void SetSelectedSong(int visibleSongNr) {}
|
||||
|
||||
public virtual void SetSelectedCategory(int categoryNr)
|
||||
{
|
||||
}
|
||||
public virtual void SetSelectedCategory(int categoryNr) {}
|
||||
|
||||
public virtual void SetSmallView(bool smallView)
|
||||
{
|
||||
}
|
||||
public virtual void SetSmallView(bool smallView) {}
|
||||
|
||||
public virtual bool IsSmallView()
|
||||
{
|
||||
@@ -554,7 +544,7 @@ namespace VocaluxeLib.Menu.SongMenu
|
||||
{
|
||||
Init();
|
||||
|
||||
if (_Theme.ColorName.Length > 0)
|
||||
if (_Theme.ColorName != "")
|
||||
_Color = CBase.Theme.GetColor(_Theme.ColorName, _PartyModeID);
|
||||
}
|
||||
|
||||
@@ -635,7 +625,7 @@ namespace VocaluxeLib.Menu.SongMenu
|
||||
_Streams.Add(stream);
|
||||
_Actsongstream = stream;
|
||||
|
||||
if (CBase.Songs.GetVisibleSong(_Actsong).VideoFileName.Length > 0 && CBase.Config.GetVideoPreview() == EOffOn.TR_CONFIG_ON)
|
||||
if (CBase.Songs.GetVisibleSong(_Actsong).VideoFileName != "" && CBase.Config.GetVideoPreview() == EOffOn.TR_CONFIG_ON)
|
||||
{
|
||||
_Video = CBase.Video.Load(Path.Combine(CBase.Songs.GetVisibleSong(_Actsong).Folder, CBase.Songs.GetVisibleSong(_Actsong).VideoFileName));
|
||||
if (_Video == -1)
|
||||
|
||||
@@ -154,7 +154,7 @@ namespace VocaluxeLib.Menu.SongMenu
|
||||
_MedleyTagIcon.Visible = false;
|
||||
}
|
||||
|
||||
if (CBase.Songs.GetNumVisibleSongs() == 0 && CBase.Songs.GetSearchFilter().Length > 0)
|
||||
if (CBase.Songs.GetNumVisibleSongs() == 0 && CBase.Songs.GetSearchFilter() != "")
|
||||
{
|
||||
_CoverBig.Texture = _CoverBigTexture;
|
||||
_Artist.Text = String.Empty;
|
||||
@@ -418,7 +418,7 @@ namespace VocaluxeLib.Menu.SongMenu
|
||||
_Artist.Text = song.Artist;
|
||||
_Title.Text = song.Title;
|
||||
_DuetIcon.Visible = song.IsDuet;
|
||||
_VideoIcon.Visible = song.VideoFileName.Length > 0;
|
||||
_VideoIcon.Visible = song.VideoFileName != "";
|
||||
_MedleyCalcIcon.Visible = song.Medley.Source == EMedleySource.Calculated;
|
||||
_MedleyTagIcon.Visible = song.Medley.Source == EMedleySource.Tag;
|
||||
|
||||
|
||||
Reference in new issue
Block a user