Apply R# clean-up for reliability (#877)
* Apply R# clean-up for reliability - Migrate to NUnit4 Assert.That - Update dependencise versions - Fix LangVersion to 9.0 (until net core migration) - Reformat code - Apply 'var' style (easier for refactoring) - Remove redundant parentheses - Add braces on every condition blocks (1 line) - Uses new null checking patterns - Uses AutoProperties when possible - Uses string scalar type instead of class - Clean usings - Add .orig files in git ignore - Rename some properties to respect defined conventions and US format definition - ID -> Id - BPM -> Bpm - Finish -> End * Update R# settings according to the clean-up made
This commit is contained in:
1 parent
b9b0f7c8df
commit
6ffa63b923
236 files changed
+14194
-7278
No files matched your search
@@ -17,14 +17,13 @@
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using VocaluxeLib.Menu;
|
||||
|
||||
namespace VocaluxeLib.PartyModes.TicTacToe
|
||||
{
|
||||
// ReSharper disable UnusedMember.Global
|
||||
public class CPartyScreenTicTacToeNames : CMenuPartyNameSelection
|
||||
// ReSharper restore UnusedMember.Global
|
||||
// ReSharper restore UnusedMember.Global
|
||||
{
|
||||
// Version number for theme files. Increment it, if you've changed something on the theme files!
|
||||
protected override int _ScreenVersion
|
||||
@@ -44,14 +43,19 @@ namespace VocaluxeLib.PartyModes.TicTacToe
|
||||
{
|
||||
base.OnShow();
|
||||
|
||||
while (_PartyMode.GameData.ProfileIDsTeam1.Count > _PartyMode.GameData.NumPlayerTeam1)
|
||||
_PartyMode.GameData.ProfileIDsTeam1.RemoveAt(_PartyMode.GameData.ProfileIDsTeam1.Count - 1);
|
||||
while (_PartyMode.GameData.ProfileIDsTeam2.Count > _PartyMode.GameData.NumPlayerTeam2)
|
||||
_PartyMode.GameData.ProfileIDsTeam2.RemoveAt(_PartyMode.GameData.ProfileIDsTeam2.Count - 1);
|
||||
while (_PartyMode.GameData.ProfileIdsTeam1.Count > _PartyMode.GameData.NumPlayerTeam1)
|
||||
{
|
||||
_PartyMode.GameData.ProfileIdsTeam1.RemoveAt(_PartyMode.GameData.ProfileIdsTeam1.Count - 1);
|
||||
}
|
||||
|
||||
while (_PartyMode.GameData.ProfileIdsTeam2.Count > _PartyMode.GameData.NumPlayerTeam2)
|
||||
{
|
||||
_PartyMode.GameData.ProfileIdsTeam2.RemoveAt(_PartyMode.GameData.ProfileIdsTeam2.Count - 1);
|
||||
}
|
||||
|
||||
SetPartyModeData(2, _PartyMode.GameData.NumPlayerTeam1 + _PartyMode.GameData.NumPlayerTeam2,
|
||||
new int[] {_PartyMode.GameData.NumPlayerTeam1, _PartyMode.GameData.NumPlayerTeam2});
|
||||
List<Guid>[] ids = new List<Guid>[] {_PartyMode.GameData.ProfileIDsTeam1, _PartyMode.GameData.ProfileIDsTeam2};
|
||||
new int[] { _PartyMode.GameData.NumPlayerTeam1, _PartyMode.GameData.NumPlayerTeam2 });
|
||||
var ids = new List<Guid>[] { _PartyMode.GameData.ProfileIdsTeam1, _PartyMode.GameData.ProfileIdsTeam2 };
|
||||
SetPartyModeProfiles(ids);
|
||||
}
|
||||
|
||||
@@ -59,14 +63,16 @@ namespace VocaluxeLib.PartyModes.TicTacToe
|
||||
{
|
||||
if (_TeamList.Length == 2)
|
||||
{
|
||||
_PartyMode.GameData.ProfileIDsTeam1 = _TeamList[0];
|
||||
_PartyMode.GameData.ProfileIDsTeam2 = _TeamList[1];
|
||||
_PartyMode.GameData.ProfileIdsTeam1 = _TeamList[0];
|
||||
_PartyMode.GameData.ProfileIdsTeam2 = _TeamList[1];
|
||||
}
|
||||
|
||||
if (_NumPlayerTeams.Length == 2)
|
||||
{
|
||||
_PartyMode.GameData.NumPlayerTeam1 = _NumPlayerTeams[0];
|
||||
_PartyMode.GameData.NumPlayerTeam2 = _NumPlayerTeams[1];
|
||||
}
|
||||
|
||||
_PartyMode.Back();
|
||||
}
|
||||
|
||||
@@ -74,13 +80,14 @@ namespace VocaluxeLib.PartyModes.TicTacToe
|
||||
{
|
||||
if (_TeamList.Length == 2)
|
||||
{
|
||||
_PartyMode.GameData.ProfileIDsTeam1 = _TeamList[0];
|
||||
_PartyMode.GameData.ProfileIDsTeam2 = _TeamList[1];
|
||||
_PartyMode.GameData.ProfileIdsTeam1 = _TeamList[0];
|
||||
_PartyMode.GameData.ProfileIdsTeam2 = _TeamList[1];
|
||||
}
|
||||
_PartyMode.GameData.NumPlayerTeam1 = _PartyMode.GameData.ProfileIDsTeam1.Count;
|
||||
_PartyMode.GameData.NumPlayerTeam2 = _PartyMode.GameData.ProfileIDsTeam2.Count;
|
||||
|
||||
_PartyMode.GameData.NumPlayerTeam1 = _PartyMode.GameData.ProfileIdsTeam1.Count;
|
||||
_PartyMode.GameData.NumPlayerTeam2 = _PartyMode.GameData.ProfileIdsTeam2.Count;
|
||||
|
||||
_PartyMode.Next();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user