Added StyleCop Cleanups
This commit is contained in:
1 parent
d047b12415
commit
1f695a7b83
68 files changed
+4198
-182
No files matched your search
@@ -204,7 +204,7 @@ namespace VocaluxeLib.Menu
|
||||
{
|
||||
_Bars[i] = 1f - weights[i];
|
||||
if (_Theme.DrawNegative == EOffOn.TR_CONFIG_OFF && weights[i] < 0)
|
||||
_Bars[i] = (1f + weights[i]);
|
||||
_Bars[i] = 1f + weights[i];
|
||||
}
|
||||
else
|
||||
_Bars[i] = 0f;
|
||||
@@ -225,7 +225,7 @@ namespace VocaluxeLib.Menu
|
||||
if (_Bars == null)
|
||||
return;
|
||||
|
||||
float dx = (Rect.W) / _Bars.Length;
|
||||
float dx = Rect.W / _Bars.Length;
|
||||
int max = _Bars.Length - 1;
|
||||
float maxB = _Bars[max];
|
||||
for (int i = 0; i < _Bars.Length - 1; i++)
|
||||
|
||||
@@ -194,7 +194,7 @@ namespace VocaluxeLib.Menu
|
||||
|
||||
public static bool IsInBounds(SRectF bounds, int x, int y)
|
||||
{
|
||||
return ((bounds.X <= x) && (bounds.X + bounds.W >= x) && (bounds.Y <= y) && (bounds.Y + bounds.H >= y));
|
||||
return (bounds.X <= x) && (bounds.X + bounds.W >= x) && (bounds.Y <= y) && (bounds.Y + bounds.H >= y);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -35,15 +35,15 @@
|
||||
{
|
||||
get
|
||||
{
|
||||
return (_Type == EType.TBackground ||
|
||||
_Type == EType.TNameSelection ||
|
||||
_Type == EType.TText ||
|
||||
_Type == EType.TStatic ||
|
||||
_Type == EType.TSongMenu ||
|
||||
_Type == EType.TLyric ||
|
||||
_Type == EType.TSingNote ||
|
||||
_Type == EType.TEqualizer ||
|
||||
_Type == EType.TPlaylist);
|
||||
return _Type == EType.TBackground ||
|
||||
_Type == EType.TNameSelection ||
|
||||
_Type == EType.TText ||
|
||||
_Type == EType.TStatic ||
|
||||
_Type == EType.TSongMenu ||
|
||||
_Type == EType.TLyric ||
|
||||
_Type == EType.TSingNote ||
|
||||
_Type == EType.TEqualizer ||
|
||||
_Type == EType.TPlaylist;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -849,7 +849,7 @@ namespace VocaluxeLib.Menu
|
||||
return;
|
||||
|
||||
|
||||
items.Sort(delegate(ZSort s1, ZSort s2) { return (s2.z.CompareTo(s1.z)); });
|
||||
items.Sort(delegate(ZSort s1, ZSort s2) { return s2.z.CompareTo(s1.z); });
|
||||
|
||||
for (int i = 0; i < items.Count; i++)
|
||||
_DrawInteraction(items[i].ID);
|
||||
|
||||
@@ -91,7 +91,7 @@ namespace VocaluxeLib.Menu
|
||||
|
||||
PlayerSelector = new CStatic(_PartyModeID);
|
||||
PlayerSelector.Texture = _TextureTileSelected;
|
||||
PlayerSelector.Rect = new SRectF(0, 0, (_TileW + 6), (_TileH + 6), (Rect.Z - 0.5f));
|
||||
PlayerSelector.Rect = new SRectF(0, 0, _TileW + 6, _TileH + 6, Rect.Z - 0.5f);
|
||||
PlayerSelector.Visible = false;
|
||||
|
||||
UpdateVisibleProfiles();
|
||||
@@ -317,7 +317,7 @@ namespace VocaluxeLib.Menu
|
||||
_actualSelection = _actualSelection - _Tiles.Count + _NumW;
|
||||
if (_Tiles[_actualSelection].PlayerNr == -1)
|
||||
{
|
||||
for (int i = (_Tiles.Count - 1); i >= 0; i--)
|
||||
for (int i = _Tiles.Count - 1; i >= 0; i--)
|
||||
{
|
||||
if (_Tiles[i].PlayerNr != -1)
|
||||
{
|
||||
|
||||
@@ -312,7 +312,7 @@ namespace VocaluxeLib.Menu
|
||||
return;
|
||||
|
||||
|
||||
items.Sort(delegate(ZSort s1, ZSort s2) { return (s2.z.CompareTo(s1.z)); });
|
||||
items.Sort(delegate(ZSort s1, ZSort s2) { return s2.z.CompareTo(s1.z); });
|
||||
|
||||
for (int i = 0; i < items.Count; i++)
|
||||
_DrawInteraction(items[i].ID);
|
||||
|
||||
@@ -86,7 +86,7 @@ namespace VocaluxeLib.Menu
|
||||
|
||||
public bool IsAlive
|
||||
{
|
||||
get { return (_Age < _MaxAge || _MaxAge == 0f); }
|
||||
get { return _Age < _MaxAge || _MaxAge == 0f; }
|
||||
}
|
||||
#endregion public vars
|
||||
|
||||
@@ -314,7 +314,7 @@ namespace VocaluxeLib.Menu
|
||||
|
||||
public bool IsAlive
|
||||
{
|
||||
get { return (_Stars.Count > 0 || !_SpawnTimer.IsRunning); }
|
||||
get { return _Stars.Count > 0 || !_SpawnTimer.IsRunning; }
|
||||
}
|
||||
|
||||
public CParticleEffect(int PartyModeID)
|
||||
|
||||
@@ -181,7 +181,6 @@ namespace VocaluxeLib.Menu
|
||||
public int DragAndDropSongID = -1;
|
||||
|
||||
//private static
|
||||
|
||||
public CPlaylist(int PartyModeID)
|
||||
{
|
||||
_PartyModeID = PartyModeID;
|
||||
@@ -511,16 +510,18 @@ namespace VocaluxeLib.Menu
|
||||
}
|
||||
else
|
||||
{
|
||||
if (CurrentPlaylistElement == -1 || PlaylistElementContents.Count == 0) //no song is selected
|
||||
if (CurrentPlaylistElement == -1 || PlaylistElementContents.Count == 0)
|
||||
{
|
||||
//no song is selected
|
||||
_Interactions.HandleInput(KeyEvent);
|
||||
CurrentPlaylistElement = GetSelectedSelectionNr();
|
||||
|
||||
if (CurrentPlaylistElement != -1)
|
||||
return true;
|
||||
}
|
||||
else if (CurrentPlaylistElement != -1) //a song is selected
|
||||
else if (CurrentPlaylistElement != -1)
|
||||
{
|
||||
//a song is selected
|
||||
int ScrollLimit = PlaylistElements.Count / 2;
|
||||
|
||||
//special actions if a song is selected
|
||||
|
||||
@@ -115,7 +115,6 @@ namespace VocaluxeLib.Menu
|
||||
{
|
||||
if (_Selection >= 0 && _ValueIndexes.Count > _Selection)
|
||||
return _ValueIndexes[_Selection];
|
||||
|
||||
else
|
||||
return -1;
|
||||
}
|
||||
@@ -726,7 +725,6 @@ namespace VocaluxeLib.Menu
|
||||
float x = Rect.X + (Rect.W - TextRelativeX) * 0.1f;
|
||||
float dx = (Rect.W - TextRelativeX) * 0.8f / _NumVisible;
|
||||
//float y = Rect.Y + (Rect.H - TextH);
|
||||
|
||||
int offset = _Selection - _NumVisible / 2;
|
||||
|
||||
if (_ValueNames.Count - _NumVisible - offset < 0)
|
||||
@@ -810,7 +808,7 @@ namespace VocaluxeLib.Menu
|
||||
|
||||
public object Clone()
|
||||
{
|
||||
return base.MemberwiseClone();
|
||||
return this.MemberwiseClone();
|
||||
}
|
||||
|
||||
#region ThemeEdit
|
||||
|
||||
@@ -49,8 +49,9 @@ namespace VocaluxeLib.Menu
|
||||
private STextPosition _DrawPosition = new STextPosition(0);
|
||||
|
||||
private float _X;
|
||||
public float X //left
|
||||
public float X
|
||||
{
|
||||
//left
|
||||
get { return _X; }
|
||||
set
|
||||
{
|
||||
@@ -63,8 +64,9 @@ namespace VocaluxeLib.Menu
|
||||
}
|
||||
|
||||
private float _Y;
|
||||
public float Y //higher
|
||||
public float Y
|
||||
{
|
||||
//higher
|
||||
get { return _Y; }
|
||||
set
|
||||
{
|
||||
@@ -238,7 +240,7 @@ namespace VocaluxeLib.Menu
|
||||
{
|
||||
if (_EditMode != value)
|
||||
{
|
||||
_Text = (value) ? _Text + "|" : _Text.Substring(0, _Text.Length - 1);
|
||||
_Text = value ? _Text + "|" : _Text.Substring(0, _Text.Length - 1);
|
||||
_EditMode = value;
|
||||
_PositionNeedsUpdate = true;
|
||||
}
|
||||
|
||||
@@ -414,7 +414,7 @@ namespace VocaluxeLib.Menu.SingNotes
|
||||
if (CompareLine.Points == 0)
|
||||
return false;
|
||||
|
||||
_PerfectLine = (Points == CompareLine.Points);
|
||||
_PerfectLine = Points == CompareLine.Points;
|
||||
return _PerfectLine;
|
||||
}
|
||||
|
||||
|
||||
@@ -688,7 +688,7 @@ namespace VocaluxeLib.Menu.SingNotes
|
||||
if (XOffset > Rect.W)
|
||||
XOffset = Rect.W;
|
||||
|
||||
float dy = Rect.H / (CBase.Settings.GetNumNoteLines());
|
||||
float dy = Rect.H / CBase.Settings.GetNumNoteLines();
|
||||
SRectF rect = new SRectF(
|
||||
Rect.X - dy + XOffset,
|
||||
Rect.Y + dy * (CBase.Settings.GetNumNoteLines() - 1 - (TonePlayer - BaseLine) / 2f),
|
||||
|
||||
@@ -1035,7 +1035,7 @@ namespace VocaluxeLib.Menu.SongMenu
|
||||
|
||||
public object Clone()
|
||||
{
|
||||
return base.MemberwiseClone();
|
||||
return this.MemberwiseClone();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -212,7 +212,6 @@ namespace VocaluxeLib.Menu.SongMenu
|
||||
//case ESongMenu.TR_CONFIG_DREIDEL:
|
||||
// _SongMenu = new CSongMenuDreidel();
|
||||
// break;
|
||||
|
||||
case ESongMenu.TR_CONFIG_TILE_BOARD:
|
||||
_SongMenu = new CSongMenuTileBoard(_PartyModeID);
|
||||
break;
|
||||
|
||||
@@ -21,7 +21,6 @@
|
||||
return _actualSelection;
|
||||
}
|
||||
*/
|
||||
|
||||
public CSongMenuDreidel(int PartyModeID)
|
||||
: base(PartyModeID) {}
|
||||
|
||||
|
||||
@@ -110,8 +110,9 @@ namespace VocaluxeLib.Menu.SongMenu
|
||||
|
||||
protected float _MaxVolume = 100f;
|
||||
|
||||
protected int _PreviewSelected //for preview only
|
||||
protected int _PreviewSelected
|
||||
{
|
||||
//for preview only
|
||||
get
|
||||
{
|
||||
if ((_SelectedInternal != _SelectedPending) && (_timer.ElapsedMilliseconds >= _PendingTime))
|
||||
@@ -158,8 +159,9 @@ namespace VocaluxeLib.Menu.SongMenu
|
||||
_SelectedInternal = _SelectedPending;
|
||||
}
|
||||
|
||||
protected int _Locked //the real selected song for singing
|
||||
protected int _Locked
|
||||
{
|
||||
//the real selected song for singing
|
||||
get { return _LockedInternal; }
|
||||
set { _LockedInternal = value; }
|
||||
}
|
||||
@@ -439,7 +441,7 @@ namespace VocaluxeLib.Menu.SongMenu
|
||||
float vtime = 0f;
|
||||
CBase.Video.GetFrame(_video, ref _vidtex, time, ref vtime);
|
||||
if (_VideoFadeTimer.ElapsedMilliseconds <= 3000L)
|
||||
_vidtex.color.A = (_VideoFadeTimer.ElapsedMilliseconds / 3000f);
|
||||
_vidtex.color.A = _VideoFadeTimer.ElapsedMilliseconds / 3000f;
|
||||
else
|
||||
{
|
||||
_vidtex.color.A = 1f;
|
||||
|
||||
@@ -341,7 +341,7 @@ namespace VocaluxeLib.Menu.SongMenu
|
||||
if (!sel)
|
||||
_actualSelection = -1;
|
||||
|
||||
if ((MouseEvent.RB) && (CBase.Songs.GetNumCategories() > 0) && CBase.Songs.GetCurrentCategoryIndex() >= 0 && CBase.Songs.GetTabs() == EOffOn.TR_CONFIG_ON &&
|
||||
if (MouseEvent.RB && (CBase.Songs.GetNumCategories() > 0) && CBase.Songs.GetCurrentCategoryIndex() >= 0 && CBase.Songs.GetTabs() == EOffOn.TR_CONFIG_ON &&
|
||||
SongOptions.Selection.CategoryChangeAllowed)
|
||||
{
|
||||
ShowCategories();
|
||||
@@ -355,7 +355,7 @@ namespace VocaluxeLib.Menu.SongMenu
|
||||
if (CHelper.IsInBounds(_CoverBig.Rect, MouseEvent) || CHelper.IsInBounds(_TextBG.Rect, MouseEvent))
|
||||
_Locked = _PreviewSelected;
|
||||
}
|
||||
else if ((MouseEvent.LB) && (CBase.Songs.GetCurrentCategoryIndex() == -1))
|
||||
else if (MouseEvent.LB && (CBase.Songs.GetCurrentCategoryIndex() == -1))
|
||||
{
|
||||
foreach (CStatic tile in _Tiles)
|
||||
{
|
||||
@@ -605,7 +605,7 @@ namespace VocaluxeLib.Menu.SongMenu
|
||||
private void UpdateList(int offset, bool force = false)
|
||||
{
|
||||
bool isInCategory = CBase.Songs.GetCurrentCategoryIndex() >= 0;
|
||||
int itemCount = (isInCategory) ? CBase.Songs.GetNumVisibleSongs() : CBase.Songs.GetNumCategories();
|
||||
int itemCount = isInCategory ? CBase.Songs.GetNumVisibleSongs() : CBase.Songs.GetNumCategories();
|
||||
|
||||
if (offset >= (itemCount / _NumW) * _NumW - (_NumW * (_NumH - 1)))
|
||||
offset = (itemCount / _NumW) * _NumW - (_NumW * (_NumH - 1));
|
||||
|
||||
Reference in new issue
Block a user