* 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
115 lines
3.7 KiB
C#
115 lines
3.7 KiB
C#
#region license
|
|
// This file is part of Vocaluxe.
|
|
//
|
|
// Vocaluxe is free software: you can redistribute it and/or modify
|
|
// it under the terms of the GNU General Public License as published by
|
|
// the Free Software Foundation, either version 3 of the License, or
|
|
// (at your option) any later version.
|
|
//
|
|
// Vocaluxe is distributed in the hope that it will be useful,
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
// GNU General Public License for more details.
|
|
//
|
|
// You should have received a copy of the GNU General Public License
|
|
// along with Vocaluxe. If not, see <http://www.gnu.org/licenses/>.
|
|
#endregion
|
|
|
|
using VocaluxeLib.Menu;
|
|
|
|
namespace VocaluxeLib.PartyModes
|
|
{
|
|
public class CPartyModeNormal : CPartyMode
|
|
{
|
|
public override int MinMics
|
|
{
|
|
get { return 1; }
|
|
}
|
|
public override int MaxMics
|
|
{
|
|
get { return CBase.Config.GetMaxNumMics(); }
|
|
}
|
|
public override int MinPlayers
|
|
{
|
|
get { return 1; }
|
|
}
|
|
public override int MaxPlayers
|
|
{
|
|
get { return CBase.Settings.GetMaxNumPlayer(); }
|
|
}
|
|
public override int MinTeams
|
|
{
|
|
get { return 1; }
|
|
}
|
|
public override int MaxTeams
|
|
{
|
|
get { return 1; }
|
|
}
|
|
public override int MinPlayersPerTeam
|
|
{
|
|
get { return MinPlayers; }
|
|
}
|
|
public override int MaxPlayersPerTeam
|
|
{
|
|
get { return MaxPlayers; }
|
|
}
|
|
|
|
public CPartyModeNormal(int id) : base(id)
|
|
{
|
|
_ScreenSongOptions.Selection.RandomOnly = false;
|
|
_ScreenSongOptions.Selection.PartyMode = false;
|
|
_ScreenSongOptions.Selection.CategoryChangeAllowed = true;
|
|
_ScreenSongOptions.Selection.NumJokers = null;
|
|
_ScreenSongOptions.Selection.TeamNames = null;
|
|
_ScreenSongOptions.Selection.SongIndex = -1;
|
|
_ScreenSongOptions.Selection.CategoryIndex = -1;
|
|
|
|
_ScreenSongOptions.Sorting.SearchString = string.Empty;
|
|
_ScreenSongOptions.Sorting.SearchActive = false;
|
|
_ScreenSongOptions.Sorting.DuetOptions = EDuetOptions.All;
|
|
_ScreenSongOptions.Sorting.FilterPlaylistId = -1;
|
|
}
|
|
|
|
public override bool Init()
|
|
{
|
|
return true;
|
|
}
|
|
|
|
public override void UpdateGame() { }
|
|
|
|
public override IMenu GetStartScreen()
|
|
{
|
|
return CBase.Graphics.GetScreen(EScreen.Names);
|
|
}
|
|
|
|
public override SScreenSongOptions GetScreenSongOptions()
|
|
{
|
|
_ScreenSongOptions.Sorting.SongSorting = CBase.Config.GetSongSorting();
|
|
_ScreenSongOptions.Sorting.Tabs = CBase.Config.GetTabs();
|
|
|
|
if (_ScreenSongOptions.Sorting.SearchActive)
|
|
{
|
|
_ScreenSongOptions.Sorting.Tabs = EOffOn.TR_CONFIG_OFF;
|
|
}
|
|
|
|
_ScreenSongOptions.Sorting.IgnoreArticles = CBase.Config.GetIgnoreArticles();
|
|
|
|
return _ScreenSongOptions;
|
|
}
|
|
|
|
public override void OnSongChange(int songIndex, ref SScreenSongOptions screenSongOptions) { }
|
|
|
|
public override void OnCategoryChange(int categoryIndex, ref SScreenSongOptions screenSongOptions) { }
|
|
|
|
public override void SetSearchString(string searchString, bool visible)
|
|
{
|
|
_ScreenSongOptions.Sorting.SearchString = searchString;
|
|
_ScreenSongOptions.Sorting.SearchActive = visible;
|
|
}
|
|
|
|
public override void SongSelected(int songId)
|
|
{
|
|
CBase.Graphics.FadeTo(EScreen.Sing);
|
|
}
|
|
}
|
|
} |