Merge branch 'develop' of github.com:Vocaluxe/Vocaluxe into develop

This commit is contained in:
Florian Küpper committed 2013-04-08 11:32:07 +02:00
commit dbcc30adb5
225 files changed
+12467 -11062

No files matched your search

+19 -14
View File
@@ -3,32 +3,37 @@ Output/Songs
*.mp4
*.pdb
/Output/Benchmark.log
/Output/CoverDB.sqlite
/Output/HighscoreDB.sqlite
/Output/PartyModes/*/Code/*
/Output/Vocaluxe.exe*
/Output/Vocaluxe.vshost.exe*
/Output/VocaluxeLib.dll
*.psess
/*.vsp
/*.ctl
/Output/Registration.xml
/Vocaluxe.suo
/Vocaluxe/Vocaluxe.csproj.user
/Output/Config.xml
*.ipch
*.log
/Output/Playlists/*.xml
/Output/x64/gstreamer/GstreamerHelper.dll
*.tlog
*.suo
*.obj
*.lastbuildstate
*.pch
*.idb
*.exp
*.ilk
*.lib
*.opensdf
*.sdf
*.codeanalysis*
*.nativecodeanalysis*
*.lastcodeanalysissucceeded
/PartyModes/*/*/*.dll
*.Cache
+50
View File
@@ -0,0 +1,50 @@
<?xml version="1.0" encoding="utf-8"?>
<RuleSet Name="Kopie von &quot;Microsoft Extended Correctness Rules&quot;" Description="These rules expand on the basic correctness rules to maximize the logic and framework usage errors that are reported. Extra emphasis is placed on specific scenarios such as COM interop and mobile applications. Consider including this rule set if one of these scenarios applies to your project or to find additional problems in your project." ToolsVersion="10.0">
<Include Path="basiccorrectnessrules.ruleset" Action="Default" />
<Rules AnalyzerId="Microsoft.Analyzers.ManagedCodeAnalysis" RuleNamespace="Microsoft.Rules.Managed">
<Rule Id="CA1032" Action="Warning" />
<Rule Id="CA1054" Action="Warning" />
<Rule Id="CA1055" Action="Warning" />
<Rule Id="CA1056" Action="Warning" />
<Rule Id="CA1057" Action="Warning" />
<Rule Id="CA1060" Action="None" />
<Rule Id="CA1301" Action="None" />
<Rule Id="CA1303" Action="None" />
<Rule Id="CA1308" Action="None" />
<Rule Id="CA1401" Action="None" />
<Rule Id="CA1402" Action="Warning" />
<Rule Id="CA1406" Action="Warning" />
<Rule Id="CA1407" Action="Warning" />
<Rule Id="CA1408" Action="Warning" />
<Rule Id="CA1409" Action="Warning" />
<Rule Id="CA1411" Action="Warning" />
<Rule Id="CA1412" Action="Warning" />
<Rule Id="CA1413" Action="Warning" />
<Rule Id="CA1414" Action="Warning" />
<Rule Id="CA1600" Action="Warning" />
<Rule Id="CA1601" Action="Warning" />
<Rule Id="CA1821" Action="Warning" />
<Rule Id="CA1824" Action="Warning" />
<Rule Id="CA2001" Action="Warning" />
<Rule Id="CA2003" Action="Warning" />
<Rule Id="CA2101" Action="None" />
<Rule Id="CA2135" Action="Warning" />
<Rule Id="CA2136" Action="Warning" />
<Rule Id="CA2139" Action="Warning" />
<Rule Id="CA2142" Action="Warning" />
<Rule Id="CA2143" Action="Warning" />
<Rule Id="CA2144" Action="Warning" />
<Rule Id="CA2145" Action="Warning" />
<Rule Id="CA2204" Action="Warning" />
<Rule Id="CA2211" Action="Warning" />
<Rule Id="CA2217" Action="Warning" />
<Rule Id="CA2218" Action="Warning" />
<Rule Id="CA2219" Action="Warning" />
<Rule Id="CA2225" Action="Warning" />
<Rule Id="CA2228" Action="Warning" />
<Rule Id="CA2230" Action="Warning" />
<Rule Id="CA2233" Action="Warning" />
<Rule Id="CA2234" Action="Warning" />
<Rule Id="CA2243" Action="Warning" />
</Rules>
</RuleSet>
-2
View File
@@ -1540,8 +1540,6 @@ yyGrowStack(pParser);
sqlite3IdListDelete( pParse.db, ref ( yypminor.yy90 ).b );
//#line 1473 "parse.c"
}
break;
default:
break; /* If no destructor action specified: do nothing */
}
}
+6 -6
View File
@@ -184,10 +184,8 @@ void GstreamerAudioStream::RefreshDuration()
{
if(Element)
{
gint64 time;
if(!gst_element_query_duration(Element, GST_FORMAT_TIME, &time)) {
LogError("Could not query duration");
}
gint64 time = -1000;
if(gst_element_query_duration(Element, GST_FORMAT_TIME, &time))
Duration = (gfloat)((gdouble)(time/GST_SECOND));
}
}
@@ -196,9 +194,11 @@ float GstreamerAudioStream::GetPosition()
{
if(Element)
{
gint64 time;
gst_element_query_position(Element, GST_FORMAT_TIME, &time);
gint64 time = 0;
if (gst_element_query_position(Element, GST_FORMAT_TIME, &time))
return (float)((gdouble)time/GST_SECOND);
else
return -1;
}
else return -1;
}
+1
View File
@@ -77,6 +77,7 @@
<OutDir>..\Output\x64\gstreamer\</OutDir>
<IncludePath>$(MSBuildProjectDirectory)\x64\lib\glib-2.0\include;$(MSBuildProjectDirectory)\x64\include\gstreamer-1.0;$(MSBuildProjectDirectory)\x64\include\glib-2.0;$(MSBuildProjectDirectory)\x64\include;$(IncludePath)</IncludePath>
<LibraryPath>$(MSBuildProjectDirectory)\x64\lib;$(LibraryPath)</LibraryPath>
<CodeAnalysisRuleSet>..\CheckingRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWin|Win32'">
<LinkIncremental>false</LinkIncremental>
+9 -2
View File
@@ -19,7 +19,7 @@ DllExport bool InitVideo()
#if _WIN64
SetDllDirectory(L".\\x64\\gstreamer");
#else
SetDllDirectory(L".\\x86\gstreamer");
SetDllDirectory(L".\\x86\\gstreamer");
#endif
gst_init(NULL, NULL);
@@ -65,7 +65,7 @@ DllExport bool CloseVideo(int Stream)
DllExport int GetVideoNumStreams()
{
return VideoStreams.size();
return (int) VideoStreams.size();
}
DllExport float GetVideoLength(int Stream)
@@ -85,6 +85,13 @@ DllExport struct ApplicationFrame GetFrame(int Stream, float Time)
{
return it->second->GetFrame(Time);
}
struct ApplicationFrame returnFrame;
returnFrame.size=0;
returnFrame.width=0;
returnFrame.height=0;
returnFrame.data=NULL;
returnFrame.videotime=0;
return returnFrame;
}
DllExport bool Skip(int Stream, float Start, float Gap)
+2 -2
View File
@@ -180,7 +180,7 @@ struct ApplicationFrame GstreamerVideoStream::GetFrame(float Time)
gst_buffer_map(Buffer, &Mapinfo, GST_MAP_READ);
Size = Mapinfo.size;
Size = (int) Mapinfo.size;
gst_structure_get_int (BufferStructure, "width", &Width);
gst_structure_get_int (BufferStructure, "height", &Height);
VideoTime = (float) (Buffer->pts / GST_SECOND);
@@ -210,7 +210,7 @@ struct ApplicationFrame GstreamerVideoStream::GetFrame(float Time)
bool GstreamerVideoStream::Skip(float Start, float Gap)
{
if(!gst_element_seek_simple(Element, GST_FORMAT_TIME, (GstSeekFlags)(GST_SEEK_FLAG_FLUSH | GST_SEEK_FLAG_ACCURATE), (Start + Gap) * GST_SECOND))
if(!gst_element_seek_simple(Element, GST_FORMAT_TIME, (GstSeekFlags)(GST_SEEK_FLAG_FLUSH | GST_SEEK_FLAG_ACCURATE), (gint64)((Start + Gap) * GST_SECOND)))
{
LogVideoError("Seek failed");
return true;
+1 -1
View File
@@ -57,7 +57,7 @@ private:
volatile gboolean Copying;
gboolean Paused;
gboolean Finished;
bool Finished;
gfloat Duration;
Binary file not shown.
+2
View File
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<root>
<Fonts>
<Font1>
<Name>Normal</Name>
<Outline>0,00</Outline>
@@ -26,4 +27,5 @@
<FileItalic>FreeSansOblique.ttf</FileItalic>
<FileBoldItalic>FreeSansBoldOblique.ttf</FileBoldItalic>
</Font2>
</Fonts>
</root>
+199
View File
@@ -0,0 +1,199 @@
<?xml version='1.0' encoding='UTF-8'?>
<resources>
<string name="language">Nederlands</string>
<string name="TR_PROGRAM_NAME">Vocaluxe</string>
<string name="TR_GENERAL_AND">en</string>
<string name="TR_BUTTON_EXIT">Afsluiten</string>
<string name="TR_BUTTON_SAVE">Opslaan</string>
<string name="TR_BUTTON_BACK">Terug</string>
<string name="TR_BUTTON_START">Start</string>
<string name="TR_DEBUG_AUDIO_STREAMS">Geluidstreams</string>
<string name="TR_DEBUG_VIDEO_STREAMS">Videostreams</string>
<string name="TR_DEBUG_TEXTURES">Structuren</string>
<string name="TR_DEBUG_TONE_ABS">ToneAbs</string>
<string name="TR_DEBUG_MAX_VOLUME">Maximaal Volume</string>
<string name="TR_DEBUG_SONGS">Liedjes geladen</string>
<string name="TR_DEBUG_MOUSE">Muis</string>
<string name="TR_GAMEMODE_NORMAL">Normaal</string>
<string name="TR_GAMEMODE_DUET">Duet</string>
<string name="TR_GAMEMODE_MEDLEY">Medley</string>
<string name="TR_GAMEMODE_SHORTSONG">Korte versie</string>
<string name="TR_RATING_VOCAL_HERO">Vocale Held</string>
<string name="TR_RATING_SUPERSTAR">Superster</string>
<string name="TR_RATING_LEAD_SINGER">Hoofdzanger</string>
<string name="TR_RATING_RISING_STAR">Ster in wording</string>
<string name="TR_RATING_HOPEFUL">Hoopvol</string>
<string name="TR_RATING_WANNABE">Wannabe</string>
<string name="TR_RATING_AMATEUR">Amateur</string>
<string name="TR_RATING_TONE_DEAF">Toondoof</string>
<string name="TR_CONFIG_SOFTWARE">Software</string>
<string name="TR_CONFIG_OPENGL">OpenGL</string>
<string name="TR_CONFIG_DIRECT3D">Direct3D</string>
<string name="TR_CONFIG_TEXTURE_LOWEST">Laagst</string>
<string name="TR_CONFIG_TEXTURE_LOW">Laag</string>
<string name="TR_CONFIG_TEXTURE_MEDIUM">Medium</string>
<string name="TR_CONFIG_TEXTURE_HIGH">Hoog</string>
<string name="TR_CONFIG_TEXTURE_HIGHEST">Hoogst</string>
<string name="TR_CONFIG_OFF">Uit</string>
<string name="TR_CONFIG_ON">Aan</string>
<string name="TR_CONFIG_ONLY_FPS">Alleen FPS</string>
<string name="TR_CONFIG_LEVEL1">Niveau 1</string>
<string name="TR_CONFIG_LEVEL2">Niveau 2</string>
<string name="TR_CONFIG_LEVEL3">Niveau 3</string>
<string name="TR_CONFIG_LEVEL_MAX">Max</string>
<string name="TR_CONFIG_LIST">Lijst</string>
<string name="TR_CONFIG_DREIDEL">Dreidel</string>
<string name="TR_CONFIG_TILE_BOARD">Tegels</string>
<string name="TR_CONFIG_BOOK">Boek</string>
<string name="TR_CONFIG_COVERLOADING_ONDEMAND">Op aanvraag</string>
<string name="TR_CONFIG_COVERLOADING_ATSTART">Bij het opstarten</string>
<string name="TR_CONFIG_COVERLOADING_DYNAMIC">Dynamisch</string>
<string name="TR_CONFIG_NONE">Geen</string>
<string name="TR_CONFIG_RANDOM">Willekeurig</string>
<string name="TR_CONFIG_FOLDER">Map</string>
<string name="TR_CONFIG_ARTIST">Artiest</string>
<string name="TR_CONFIG_ARTIST_LETTER">Artiestletter</string>
<string name="TR_CONFIG_TITLE_LETTER">Tegelletter</string>
<string name="TR_CONFIG_EDITION">Editie</string>
<string name="TR_CONFIG_GENRE">Genre</string>
<string name="TR_CONFIG_YEAR">Jaar</string>
<string name="TR_CONFIG_DECADE">Decennium</string>
<string name="TR_CONFIG_LANGUAGE">Taal</string>
<string name="TR_CONFIG_EASY">Eenvoudig</string>
<string name="TR_CONFIG_NORMAL">Normaal</string>
<string name="TR_CONFIG_HARD">Moeilijk</string>
<string name="TR_CONFIG_TIMERMODE_CURRENT">Huidig</string>
<string name="TR_CONFIG_TIMERMODE_REMAINING">Te gaan</string>
<string name="TR_CONFIG_TIMERMODE_TOTAL">Totaal</string>
<string name="TR_CONFIG_TIMERLOOK_NORMAL">Normaal</string>
<string name="TR_CONFIG_TIMERLOOK_EXPANDED">Uitgebreid</string>
<string name="TR_CONFIG_OWN_MUSIC">Eigen Muziek en Achtergrondmuziek</string>
<string name="TR_CONFIG_NO_OWN_MUSIC">Geen eigen Muziek</string>
<string name="TR_CONFIG_ONLY_OWN_MUSIC">Alleen eigen Muziek</string>
<string name="TR_CONFIG_FADEPLAYERINFO_ALL">Alles</string>
<string name="TR_CONFIG_FADEPLAYERINFO_INFO">Alleen namen en avatars</string>
<string name="TR_CONFIG_FADEPLAYERINFO_OFF">Niets</string>
<string name="TR_SCREENLOAD_LOADING">Laden</string>
<string name="TR_SCREENLOAD_TOTAL">Totaal</string>
<string name="TR_SCREENLOAD_SONGS">Liedjes</string>
<string name="TR_SCREENLOAD_LOADED">geladen</string>
<string name="TR_SCREENMAIN_MENU">Hoofdmenu</string>
<string name="TR_SCREENMAIN_BUTTON_SING">Zing</string>
<string name="TR_SCREENMAIN_BUTTON_PARTY">Party</string>
<string name="TR_SCREENMAIN_BUTTON_OPTIONS">Instellingen</string>
<string name="TR_SCREENMAIN_BUTTON_PROFILES">Profielen</string>
<string name="TR_SCREENPARTY_TITLE">Partymodus Selectie</string>
<string name="TR_SCREENPARTY_MODES">Partymodus</string>
<string name="TR_SCREENPARTY_DESCRIPTION">Omschrijving</string>
<string name="TR_SCREENPARTY_AUTHOR">Auteur</string>
<string name="TR_SCREENPARTY_VERSION">Versie</string>
<string name="TR_SCREENPARTY_ERROR">Kan deze Partymodus niet laden</string>
<string name="TR_SCREENPARTY_TARGETAUDIENCE">Doelgroep</string>
<string name="TR_SCREENPARTY_NOTEAMS">Geen teams</string>
<string name="TR_SCREENPARTY_NUMTEAMS">Aantal teams</string>
<string name="TR_SCREENPARTY_NUMPLAYERS">Aantal spelers</string>
<string name="TR_SCREENNAMES_MENU">Spelerselectie</string>
<string name="TR_SCREENNAMES_PLAYER">Speler</string>
<string name="TR_SCREENNAMES_1PLAYER">1 Speler</string>
<string name="TR_SCREENNAMES_2PLAYER">2 Spelers</string>
<string name="TR_SCREENNAMES_3PLAYER">3 Spelers</string>
<string name="TR_SCREENNAMES_4PLAYER">4 Spelers</string>
<string name="TR_SCREENNAMES_5PLAYER">5 Spelers</string>
<string name="TR_SCREENNAMES_6PLAYER">6 Spelers</string>
<string name="TR_SCREENNAMES_WARNING_MICS_SG">Waarschuwing: Er is geen microfoon toegewezen aan speler %v!</string>
<string name="TR_SCREENNAMES_WARNING_MICS_PL">Waarschuwing: Er zijn geen microfoons toegewezen aan spelers %v!</string>
<string name="TR_SCREENNAMES_WARNING_PROFILES_SG">Waarschuwing: Er is geen profiel toegewezen aan speler %v!</string>
<string name="TR_SCREENNAMES_WARNING_PROFILES_PL">Waarschuwing: Er zijn geen profielen toegewezen aan spelers %v!</string>
<string name="TR_SCREENSONG_MENU">Liedjesselectie</string>
<string name="TR_SCREENSONG_BUTTON_SING">Zing</string>
<string name="TR_SCREENSONG_BUTTON_PLAYLIST">Toevoegen aan afspeellijst</string>
<string name="TR_SCREENSONG_BUTTON_CANCEL">Sluiten</string>
<string name="TR_SCREENSONG_BUTTON_RANDOM">Kies een willekeurig liedje</string>
<string name="TR_SCREENSONG_BUTTON_RANDOMCAT">Kies een willekeurige categorie</string>
<string name="TR_SCREENSONG_BUTTON_SINGALL">Zing alle liedjes</string>
<string name="TR_SCREENSONG_BUTTON_SINGALLVISIBLE">Zing alle zichtbare liedjes</string>
<string name="TR_SCREENSONG_BUTTON_OPENPLAYLIST">Open afspeellijst</string>
<string name="TR_SCREENSONG_BUTTON_RANDOMMEDLEY">Zing een willekeurige medley</string>
<string name="TR_SCREENSONG_BUTTON_STARTMEDLEY">Zing medleyliedjes</string>
<string name="TR_SCREENSONG_NEWPLAYLIST">Nieuwe afspeellijst</string>
<string name="TR_SCREENSONG_SONGOPTIONS">Liedjesopties</string>
<string name="TR_SCREENSONG_SEARCH">Zoek:</string>
<string name="TR_SCREENSONG_NOLANGUAGE">Geen taal</string>
<string name="TR_SCREENSONG_NOYEAR">Geen jaar</string>
<string name="TR_SCREENSONG_NOGENRE">Geen genre</string>
<string name="TR_SCREENSONG_NOEDITION">Geen editie</string>
<string name="TR_SCREENSONG_ALLSONGS">Alle liedjes</string>
<string name="TR_SCREENSONG_NUMSONGS">(%v Liedjes)</string>
<string name="TR_SCREENSONG_NUMSONG">(%v Liedje)</string>
<string name="TR_SCREENSING_PAUSE">Pauze</string>
<string name="TR_SCREENSING_BUTTON_CANCEL">Stop met zingen</string>
<string name="TR_SCREENSING_BUTTON_CONTINUE">Doorgaan</string>
<string name="TR_SCREENSING_BUTTON_SKIP">Sla dit liedje over</string>
<string name="TR_SCREENSCORE_SCORES">Scores</string>
<string name="TR_SCREENSCORE_RATING">Beoordeling</string>
<string name="TR_SCREENSCORE_POINTS">Punten</string>
<string name="TR_SCREENSCORE_GAMEDIFFICULTY">Moeilijkheidsgraad</string>
<string name="TR_SCREENSCORE_OVERALLSCORE">Totaalscore</string>
<string name="TR_SCREENHIGHSCORE_HIGHSCORE">Highscore</string>
<string name="TR_SCREENPROFILES_PROFILES">Profielen</string>
<string name="TR_SCREENPROFILES_PLAYERNAME">Spelernaam</string>
<string name="TR_SCREENPROFILES_GAMEDIFFICULTY">Moeilijkheidsgraad</string>
<string name="TR_SCREENPROFILES_AVATAR">Avatar</string>
<string name="TR_SCREENPROFILES_GUESTPROFILE">Gastprofiel</string>
<string name="TR_SCREENPROFILES_ACTIVE">Actief</string>
<string name="TR_SCREENPROFILES_BUTTON_NEW">Nieuw</string>
<string name="TR_SCREENPROFILES_BUTTON_DELETE">Verwijderen</string>
<string name="TR_SCREENPROFILES_BUTTON_TAKESNAPSHOT">Maak Screenshot</string>
<string name="TR_SCREENPROFILES_BUTTON_SAVESNAPSHOT">Bewaar Screenshot</string>
<string name="TR_SCREENPROFILES_BUTTON_DISCARDSNAPSHOT">Verwijder Screenshot</string>
<string name="TR_SCREENPROFILES_BUTTON_WEBCAM">Webcam</string>
<string name="TR_SCREENO_OPTIONS">Menu-opties</string>
<string name="TR_SCREENO_BUTTON_GAME">Spel</string>
<string name="TR_SCREENO_BUTTON_SOUND">Geluid</string>
<string name="TR_SCREENO_BUTTON_RECORD">Opname</string>
<string name="TR_SCREENO_BUTTON_VIDEO">Video</string>
<string name="TR_SCREENO_BUTTON_LYRICS">Songteksten</string>
<string name="TR_SCREENO_BUTTON_THEME">Thema</string>
<string name="TR_SCREENOGAME_OPTIONS">Spelinstellingen</string>
<string name="TR_SCREENOGAME_LANGUAGE">Taal</string>
<string name="TR_SCREENOGAME_DEBUGLEVEL">Debug Niveau</string>
<string name="TR_SCREENOGAME_SONGMENU">Liedjesmenu</string>
<string name="TR_SCREENOGAME_SONGSORTING">Sorteren Liedjes</string>
<string name="TR_SCREENOGAME_TABS">Tabs</string>
<string name="TR_SCREENOGAME_DIFFICULTY">Moeilijkheidsgraad</string>
<string name="TR_SCREENOGAME_TIMERMODE">Timermodus</string>
<string name="TR_SCREENORECORD_OPTIONS">Opname-opties</string>
<string name="TR_SCREENORECORD_DEVICE">Apparaat</string>
<string name="TR_SCREENORECORD_INPUT">Input</string>
<string name="TR_SCREENORECORD_CHANNEL_1">Kanaal 1</string>
<string name="TR_SCREENORECORD_CHANNEL_2">Kanaal 2</string>
<string name="TR_SCREENORECORD_MIC_DELAY">Microfoonvertraging</string>
<string name="TR_SCREENORECORD_MIC_WARNING">Waarschuwing: Ten minste één speler is toegewezen aan twee microfoons.</string>
<string name="TR_SCREENORECORD_BUTTON_DELAYTEST">Vertragingstest</string>
<string name="TR_SCREENOSOUND_OPTIONS">Geluidsopties</string>
<string name="TR_SCREENOSOUND_BACKGROUNDMUSIC">Achtergrondmuziek</string>
<string name="TR_SCREENOSOUND_BACKGROUNDMUSICVOLUME">Volume Achtergrondmuziek</string>
<string name="TR_SCREENOSOUND_BACKGROUNDMUSICSOURCE">Bron Achtergrondmuziek</string>
<string name="TR_SCREENOSOUND_PREVIEWMUSICVOLUME">Preview Muziekvolume</string>
<string name="TR_SCREENOSOUND_GAMEMUSICVOLUME">Spel Muziekvolume</string>
<string name="TR_SCREENOTHEME_OPTIONS">Thema-opties</string>
<string name="TR_SCREENOTHEME_THEME">Thema</string>
<string name="TR_SCREENOTHEME_SKIN">Skin</string>
<string name="TR_SCREENOTHEME_COVERTHEME">Coverthema</string>
<string name="TR_SCREENOTHEME_NOTELINES">Toon Nootlijnen</string>
<string name="TR_SCREENOTHEME_TONEHELPER">Toon Toonhelper</string>
<string name="TR_SCREENOTHEME_TIMERLOOK">Uiterlijk Timer</string>
<string name="TR_SCREENOTHEME_FADEINFO">Fade Spelerinformatie</string>
<string name="TR_SCREENOTHEME_COVERLOADING">Gedrag Laden Covers</string>
<string name="TR_SCREENOLYRICS_OPTIONS">Songtekstopties</string>
<string name="TR_SCREENOLYRICS_STYLE">Stijl</string>
<string name="TR_SCREENOLYRICS_ONTOP">Songteksten bovenaan</string>
<string name="TR_SCREENOVIDEO_OPTIONS">Video-opties</string>
<string name="TR_SCREENOVIDEO_VIDEOBACKGROUNDS">Videoachtergronden</string>
<string name="TR_SCREENOVIDEO_VIDEOPREVIEW">Videopreview</string>
<string name="TR_SCREENOVIDEO_VIDEOINSONGS">Video tijdens zingen</string>
<string name="TR_SCREENO_VIDEO_VIDEOSTOBACKGROUND">Toon huidige achtergrondmuziekvideo</string>
<string name="TR_SCREENO_VIDEO_WEBCAMDEVICES">Webcams</string>
<string name="TR_SCREENO_VIDEO_WEBCAMCAPABILITIES">Webcaminstellingen</string>
<string name="TR_SCREENPVOLUMECONTROL_VOLUME">Volume</string>
</resources>
+1
View File
@@ -112,6 +112,7 @@
<string name="TR_SCREENSONG_BUTTON_SINGALL">Sing all songs</string>
<string name="TR_SCREENSONG_BUTTON_SINGALLVISIBLE">Sing all visible songs</string>
<string name="TR_SCREENSONG_BUTTON_OPENPLAYLIST">Open playlist</string>
<string name="TR_SCREENSONG_BUTTON_OPEN_SELECTED_ITEM">Select</string>
<string name="TR_SCREENSONG_BUTTON_RANDOMMEDLEY">Sing a random medley</string>
<string name="TR_SCREENSONG_BUTTON_STARTMEDLEY">Sing medley-songs</string>
<string name="TR_SCREENSONG_NEWPLAYLIST">New Playlist</string>
+1
View File
@@ -112,6 +112,7 @@
<string name="TR_SCREENSONG_BUTTON_SINGALL">Alle Songs singen</string>
<string name="TR_SCREENSONG_BUTTON_SINGALLVISIBLE">Alle sichtbaren Songs singen</string>
<string name="TR_SCREENSONG_BUTTON_OPENPLAYLIST">Playlist öffnen</string>
<string name="TR_SCREENSONG_BUTTON_OPEN_SELECTED_ITEM">Auswählen</string>
<string name="TR_SCREENSONG_BUTTON_RANDOMMEDLEY">Zufälliges Medley singen</string>
<string name="TR_SCREENSONG_BUTTON_STARTMEDLEY">Medley-Songs singen</string>
<string name="TR_SCREENSONG_NEWPLAYLIST">Neue Playlist</string>
+199
View File
@@ -0,0 +1,199 @@
<?xml version='1.0' encoding='UTF-8'?>
<resources>
<string name="language">Türkçe</string>
<string name="TR_PROGRAM_NAME">Vocaluxe</string>
<string name="TR_GENERAL_AND">ve</string>
<string name="TR_BUTTON_EXIT">Çıkış</string>
<string name="TR_BUTTON_SAVE">Kaydet</string>
<string name="TR_BUTTON_BACK">Geri</string>
<string name="TR_BUTTON_START">Başla</string>
<string name="TR_DEBUG_AUDIO_STREAMS">Ses akışları</string>
<string name="TR_DEBUG_VIDEO_STREAMS">Video akışları</string>
<string name="TR_DEBUG_TEXTURES">Desenler</string>
<string name="TR_DEBUG_TONE_ABS">ABS Tonu</string>
<string name="TR_DEBUG_MAX_VOLUME">Max Ses</string>
<string name="TR_DEBUG_SONGS">Yüklenen şarkılar</string>
<string name="TR_DEBUG_MOUSE">Fare</string>
<string name="TR_GAMEMODE_NORMAL">Normal</string>
<string name="TR_GAMEMODE_DUET">Düet</string>
<string name="TR_GAMEMODE_MEDLEY">Potpuri</string>
<string name="TR_GAMEMODE_SHORTSONG">Kısa versiyon</string>
<string name="TR_RATING_VOCAL_HERO">Sözlü Kahraman</string>
<string name="TR_RATING_SUPERSTAR">Süperstar</string>
<string name="TR_RATING_LEAD_SINGER">Solist</string>
<string name="TR_RATING_RISING_STAR">Yükselen Yıldız</string>
<string name="TR_RATING_HOPEFUL">Ümit Vaadeden</string>
<string name="TR_RATING_WANNABE">Taklitçi</string>
<string name="TR_RATING_AMATEUR">Amatör</string>
<string name="TR_RATING_TONE_DEAF">Müzik Kulağı Olmayan</string>
<string name="TR_CONFIG_SOFTWARE">Yazılım</string>
<string name="TR_CONFIG_OPENGL">OpenGL</string>
<string name="TR_CONFIG_DIRECT3D">Direct3D</string>
<string name="TR_CONFIG_TEXTURE_LOWEST">En düşük</string>
<string name="TR_CONFIG_TEXTURE_LOW">Düşük</string>
<string name="TR_CONFIG_TEXTURE_MEDIUM">Orta</string>
<string name="TR_CONFIG_TEXTURE_HIGH">Yüksek</string>
<string name="TR_CONFIG_TEXTURE_HIGHEST">En Yüksek</string>
<string name="TR_CONFIG_OFF">Kapalı</string>
<string name="TR_CONFIG_ON">Açık</string>
<string name="TR_CONFIG_ONLY_FPS">Sadece FPS</string>
<string name="TR_CONFIG_LEVEL1">Seviye 1</string>
<string name="TR_CONFIG_LEVEL2">Seviye 2</string>
<string name="TR_CONFIG_LEVEL3">Seviye 3</string>
<string name="TR_CONFIG_LEVEL_MAX">Max</string>
<string name="TR_CONFIG_LIST">Liste</string>
<string name="TR_CONFIG_DREIDEL">Dreidel</string>
<string name="TR_CONFIG_TILE_BOARD">Döşemeli Pano</string>
<string name="TR_CONFIG_BOOK">Kitap</string>
<string name="TR_CONFIG_COVERLOADING_ONDEMAND">İstek Üzerine</string>
<string name="TR_CONFIG_COVERLOADING_ATSTART">Başlangıçta</string>
<string name="TR_CONFIG_COVERLOADING_DYNAMIC">Dinamik</string>
<string name="TR_CONFIG_NONE">Yok</string>
<string name="TR_CONFIG_RANDOM">Rasgele</string>
<string name="TR_CONFIG_FOLDER">Klasör</string>
<string name="TR_CONFIG_ARTIST">Sanatçı</string>
<string name="TR_CONFIG_ARTIST_LETTER">Sanatçı Harfi</string>
<string name="TR_CONFIG_TITLE_LETTER">Başlık Harfi</string>
<string name="TR_CONFIG_EDITION">Basım</string>
<string name="TR_CONFIG_GENRE">Tür</string>
<string name="TR_CONFIG_YEAR">Yıl</string>
<string name="TR_CONFIG_DECADE">On yıl</string>
<string name="TR_CONFIG_LANGUAGE">Dil</string>
<string name="TR_CONFIG_EASY">Kolay</string>
<string name="TR_CONFIG_NORMAL">Normal</string>
<string name="TR_CONFIG_HARD">Zor</string>
<string name="TR_CONFIG_TIMERMODE_CURRENT">Şimdiki</string>
<string name="TR_CONFIG_TIMERMODE_REMAINING">Kalan</string>
<string name="TR_CONFIG_TIMERMODE_TOTAL">Toplam</string>
<string name="TR_CONFIG_TIMERLOOK_NORMAL">Normal</string>
<string name="TR_CONFIG_TIMERLOOK_EXPANDED">Genişletilmiş</string>
<string name="TR_CONFIG_OWN_MUSIC">Kendi Müziğiniz ve Arkaplan Müziği</string>
<string name="TR_CONFIG_NO_OWN_MUSIC">Hiç kendi müziğiniz yok</string>
<string name="TR_CONFIG_ONLY_OWN_MUSIC">Sadece kendi Müziğim</string>
<string name="TR_CONFIG_FADEPLAYERINFO_ALL">Hepsi</string>
<string name="TR_CONFIG_FADEPLAYERINFO_INFO">Sadece isimler ve fotoğrafları</string>
<string name="TR_CONFIG_FADEPLAYERINFO_OFF">Hiçbirşey</string>
<string name="TR_SCREENLOAD_LOADING">Yükleniyor</string>
<string name="TR_SCREENLOAD_TOTAL">Toplam</string>
<string name="TR_SCREENLOAD_SONGS">Şarkılar</string>
<string name="TR_SCREENLOAD_LOADED">yüklendi</string>
<string name="TR_SCREENMAIN_MENU">Ana Menü</string>
<string name="TR_SCREENMAIN_BUTTON_SING">Şarkı</string>
<string name="TR_SCREENMAIN_BUTTON_PARTY">Parti</string>
<string name="TR_SCREENMAIN_BUTTON_OPTIONS">Seçenekler</string>
<string name="TR_SCREENMAIN_BUTTON_PROFILES">Profiller</string>
<string name="TR_SCREENPARTY_TITLE">Parti Modu Seçeneği</string>
<string name="TR_SCREENPARTY_MODES">Parti Modu</string>
<string name="TR_SCREENPARTY_DESCRIPTION">Açıklama</string>
<string name="TR_SCREENPARTY_AUTHOR">Yazar</string>
<string name="TR_SCREENPARTY_VERSION">Sürüm</string>
<string name="TR_SCREENPARTY_ERROR">Bu parti modu yüklenemedi</string>
<string name="TR_SCREENPARTY_TARGETAUDIENCE">Hedef dinleyici</string>
<string name="TR_SCREENPARTY_NOTEAMS">Takım yok</string>
<string name="TR_SCREENPARTY_NUMTEAMS">Takım sayısı</string>
<string name="TR_SCREENPARTY_NUMPLAYERS">Oyuncu sayısı</string>
<string name="TR_SCREENNAMES_MENU">Oyuncu Seçimi</string>
<string name="TR_SCREENNAMES_PLAYER">Oyuncu</string>
<string name="TR_SCREENNAMES_1PLAYER">1 Oyuncu</string>
<string name="TR_SCREENNAMES_2PLAYER">2 Oyunculu</string>
<string name="TR_SCREENNAMES_3PLAYER">3 Oyunculu</string>
<string name="TR_SCREENNAMES_4PLAYER">4 Oyunculu</string>
<string name="TR_SCREENNAMES_5PLAYER">5 Oyunculu</string>
<string name="TR_SCREENNAMES_6PLAYER">6 Oyunculu</string>
<string name="TR_SCREENNAMES_WARNING_MICS_SG">Uyarı: %v oyuncusu için hiç mikrofon atanmadı!</string>
<string name="TR_SCREENNAMES_WARNING_MICS_PL">Uyarı: %v oyuncuları için hiç mikrofon atanmadı!</string>
<string name="TR_SCREENNAMES_WARNING_PROFILES_SG">Uyarı: %v oyuncusu için hiç profil atanmadı!</string>
<string name="TR_SCREENNAMES_WARNING_PROFILES_PL">Uyarı: %v oyuncuları için hiç profil atanmadı!</string>
<string name="TR_SCREENSONG_MENU">Şarkı Seçimi</string>
<string name="TR_SCREENSONG_BUTTON_SING">Şarkı Söyle</string>
<string name="TR_SCREENSONG_BUTTON_PLAYLIST">Çalma Listesine Ekle</string>
<string name="TR_SCREENSONG_BUTTON_CANCEL">Kapat</string>
<string name="TR_SCREENSONG_BUTTON_RANDOM">Rastgele bir şarkı seç</string>
<string name="TR_SCREENSONG_BUTTON_RANDOMCAT">Rastgele bir kategori seç</string>
<string name="TR_SCREENSONG_BUTTON_SINGALL">Tüm şarkıları söyle</string>
<string name="TR_SCREENSONG_BUTTON_SINGALLVISIBLE">Tüm görünür şarkıları söyle</string>
<string name="TR_SCREENSONG_BUTTON_OPENPLAYLIST">Çalma listesini aç</string>
<string name="TR_SCREENSONG_BUTTON_RANDOMMEDLEY">Rastgele bir potpuri söyle</string>
<string name="TR_SCREENSONG_BUTTON_STARTMEDLEY">Potpuri şarkılarını söyle</string>
<string name="TR_SCREENSONG_NEWPLAYLIST">Yeni Çalma Listesi</string>
<string name="TR_SCREENSONG_SONGOPTIONS">Şarkı Seçenekleri</string>
<string name="TR_SCREENSONG_SEARCH">Arama:</string>
<string name="TR_SCREENSONG_NOLANGUAGE">Dil yok</string>
<string name="TR_SCREENSONG_NOYEAR">Yıl yok</string>
<string name="TR_SCREENSONG_NOGENRE">Tür yok</string>
<string name="TR_SCREENSONG_NOEDITION">Basım yok</string>
<string name="TR_SCREENSONG_ALLSONGS">Tüm Şarkılar</string>
<string name="TR_SCREENSONG_NUMSONGS">(%v Şarkıları)</string>
<string name="TR_SCREENSONG_NUMSONG">(%v Şarkısı)</string>
<string name="TR_SCREENSING_PAUSE">Duraklat</string>
<string name="TR_SCREENSING_BUTTON_CANCEL">Şarkı söylemeyi durdur</string>
<string name="TR_SCREENSING_BUTTON_CONTINUE">Devam et</string>
<string name="TR_SCREENSING_BUTTON_SKIP">Bu şarkıyı atla</string>
<string name="TR_SCREENSCORE_SCORES">Skorlar</string>
<string name="TR_SCREENSCORE_RATING">Derecelendirme</string>
<string name="TR_SCREENSCORE_POINTS">Puanlar</string>
<string name="TR_SCREENSCORE_GAMEDIFFICULTY">Zorluk Derecesi</string>
<string name="TR_SCREENSCORE_OVERALLSCORE">Genel skor</string>
<string name="TR_SCREENHIGHSCORE_HIGHSCORE">Yüksek skor</string>
<string name="TR_SCREENPROFILES_PROFILES">Profiller</string>
<string name="TR_SCREENPROFILES_PLAYERNAME">Oyuncu Adı</string>
<string name="TR_SCREENPROFILES_GAMEDIFFICULTY">Oyun Zorluğu</string>
<string name="TR_SCREENPROFILES_AVATAR">Profil Resmi</string>
<string name="TR_SCREENPROFILES_GUESTPROFILE">Misafir Profili</string>
<string name="TR_SCREENPROFILES_ACTIVE">Aktif</string>
<string name="TR_SCREENPROFILES_BUTTON_NEW">Yeni</string>
<string name="TR_SCREENPROFILES_BUTTON_DELETE">Sil</string>
<string name="TR_SCREENPROFILES_BUTTON_TAKESNAPSHOT">Ekran Görüntüsü Al</string>
<string name="TR_SCREENPROFILES_BUTTON_SAVESNAPSHOT">Ekran Görüntüsünü Kaydet</string>
<string name="TR_SCREENPROFILES_BUTTON_DISCARDSNAPSHOT">Ekran Görüntüsünü Sil</string>
<string name="TR_SCREENPROFILES_BUTTON_WEBCAM">Webcam</string>
<string name="TR_SCREENO_OPTIONS">Menü Seçenekleri</string>
<string name="TR_SCREENO_BUTTON_GAME">Oyun</string>
<string name="TR_SCREENO_BUTTON_SOUND">Ses</string>
<string name="TR_SCREENO_BUTTON_RECORD">Kayıt</string>
<string name="TR_SCREENO_BUTTON_VIDEO">Video</string>
<string name="TR_SCREENO_BUTTON_LYRICS">Sözler</string>
<string name="TR_SCREENO_BUTTON_THEME">Tema</string>
<string name="TR_SCREENOGAME_OPTIONS">Oyun Seçenekleri</string>
<string name="TR_SCREENOGAME_LANGUAGE">Dil</string>
<string name="TR_SCREENOGAME_DEBUGLEVEL">Hata Ayıklama Seviyesi</string>
<string name="TR_SCREENOGAME_SONGMENU">Şarkı Menüsü</string>
<string name="TR_SCREENOGAME_SONGSORTING">Şarkı Sıralama</string>
<string name="TR_SCREENOGAME_TABS">Sekmeler</string>
<string name="TR_SCREENOGAME_DIFFICULTY">Oyun Zorluğu</string>
<string name="TR_SCREENOGAME_TIMERMODE">Zamanlayıcı Modu</string>
<string name="TR_SCREENORECORD_OPTIONS">Kaydetme Seçenekleri</string>
<string name="TR_SCREENORECORD_DEVICE">Aygıt</string>
<string name="TR_SCREENORECORD_INPUT">Giriş</string>
<string name="TR_SCREENORECORD_CHANNEL_1">Kanal 1</string>
<string name="TR_SCREENORECORD_CHANNEL_2">Kanal 2 </string>
<string name="TR_SCREENORECORD_MIC_DELAY">Mikrofon Gecikmesi</string>
<string name="TR_SCREENORECORD_MIC_WARNING">Uyarı: Tek oyuncuya iki mikrofon atandı.</string>
<string name="TR_SCREENORECORD_BUTTON_DELAYTEST">Gecikme Testi</string>
<string name="TR_SCREENOSOUND_OPTIONS">Ses Seçenekleri</string>
<string name="TR_SCREENOSOUND_BACKGROUNDMUSIC">Arka Plan Müziği</string>
<string name="TR_SCREENOSOUND_BACKGROUNDMUSICVOLUME">Arka Plan Müziği Seviyesi</string>
<string name="TR_SCREENOSOUND_BACKGROUNDMUSICSOURCE">Arka Plan Müziği Kaynağı</string>
<string name="TR_SCREENOSOUND_PREVIEWMUSICVOLUME">Ön İzleme Müziği Seviyesi</string>
<string name="TR_SCREENOSOUND_GAMEMUSICVOLUME">Oyun Müziği Seviyesi</string>
<string name="TR_SCREENOTHEME_OPTIONS">Tema Seçenekleri</string>
<string name="TR_SCREENOTHEME_THEME">Tema</string>
<string name="TR_SCREENOTHEME_SKIN">Renk</string>
<string name="TR_SCREENOTHEME_COVERTHEME">Kapak Teması</string>
<string name="TR_SCREENOTHEME_NOTELINES">Not Çizgilerini Göster</string>
<string name="TR_SCREENOTHEME_TONEHELPER">Ton Yardımcısını Göster</string>
<string name="TR_SCREENOTHEME_TIMERLOOK">Kronometre Bakışı</string>
<string name="TR_SCREENOTHEME_FADEINFO">Oyuncu Bilgisini Kapat</string>
<string name="TR_SCREENOTHEME_COVERLOADING">Kapak Yüklenme Davranışı</string>
<string name="TR_SCREENOLYRICS_OPTIONS">Şarkı Sözü Seçenekleri</string>
<string name="TR_SCREENOLYRICS_STYLE">Tarz</string>
<string name="TR_SCREENOLYRICS_ONTOP">Sözler Yukarıda Gösterilsin</string>
<string name="TR_SCREENOVIDEO_OPTIONS">Video Seçenekleri</string>
<string name="TR_SCREENOVIDEO_VIDEOBACKGROUNDS">Video Arka Planları</string>
<string name="TR_SCREENOVIDEO_VIDEOPREVIEW">Video Önizleme</string>
<string name="TR_SCREENOVIDEO_VIDEOINSONGS">Şarkı Söylerken Videoları Gösterme</string>
<string name="TR_SCREENO_VIDEO_VIDEOSTOBACKGROUND">Mevcut Arka Plan Müziği Videosunu Göster</string>
<string name="TR_SCREENO_VIDEO_WEBCAMDEVICES">Web Kameraları</string>
<string name="TR_SCREENO_VIDEO_WEBCAMCAPABILITIES">Web Kameraları Özellikleri</string>
<string name="TR_SCREENPVOLUMECONTROL_VOLUME">Ses</string>
</resources>
@@ -1,29 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<root>
<Font1>
<Name>Normal</Name>
<Outline>0,00</Outline>
<OutlineColorR>0,00</OutlineColorR>
<OutlineColorG>0,00</OutlineColorG>
<OutlineColorB>0,00</OutlineColorB>
<OutlineColorA>1,00</OutlineColorA>
<Folder>FreeSans</Folder>
<FileNormal>FreeSans.ttf</FileNormal>
<FileBold>FreeSansBold.ttf</FileBold>
<FileItalic>FreeSansOblique.ttf</FileItalic>
<FileBoldItalic>FreeSansBoldOblique.ttf</FileBoldItalic>
</Font1>
<Font2>
<Name>Outline</Name>
<Outline>0,10</Outline>
<OutlineColorR>0,00</OutlineColorR>
<OutlineColorG>0,00</OutlineColorG>
<OutlineColorB>0,00</OutlineColorB>
<OutlineColorA>1,00</OutlineColorA>
<Folder>FreeSans</Folder>
<FileNormal>FreeSans.ttf</FileNormal>
<FileBold>FreeSansBold.ttf</FileBold>
<FileItalic>FreeSansOblique.ttf</FileItalic>
<FileBoldItalic>FreeSansBoldOblique.ttf</FileBoldItalic>
</Font2>
</root>
@@ -1,40 +0,0 @@
Congratulations, you have successfully downloaded font file!
This font is provided to you by Fonts2u.com – the largest online
repository of free fonts for Windows and Mac.
How to install this font on your computer?
For Windows 7 / Vista users:
- Right-click the font file(s) and choose "Install".
For users of the previous Windows versions:
- Copy the included file(s) into a default Windows font folder
(usually C:\WINDOWS\FONTS or C:\WINNT\FONTS)
For Mac users:
Mac OS X 10.3 or above (including the FontBook)
- Double-click the font file and hit "Install font" button at
the bottom of the preview.
Mac OS X
- Either copy the font file(s) to /Library/Fonts (for all users),
or to /Users/Your_username/Library/Fonts (for you only).
Mac OS 9 or earlier
- You have to convert the font file(s) you have downloaded.
Drag the font suitcases into the System folder. The system
will propose you to add them to the Fonts folder.
For Linux users:
- Copy the font file(s) to /USR/SHARE/FONTS
@@ -0,0 +1,29 @@
<?xml version='1.0' encoding='UTF-8'?>
<resources>
<string name="language">Engels</string>
<string name="TR_PARTYMODE_NAME">Uitdaging</string>
<string name="TR_PARTYMODE_DESCRIPTION">Speel Uitdaging.</string>
<string name="TR_PARTYMODE_AUDIENCE">Voor iedereen geïnteresseerd in duelleren.</string>
<string name="TR_BUTTON_NEXT">Volgende</string>
<string name="TR_BUTTON_BACK">Vorige</string>
<string name="TR_BUTTON_START">Start</string>
<string name="TR_BUTTON_EXIT">Afsluiten</string>
<string name="TR_BUTTON_YES">Ja</string>
<string name="TR_BUTTON_NO">Nee</string>
<string name="TR_BUTTON_NEXT_ROUND">Volgende Ronde</string>
<string name="TR_SCREENCONFIG_TITLE">Uitdaging: Configuratie</string>
<string name="TR_SCREENCONFIG_NUMPLAYERS">Aantal spelers</string>
<string name="TR_SCREENCONFIG_NUMMICS">Aantal microfoons</string>
<string name="TR_SCREENCONFIG_NUMROUNDS">Aantal rondes</string>
<string name="TR_SCREENNAMES_TITLE">Uitdaging: Kies speler</string>
<string name="TR_SCREENMAIN_TITLE">Uitdaging: Overzicht</string>
<string name="TR_SCREENMAIN_TABLE_POS">#</string>
<string name="TR_SCREENMAIN_TABLE_PLAYERNAME">Naam</string>
<string name="TR_SCREENMAIN_TABLE_NUMPLAYED">Rondes</string>
<string name="TR_SCREENMAIN_TABLE_WON">Overwinningen</string>
<string name="TR_SCREENMAIN_TABLE_SINGPOINTS">Zingpunten</string>
<string name="TR_SCREENMAIN_TABLE_GAMEPOINTS">Score</string>
<string name="TR_SCREENMAIN_POPUP_REALLYEXIT">Wil je echt afsluiten?</string>
<string name="TR_SCREENMAIN_NEXT_PLAYER">Speler van volgende ronde:</string>
<string name="TR_SCREENMAIN_FINISH">Alle rondes zijn gezongen! De winnaar is...</string>
</resources>
@@ -0,0 +1,29 @@
<?xml version='1.0' encoding='UTF-8'?>
<resources>
<string name="language">Türkçe</string>
<string name="TR_PARTYMODE_NAME">Yarışma Modu</string>
<string name="TR_PARTYMODE_DESCRIPTION">Biraz yarışma turu oyna.</string>
<string name="TR_PARTYMODE_AUDIENCE">Düello yarışmalarıyla ilgilenen herkes için.</string>
<string name="TR_BUTTON_NEXT">Sonraki</string>
<string name="TR_BUTTON_BACK">Önceki</string>
<string name="TR_BUTTON_START">Başla</string>
<string name="TR_BUTTON_EXIT">Çıkış</string>
<string name="TR_BUTTON_YES">Evet</string>
<string name="TR_BUTTON_NO">Hayır</string>
<string name="TR_BUTTON_NEXT_ROUND">Sonraki Tur</string>
<string name="TR_SCREENCONFIG_TITLE">Yarışma Modu: Yapılandırma</string>
<string name="TR_SCREENCONFIG_NUMPLAYERS">Oyuncu sayısı</string>
<string name="TR_SCREENCONFIG_NUMMICS">Mikrofon sayısı</string>
<string name="TR_SCREENCONFIG_NUMROUNDS">Tur sayısı</string>
<string name="TR_SCREENNAMES_TITLE">Yarışma Modu: Oyuncu Seçiniz</string>
<string name="TR_SCREENMAIN_TITLE">Yarışma Modu: Genel Bakış</string>
<string name="TR_SCREENMAIN_TABLE_POS">Pozisyon</string>
<string name="TR_SCREENMAIN_TABLE_PLAYERNAME">İsim</string>
<string name="TR_SCREENMAIN_TABLE_NUMPLAYED">Turlar</string>
<string name="TR_SCREENMAIN_TABLE_WON">Kazanma</string>
<string name="TR_SCREENMAIN_TABLE_SINGPOINTS">Şarkı Söyleme Puanı</string>
<string name="TR_SCREENMAIN_TABLE_GAMEPOINTS">Skor</string>
<string name="TR_SCREENMAIN_POPUP_REALLYEXIT">Gerçekten çıkmak istiyor musunuz?</string>
<string name="TR_SCREENMAIN_NEXT_PLAYER">Sonraki turun oyuncusu:</string>
<string name="TR_SCREENMAIN_FINISH">Tüm turlar tamamlandı! Kazanan...</string>
</resources>
+4 -4
View File
@@ -6,14 +6,14 @@
<Author>brunzel</Author>
<Description>TR_PARTYMODE_DESCRIPTION</Description>
<Folder>ChallengeMedley</Folder>
<PartyModeFile>PartyModeChallenge</PartyModeFile>
<PartyModeFile>PartyModeChallengeMedley</PartyModeFile>
<PartyModeVersionMajor>0</PartyModeVersionMajor>
<PartyModeVersionMinor>1</PartyModeVersionMinor>
<TargetAudience>TR_PARTYMODE_AUDIENCE</TargetAudience>
</Info>
<PartyScreens>
<ScreenFile>PartyScreenChallengeMain</ScreenFile>
<ScreenFile>PartyScreenChallengeConfig</ScreenFile>
<ScreenFile>PartyScreenChallengeNames</ScreenFile>
<ScreenFile>PartyScreenChallengeMedleyMain</ScreenFile>
<ScreenFile>PartyScreenChallengeMedleyConfig</ScreenFile>
<ScreenFile>PartyScreenChallengeMedleyNames</ScreenFile>
</PartyScreens>
</root>
@@ -1,29 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<root>
<Font1>
<Name>Normal</Name>
<Outline>0,00</Outline>
<OutlineColorR>0,00</OutlineColorR>
<OutlineColorG>0,00</OutlineColorG>
<OutlineColorB>0,00</OutlineColorB>
<OutlineColorA>1,00</OutlineColorA>
<Folder>FreeSans</Folder>
<FileNormal>FreeSans.ttf</FileNormal>
<FileBold>FreeSansBold.ttf</FileBold>
<FileItalic>FreeSansOblique.ttf</FileItalic>
<FileBoldItalic>FreeSansBoldOblique.ttf</FileBoldItalic>
</Font1>
<Font2>
<Name>Outline</Name>
<Outline>0,10</Outline>
<OutlineColorR>0,00</OutlineColorR>
<OutlineColorG>0,00</OutlineColorG>
<OutlineColorB>0,00</OutlineColorB>
<OutlineColorA>1,00</OutlineColorA>
<Folder>FreeSans</Folder>
<FileNormal>FreeSans.ttf</FileNormal>
<FileBold>FreeSansBold.ttf</FileBold>
<FileItalic>FreeSansOblique.ttf</FileItalic>
<FileBoldItalic>FreeSansBoldOblique.ttf</FileBoldItalic>
</Font2>
</root>
@@ -1,40 +0,0 @@
Congratulations, you have successfully downloaded font file!
This font is provided to you by Fonts2u.com – the largest online
repository of free fonts for Windows and Mac.
How to install this font on your computer?
For Windows 7 / Vista users:
- Right-click the font file(s) and choose "Install".
For users of the previous Windows versions:
- Copy the included file(s) into a default Windows font folder
(usually C:\WINDOWS\FONTS or C:\WINNT\FONTS)
For Mac users:
Mac OS X 10.3 or above (including the FontBook)
- Double-click the font file and hit "Install font" button at
the bottom of the preview.
Mac OS X
- Either copy the font file(s) to /Library/Fonts (for all users),
or to /Users/Your_username/Library/Fonts (for you only).
Mac OS 9 or earlier
- You have to convert the font file(s) you have downloaded.
Drag the font suitcases into the System folder. The system
will propose you to add them to the Fonts folder.
For Linux users:
- Copy the font file(s) to /USR/SHARE/FONTS
@@ -0,0 +1,29 @@
<?xml version='1.0' encoding='UTF-8'?>
<resources>
<string name="language">Engels</string>
<string name="TR_PARTYMODE_NAME">Uitdaging Medley</string>
<string name="TR_PARTYMODE_DESCRIPTION">Speel Uitdaging met alleen 5 Medleys</string>
<string name="TR_PARTYMODE_AUDIENCE">Voor iedereen geïnteresseerd in duelleren en Medleys.</string>
<string name="TR_BUTTON_NEXT">Volgende</string>
<string name="TR_BUTTON_BACK">Vorige</string>
<string name="TR_BUTTON_START">Start</string>
<string name="TR_BUTTON_EXIT">Afsluiten</string>
<string name="TR_BUTTON_YES">Ja</string>
<string name="TR_BUTTON_NO">Nee</string>
<string name="TR_BUTTON_NEXT_ROUND">Volgende Ronde</string>
<string name="TR_SCREENCONFIG_TITLE">Uitdaging Medley: Configuratie</string>
<string name="TR_SCREENCONFIG_NUMPLAYERS">Aantal spelers</string>
<string name="TR_SCREENCONFIG_NUMMICS">Aantal microfoons</string>
<string name="TR_SCREENCONFIG_NUMROUNDS">Aantal rondes</string>
<string name="TR_SCREENNAMES_TITLE">Uitdaging Medley: Kies speler</string>
<string name="TR_SCREENMAIN_TITLE">Uitdaging Medley: Overzicht</string>
<string name="TR_SCREENMAIN_TABLE_POS">#</string>
<string name="TR_SCREENMAIN_TABLE_PLAYERNAME">Naam</string>
<string name="TR_SCREENMAIN_TABLE_NUMPLAYED">Rondes</string>
<string name="TR_SCREENMAIN_TABLE_WON">Overwinningen</string>
<string name="TR_SCREENMAIN_TABLE_SINGPOINTS">Zingpunten</string>
<string name="TR_SCREENMAIN_TABLE_GAMEPOINTS">Score</string>
<string name="TR_SCREENMAIN_POPUP_REALLYEXIT">Wil je echt afsluiten?</string>
<string name="TR_SCREENMAIN_NEXT_PLAYER">Speler van volgende ronde:</string>
<string name="TR_SCREENMAIN_FINISH">Alle rondes zijn gezonden! De winnaar is...</string>
</resources>
@@ -0,0 +1,29 @@
<?xml version='1.0' encoding='UTF-8'?>
<resources>
<string name="language">Türkçe</string>
<string name="TR_PARTYMODE_NAME">Potpuri Yarış Modu</string>
<string name="TR_PARTYMODE_DESCRIPTION">Sadece 5 Potpuri kullanarak yarışma turları oyna.</string>
<string name="TR_PARTYMODE_AUDIENCE">Düel yarışmaları ve Potpuri ile ilgilenen herkes için.</string>
<string name="TR_BUTTON_NEXT">Sonraki</string>
<string name="TR_BUTTON_BACK">Önceki</string>
<string name="TR_BUTTON_START">Başla</string>
<string name="TR_BUTTON_EXIT">Çık</string>
<string name="TR_BUTTON_YES">Evet</string>
<string name="TR_BUTTON_NO">Hayır</string>
<string name="TR_BUTTON_NEXT_ROUND">Sonraki Tur</string>
<string name="TR_SCREENCONFIG_TITLE">Potpuri Yarış Modu: Yapılandırma</string>
<string name="TR_SCREENCONFIG_NUMPLAYERS">Oyuncu sayısı</string>
<string name="TR_SCREENCONFIG_NUMMICS">Mikrofon sayısı</string>
<string name="TR_SCREENCONFIG_NUMROUNDS">Tur sayısı</string>
<string name="TR_SCREENNAMES_TITLE">Potpuri Yarışma Modu: Oyuncu Seçimi</string>
<string name="TR_SCREENMAIN_TITLE">Potpuri Yarışma Modu: Genel Bakış</string>
<string name="TR_SCREENMAIN_TABLE_POS">Pos</string>
<string name="TR_SCREENMAIN_TABLE_PLAYERNAME">İsim</string>
<string name="TR_SCREENMAIN_TABLE_NUMPLAYED">Tur</string>
<string name="TR_SCREENMAIN_TABLE_WON">Kazanma</string>
<string name="TR_SCREENMAIN_TABLE_SINGPOINTS">Şarkı Söyleme Puanı</string>
<string name="TR_SCREENMAIN_TABLE_GAMEPOINTS">Skor</string>
<string name="TR_SCREENMAIN_POPUP_REALLYEXIT">Gerçekten çıkmak istiyor musunuz?</string>
<string name="TR_SCREENMAIN_NEXT_PLAYER">Sonraki tur oyuncusu:</string>
<string name="TR_SCREENMAIN_FINISH">Tüm turlar tamamlandı! Kazanan...</string>
</resources>
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<PartyScreenChallengeConfig>
<PartyScreenChallengeMedleyConfig>
<ScreenVersion>1</ScreenVersion>
<Background1>
<!--<Type>: Background type: None, Color, Texture, Video-->
@@ -454,5 +454,5 @@
<!--<NumVisible>: Number of visible elements in the slide-->
<NumVisible>10</NumVisible>
</SelectSlideNumRounds>
</PartyScreenChallengeConfig>
</PartyScreenChallengeMedleyConfig>
</root>
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<PartyScreenChallengeMain>
<PartyScreenChallengeMedleyMain>
<ScreenVersion>1</ScreenVersion>
<Background1>
<!--<Type>: Background type: None, Color, Texture, Video-->
@@ -981,5 +981,5 @@
<!-- <Space>: Reflection Space of selected button-->
<!-- <Height>: Reflection Height of selected button-->
</ButtonRoundsScrollDown>
</PartyScreenChallengeMain>
</PartyScreenChallengeMedleyMain>
</root>
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<PartyScreenChallengeNames>
<PartyScreenChallengeMedleyNames>
<ScreenVersion>1</ScreenVersion>
<Background1>
<!--<Type>: Background type: None, Color, Texture, Video-->
@@ -270,5 +270,5 @@
<!-- <Space>: Reflection Space of selected button-->
<!-- <Height>: Reflection Height of selected button-->
</ButtonPlayerChoose>
</PartyScreenChallengeNames>
</PartyScreenChallengeMedleyNames>
</root>
@@ -1,29 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<root>
<Font1>
<Name>Normal</Name>
<Outline>0,00</Outline>
<OutlineColorR>0,00</OutlineColorR>
<OutlineColorG>0,00</OutlineColorG>
<OutlineColorB>0,00</OutlineColorB>
<OutlineColorA>1,00</OutlineColorA>
<Folder>FreeSans</Folder>
<FileNormal>FreeSans.ttf</FileNormal>
<FileBold>FreeSansBold.ttf</FileBold>
<FileItalic>FreeSansOblique.ttf</FileItalic>
<FileBoldItalic>FreeSansBoldOblique.ttf</FileBoldItalic>
</Font1>
<Font2>
<Name>Outline</Name>
<Outline>0,10</Outline>
<OutlineColorR>0,00</OutlineColorR>
<OutlineColorG>0,00</OutlineColorG>
<OutlineColorB>0,00</OutlineColorB>
<OutlineColorA>1,00</OutlineColorA>
<Folder>FreeSans</Folder>
<FileNormal>FreeSans.ttf</FileNormal>
<FileBold>FreeSansBold.ttf</FileBold>
<FileItalic>FreeSansOblique.ttf</FileItalic>
<FileBoldItalic>FreeSansBoldOblique.ttf</FileBoldItalic>
</Font2>
</root>
@@ -1,40 +0,0 @@
Congratulations, you have successfully downloaded font file!
This font is provided to you by Fonts2u.com – the largest online
repository of free fonts for Windows and Mac.
How to install this font on your computer?
For Windows 7 / Vista users:
- Right-click the font file(s) and choose "Install".
For users of the previous Windows versions:
- Copy the included file(s) into a default Windows font folder
(usually C:\WINDOWS\FONTS or C:\WINNT\FONTS)
For Mac users:
Mac OS X 10.3 or above (including the FontBook)
- Double-click the font file and hit "Install font" button at
the bottom of the preview.
Mac OS X
- Either copy the font file(s) to /Library/Fonts (for all users),
or to /Users/Your_username/Library/Fonts (for you only).
Mac OS 9 or earlier
- You have to convert the font file(s) you have downloaded.
Drag the font suitcases into the System folder. The system
will propose you to add them to the Fonts folder.
For Linux users:
- Copy the font file(s) to /USR/SHARE/FONTS
@@ -0,0 +1,34 @@
<?xml version='1.0' encoding='UTF-8'?>
<resources>
<string name="language">Engels</string>
<string name="TR_PARTYMODE_NAME">Drie-op-een-rij</string>
<string name="TR_PARTYMODE_DESCRIPTION">Speel Drie-op-een-rij op een speciale manier</string>
<string name="TR_PARTYMODE_AUDIENCE">Grappige rondes met strategie, geluk en kunde</string>
<string name="TR_BUTTON_NEXT">Volgende</string>
<string name="TR_BUTTON_BACK">Vorige</string>
<string name="TR_BUTTON_START">Start</string>
<string name="TR_BUTTON_EXIT">Afsluiten</string>
<string name="TR_BUTTON_YES">Ja</string>
<string name="TR_BUTTON_NO">Nee</string>
<string name="TR_BUTTON_NEXT_ROUND">Start</string>
<string name="TR_SONGS">Liedjes</string>
<string name="TR_TEAM">Team</string>
<string name="TR_PLAYLIST">Afspeellijst</string>
<string name="TR_CATEGORY">Categorie</string>
<string name="TR_ALLSONGS">Alle liedjes</string>
<string name="TR_SCREENCONFIG_TITLE">Drie-op-een-rij: configuratie</string>
<string name="TR_SCREENCONFIG_NUMPLAYERST1">Aantal spelers in team 1</string>
<string name="TR_SCREENCONFIG_NUMPLAYERST2">Aantal spelers in team 2</string>
<string name="TR_SCREENCONFIG_NUMFIELDS">Aantal vakjes</string>
<string name="TR_SCREENCONFIG_SONGSOURCE">Liedjesbron</string>
<string name="TR_SCREENCONFIG_GAMEMODE">Spelmodus</string>
<string name="TR_SCREENNAMES_TITLE">Drie-op-een-rij: Kies speler</string>
<string name="TR_SCREENNAMES_TEAM1">Team 1</string>
<string name="TR_SCREENNAMES_TEAM2">Team 2</string>
<string name="TR_SCREENMAIN_TITLE">Drie-op-een-rij</string>
<string name="TR_SCREENMAIN_TEAM_CHOOSE">Kies een vakje.</string>
<string name="TR_SCREENMAIN_NEXT_PLAYER">Volgende speler</string>
<string name="TR_SCREENMAIN_POPUP_REALLYEXIT">Drie-op-een-rij afsluiten?</string>
<string name="TR_SCREENMAIN_WINNER">En de winnaar is...</string>
<string name="TR_SCREENMAIN_NOWINNER">Er is geen winnaar in deze ronde...</string>
</resources>
@@ -0,0 +1,34 @@
<?xml version='1.0' encoding='UTF-8'?>
<resources>
<string name="language">Türkçe</string>
<string name="TR_PARTYMODE_NAME">XOX oyunu</string>
<string name="TR_PARTYMODE_DESCRIPTION">Özel bir şekilde XOX oyna</string>
<string name="TR_PARTYMODE_AUDIENCE">Strateji, şans ve becerilerle eğlenceli turlar</string>
<string name="TR_BUTTON_NEXT">Sonraki</string>
<string name="TR_BUTTON_BACK">Önceki</string>
<string name="TR_BUTTON_START">Başla</string>
<string name="TR_BUTTON_EXIT">Çıkış</string>
<string name="TR_BUTTON_YES">Evet</string>
<string name="TR_BUTTON_NO">Hayır</string>
<string name="TR_BUTTON_NEXT_ROUND">Başla</string>
<string name="TR_SONGS">Şarkılar</string>
<string name="TR_TEAM">Takım</string>
<string name="TR_PLAYLIST">Çalma Listesi</string>
<string name="TR_CATEGORY">Kategori</string>
<string name="TR_ALLSONGS">Tüm Şarkılar</string>
<string name="TR_SCREENCONFIG_TITLE">XOX: Yapılandırma</string>
<string name="TR_SCREENCONFIG_NUMPLAYERST1">1. takımdaki oyuncu sayısı</string>
<string name="TR_SCREENCONFIG_NUMPLAYERST2">2. takımdaki oyuncu sayısı</string>
<string name="TR_SCREENCONFIG_NUMFIELDS">Bölge sayısı</string>
<string name="TR_SCREENCONFIG_SONGSOURCE">Şarkı Kaynağı</string>
<string name="TR_SCREENCONFIG_GAMEMODE">Oyun Modu</string>
<string name="TR_SCREENNAMES_TITLE">XOX: Oyuncu Seç</string>
<string name="TR_SCREENNAMES_TEAM1">1. Takım</string>
<string name="TR_SCREENNAMES_TEAM2">2. Takım</string>
<string name="TR_SCREENMAIN_TITLE">XOX</string>
<string name="TR_SCREENMAIN_TEAM_CHOOSE">Bir bölge seç.</string>
<string name="TR_SCREENMAIN_NEXT_PLAYER">Sonraki oyuncu</string>
<string name="TR_SCREENMAIN_POPUP_REALLYEXIT">XOX oyunundan gerçekten çıkmak istiyor musunuz?</string>
<string name="TR_SCREENMAIN_WINNER">Ve kazanan...</string>
<string name="TR_SCREENMAIN_NOWINNER">Bu turdan hiç kazanan çıkmadı...</string>
</resources>
+5 -3
View File
@@ -125,11 +125,13 @@ Vocaluxe.exe -ConfigFile MyConfig.xml -ScoreFile C:\Vocaluxe\Highscores\MyHighsc
[SHIFT] + [-] to decrease volume
Song screen
[CTRL] + [R] to select a random song
[F3] to open/close the song search menu
[A] to sing all songs
[SHIFT] + [A] to sing all songs from a category
[SPACE] to open/close the song menu
[CTRL] + [R] to select a random song
[CTRL] + [A] to sing all songs
[CTRL] + [V] to sing all songs from a category
[NUM_1]..[NUM_6] to use a Joker for team 1..6
[A]..[Z] to jump to category/song title starting with that letter
Name selection screen
[1]..[6] to activate player selection.
+10 -10
View File
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<ScreenSong>
<ScreenVersion>4</ScreenVersion>
<ScreenVersion>5</ScreenVersion>
<Background1>
<!--<Type>: Background type: None, Color, Texture, Video-->
<Type>Video</Type>
@@ -954,7 +954,7 @@
<SkinSelected>Button</SkinSelected>
<!--<X>, <Y>, <Z>, <W>, <H>: Button position, width and height-->
<X>40</X>
<Y>135</Y>
<Y>225</Y>
<Z>-2,11</Z>
<W>360</W>
<H>40</H>
@@ -1003,7 +1003,7 @@
<SkinSelected>Button</SkinSelected>
<!--<X>, <Y>, <Z>, <W>, <H>: Button position, width and height-->
<X>40</X>
<Y>180</Y>
<Y>270</Y>
<Z>-2,11</Z>
<W>360</W>
<H>40</H>
@@ -1045,14 +1045,14 @@
<!-- <Space>: Reflection Space of selected button-->
<!-- <Height>: Reflection Height of selected button-->
</ButtonOptionsSingAllVisible>
<ButtonOptionsOpenPlaylist>
<ButtonOptionsOpenSelectedItem>
<!--<Skin>: Texture name-->
<Skin>Button</Skin>
<!--<SkinSelected>: Texture name for selected button-->
<SkinSelected>Button</SkinSelected>
<!--<X>, <Y>, <Z>, <W>, <H>: Button position, width and height-->
<X>40</X>
<Y>270</Y>
<Y>135</Y>
<Z>-2,11</Z>
<W>360</W>
<H>40</H>
@@ -1085,7 +1085,7 @@
<!--<Font>: Text font name-->
<Font>Outline</Font>
<!--<Text>: Nothing or translation tag-->
<Text>TR_SCREENSONG_BUTTON_OPENPLAYLIST</Text>
<Text>TR_SCREENSONG_BUTTON_OPEN_SELECTED_ITEM</Text>
</Text>
<!--<Reflection> If exists:-->
<!-- <Space>: Reflection Space-->
@@ -1093,7 +1093,7 @@
<!--<SReflection> If exists:-->
<!-- <Space>: Reflection Space of selected button-->
<!-- <Height>: Reflection Height of selected button-->
</ButtonOptionsOpenPlaylist>
</ButtonOptionsOpenSelectedItem>
<ButtonOpenOptions>
<!--<Skin>: Texture name-->
<Skin>Invisible</Skin>
@@ -1449,19 +1449,19 @@
<SkinHighlighted>SelectSlide</SkinHighlighted>
<!--<X>, <Y>, <Z>, <W>, <H>: SelectSlide position, width and height-->
<X>40</X>
<Y>225</Y>
<Y>180</Y>
<Z>-2,11</Z>
<W>360</W>
<H>40</H>
<!--<ArrowLeftX>, <ArrowLeftY>, <ArrowLeftZ>, <ArrowLeftW>, <ArrowLeftH>: Left arrow position, width and height-->
<ArrowLeftX>45</ArrowLeftX>
<ArrowLeftY>235</ArrowLeftY>
<ArrowLeftY>190</ArrowLeftY>
<ArrowLeftZ>-2,12</ArrowLeftZ>
<ArrowLeftW>30</ArrowLeftW>
<ArrowLeftH>30</ArrowLeftH>
<!--<ArrowRightX>, <ArrowRightY>, <ArrowRightZ>, <ArrowRightW>, <ArrowRightH>: Right arrow position, width and height-->
<ArrowRightX>365</ArrowRightX>
<ArrowRightY>235</ArrowRightY>
<ArrowRightY>190</ArrowRightY>
<ArrowRightZ>-2,12</ArrowRightZ>
<ArrowRightW>30</ArrowRightW>
<ArrowRightH>30</ArrowRightH>
@@ -1,5 +1,13 @@
ScreenSong
++++++++++
Version 5:
Add:
<ButtonOptionsOpenSelectedItem>
Remove:
ButtonOptionsOpenPlaylist
++++++++++
Version 4:
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+1
View File
@@ -0,0 +1 @@
GlobalSuppressions.cs
@@ -1,22 +1,19 @@
using System;
using System.Collections.Generic;
using System.Text;
using Vocaluxe.Menu;
namespace Vocaluxe.PartyModes
namespace VocaluxeLib.PartyModes.Challenge
{
public class ChallengeRounds
{
private Random _Rand;
private int _NumPlayer;
private readonly Random _Rand;
private readonly int _NumPlayer;
public List<Combination> Rounds;
public ChallengeRounds(int NumRounds, int NumPlayer, int NumPlayerAtOnce)
{
Rounds = new List<Combination>();
_Rand = new Random(System.DateTime.Now.Millisecond);
_Rand = new Random(DateTime.Now.Millisecond);
if (NumPlayerAtOnce < 1 || NumRounds < 1 || NumPlayer == 0)
_NumPlayer = 0;
@@ -41,27 +38,20 @@ namespace Vocaluxe.PartyModes
Rounds.Add(Combinations.GetNextCombination(null));
for (int i = 1; i < NumRounds; i++)
{
Rounds.Add(Combinations.GetNextCombination(GetPlayerDemand(i)));
}
}
private List<int> GetPlayerDemand(int RoundIndex)
{
List<int> NumPlayed = new List<int>(_NumPlayer);
for (int i = 0; i < _NumPlayer; i++)
{
NumPlayed.Add(0);
}
for (int i = 0; i < RoundIndex; i++)
{
foreach (int PlayerIndex in Rounds[i].Player)
{
NumPlayed[PlayerIndex]++;
}
}
int max = 0;
foreach (int p in NumPlayed)
@@ -95,7 +85,6 @@ namespace Vocaluxe.PartyModes
}
else
last.Add(i);
}
}
@@ -129,10 +118,10 @@ namespace Vocaluxe.PartyModes
class Combinations
{
private List<Combination> _Combs;
private Random _Rand;
private int _NumPlayer;
private int _NumMics;
private readonly List<Combination> _Combs;
private readonly Random _Rand;
private readonly int _NumPlayer;
private readonly int _NumMics;
public Combinations(int NumPlayer, int NumMics, Random Rand)
{
@@ -150,9 +139,7 @@ namespace Vocaluxe.PartyModes
Combination combs = new Combination();
if (_NumPlayer == _NumMics)
{
return _Combs[0];
}
//filter against PlayerNrDemand
List<Combination> combsFiltered = new List<Combination>();
@@ -179,18 +166,14 @@ namespace Vocaluxe.PartyModes
if (combsFiltered.Count == 0)
{
for (int i = 0; i < _Combs.Count; i++)
{
combsFiltered.Add(_Combs[i]);
}
}
int num = combsFiltered.Count;
int rand = _Rand.Next(num);
Combination c = new Combination();
for (int i = 0; i < combsFiltered[rand].Player.Count; i++)
{
c.Player.Add(combsFiltered[rand].Player[i]);
}
_Combs.Remove(combsFiltered[rand]);
return combsFiltered[rand];
@@ -209,10 +192,8 @@ namespace Vocaluxe.PartyModes
for (int j = 0; j < _NumPlayer; j++)
{
if ((i & (1 << j)) > 0)
{
c.Player.Add(j);
}
}
if (c.Player.Count == _NumMics)
_Combs.Add(c);
@@ -243,9 +224,7 @@ namespace Vocaluxe.PartyModes
{
bool result = true;
foreach (int p in PlayerIndices)
{
result &= IsAvailable(p);
}
return result;
}
@@ -253,9 +232,7 @@ namespace Vocaluxe.PartyModes
{
bool result = false;
foreach (int p in PlayerIndices)
{
result |= IsAvailable(p);
}
return result;
}
}
Binary file not shown.
@@ -1,12 +1,15 @@
using System;
using System.Collections.Generic;
using System.Text;
using System.Runtime.InteropServices;
using VocaluxeLib.Menu;
using Vocaluxe.Menu;
[assembly: ComVisible(false)]
namespace Vocaluxe.PartyModes
namespace VocaluxeLib.PartyModes.Challenge
{
#region Communication
#region ToScreen
public struct DataToScreenConfig
{
@@ -52,17 +55,14 @@ namespace Vocaluxe.PartyModes
{
res = row.NumSingPoints.CompareTo(NumSingPoints);
if (res == 0)
{
res = row.NumWon.CompareTo(NumWon);
}
}
return res;
}
throw new ArgumentException("object is not a ResultTableRow");
}
}
#endregion ToScreen
#region FromScreen
@@ -93,6 +93,7 @@ namespace Vocaluxe.PartyModes
public bool FadeToNameSelection;
}
#endregion FromScreen
#endregion Communication
public sealed class PartyModeChallenge : CPartyMode
@@ -103,7 +104,7 @@ namespace Vocaluxe.PartyModes
private const int MinTeams = 0;
private const int MaxNumRounds = 100;
enum EStage
private enum EStage
{
NotStarted,
Config,
@@ -112,7 +113,7 @@ namespace Vocaluxe.PartyModes
Singing
}
struct Data
private struct Data
{
public int NumPlayer;
public int NumPlayerAtOnce;
@@ -128,7 +129,7 @@ namespace Vocaluxe.PartyModes
public int[] CatSongIndices;
}
struct Stats
private struct Stats
{
public int ProfileID;
public int SingPoints;
@@ -148,12 +149,12 @@ namespace Vocaluxe.PartyModes
_ScreenSongOptions.Selection.RandomOnly = false;
_ScreenSongOptions.Selection.PartyMode = true;
_ScreenSongOptions.Selection.CategoryChangeAllowed = true;
_ScreenSongOptions.Selection.NumJokers = new int[] { 5, 5 };
_ScreenSongOptions.Selection.TeamNames = new string[] { "foo", "bar" };
_ScreenSongOptions.Selection.NumJokers = new int[] {5, 5};
_ScreenSongOptions.Selection.TeamNames = new string[] {"foo", "bar"};
_ScreenSongOptions.Sorting.SearchString = String.Empty;
_ScreenSongOptions.Sorting.SearchActive = false;
_ScreenSongOptions.Sorting.ShowDuetSongs = false;
_ScreenSongOptions.Sorting.DuetOptions = EDuetOptions.NoDuets;
_Stage = EStage.NotStarted;
@@ -327,8 +328,6 @@ namespace Vocaluxe.PartyModes
Screen.DataToScreen(ToScreenMain);
}
break;
default:
break;
}
return Screen;
@@ -441,7 +440,6 @@ namespace Vocaluxe.PartyModes
public override void SongSelected(int SongID)
{
EGameMode gm = EGameMode.TR_GAMEMODE_NORMAL;
CBase.Game.Reset();
@@ -503,30 +501,30 @@ namespace Vocaluxe.PartyModes
switch (GameData.NumPlayerAtOnce)
{
case 1:
_ScreenSongOptions.Selection.NumJokers = new int[] { 10 };
_ScreenSongOptions.Selection.NumJokers = new int[] {10};
break;
case 2:
_ScreenSongOptions.Selection.NumJokers = new int[] { 5, 5 };
_ScreenSongOptions.Selection.NumJokers = new int[] {5, 5};
break;
case 3:
_ScreenSongOptions.Selection.NumJokers = new int[] { 4, 4, 4 };
_ScreenSongOptions.Selection.NumJokers = new int[] {4, 4, 4};
break;
case 4:
_ScreenSongOptions.Selection.NumJokers = new int[] { 3, 3, 3, 3 };
_ScreenSongOptions.Selection.NumJokers = new int[] {3, 3, 3, 3};
break;
case 5:
_ScreenSongOptions.Selection.NumJokers = new int[] { 2, 2, 2, 2, 2 };
_ScreenSongOptions.Selection.NumJokers = new int[] {2, 2, 2, 2, 2};
break;
case 6:
_ScreenSongOptions.Selection.NumJokers = new int[] { 2, 2, 2, 2, 2, 2 };
_ScreenSongOptions.Selection.NumJokers = new int[] {2, 2, 2, 2, 2, 2};
break;
default:
_ScreenSongOptions.Selection.NumJokers = new int[] { 5, 5 };
_ScreenSongOptions.Selection.NumJokers = new int[] {5, 5};
break;
}
}
@@ -537,13 +535,13 @@ namespace Vocaluxe.PartyModes
if (profiles == null)
{
_ScreenSongOptions.Selection.TeamNames = new string[] { "foo", "bar" };
_ScreenSongOptions.Selection.TeamNames = new string[] {"foo", "bar"};
return;
}
if (GameData.NumPlayerAtOnce < 1 || GameData.ProfileIDs.Count < GameData.NumPlayerAtOnce || profiles.Length < GameData.NumPlayerAtOnce)
{
_ScreenSongOptions.Selection.TeamNames = new string[] { "foo", "bar" };
_ScreenSongOptions.Selection.TeamNames = new string[] {"foo", "bar"};
return;
}
@@ -580,15 +578,13 @@ namespace Vocaluxe.PartyModes
GameData.ResultTable.Add(row);
}
GameData.Results = new int[GameData.NumRounds, GameData.NumPlayerAtOnce];
GameData.Results = new int[GameData.NumRounds,GameData.NumPlayerAtOnce];
for (int i = 0; i < GameData.NumRounds; i++)
{
for (int j = 0; j < GameData.NumPlayerAtOnce; j++)
{
GameData.Results[i, j] = 0;
}
}
}
else
{
SPlayer[] results = CBase.Game.GetPlayer();
@@ -599,9 +595,7 @@ namespace Vocaluxe.PartyModes
return;
for (int j = 0; j < GameData.NumPlayerAtOnce; j++)
{
GameData.Results[GameData.CurrentRoundNr - 2, j] = (int)Math.Round(results[j].Points);
}
List<Stats> points = GetPointsForPlayer(results);
@@ -638,7 +632,7 @@ namespace Vocaluxe.PartyModes
int pos = 1;
int lastPoints = 0;
int lastSingPoints = 0;
for (int i = 0; i < GameData.ResultTable.Count; i++ )
for (int i = 0; i < GameData.ResultTable.Count; i++)
{
if (lastPoints > GameData.ResultTable[i].NumGamePoints || lastSingPoints > GameData.ResultTable[i].NumSingPoints)
pos++;
@@ -651,7 +645,7 @@ namespace Vocaluxe.PartyModes
private List<Stats> GetPointsForPlayer(SPlayer[] Results)
{
List<Stats> result = new List<Stats>();
for(int i = 0; i < GameData.NumPlayerAtOnce; i++)
for (int i = 0; i < GameData.NumPlayerAtOnce; i++)
{
Stats stat = new Stats();
stat.ProfileID = Results[i].ProfileID;
@@ -698,7 +692,6 @@ namespace Vocaluxe.PartyModes
}
return result;
}
@@ -708,10 +701,8 @@ namespace Vocaluxe.PartyModes
{
GameData.CatSongIndices = new int[CBase.Songs.GetNumCategories()];
for (int i = 0; i < GameData.CatSongIndices.Length; i++)
{
GameData.CatSongIndices[i] = -1;
}
}
if (CBase.Songs.GetNumCategories() == 0 || _ScreenSongOptions.Sorting.Tabs == EOffOn.TR_CONFIG_OFF)
GameData.CatSongIndices = null;
@@ -8,11 +8,10 @@
<ProjectGuid>{5A4053F1-5AD5-441F-B254-D97A088127B6}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>PartyModeChallenge</RootNamespace>
<AssemblyName>PartyModeChallenge</AssemblyName>
<TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
<TargetFrameworkProfile>
</TargetFrameworkProfile>
<RootNamespace>VocaluxeLib.PartyModes.Challenge</RootNamespace>
<AssemblyName>Challenge</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<TargetFrameworkProfile>Client</TargetFrameworkProfile>
<FileAlignment>512</FileAlignment>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'DebugWin|x86' ">
@@ -20,7 +19,7 @@
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>..\..\Output\PartyModes\Challenge\Code</OutputPath>
<OutputPath>bin</OutputPath>
<DefineConstants>TRACE;DEBUG;WIN</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
@@ -30,7 +29,7 @@
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>none</DebugType>
<Optimize>true</Optimize>
<OutputPath>..\..\Output\PartyModes\Challenge\Code</OutputPath>
<OutputPath>bin</OutputPath>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<UseVSHostingProcess>false</UseVSHostingProcess>
@@ -42,17 +41,18 @@
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>..\..\Output\PartyModes\Challenge\Code</OutputPath>
<OutputPath>bin</OutputPath>
<DefineConstants>TRACE;DEBUG;WIN</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
<CodeAnalysisRuleSet>..\..\CheckingRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'ReleaseWin|x64'">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>none</DebugType>
<Optimize>true</Optimize>
<OutputPath>..\..\Output\PartyModes\Challenge\Code</OutputPath>
<OutputPath>bin</OutputPath>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<UseVSHostingProcess>false</UseVSHostingProcess>
@@ -64,7 +64,7 @@
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>..\..\Output\PartyModes\Challenge\Code</OutputPath>
<OutputPath>bin</OutputPath>
<DefineConstants>TRACE;DEBUG;LINUX</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
@@ -74,7 +74,7 @@
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>none</DebugType>
<Optimize>true</Optimize>
<OutputPath>..\..\Output\PartyModes\Challenge\Code</OutputPath>
<OutputPath>bin</OutputPath>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<UseVSHostingProcess>false</UseVSHostingProcess>
@@ -86,7 +86,7 @@
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>..\..\Output\PartyModes\Challenge\Code</OutputPath>
<OutputPath>bin</OutputPath>
<DefineConstants>TRACE;DEBUG;LINUX</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
@@ -96,7 +96,7 @@
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>none</DebugType>
<Optimize>true</Optimize>
<OutputPath>..\..\Output\PartyModes\Challenge\Code</OutputPath>
<OutputPath>bin</OutputPath>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<UseVSHostingProcess>false</UseVSHostingProcess>
@@ -107,21 +107,12 @@
<StartupObject />
</PropertyGroup>
<ItemGroup>
<Compile Include="ChallengeRounds.cs">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Compile>
<Compile Include="PartyModeChallenge.cs">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Compile>
<Compile Include="PartyScreenChallengeConfig.cs">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Compile>
<Compile Include="PartyScreenChallengeMain.cs">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Compile>
<Compile Include="PartyScreenChallengeNames.cs">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Compile>
<Compile Include="ChallengeRounds.cs" />
<Compile Include="GlobalSuppressions.cs" />
<Compile Include="PartyModeChallenge.cs" />
<Compile Include="PartyScreenChallengeConfig.cs" />
<Compile Include="PartyScreenChallengeMain.cs" />
<Compile Include="PartyScreenChallengeNames.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\VocaluxeLib\VocaluxeLib.csproj">
@@ -137,7 +128,14 @@
<Reference Include="System.Windows.Forms" />
<Reference Include="System.XML" />
</ItemGroup>
<ItemGroup>
<Folder Include="Properties\" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
<PostBuildEvent>cd $(SolutionDir)Partymodes\
xcopy "$(ProjectDir)*.cs" "$(SolutionDir)Output\PartyModes\$(TargetName)\Code\" /EXCLUDE:Excludes.txt /I /Y</PostBuildEvent>
</PropertyGroup>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
@@ -1,41 +1,35 @@
using System;
using System.Collections.Generic;
using System.Text;
using System.Windows.Forms;
using VocaluxeLib.Menu;
using Vocaluxe.Menu;
namespace Vocaluxe.PartyModes
namespace VocaluxeLib.PartyModes.Challenge
{
public class PartyScreenChallengeConfig : CMenuParty
{
// Version number for theme files. Increment it, if you've changed something on the theme files!
const int ScreenVersion = 1;
protected override int _ScreenVersion
{
get { return 1; }
}
const string SelectSlideNumPlayers = "SelectSlideNumPlayers";
const string SelectSlideNumMics = "SelectSlideNumMics";
const string SelectSlideNumRounds = "SelectSlideNumRounds";
const string ButtonNext = "ButtonNext";
const string ButtonBack = "ButtonBack";
private const string SelectSlideNumPlayers = "SelectSlideNumPlayers";
private const string SelectSlideNumMics = "SelectSlideNumMics";
private const string SelectSlideNumRounds = "SelectSlideNumRounds";
private const string ButtonNext = "ButtonNext";
private const string ButtonBack = "ButtonBack";
private int _MaxNumMics = 2;
private int _MaxNumRounds = 100;
private int _RoundSteps = 1;
DataFromScreen Data;
private DataFromScreen Data;
public PartyScreenChallengeConfig()
{
}
protected override void Init()
public override void Init()
{
base.Init();
_ThemeName = "PartyScreenChallengeConfig";
_ThemeSelectSlides = new string[] { SelectSlideNumPlayers, SelectSlideNumMics, SelectSlideNumRounds };
_ThemeButtons = new string[] { ButtonNext, ButtonBack };
_ScreenVersion = ScreenVersion;
_ThemeSelectSlides = new string[] {SelectSlideNumPlayers, SelectSlideNumMics, SelectSlideNumRounds};
_ThemeButtons = new string[] {ButtonNext, ButtonBack};
Data = new DataFromScreen();
FromScreenConfig config = new FromScreenConfig();
@@ -45,11 +39,6 @@ namespace Vocaluxe.PartyModes
Data.ScreenConfig = config;
}
public override void LoadTheme(string XmlPath)
{
base.LoadTheme(XmlPath);
}
public override void DataToScreen(object ReceivedData)
{
DataToScreenConfig config = new DataToScreenConfig();
@@ -63,22 +52,18 @@ namespace Vocaluxe.PartyModes
}
catch (Exception e)
{
CBase.Log.LogError("Error in party mode screen challenge config. Can't cast received data from game mode " + _ThemeName + ". " + e.Message);;
CBase.Log.LogError("Error in party mode screen challenge config. Can't cast received data from game mode " + ThemeName + ". " + e.Message);
}
}
}
public override bool HandleInput(KeyEvent KeyEvent)
public override bool HandleInput(KeyEvent keyEvent)
{
base.HandleInput(KeyEvent);
base.HandleInput(keyEvent);
if (KeyEvent.KeyPressed)
{
}
if (keyEvent.KeyPressed) {}
else
{
switch (KeyEvent.Key)
switch (keyEvent.Key)
{
case Keys.Back:
case Keys.Escape:
@@ -88,10 +73,10 @@ namespace Vocaluxe.PartyModes
case Keys.Enter:
UpdateSlides();
if (Buttons[htButtons(ButtonBack)].Selected)
if (Buttons[ButtonBack].Selected)
Back();
if (Buttons[htButtons(ButtonNext)].Selected)
if (Buttons[ButtonNext].Selected)
Next();
break;
@@ -107,24 +92,22 @@ namespace Vocaluxe.PartyModes
return true;
}
public override bool HandleMouse(MouseEvent MouseEvent)
public override bool HandleMouse(MouseEvent mouseEvent)
{
base.HandleMouse(MouseEvent);
base.HandleMouse(mouseEvent);
if (MouseEvent.LB && IsMouseOver(MouseEvent))
if (mouseEvent.LB && IsMouseOver(mouseEvent))
{
UpdateSlides();
if (Buttons[htButtons(ButtonBack)].Selected)
if (Buttons[ButtonBack].Selected)
Back();
if (Buttons[htButtons(ButtonNext)].Selected)
if (Buttons[ButtonNext].Selected)
Next();
}
if (MouseEvent.RB)
{
if (mouseEvent.RB)
Back();
}
return true;
}
@@ -153,20 +136,13 @@ namespace Vocaluxe.PartyModes
return true;
}
public override void OnClose()
{
base.OnClose();
}
private void RebuildSlides()
{
// build num player slide (min player ... max player);
SelectSlides[htSelectSlides(SelectSlideNumPlayers)].Clear();
SelectSlides[SelectSlideNumPlayers].Clear();
for (int i = _PartyMode.GetMinPlayer(); i <= _PartyMode.GetMaxPlayer(); i++)
{
SelectSlides[htSelectSlides(SelectSlideNumPlayers)].AddValue(i.ToString());
}
SelectSlides[htSelectSlides(SelectSlideNumPlayers)].Selection = Data.ScreenConfig.NumPlayer - _PartyMode.GetMinPlayer();
SelectSlides[SelectSlideNumPlayers].AddValue(i.ToString());
SelectSlides[SelectSlideNumPlayers].Selection = Data.ScreenConfig.NumPlayer - _PartyMode.GetMinPlayer();
UpdateMicsAtOnce();
SetRoundSteps();
@@ -177,9 +153,9 @@ namespace Vocaluxe.PartyModes
{
int player = Data.ScreenConfig.NumPlayer;
int mics = Data.ScreenConfig.NumPlayerAtOnce;
Data.ScreenConfig.NumPlayer = SelectSlides[htSelectSlides(SelectSlideNumPlayers)].Selection + _PartyMode.GetMinPlayer();
Data.ScreenConfig.NumPlayerAtOnce = SelectSlides[htSelectSlides(SelectSlideNumMics)].Selection + _PartyMode.GetMinPlayer();
Data.ScreenConfig.NumRounds = (SelectSlides[htSelectSlides(SelectSlideNumRounds)].Selection + 1) * _RoundSteps;
Data.ScreenConfig.NumPlayer = SelectSlides[SelectSlideNumPlayers].Selection + _PartyMode.GetMinPlayer();
Data.ScreenConfig.NumPlayerAtOnce = SelectSlides[SelectSlideNumMics].Selection + _PartyMode.GetMinPlayer();
Data.ScreenConfig.NumRounds = (SelectSlides[SelectSlideNumRounds].Selection + 1) * _RoundSteps;
UpdateMicsAtOnce();
SetRoundSteps();
@@ -188,9 +164,7 @@ namespace Vocaluxe.PartyModes
{
int num = CHelper.nCk(Data.ScreenConfig.NumPlayer, Data.ScreenConfig.NumPlayerAtOnce);
while (num > _MaxNumRounds)
{
num -= _RoundSteps;
}
Data.ScreenConfig.NumRounds = num;
}
@@ -208,23 +182,19 @@ namespace Vocaluxe.PartyModes
Data.ScreenConfig.NumPlayerAtOnce = MaxNum;
// build mics at once slide
SelectSlides[htSelectSlides(SelectSlideNumMics)].Clear();
SelectSlides[SelectSlideNumMics].Clear();
for (int i = 1; i <= MaxNum; i++)
{
SelectSlides[htSelectSlides(SelectSlideNumMics)].AddValue(i.ToString());
}
SelectSlides[htSelectSlides(SelectSlideNumMics)].Selection = Data.ScreenConfig.NumPlayerAtOnce - _PartyMode.GetMinPlayer();
SelectSlides[SelectSlideNumMics].AddValue(i.ToString());
SelectSlides[SelectSlideNumMics].Selection = Data.ScreenConfig.NumPlayerAtOnce - _PartyMode.GetMinPlayer();
}
private void UpdateSlideRounds()
{
// build num rounds slide
SelectSlides[htSelectSlides(SelectSlideNumRounds)].Clear();
SelectSlides[SelectSlideNumRounds].Clear();
for (int i = _RoundSteps; i <= _MaxNumRounds; i += _RoundSteps)
{
SelectSlides[htSelectSlides(SelectSlideNumRounds)].AddValue(i.ToString());
}
SelectSlides[htSelectSlides(SelectSlideNumRounds)].Selection = Data.ScreenConfig.NumRounds / _RoundSteps - 1;
SelectSlides[SelectSlideNumRounds].AddValue(i.ToString());
SelectSlides[SelectSlideNumRounds].Selection = Data.ScreenConfig.NumRounds / _RoundSteps - 1;
}
private void SetRoundSteps()
@@ -251,7 +221,7 @@ namespace Vocaluxe.PartyModes
private void Next()
{
_PartyMode.DataFromScreen(_ThemeName, Data);
_PartyMode.DataFromScreen(ThemeName, Data);
}
}
}
@@ -1,11 +1,9 @@
using System;
using System.Collections.Generic;
using System.Text;
using System.Windows.Forms;
using VocaluxeLib.Menu;
using Vocaluxe.Menu;
namespace Vocaluxe.PartyModes
namespace VocaluxeLib.PartyModes.Challenge
{
struct TableRow
{
@@ -24,41 +22,43 @@ namespace Vocaluxe.PartyModes
public List<CText> TextScores;
}
public class PartyScreenChallengeMain : CMenuParty
{
// Version number for theme files. Increment it, if you've changed something on the theme files!
const int ScreenVersion = 1;
protected override int _ScreenVersion
{
get { return 1; }
}
const string TextPosition = "TextPosition";
const string TextPlayerName = "TextPlayerName";
const string TextNumPlayed = "TextNumPlayed";
const string TextWon = "TextWon";
const string TextSingPoints = "TextSingPoints";
const string TextGamePoints = "TextGamePoints";
const string TextNextPlayer = "TextNextPlayer";
const string TextPopupReallyExit = "TextPopupReallyExit";
const string TextRoundPlayer = "TextRoundPlayer";
const string TextRoundScore = "TextRoundScore";
const string TextRoundNumber = "TextRoundNumber";
const string TextFinishMessage = "TextFinishMessage";
const string TextFinishPlayerWin = "TextFinishPlayerWin";
const string TextNextPlayerMessage = "TextNextPlayerMessage";
private const string TextPosition = "TextPosition";
private const string TextPlayerName = "TextPlayerName";
private const string TextNumPlayed = "TextNumPlayed";
private const string TextWon = "TextWon";
private const string TextSingPoints = "TextSingPoints";
private const string TextGamePoints = "TextGamePoints";
private const string TextNextPlayer = "TextNextPlayer";
private const string TextPopupReallyExit = "TextPopupReallyExit";
private const string TextRoundPlayer = "TextRoundPlayer";
private const string TextRoundScore = "TextRoundScore";
private const string TextRoundNumber = "TextRoundNumber";
private const string TextFinishMessage = "TextFinishMessage";
private const string TextFinishPlayerWin = "TextFinishPlayerWin";
private const string TextNextPlayerMessage = "TextNextPlayerMessage";
const string ButtonNextRound = "ButtonNextRound";
const string ButtonBack = "ButtonBack";
const string ButtonExit = "ButtonExit";
const string ButtonPopupYes = "ButtonPopupYes";
const string ButtonPopupNo = "ButtonPopupNo";
const string ButtonPlayerScrollUp = "ButtonPlayerScrollUp";
const string ButtonPlayerScrollDown = "ButtonPlayerScrollDown";
const string ButtonRoundsScrollUp = "ButtonRoundsScrollUp";
const string ButtonRoundsScrollDown = "ButtonRoundsScrollDown";
private const string ButtonNextRound = "ButtonNextRound";
private const string ButtonBack = "ButtonBack";
private const string ButtonExit = "ButtonExit";
private const string ButtonPopupYes = "ButtonPopupYes";
private const string ButtonPopupNo = "ButtonPopupNo";
private const string ButtonPlayerScrollUp = "ButtonPlayerScrollUp";
private const string ButtonPlayerScrollDown = "ButtonPlayerScrollDown";
private const string ButtonRoundsScrollUp = "ButtonRoundsScrollUp";
private const string ButtonRoundsScrollDown = "ButtonRoundsScrollDown";
const string StaticPopupBG = "StaticPopupBG";
const string StaticNextPlayer = "StaticNextPlayer";
private const string StaticPopupBG = "StaticPopupBG";
private const string StaticNextPlayer = "StaticNextPlayer";
private bool ExitPopupVisible = false;
private bool ExitPopupVisible;
private DataFromScreen Data;
private DataToScreenMain GameState;
@@ -70,8 +70,8 @@ namespace Vocaluxe.PartyModes
private SRectF RoundsTableScrollArea;
private SRectF PlayerTableScrollArea;
private int RoundsTableOffset = 0;
private int PlayerTableOffset = 0;
private int RoundsTableOffset;
private int PlayerTableOffset;
private int NumPlayerVisible = 10;
private int NumRoundsVisible = 3;
@@ -81,15 +81,18 @@ namespace Vocaluxe.PartyModes
Data.ScreenMain = new FromScreenMain();
}
protected override void Init()
public override void Init()
{
base.Init();
_ThemeName = "PartyScreenChallengeMain";
_ThemeTexts = new string[] { TextPosition, TextPlayerName, TextNumPlayed, TextWon, TextSingPoints, TextGamePoints, TextNextPlayer, TextPopupReallyExit, TextRoundNumber, TextRoundPlayer, TextRoundScore, TextFinishMessage, TextFinishPlayerWin, TextNextPlayerMessage };
_ThemeButtons = new string[] { ButtonNextRound, ButtonBack, ButtonExit, ButtonPopupYes, ButtonPopupNo, ButtonPlayerScrollDown, ButtonPlayerScrollUp, ButtonRoundsScrollDown, ButtonRoundsScrollUp };
_ThemeStatics = new string[] { StaticPopupBG, StaticNextPlayer };
_ScreenVersion = ScreenVersion;
_ThemeTexts = new string[]
{
TextPosition, TextPlayerName, TextNumPlayed, TextWon, TextSingPoints, TextGamePoints, TextNextPlayer, TextPopupReallyExit, TextRoundNumber, TextRoundPlayer,
TextRoundScore, TextFinishMessage, TextFinishPlayerWin, TextNextPlayerMessage
};
_ThemeButtons = new string[]
{ButtonNextRound, ButtonBack, ButtonExit, ButtonPopupYes, ButtonPopupNo, ButtonPlayerScrollDown, ButtonPlayerScrollUp, ButtonRoundsScrollDown, ButtonRoundsScrollUp};
_ThemeStatics = new string[] {StaticPopupBG, StaticNextPlayer};
}
public override void LoadTheme(string XmlPath)
@@ -104,9 +107,9 @@ namespace Vocaluxe.PartyModes
for (int i = 0; i < _PartyMode.GetMaxPlayer(); i++)
{
NextPlayerTexts.Add(GetNewText(Texts[htTexts(TextNextPlayer)]));
NextPlayerTexts.Add(GetNewText(Texts[TextNextPlayer]));
AddText(NextPlayerTexts[NextPlayerTexts.Count - 1]);
NextPlayerStatics.Add(GetNewStatic(Statics[htStatics(StaticNextPlayer)]));
NextPlayerStatics.Add(GetNewStatic(Statics[StaticNextPlayer]));
AddStatic(NextPlayerStatics[NextPlayerStatics.Count - 1]);
}
}
@@ -122,30 +125,28 @@ namespace Vocaluxe.PartyModes
}
catch (Exception e)
{
CBase.Log.LogError("Error in party mode screen challenge main. Can't cast received data from game mode " + _ThemeName + ". " + e.Message); ;
CBase.Log.LogError("Error in party mode screen challenge main. Can't cast received data from game mode " + ThemeName + ". " + e.Message);
}
}
}
public override bool HandleInput(KeyEvent KeyEvent)
public override bool HandleInput(KeyEvent keyEvent)
{
base.HandleInput(KeyEvent);
base.HandleInput(keyEvent);
if (KeyEvent.KeyPressed)
{
}
if (keyEvent.KeyPressed) {}
else
{
switch (KeyEvent.Key)
switch (keyEvent.Key)
{
case Keys.Back:
case Keys.Escape:
if (!ExitPopupVisible)
{
if (GameState.CurrentRoundNr == 1)
Back();
else
ShowPopup(true);
}
else
ShowPopup(false);
break;
@@ -153,26 +154,26 @@ namespace Vocaluxe.PartyModes
case Keys.Enter:
if (!ExitPopupVisible)
{
if (Buttons[htButtons(ButtonNextRound)].Selected)
if (Buttons[ButtonNextRound].Selected)
NextRound();
if (Buttons[htButtons(ButtonBack)].Selected && GameState.CurrentRoundNr == 1)
if (Buttons[ButtonBack].Selected && GameState.CurrentRoundNr == 1)
Back();
if (Buttons[htButtons(ButtonExit)].Selected && GameState.CurrentRoundNr > 1)
if (Buttons[ButtonExit].Selected && GameState.CurrentRoundNr > 1)
ShowPopup(true);
if (Buttons[htButtons(ButtonPlayerScrollUp)].Selected)
if (Buttons[ButtonPlayerScrollUp].Selected)
ScrollPlayerTable(-1);
if (Buttons[htButtons(ButtonPlayerScrollDown)].Selected)
if (Buttons[ButtonPlayerScrollDown].Selected)
ScrollPlayerTable(1);
if (Buttons[htButtons(ButtonRoundsScrollUp)].Selected)
if (Buttons[ButtonRoundsScrollUp].Selected)
ScrollRoundsTable(-1);
if (Buttons[htButtons(ButtonRoundsScrollDown)].Selected)
if (Buttons[ButtonRoundsScrollDown].Selected)
ScrollRoundsTable(1);
}
else
{
if (Buttons[htButtons(ButtonPopupYes)].Selected)
if (Buttons[ButtonPopupYes].Selected)
EndParty();
if (Buttons[htButtons(ButtonPopupNo)].Selected)
if (Buttons[ButtonPopupNo].Selected)
ShowPopup(false);
}
break;
@@ -181,55 +182,57 @@ namespace Vocaluxe.PartyModes
return true;
}
public override bool HandleMouse(MouseEvent MouseEvent)
public override bool HandleMouse(MouseEvent mouseEvent)
{
base.HandleMouse(MouseEvent);
base.HandleMouse(mouseEvent);
if (MouseEvent.LB && IsMouseOver(MouseEvent))
if (mouseEvent.LB && IsMouseOver(mouseEvent))
{
if (!ExitPopupVisible)
{
if (Buttons[htButtons(ButtonNextRound)].Selected)
if (Buttons[ButtonNextRound].Selected)
NextRound();
if (Buttons[htButtons(ButtonBack)].Selected && GameState.CurrentRoundNr == 1)
if (Buttons[ButtonBack].Selected && GameState.CurrentRoundNr == 1)
Back();
if (Buttons[htButtons(ButtonExit)].Selected && GameState.CurrentRoundNr > 1)
if (Buttons[ButtonExit].Selected && GameState.CurrentRoundNr > 1)
ShowPopup(true);
if (Buttons[htButtons(ButtonPlayerScrollUp)].Selected)
if (Buttons[ButtonPlayerScrollUp].Selected)
ScrollPlayerTable(-1);
if (Buttons[htButtons(ButtonPlayerScrollDown)].Selected)
if (Buttons[ButtonPlayerScrollDown].Selected)
ScrollPlayerTable(1);
if (Buttons[htButtons(ButtonRoundsScrollUp)].Selected)
if (Buttons[ButtonRoundsScrollUp].Selected)
ScrollRoundsTable(-1);
if (Buttons[htButtons(ButtonRoundsScrollDown)].Selected)
if (Buttons[ButtonRoundsScrollDown].Selected)
ScrollRoundsTable(1);
}
else
{
if (Buttons[htButtons(ButtonPopupYes)].Selected)
if (Buttons[ButtonPopupYes].Selected)
EndParty();
if (Buttons[htButtons(ButtonPopupNo)].Selected)
if (Buttons[ButtonPopupNo].Selected)
ShowPopup(false);
}
}
if (MouseEvent.RB)
if (mouseEvent.RB)
{
if (!ExitPopupVisible)
{
if (GameState.CurrentRoundNr == 1)
Back();
else
ShowPopup(true);
}
else
ShowPopup(false);
}
if (MouseEvent.Wheel != 0)
if (mouseEvent.Wheel != 0)
{
if(CHelper.IsInBounds(RoundsTableScrollArea, MouseEvent))
ScrollRoundsTable(MouseEvent.Wheel);
if(CHelper.IsInBounds(PlayerTableScrollArea, MouseEvent))
ScrollPlayerTable(MouseEvent.Wheel);
if (CHelper.IsInBounds(RoundsTableScrollArea, mouseEvent))
ScrollRoundsTable(mouseEvent.Wheel);
if (CHelper.IsInBounds(PlayerTableScrollArea, mouseEvent))
ScrollPlayerTable(mouseEvent.Wheel);
}
return true;
@@ -253,29 +256,29 @@ namespace Vocaluxe.PartyModes
if (GameState.CurrentRoundNr == 1)
{
Buttons[htButtons(ButtonBack)].Visible = true;
Buttons[htButtons(ButtonExit)].Visible = false;
Buttons[ButtonBack].Visible = true;
Buttons[ButtonExit].Visible = false;
}
else
{
Buttons[htButtons(ButtonBack)].Visible = false;
Buttons[htButtons(ButtonExit)].Visible = true;
Buttons[ButtonBack].Visible = false;
Buttons[ButtonExit].Visible = true;
}
if (GameState.CurrentRoundNr <= GameState.Combs.Count)
{
Buttons[htButtons(ButtonNextRound)].Visible = true;
Texts[htTexts(TextFinishMessage)].Visible = false;
Texts[htTexts(TextFinishPlayerWin)].Visible = false;
SetInteractionToButton(Buttons[htButtons(ButtonNextRound)]);
Buttons[ButtonNextRound].Visible = true;
Texts[TextFinishMessage].Visible = false;
Texts[TextFinishPlayerWin].Visible = false;
SetInteractionToButton(Buttons[ButtonNextRound]);
}
else
{
Buttons[htButtons(ButtonNextRound)].Visible = false;
Texts[htTexts(TextFinishMessage)].Visible = true;
Texts[htTexts(TextFinishPlayerWin)].Visible = true;
Texts[htTexts(TextFinishPlayerWin)].Text = GetPlayerWinString();
SetInteractionToButton(Buttons[htButtons(ButtonExit)]);
Buttons[ButtonNextRound].Visible = false;
Texts[TextFinishMessage].Visible = true;
Texts[TextFinishPlayerWin].Visible = true;
Texts[TextFinishPlayerWin].Text = GetPlayerWinString();
SetInteractionToButton(Buttons[ButtonExit]);
}
ShowPopup(false);
@@ -292,16 +295,11 @@ namespace Vocaluxe.PartyModes
return true;
}
public override void OnClose()
{
base.OnClose();
}
private void NextRound()
{
Data.ScreenMain.FadeToNameSelection = false;
Data.ScreenMain.FadeToSongSelection = true;
_PartyMode.DataFromScreen(_ThemeName, Data);
_PartyMode.DataFromScreen(ThemeName, Data);
}
private void EndParty()
@@ -313,25 +311,25 @@ namespace Vocaluxe.PartyModes
{
ExitPopupVisible = Visible;
Statics[htStatics(StaticPopupBG)].Visible = ExitPopupVisible;
Texts[htTexts(TextPopupReallyExit)].Visible = ExitPopupVisible;
Buttons[htButtons(ButtonPopupYes)].Visible = ExitPopupVisible;
Buttons[htButtons(ButtonPopupNo)].Visible = ExitPopupVisible;
Statics[StaticPopupBG].Visible = ExitPopupVisible;
Texts[TextPopupReallyExit].Visible = ExitPopupVisible;
Buttons[ButtonPopupYes].Visible = ExitPopupVisible;
Buttons[ButtonPopupNo].Visible = ExitPopupVisible;
if (ExitPopupVisible)
SetInteractionToButton(Buttons[htButtons(ButtonPopupNo)]);
SetInteractionToButton(Buttons[ButtonPopupNo]);
}
private void Back()
{
Data.ScreenMain.FadeToNameSelection = true;
Data.ScreenMain.FadeToSongSelection = false;
_PartyMode.DataFromScreen(_ThemeName, Data);
_PartyMode.DataFromScreen(ThemeName, Data);
}
private void UpdateNextPlayerPositions()
{
float x = CBase.Settings.GetRenderW()/2 - ((GameState.NumPlayerAtOnce * Statics[htStatics(StaticNextPlayer)].Rect.W) + ((GameState.NumPlayerAtOnce-1) * 15))/2;
float x = CBase.Settings.GetRenderW() / 2 - ((GameState.NumPlayerAtOnce * Statics[StaticNextPlayer].Rect.W) + ((GameState.NumPlayerAtOnce - 1) * 15)) / 2;
float static_y = 590;
float text_y = 550;
for (int i = 0; i < GameState.NumPlayerAtOnce; i++)
@@ -341,11 +339,11 @@ namespace Vocaluxe.PartyModes
NextPlayerStatics[i].Rect.Y = static_y;
NextPlayerStatics[i].Visible = true;
//text
NextPlayerTexts[i].X = x + Statics[htStatics(StaticNextPlayer)].Rect.W / 2;
NextPlayerTexts[i].X = x + Statics[StaticNextPlayer].Rect.W / 2;
NextPlayerTexts[i].Y = text_y;
NextPlayerTexts[i].Visible = true;
x += Statics[htStatics(StaticNextPlayer)].Rect.W + 15;
x += Statics[StaticNextPlayer].Rect.W + 15;
}
for (int i = GameState.NumPlayerAtOnce; i < _PartyMode.GetMaxPlayer(); i++)
{
@@ -358,19 +356,19 @@ namespace Vocaluxe.PartyModes
{
if (GameState.CurrentRoundNr <= GameState.Combs.Count)
{
Texts[htTexts(TextNextPlayerMessage)].Visible = true;
Texts[TextNextPlayerMessage].Visible = true;
SProfile[] profiles = CBase.Profiles.GetProfiles();
for (int i = 0; i < GameState.NumPlayerAtOnce; i++)
{
int pid = GameState.Combs[GameState.CurrentRoundNr - 1].Player[i];
NextPlayerStatics[i].Texture = profiles[GameState.ProfileIDs[pid]].Avatar.Texture;
NextPlayerTexts[i].Text = profiles[GameState.ProfileIDs[pid]].PlayerName;
NextPlayerTexts[i].Color = CBase.Theme.GetPlayerColor((i + 1));
NextPlayerTexts[i].Color = CBase.Theme.GetPlayerColor(i + 1);
}
}
else
{
Texts[htTexts(TextNextPlayerMessage)].Visible = false;
Texts[TextNextPlayerMessage].Visible = false;
for (int i = 0; i < GameState.NumPlayerAtOnce; i++)
{
NextPlayerStatics[i].Visible = false;
@@ -394,7 +392,7 @@ namespace Vocaluxe.PartyModes
for (int round = 0; round < RoundsTable.Count; round++)
{
//Round-number
CText text = GetNewText(Texts[htTexts(TextRoundNumber)]);
CText text = GetNewText(Texts[TextRoundNumber]);
AddText(text);
RoundsTable[round].Number = text;
for (int row = 0; row < 2; row++)
@@ -402,11 +400,11 @@ namespace Vocaluxe.PartyModes
for (int column = 0; column < 3; column++)
{
//Player
text = GetNewText(Texts[htTexts(TextRoundPlayer)]);
text = GetNewText(Texts[TextRoundPlayer]);
AddText(text);
RoundsTable[round].TextPlayer.Add(text);
//Score
text = GetNewText(Texts[htTexts(TextRoundScore)]);
text = GetNewText(Texts[TextRoundScore]);
AddText(text);
RoundsTable[round].TextScores.Add(text);
}
@@ -427,14 +425,14 @@ namespace Vocaluxe.PartyModes
if (NumRoundsVisible > GameState.Combs.Count)
NumRoundsVisible = GameState.Combs.Count;
float x = Texts[htTexts(TextRoundNumber)].X;
float y = Texts[htTexts(TextRoundNumber)].Y;
float x = Texts[TextRoundNumber].X;
float y = Texts[TextRoundNumber].Y;
RoundsTableScrollArea.X = x;
RoundsTableScrollArea.Y = y;
RoundsTableScrollArea.W = CBase.Settings.GetRenderW() - Texts[htTexts(TextRoundNumber)].X - 20;
RoundsTableScrollArea.W = CBase.Settings.GetRenderW() - Texts[TextRoundNumber].X - 20;
float delta = Texts[htTexts(TextRoundNumber)].Height;
float delta = Texts[TextRoundNumber].Height;
//Update statics and texts for rounds
for (int round = 0; round < RoundsTable.Count; round++)
@@ -455,8 +453,9 @@ namespace Vocaluxe.PartyModes
for (int column = row * NumPlayerInOneRow; column < num; column++)
{
//Player
float _x = x + 15 + (CBase.Settings.GetRenderW() - Texts[htTexts(TextRoundNumber)].X - 20) / NumPlayerInThisRow * (column - row * NumPlayerInOneRow) + ((CBase.Settings.GetRenderW() - Texts[htTexts(TextRoundNumber)].X - 20) / NumPlayerInThisRow) / 2;
float maxw = ((CBase.Settings.GetRenderW() - Texts[htTexts(TextRoundNumber)].X - 20) / NumPlayerInThisRow) / 2 - 5;
float _x = x + 15 + (CBase.Settings.GetRenderW() - Texts[TextRoundNumber].X - 20) / NumPlayerInThisRow * (column - row * NumPlayerInOneRow) +
((CBase.Settings.GetRenderW() - Texts[TextRoundNumber].X - 20) / NumPlayerInThisRow) / 2;
float maxw = ((CBase.Settings.GetRenderW() - Texts[TextRoundNumber].X - 20) / NumPlayerInThisRow) / 2 - 5;
RoundsTable[round].TextPlayer[column].X = _x;
RoundsTable[round].TextPlayer[column].Y = y;
RoundsTable[round].TextPlayer[column].MaxWidth = maxw;
@@ -478,7 +477,7 @@ namespace Vocaluxe.PartyModes
SProfile[] profile = CBase.Profiles.GetProfiles();
for (int i = 0; i < RoundsTable.Count; i++)
{
for(int p = 0; p < RoundsTable[i].TextPlayer.Count; p++)
for (int p = 0; p < RoundsTable[i].TextPlayer.Count; p++)
{
if (GameState.Combs.Count > i + RoundsTableOffset && GameState.Combs[i + RoundsTableOffset].Player.Count > p)
{
@@ -510,19 +509,19 @@ namespace Vocaluxe.PartyModes
}
}
Buttons[htButtons(ButtonRoundsScrollUp)].Visible = RoundsTableOffset > 0;
Buttons[htButtons(ButtonRoundsScrollDown)].Visible = GameState.Combs.Count - NumRoundsVisible - RoundsTableOffset > 0;
Buttons[ButtonRoundsScrollUp].Visible = RoundsTableOffset > 0;
Buttons[ButtonRoundsScrollDown].Visible = GameState.Combs.Count - NumRoundsVisible - RoundsTableOffset > 0;
}
private void BuildPlayerTable()
{
PlayerTableScrollArea = new SRectF();
PlayerTableScrollArea.X = Texts[htTexts(TextPosition)].X;
PlayerTableScrollArea.Y = Texts[htTexts(TextPosition)].Y;
PlayerTableScrollArea.W = Texts[htTexts(TextGamePoints)].X - Texts[htTexts(TextPosition)].X;
PlayerTableScrollArea.X = Texts[TextPosition].X;
PlayerTableScrollArea.Y = Texts[TextPosition].Y;
PlayerTableScrollArea.W = Texts[TextGamePoints].X - Texts[TextPosition].X;
PlayerTable = new List<TableRow>();
float delta = Texts[htTexts(TextPosition)].Height * 1.2f;
float delta = Texts[TextPosition].Height * 1.2f;
float h = 0;
@@ -530,12 +529,12 @@ namespace Vocaluxe.PartyModes
{
TableRow row = new TableRow();
row.Pos = GetNewText(Texts[htTexts(TextPosition)]);
row.Name = GetNewText(Texts[htTexts(TextPlayerName)]);
row.Rounds = GetNewText(Texts[htTexts(TextNumPlayed)]);
row.Won = GetNewText(Texts[htTexts(TextWon)]);
row.SingPoints = GetNewText(Texts[htTexts(TextSingPoints)]);
row.GamePoints = GetNewText(Texts[htTexts(TextGamePoints)]);
row.Pos = GetNewText(Texts[TextPosition]);
row.Name = GetNewText(Texts[TextPlayerName]);
row.Rounds = GetNewText(Texts[TextNumPlayed]);
row.Won = GetNewText(Texts[TextWon]);
row.SingPoints = GetNewText(Texts[TextSingPoints]);
row.GamePoints = GetNewText(Texts[TextGamePoints]);
row.Pos.Y += delta * (i + 1);
row.Name.Y += delta * (i + 1);
@@ -575,7 +574,7 @@ namespace Vocaluxe.PartyModes
{
TableRow row = PlayerTable[i];
if (i+PlayerTableOffset < GameState.ResultTable.Count)
if (i + PlayerTableOffset < GameState.ResultTable.Count)
{
row.Pos.Visible = true;
row.Name.Visible = true;
@@ -585,11 +584,11 @@ namespace Vocaluxe.PartyModes
row.GamePoints.Visible = true;
row.Pos.Text = GameState.ResultTable[i + PlayerTableOffset].Position.ToString() + ".";
row.Name.Text = profiles[GameState.ResultTable[i+PlayerTableOffset].PlayerID].PlayerName;
row.Rounds.Text = GameState.ResultTable[i+PlayerTableOffset].NumRounds.ToString();
row.Won.Text = GameState.ResultTable[i+PlayerTableOffset].NumWon.ToString();
row.SingPoints.Text = GameState.ResultTable[i+PlayerTableOffset].NumSingPoints.ToString();
row.GamePoints.Text = GameState.ResultTable[i+PlayerTableOffset].NumGamePoints.ToString();
row.Name.Text = profiles[GameState.ResultTable[i + PlayerTableOffset].PlayerID].PlayerName;
row.Rounds.Text = GameState.ResultTable[i + PlayerTableOffset].NumRounds.ToString();
row.Won.Text = GameState.ResultTable[i + PlayerTableOffset].NumWon.ToString();
row.SingPoints.Text = GameState.ResultTable[i + PlayerTableOffset].NumSingPoints.ToString();
row.GamePoints.Text = GameState.ResultTable[i + PlayerTableOffset].NumGamePoints.ToString();
}
else
{
@@ -602,8 +601,8 @@ namespace Vocaluxe.PartyModes
}
}
Buttons[htButtons(ButtonPlayerScrollUp)].Visible = PlayerTableOffset > 0;
Buttons[htButtons(ButtonPlayerScrollDown)].Visible = GameState.ProfileIDs.Count - NumPlayerVisible - PlayerTableOffset > 0;
Buttons[ButtonPlayerScrollUp].Visible = PlayerTableOffset > 0;
Buttons[ButtonPlayerScrollDown].Visible = GameState.ProfileIDs.Count - NumPlayerVisible - PlayerTableOffset > 0;
}
private void ScrollPlayerTable(int Offset)
@@ -1,21 +1,22 @@
using System;
using System.Collections.Generic;
using System.Text;
using System.Windows.Forms;
using VocaluxeLib.Menu;
using Vocaluxe.Menu;
namespace Vocaluxe.PartyModes
namespace VocaluxeLib.PartyModes.Challenge
{
public class PartyScreenChallengeNames : CMenuParty
{
// Version number for theme files. Increment it, if you've changed something on the theme files!
const int ScreenVersion = 1;
protected override int _ScreenVersion
{
get { return 1; }
}
const string ButtonNext = "ButtonNext";
const string ButtonBack = "ButtonBack";
const string ButtonPlayerDestination = "ButtonPlayerDestination";
const string ButtonPlayerChoose = "ButtonPlayerChoose";
private const string ButtonNext = "ButtonNext";
private const string ButtonBack = "ButtonBack";
private const string ButtonPlayerDestination = "ButtonPlayerDestination";
private const string ButtonPlayerChoose = "ButtonPlayerChoose";
private List<CPlayerChooseButton> PlayerChooseButtons;
private List<CButton> PlayerDestinationButtons;
@@ -37,11 +38,11 @@ namespace Vocaluxe.PartyModes
private int PlayerChooseButtonsOffset = 0;
private CStatic chooseAvatarStatic;
private bool SelectingMouseActive = false;
private int OldMouseX = 0;
private int OldMouseY = 0;
private bool SelectingMouseActive;
private int OldMouseX;
private int OldMouseY;
private int SelectedPlayerNr = -1;
private bool ButtonsAdded = false;
private bool ButtonsAdded;
private int NumPlayer = 4;
@@ -53,11 +54,7 @@ namespace Vocaluxe.PartyModes
public int ProfileID;
}
public PartyScreenChallengeNames()
{
}
protected override void Init()
public override void Init()
{
base.Init();
@@ -68,10 +65,8 @@ namespace Vocaluxe.PartyModes
Data.ScreenNames.ProfileIDs = new List<int>();
_ThemeName = "PartyScreenChallengeNames";
List<string> buttons = new List<string>();
_ThemeButtons = new string[] { ButtonBack, ButtonNext, ButtonPlayerDestination, ButtonPlayerChoose };
_ScreenVersion = ScreenVersion;
_ThemeButtons = new string[] {ButtonBack, ButtonNext, ButtonPlayerDestination, ButtonPlayerChoose};
Data = new DataFromScreen();
FromScreenNames names = new FromScreenNames();
@@ -81,11 +76,6 @@ namespace Vocaluxe.PartyModes
Data.ScreenNames = names;
}
public override void LoadTheme(string XmlPath)
{
base.LoadTheme(XmlPath);
}
public override void DataToScreen(object ReceivedData)
{
DataToScreenNames config = new DataToScreenNames();
@@ -100,30 +90,22 @@ namespace Vocaluxe.PartyModes
NumPlayer = config.NumPlayer;
while (Data.ScreenNames.ProfileIDs.Count > NumPlayer)
{
Data.ScreenNames.ProfileIDs.RemoveAt(Data.ScreenNames.ProfileIDs.Count - 1);
}
}
catch (Exception e)
{
CBase.Log.LogError("Error in party mode screen challenge names. Can't cast received data from game mode " + _ThemeName + ". " + e.Message); ;
CBase.Log.LogError("Error in party mode screen challenge names. Can't cast received data from game mode " + ThemeName + ". " + e.Message);
}
}
}
public override bool HandleInput(KeyEvent KeyEvent)
public override bool HandleInput(KeyEvent keyEvent)
{
base.HandleInput(KeyEvent);
base.HandleInput(keyEvent);
if (KeyEvent.KeyPressed)
{
}
if (keyEvent.KeyPressed) {}
else
{
switch (KeyEvent.Key)
switch (keyEvent.Key)
{
case Keys.Back:
case Keys.Escape:
@@ -131,10 +113,10 @@ namespace Vocaluxe.PartyModes
break;
case Keys.Enter:
if (Buttons[htButtons(ButtonBack)].Selected)
if (Buttons[ButtonBack].Selected)
Back();
if (Buttons[htButtons(ButtonNext)].Selected)
if (Buttons[ButtonNext].Selected)
Next();
if (!OnAdd())
@@ -149,9 +131,9 @@ namespace Vocaluxe.PartyModes
return true;
}
public override bool HandleMouse(MouseEvent MouseEvent)
public override bool HandleMouse(MouseEvent mouseEvent)
{
base.HandleMouse(MouseEvent);
base.HandleMouse(mouseEvent);
/*
//Check if LeftButton is hold and Select-Mode inactive
@@ -182,13 +164,13 @@ namespace Vocaluxe.PartyModes
}*/
//Check if LeftButton is hold and Select-Mode active
if (MouseEvent.LBH && SelectingMouseActive)
if (mouseEvent.LBH && SelectingMouseActive)
{
//Update coords for Drag/Drop-Texture
chooseAvatarStatic.Rect.X += (MouseEvent.X - OldMouseX);
chooseAvatarStatic.Rect.Y += (MouseEvent.Y - OldMouseY);
OldMouseX = MouseEvent.X;
OldMouseY = MouseEvent.Y;
chooseAvatarStatic.Rect.X += mouseEvent.X - OldMouseX;
chooseAvatarStatic.Rect.Y += mouseEvent.Y - OldMouseY;
OldMouseX = mouseEvent.X;
OldMouseY = mouseEvent.Y;
}
// LeftButton isn't hold anymore, but Selec-Mode is still active -> "Drop" of Avatar
else if (SelectingMouseActive)
@@ -200,10 +182,10 @@ namespace Vocaluxe.PartyModes
for (int i = 0; i < PlayerDestinationButtons.Count; i++)
{
//Check first, if area is "active"
if (PlayerDestinationButtons[i].Visible == true)
if (PlayerDestinationButtons[i].Visible)
{
//Check if Mouse is in area
if (CHelper.IsInBounds(PlayerDestinationButtons[i].Rect, MouseEvent))
if (CHelper.IsInBounds(PlayerDestinationButtons[i].Rect, mouseEvent))
{
int added = -1;
//Add Player-ID to list.
@@ -236,22 +218,20 @@ namespace Vocaluxe.PartyModes
chooseAvatarStatic.Visible = false;
}
if (MouseEvent.LB && IsMouseOver(MouseEvent))
if (mouseEvent.LB && IsMouseOver(mouseEvent))
{
if (Buttons[htButtons(ButtonBack)].Selected)
if (Buttons[ButtonBack].Selected)
Back();
if (Buttons[htButtons(ButtonNext)].Selected)
if (Buttons[ButtonNext].Selected)
Next();
if (!OnAdd())
OnRemove();
}
if (MouseEvent.RB)
{
if (mouseEvent.RB)
Back();
}
return true;
}
@@ -286,20 +266,15 @@ namespace Vocaluxe.PartyModes
return true;
}
public override void OnClose()
{
base.OnClose();
}
private void AddButtonPlayerDestination()
{
Buttons[htButtons(ButtonPlayerDestination)].Visible = false;
Buttons[ButtonPlayerDestination].Visible = false;
PlayerDestinationButtons = new List<CButton>();
int row = 0;
int column = 0;
for (int i = 1; i <= _PartyMode.GetMaxPlayer(); i++)
{
CButton b = GetNewButton(Buttons[htButtons(ButtonPlayerDestination)]);
CButton b = GetNewButton(Buttons[ButtonPlayerDestination]);
b.Rect.X = PlayerDestinationButtonsFirstX + column * (b.Rect.W + PlayerDestinationButtonsSpaceH);
b.Rect.Y = PlayerDestinationButtonsFirstY + row * (b.Rect.H + PlayerDestinationButtonsSpaceW);
PlayerDestinationButtons.Add(b);
@@ -317,13 +292,13 @@ namespace Vocaluxe.PartyModes
private void AddButtonPlayerChoose()
{
Buttons[htButtons(ButtonPlayerChoose)].Visible = false;
Buttons[ButtonPlayerChoose].Visible = false;
PlayerChooseButtons = new List<CPlayerChooseButton>();
int row = 0;
int column = 0;
for (int i = 1; i <= PlayerChooseButtonsNumH * PlayerChooseButtonsNumW; i++)
{
CButton b = GetNewButton(Buttons[htButtons(ButtonPlayerChoose)]);
CButton b = GetNewButton(Buttons[ButtonPlayerChoose]);
b.Rect.X = PlayerChooseButtonsFirstX + column * (b.Rect.W + PlayerChooseButtonsSpaceH);
b.Rect.Y = PlayerChooseButtonsFirstY + row * (b.Rect.H + PlayerChooseButtonsSpaceW);
CPlayerChooseButton pcb = new CPlayerChooseButton();
@@ -345,15 +320,12 @@ namespace Vocaluxe.PartyModes
private void UpdateButtonPlayerChoose()
{
UpdateVisibleProfiles();
if ((PlayerChooseButtonsNumW * PlayerChooseButtonsNumH) * (PlayerChooseButtonsOffset + 1) - PlayerChooseButtonsVisibleProfiles.Count >= (PlayerChooseButtonsNumW * PlayerChooseButtonsNumH) * PlayerChooseButtonsOffset)
{
if ((PlayerChooseButtonsNumW * PlayerChooseButtonsNumH) * (PlayerChooseButtonsOffset + 1) - PlayerChooseButtonsVisibleProfiles.Count >=
(PlayerChooseButtonsNumW * PlayerChooseButtonsNumH) * PlayerChooseButtonsOffset)
UpdateButtonPlayerChoose(PlayerChooseButtonsOffset - 1);
}
else
{
UpdateButtonPlayerChoose(PlayerChooseButtonsOffset);
}
}
private void UpdateButtonPlayerChoose(int Offset)
{
@@ -379,10 +351,10 @@ namespace Vocaluxe.PartyModes
{
PlayerChooseButtons[i].ProfileID = -1;
PlayerChooseButtons[i].Button.Text.Text = String.Empty;
PlayerChooseButtons[i].Button.Texture = Buttons[htButtons(ButtonPlayerChoose)].Texture;
PlayerChooseButtons[i].Button.STexture = Buttons[htButtons(ButtonPlayerChoose)].STexture;
PlayerChooseButtons[i].Button.Color = Buttons[htButtons(ButtonPlayerChoose)].Color;
PlayerChooseButtons[i].Button.SColor = Buttons[htButtons(ButtonPlayerChoose)].SColor;
PlayerChooseButtons[i].Button.Texture = Buttons[ButtonPlayerChoose].Texture;
PlayerChooseButtons[i].Button.STexture = Buttons[ButtonPlayerChoose].STexture;
PlayerChooseButtons[i].Button.Color = Buttons[ButtonPlayerChoose].Color;
PlayerChooseButtons[i].Button.SColor = Buttons[ButtonPlayerChoose].SColor;
PlayerChooseButtons[i].Button.Enabled = false;
}
}
@@ -411,11 +383,9 @@ namespace Vocaluxe.PartyModes
}
}
if (visible)
{
PlayerChooseButtonsVisibleProfiles.Add(i);
}
}
}
private void UpdateButtonPlayerDestination()
{
@@ -448,10 +418,10 @@ namespace Vocaluxe.PartyModes
}
else
{
PlayerDestinationButtons[i].Color = Buttons[htButtons(ButtonPlayerDestination)].Color;
PlayerDestinationButtons[i].SColor = Buttons[htButtons(ButtonPlayerDestination)].SColor;
PlayerDestinationButtons[i].Texture = Buttons[htButtons(ButtonPlayerDestination)].Texture;
PlayerDestinationButtons[i].STexture = Buttons[htButtons(ButtonPlayerDestination)].STexture;
PlayerDestinationButtons[i].Color = Buttons[ButtonPlayerDestination].Color;
PlayerDestinationButtons[i].SColor = Buttons[ButtonPlayerDestination].SColor;
PlayerDestinationButtons[i].Texture = Buttons[ButtonPlayerDestination].Texture;
PlayerDestinationButtons[i].STexture = Buttons[ButtonPlayerDestination].STexture;
PlayerDestinationButtons[i].Text.Text = String.Empty;
PlayerDestinationButtons[i].Enabled = false;
}
@@ -462,11 +432,11 @@ namespace Vocaluxe.PartyModes
{
if (Data.ScreenNames.ProfileIDs.Count == NumPlayer)
{
Buttons[htButtons(ButtonNext)].Visible = true;
SetInteractionToButton(Buttons[htButtons(ButtonNext)]);
Buttons[ButtonNext].Visible = true;
SetInteractionToButton(Buttons[ButtonNext]);
}
else
Buttons[htButtons(ButtonNext)].Visible = false;
Buttons[ButtonNext].Visible = false;
}
private bool OnAdd()
@@ -521,14 +491,14 @@ namespace Vocaluxe.PartyModes
{
Data.ScreenNames.FadeToConfig = true;
Data.ScreenNames.FadeToMain = false;
_PartyMode.DataFromScreen(_ThemeName, Data);
_PartyMode.DataFromScreen(ThemeName, Data);
}
private void Next()
{
Data.ScreenNames.FadeToConfig = false;
Data.ScreenNames.FadeToMain = true;
_PartyMode.DataFromScreen(_ThemeName, Data);
_PartyMode.DataFromScreen(ThemeName, Data);
}
}
}
@@ -0,0 +1,809 @@
<StyleCopSettings Version="105">
<Analyzers>
<Analyzer AnalyzerId="StyleCop.CSharp.DocumentationRules">
<Rules>
<Rule Name="ElementsMustBeDocumented">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="PartialElementsMustBeDocumented">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="EnumerationItemsMustBeDocumented">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="DocumentationMustContainValidXml">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ElementDocumentationMustHaveSummary">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="PartialElementDocumentationMustHaveSummary">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ElementDocumentationMustHaveSummaryText">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="PartialElementDocumentationMustHaveSummaryText">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ElementDocumentationMustNotHaveDefaultSummary">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ElementParametersMustBeDocumented">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ElementParameterDocumentationMustMatchElementParameters">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ElementParameterDocumentationMustDeclareParameterName">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ElementParameterDocumentationMustHaveText">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ElementReturnValueMustBeDocumented">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ElementReturnValueDocumentationMustHaveText">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="VoidReturnValueMustNotBeDocumented">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="GenericTypeParametersMustBeDocumented">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="GenericTypeParametersMustBeDocumentedPartialClass">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="GenericTypeParameterDocumentationMustMatchTypeParameters">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="GenericTypeParameterDocumentationMustDeclareParameterName">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="GenericTypeParameterDocumentationMustHaveText">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="PropertySummaryDocumentationMustMatchAccessors">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="PropertySummaryDocumentationMustOmitSetAccessorWithRestrictedAccess">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ElementDocumentationMustNotBeCopiedAndPasted">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="SingleLineCommentsMustNotUseDocumentationStyleSlashes">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="DocumentationTextMustNotBeEmpty">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="DocumentationTextMustContainWhitespace">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="DocumentationMustMeetCharacterPercentage">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ConstructorSummaryDocumentationMustBeginWithStandardText">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="DestructorSummaryDocumentationMustBeginWithStandardText">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="DocumentationHeadersMustNotContainBlankLines">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="IncludedDocumentationXPathDoesNotExist">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="IncludeNodeDoesNotContainValidFileAndPath">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="InheritDocMustBeUsedWithInheritingClass">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ElementDocumentationMustBeSpelledCorrectly">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="FileMustHaveHeader">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="FileHeaderMustShowCopyright">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="FileHeaderMustHaveCopyrightText">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="FileHeaderMustContainFileName">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="FileHeaderFileNameDocumentationMustMatchFileName">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="FileHeaderMustHaveValidCompanyText">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="FileHeaderFileNameDocumentationMustMatchTypeName">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
</Rules>
<AnalyzerSettings />
</Analyzer>
<Analyzer AnalyzerId="StyleCop.CSharp.NamingRules">
<Rules>
<Rule Name="FieldNamesMustNotBeginWithUnderscore">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ElementMustBeginWithUpperCaseLetter">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ElementMustBeginWithLowerCaseLetter">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="InterfaceNamesMustBeginWithI">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ConstFieldNamesMustBeginWithUpperCaseLetter">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="NonPrivateReadonlyFieldsMustBeginWithUpperCaseLetter">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="FieldNamesMustNotUseHungarianNotation">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="FieldNamesMustBeginWithLowerCaseLetter">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="AccessibleFieldsMustBeginWithUpperCaseLetter">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="VariableNamesMustNotBePrefixed">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="FieldNamesMustNotContainUnderscore">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="StaticReadonlyFieldsMustBeginWithUpperCaseLetter">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
</Rules>
<AnalyzerSettings />
</Analyzer>
<Analyzer AnalyzerId="StyleCop.CSharp.LayoutRules">
<Rules>
<Rule Name="CurlyBracketsForMultiLineStatementsMustNotShareLine">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="StatementMustNotBeOnSingleLine">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ElementMustNotBeOnSingleLine">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="CurlyBracketsMustNotBeOmitted">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="AllAccessorsMustBeMultiLineOrSingleLine">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="OpeningCurlyBracketsMustNotBeFollowedByBlankLine">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ElementDocumentationHeadersMustNotBeFollowedByBlankLine">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="CodeMustNotContainMultipleBlankLinesInARow">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ClosingCurlyBracketsMustNotBePrecededByBlankLine">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="OpeningCurlyBracketsMustNotBePrecededByBlankLine">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ChainedStatementBlocksMustNotBePrecededByBlankLine">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="WhileDoFooterMustNotBePrecededByBlankLine">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="SingleLineCommentsMustNotBeFollowedByBlankLine">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ClosingCurlyBracketMustBeFollowedByBlankLine">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ElementDocumentationHeaderMustBePrecededByBlankLine">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="SingleLineCommentMustBePrecededByBlankLine">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ElementsMustBeSeparatedByBlankLine">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="CodeMustNotContainBlankLinesAtStartOfFile">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="CodeMustNotContainBlankLinesAtEndOfFile">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
</Rules>
<AnalyzerSettings />
</Analyzer>
<Analyzer AnalyzerId="StyleCop.CSharp.MaintainabilityRules">
<Rules>
<Rule Name="AccessModifierMustBeDeclared">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="FieldsMustBePrivate">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="CodeAnalysisSuppressionMustHaveJustification">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="DebugAssertMustProvideMessageText">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="DebugFailMustProvideMessageText">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="FileMayOnlyContainASingleClass">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="FileMayOnlyContainASingleNamespace">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="StatementMustNotUseUnnecessaryParenthesis">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ArithmeticExpressionsMustDeclarePrecedence">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ConditionalExpressionsMustDeclarePrecedence">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="RemoveDelegateParenthesisWhenPossible">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="AttributeConstructorMustNotUseUnnecessaryParenthesis">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="RemoveUnnecessaryCode">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
</Rules>
<AnalyzerSettings />
</Analyzer>
<Analyzer AnalyzerId="StyleCop.CSharp.OrderingRules">
<Rules>
<Rule Name="UsingDirectivesMustBePlacedWithinNamespace">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ElementsMustAppearInTheCorrectOrder">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ElementsMustBeOrderedByAccess">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ConstantsMustAppearBeforeFields">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="StaticElementsMustAppearBeforeInstanceElements">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="DeclarationKeywordsMustFollowOrder">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ProtectedMustComeBeforeInternal">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="PropertyAccessorsMustFollowOrder">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="EventAccessorsMustFollowOrder">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="StaticReadonlyElementsMustAppearBeforeStaticNonReadonlyElements">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="InstanceReadonlyElementsMustAppearBeforeInstanceNonReadonlyElements">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="SystemUsingDirectivesMustBePlacedBeforeOtherUsingDirectives">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="UsingAliasDirectivesMustBePlacedAfterOtherUsingDirectives">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="UsingDirectivesMustBeOrderedAlphabeticallyByNamespace">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="UsingAliasDirectivesMustBeOrderedAlphabeticallyByAliasName">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
</Rules>
<AnalyzerSettings />
</Analyzer>
<Analyzer AnalyzerId="StyleCop.CSharp.ReadabilityRules">
<Rules>
<Rule Name="CommentsMustContainText">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="DoNotPrefixCallsWithBaseUnlessLocalImplementationExists">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="PrefixLocalCallsWithThis">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="PrefixCallsCorrectly">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="OpeningParenthesisMustBeOnDeclarationLine">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ClosingParenthesisMustBeOnLineOfLastParameter">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ClosingParenthesisMustBeOnLineOfOpeningParenthesis">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="CommaMustBeOnSameLineAsPreviousParameter">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ParameterListMustFollowDeclaration">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ParameterMustFollowComma">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="SplitParametersMustStartOnLineAfterDeclaration">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ParametersMustBeOnSameLineOrSeparateLines">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ParameterMustNotSpanMultipleLines">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="QueryClauseMustFollowPreviousClause">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="QueryClausesMustBeOnSeparateLinesOrAllOnOneLine">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="QueryClauseMustBeginOnNewLineWhenPreviousClauseSpansMultipleLines">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="QueryClausesSpanningMultipleLinesMustBeginOnOwnLine">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="DoNotPlaceRegionsWithinElements">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="CodeMustNotContainEmptyStatements">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="CodeMustNotContainMultipleStatementsOnOneLine">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="BlockStatementsMustNotContainEmbeddedComments">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="BlockStatementsMustNotContainEmbeddedRegions">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="UseStringEmptyForEmptyStrings">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="UseBuiltInTypeAlias">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="UseShorthandForNullableTypes">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
</Rules>
<AnalyzerSettings />
</Analyzer>
<Analyzer AnalyzerId="StyleCop.CSharp.SpacingRules">
<Rules>
<Rule Name="KeywordsMustBeSpacedCorrectly">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="CommasMustBeSpacedCorrectly">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="SemicolonsMustBeSpacedCorrectly">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="SymbolsMustBeSpacedCorrectly">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="DocumentationLinesMustBeginWithSingleSpace">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="SingleLineCommentsMustBeginWithSingleSpace">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="PreprocessorKeywordsMustNotBePrecededBySpace">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="OperatorKeywordMustBeFollowedBySpace">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="OpeningParenthesisMustBeSpacedCorrectly">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ClosingParenthesisMustBeSpacedCorrectly">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="OpeningSquareBracketsMustBeSpacedCorrectly">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ClosingSquareBracketsMustBeSpacedCorrectly">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="OpeningCurlyBracketsMustBeSpacedCorrectly">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ClosingCurlyBracketsMustBeSpacedCorrectly">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="OpeningGenericBracketsMustBeSpacedCorrectly">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ClosingGenericBracketsMustBeSpacedCorrectly">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="OpeningAttributeBracketsMustBeSpacedCorrectly">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ClosingAttributeBracketsMustBeSpacedCorrectly">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="NullableTypeSymbolsMustNotBePrecededBySpace">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="MemberAccessSymbolsMustBeSpacedCorrectly">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="IncrementDecrementSymbolsMustBeSpacedCorrectly">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="NegativeSignsMustBeSpacedCorrectly">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="PositiveSignsMustBeSpacedCorrectly">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="DereferenceAndAccessOfSymbolsMustBeSpacedCorrectly">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ColonsMustBeSpacedCorrectly">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="CodeMustNotContainMultipleWhitespaceInARow">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="CodeMustNotContainSpaceAfterNewKeywordInImplicitlyTypedArrayAllocation">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="TabsMustNotBeUsed">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
</Rules>
<AnalyzerSettings />
</Analyzer>
</Analyzers>
</StyleCopSettings>
@@ -1,22 +1,19 @@
using System;
using System.Collections.Generic;
using System.Text;
using Vocaluxe.Menu;
namespace Vocaluxe.PartyModes
namespace VocaluxeLib.PartyModes.ChallengeMedley
{
public class ChallengeRounds
{
private Random _Rand;
private int _NumPlayer;
private readonly Random _Rand;
private readonly int _NumPlayer;
public List<Combination> Rounds;
public ChallengeRounds(int NumRounds, int NumPlayer, int NumPlayerAtOnce)
{
Rounds = new List<Combination>();
_Rand = new Random(System.DateTime.Now.Millisecond);
_Rand = new Random(DateTime.Now.Millisecond);
if (NumPlayerAtOnce < 1 || NumRounds < 1 || NumPlayer == 0)
_NumPlayer = 0;
@@ -41,27 +38,20 @@ namespace Vocaluxe.PartyModes
Rounds.Add(Combinations.GetNextCombination(null));
for (int i = 1; i < NumRounds; i++)
{
Rounds.Add(Combinations.GetNextCombination(GetPlayerDemand(i)));
}
}
private List<int> GetPlayerDemand(int RoundIndex)
{
List<int> NumPlayed = new List<int>(_NumPlayer);
for (int i = 0; i < _NumPlayer; i++)
{
NumPlayed.Add(0);
}
for (int i = 0; i < RoundIndex; i++)
{
foreach (int PlayerIndex in Rounds[i].Player)
{
NumPlayed[PlayerIndex]++;
}
}
int max = 0;
foreach (int p in NumPlayed)
@@ -95,7 +85,6 @@ namespace Vocaluxe.PartyModes
}
else
last.Add(i);
}
}
@@ -129,10 +118,10 @@ namespace Vocaluxe.PartyModes
class Combinations
{
private List<Combination> _Combs;
private Random _Rand;
private int _NumPlayer;
private int _NumMics;
private readonly List<Combination> _Combs;
private readonly Random _Rand;
private readonly int _NumPlayer;
private readonly int _NumMics;
public Combinations(int NumPlayer, int NumMics, Random Rand)
{
@@ -150,9 +139,7 @@ namespace Vocaluxe.PartyModes
Combination combs = new Combination();
if (_NumPlayer == _NumMics)
{
return _Combs[0];
}
//filter against PlayerNrDemand
List<Combination> combsFiltered = new List<Combination>();
@@ -179,18 +166,14 @@ namespace Vocaluxe.PartyModes
if (combsFiltered.Count == 0)
{
for (int i = 0; i < _Combs.Count; i++)
{
combsFiltered.Add(_Combs[i]);
}
}
int num = combsFiltered.Count;
int rand = _Rand.Next(num);
Combination c = new Combination();
for (int i = 0; i < combsFiltered[rand].Player.Count; i++)
{
c.Player.Add(combsFiltered[rand].Player[i]);
}
_Combs.Remove(combsFiltered[rand]);
return combsFiltered[rand];
@@ -209,10 +192,8 @@ namespace Vocaluxe.PartyModes
for (int j = 0; j < _NumPlayer; j++)
{
if ((i & (1 << j)) > 0)
{
c.Player.Add(j);
}
}
if (c.Player.Count == _NumMics)
_Combs.Add(c);
@@ -243,9 +224,7 @@ namespace Vocaluxe.PartyModes
{
bool result = true;
foreach (int p in PlayerIndices)
{
result &= IsAvailable(p);
}
return result;
}
@@ -253,9 +232,7 @@ namespace Vocaluxe.PartyModes
{
bool result = false;
foreach (int p in PlayerIndices)
{
result |= IsAvailable(p);
}
return result;
}
}
@@ -1,13 +1,16 @@
using System;
using System.Collections.Generic;
using System.Text;
using System.Runtime.InteropServices;
using VocaluxeLib.Menu;
using VocaluxeLib.Menu.SongMenu;
using Vocaluxe.Menu;
using Vocaluxe.Menu.SongMenu;
[assembly: ComVisible(false)]
namespace Vocaluxe.PartyModes
namespace VocaluxeLib.PartyModes.ChallengeMedley
{
#region Communication
#region ToScreen
public struct DataToScreenConfig
{
@@ -53,17 +56,14 @@ namespace Vocaluxe.PartyModes
{
res = row.NumSingPoints.CompareTo(NumSingPoints);
if (res == 0)
{
res = row.NumWon.CompareTo(NumWon);
}
}
return res;
}
throw new ArgumentException("object is not a ResultTableRow");
}
}
#endregion ToScreen
#region FromScreen
@@ -94,9 +94,10 @@ namespace Vocaluxe.PartyModes
public bool FadeToNameSelection;
}
#endregion FromScreen
#endregion Communication
public sealed class PartyModeChallenge : CPartyMode
public sealed class PartyModeChallengeMedley : CPartyMode
{
private const int MaxPlayer = 12;
private const int MinPlayer = 1;
@@ -105,7 +106,7 @@ namespace Vocaluxe.PartyModes
private const int MaxNumRounds = 100;
private const int NumSongs = 5;
enum EStage
private enum EStage
{
NotStarted,
Config,
@@ -114,7 +115,7 @@ namespace Vocaluxe.PartyModes
Singing
}
struct Data
private struct Data
{
public int NumPlayer;
public int NumPlayerAtOnce;
@@ -130,7 +131,7 @@ namespace Vocaluxe.PartyModes
public int[] CatSongIndices;
}
struct Stats
private struct Stats
{
public int ProfileID;
public int SingPoints;
@@ -145,17 +146,17 @@ namespace Vocaluxe.PartyModes
private Data GameData;
private EStage _Stage;
public PartyModeChallenge()
public PartyModeChallengeMedley()
{
_ScreenSongOptions.Selection.RandomOnly = false;
_ScreenSongOptions.Selection.PartyMode = true;
_ScreenSongOptions.Selection.CategoryChangeAllowed = true;
_ScreenSongOptions.Selection.NumJokers = new int[] { 5, 5 };
_ScreenSongOptions.Selection.TeamNames = new string[] { "foo", "bar" };
_ScreenSongOptions.Selection.NumJokers = new int[] {5, 5};
_ScreenSongOptions.Selection.TeamNames = new string[] {"foo", "bar"};
_ScreenSongOptions.Sorting.SearchString = String.Empty;
_ScreenSongOptions.Sorting.SearchActive = false;
_ScreenSongOptions.Sorting.ShowDuetSongs = false;
_ScreenSongOptions.Sorting.DuetOptions = EDuetOptions.NoDuets;
_Stage = EStage.NotStarted;
@@ -188,7 +189,7 @@ namespace Vocaluxe.PartyModes
ToScreenMain.ResultTable = new List<ResultTableRow>();
GameData.ResultTable = new List<ResultTableRow>();
CBase.Songs.SortSongs(ESongSorting.TR_CONFIG_NONE, EOffOn.TR_CONFIG_OFF, EOffOn.TR_CONFIG_OFF, String.Empty, false);
CBase.Songs.SortSongs(ESongSorting.TR_CONFIG_NONE, EOffOn.TR_CONFIG_OFF, EOffOn.TR_CONFIG_OFF, String.Empty, EDuetOptions.NoDuets);
CBase.Songs.SetCategory(0);
return true;
@@ -199,7 +200,7 @@ namespace Vocaluxe.PartyModes
DataFromScreen data = new DataFromScreen();
switch (ScreenName)
{
case "PartyScreenChallengeConfig":
case "PartyScreenChallengeMedleyConfig":
try
{
@@ -217,7 +218,7 @@ namespace Vocaluxe.PartyModes
}
break;
case "PartyScreenChallengeNames":
case "PartyScreenChallengeMedleyNames":
try
{
data = (DataFromScreen)Data;
@@ -237,7 +238,7 @@ namespace Vocaluxe.PartyModes
}
break;
case "PartyScreenChallengeMain":
case "PartyScreenChallengeMedleyMain":
try
{
data = (DataFromScreen)Data;
@@ -281,7 +282,7 @@ namespace Vocaluxe.PartyModes
switch (_Stage)
{
case EStage.NotStarted:
_Screens.TryGetValue("PartyScreenChallengeConfig", out Screen);
_Screens.TryGetValue("PartyScreenChallengeMedleyConfig", out Screen);
if (_Screens != null)
{
ToScreenConfig.NumPlayer = GameData.NumPlayer;
@@ -291,7 +292,7 @@ namespace Vocaluxe.PartyModes
}
break;
case EStage.Config:
_Screens.TryGetValue("PartyScreenChallengeNames", out Screen);
_Screens.TryGetValue("PartyScreenChallengeMedleyNames", out Screen);
if (_Screens != null)
{
ToScreenNames.NumPlayer = GameData.NumPlayer;
@@ -300,7 +301,7 @@ namespace Vocaluxe.PartyModes
}
break;
case EStage.Names:
_Screens.TryGetValue("PartyScreenChallengeMain", out Screen);
_Screens.TryGetValue("PartyScreenChallengeMedleyMain", out Screen);
if (_Screens != null)
{
CBase.Songs.ResetPartySongSung();
@@ -322,7 +323,7 @@ namespace Vocaluxe.PartyModes
//nothing to do
break;
case EStage.Singing:
_Screens.TryGetValue("PartyScreenChallengeMain", out Screen);
_Screens.TryGetValue("PartyScreenChallengeMedleyMain", out Screen);
if (_Screens != null)
{
UpdateScores();
@@ -332,8 +333,6 @@ namespace Vocaluxe.PartyModes
Screen.DataToScreen(ToScreenMain);
}
break;
default:
break;
}
return Screen;
@@ -444,9 +443,7 @@ namespace Vocaluxe.PartyModes
_ScreenSongOptions.Selection.CategoryChangeAllowed = false;
}
public override void SongSelected(int SongID)
{
}
public override void SongSelected(int SongID) {}
public override void LeavingHighscore()
{
@@ -525,7 +522,6 @@ namespace Vocaluxe.PartyModes
if (mode == EGameMode.TR_GAMEMODE_MEDLEY)
IDs.Add(VisSongs[i].ID);
}
}
if (IDs.Count == 0)
@@ -553,30 +549,30 @@ namespace Vocaluxe.PartyModes
switch (GameData.NumPlayerAtOnce)
{
case 1:
_ScreenSongOptions.Selection.NumJokers = new int[] { 10 };
_ScreenSongOptions.Selection.NumJokers = new int[] {10};
break;
case 2:
_ScreenSongOptions.Selection.NumJokers = new int[] { 5, 5 };
_ScreenSongOptions.Selection.NumJokers = new int[] {5, 5};
break;
case 3:
_ScreenSongOptions.Selection.NumJokers = new int[] { 4, 4, 4 };
_ScreenSongOptions.Selection.NumJokers = new int[] {4, 4, 4};
break;
case 4:
_ScreenSongOptions.Selection.NumJokers = new int[] { 3, 3, 3, 3 };
_ScreenSongOptions.Selection.NumJokers = new int[] {3, 3, 3, 3};
break;
case 5:
_ScreenSongOptions.Selection.NumJokers = new int[] { 2, 2, 2, 2, 2 };
_ScreenSongOptions.Selection.NumJokers = new int[] {2, 2, 2, 2, 2};
break;
case 6:
_ScreenSongOptions.Selection.NumJokers = new int[] { 2, 2, 2, 2, 2, 2 };
_ScreenSongOptions.Selection.NumJokers = new int[] {2, 2, 2, 2, 2, 2};
break;
default:
_ScreenSongOptions.Selection.NumJokers = new int[] { 5, 5 };
_ScreenSongOptions.Selection.NumJokers = new int[] {5, 5};
break;
}
}
@@ -587,13 +583,13 @@ namespace Vocaluxe.PartyModes
if (profiles == null)
{
_ScreenSongOptions.Selection.TeamNames = new string[] { "foo", "bar" };
_ScreenSongOptions.Selection.TeamNames = new string[] {"foo", "bar"};
return;
}
if (GameData.NumPlayerAtOnce < 1 || GameData.ProfileIDs.Count < GameData.NumPlayerAtOnce || profiles.Length < GameData.NumPlayerAtOnce)
{
_ScreenSongOptions.Selection.TeamNames = new string[] { "foo", "bar" };
_ScreenSongOptions.Selection.TeamNames = new string[] {"foo", "bar"};
return;
}
@@ -630,15 +626,13 @@ namespace Vocaluxe.PartyModes
GameData.ResultTable.Add(row);
}
GameData.Results = new int[GameData.NumRounds, GameData.NumPlayerAtOnce];
GameData.Results = new int[GameData.NumRounds,GameData.NumPlayerAtOnce];
for (int i = 0; i < GameData.NumRounds; i++)
{
for (int j = 0; j < GameData.NumPlayerAtOnce; j++)
{
GameData.Results[i, j] = 0;
}
}
}
else
{
CPoints GamePoints = CBase.Game.GetPoints();
@@ -659,10 +653,8 @@ namespace Vocaluxe.PartyModes
{
SPlayer[] temp = GamePoints.GetPlayer(i, GameData.NumPlayerAtOnce);
for (int p = 0; p < GameData.NumPlayerAtOnce; p++)
{
results[p].Points += temp[p].Points;
}
}
for (int j = 0; j < GameData.NumPlayerAtOnce; j++)
{
@@ -705,7 +697,7 @@ namespace Vocaluxe.PartyModes
int pos = 1;
int lastPoints = 0;
int lastSingPoints = 0;
for (int i = 0; i < GameData.ResultTable.Count; i++ )
for (int i = 0; i < GameData.ResultTable.Count; i++)
{
if (lastPoints > GameData.ResultTable[i].NumGamePoints || lastSingPoints > GameData.ResultTable[i].NumSingPoints)
pos++;
@@ -718,7 +710,7 @@ namespace Vocaluxe.PartyModes
private List<Stats> GetPointsForPlayer(SPlayer[] Results)
{
List<Stats> result = new List<Stats>();
for(int i = 0; i < GameData.NumPlayerAtOnce; i++)
for (int i = 0; i < GameData.NumPlayerAtOnce; i++)
{
Stats stat = new Stats();
stat.ProfileID = Results[i].ProfileID;
@@ -765,7 +757,6 @@ namespace Vocaluxe.PartyModes
}
return result;
}
@@ -775,10 +766,8 @@ namespace Vocaluxe.PartyModes
{
GameData.CatSongIndices = new int[CBase.Songs.GetNumCategories()];
for (int i = 0; i < GameData.CatSongIndices.Length; i++)
{
GameData.CatSongIndices[i] = -1;
}
}
if (CBase.Songs.GetNumCategories() == 0 || _ScreenSongOptions.Sorting.Tabs == EOffOn.TR_CONFIG_OFF)
GameData.CatSongIndices = null;
@@ -8,11 +8,10 @@
<ProjectGuid>{6F3E1874-F28A-40E9-AFBD-31934D593678}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>PartyModeChallenge</RootNamespace>
<AssemblyName>PartyModeChallenge</AssemblyName>
<TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
<TargetFrameworkProfile>
</TargetFrameworkProfile>
<RootNamespace>VocaluxeLib.PartyModes.ChallengeMedley</RootNamespace>
<AssemblyName>ChallengeMedley</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<TargetFrameworkProfile>Client</TargetFrameworkProfile>
<FileAlignment>512</FileAlignment>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'DebugWin|x86' ">
@@ -20,7 +19,7 @@
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>..\..\Output\PartyModes\ChallengeMedley\Code</OutputPath>
<OutputPath>bin</OutputPath>
<DefineConstants>TRACE;DEBUG;WIN</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
@@ -30,7 +29,7 @@
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>none</DebugType>
<Optimize>true</Optimize>
<OutputPath>..\..\Output\PartyModes\ChallengeMedley\Code</OutputPath>
<OutputPath>bin</OutputPath>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<UseVSHostingProcess>false</UseVSHostingProcess>
@@ -42,17 +41,18 @@
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>..\..\Output\PartyModes\ChallengeMedley\Code</OutputPath>
<OutputPath>bin</OutputPath>
<DefineConstants>TRACE;DEBUG;WIN</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
<CodeAnalysisRuleSet>..\..\CheckingRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'ReleaseWin|x64'">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>none</DebugType>
<Optimize>true</Optimize>
<OutputPath>..\..\Output\PartyModes\ChallengeMedley\Code</OutputPath>
<OutputPath>bin</OutputPath>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<UseVSHostingProcess>false</UseVSHostingProcess>
@@ -64,7 +64,7 @@
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>..\..\Output\PartyModes\ChallengeMedley\Code</OutputPath>
<OutputPath>bin</OutputPath>
<DefineConstants>TRACE;DEBUG;LINUX</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
@@ -74,7 +74,7 @@
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>none</DebugType>
<Optimize>true</Optimize>
<OutputPath>..\..\Output\PartyModes\ChallengeMedley\Code</OutputPath>
<OutputPath>bin</OutputPath>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<UseVSHostingProcess>false</UseVSHostingProcess>
@@ -86,7 +86,7 @@
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>..\..\Output\PartyModes\ChallengeMedley\Code</OutputPath>
<OutputPath>bin</OutputPath>
<DefineConstants>TRACE;DEBUG;LINUX</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
@@ -96,7 +96,7 @@
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>none</DebugType>
<Optimize>true</Optimize>
<OutputPath>..\..\Output\PartyModes\ChallengeMedley\Code</OutputPath>
<OutputPath>bin</OutputPath>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<UseVSHostingProcess>false</UseVSHostingProcess>
@@ -107,21 +107,12 @@
<StartupObject />
</PropertyGroup>
<ItemGroup>
<Compile Include="ChallengeRounds.cs">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Compile>
<Compile Include="PartyModeChallenge.cs">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Compile>
<Compile Include="PartyScreenChallengeConfig.cs">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Compile>
<Compile Include="PartyScreenChallengeMain.cs">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Compile>
<Compile Include="PartyScreenChallengeNames.cs">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Compile>
<Compile Include="ChallengeRounds.cs" />
<Compile Include="GlobalSuppressions.cs" />
<Compile Include="PartyModeChallengeMedley.cs" />
<Compile Include="PartyScreenChallengeMedleyConfig.cs" />
<Compile Include="PartyScreenChallengeMedleyMain.cs" />
<Compile Include="PartyScreenChallengeMedleyNames.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\VocaluxeLib\VocaluxeLib.csproj">
@@ -137,7 +128,14 @@
<Reference Include="System.Windows.Forms" />
<Reference Include="System.XML" />
</ItemGroup>
<ItemGroup>
<Folder Include="Properties\" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
<PostBuildEvent>cd $(SolutionDir)Partymodes\
xcopy "$(ProjectDir)*.cs" "$(SolutionDir)Output\PartyModes\$(TargetName)\Code\" /EXCLUDE:Excludes.txt /I /Y</PostBuildEvent>
</PropertyGroup>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
@@ -1,41 +1,35 @@
using System;
using System.Collections.Generic;
using System.Text;
using System.Windows.Forms;
using VocaluxeLib.Menu;
using Vocaluxe.Menu;
namespace Vocaluxe.PartyModes
namespace VocaluxeLib.PartyModes.ChallengeMedley
{
public class PartyScreenChallengeConfig : CMenuParty
public class PartyScreenChallengeMedleyConfig : CMenuParty
{
// Version number for theme files. Increment it, if you've changed something on the theme files!
const int ScreenVersion = 1;
protected override int _ScreenVersion
{
get { return 1; }
}
const string SelectSlideNumPlayers = "SelectSlideNumPlayers";
const string SelectSlideNumMics = "SelectSlideNumMics";
const string SelectSlideNumRounds = "SelectSlideNumRounds";
const string ButtonNext = "ButtonNext";
const string ButtonBack = "ButtonBack";
private const string SelectSlideNumPlayers = "SelectSlideNumPlayers";
private const string SelectSlideNumMics = "SelectSlideNumMics";
private const string SelectSlideNumRounds = "SelectSlideNumRounds";
private const string ButtonNext = "ButtonNext";
private const string ButtonBack = "ButtonBack";
private int _MaxNumMics = 2;
private int _MaxNumRounds = 100;
private int _RoundSteps = 1;
DataFromScreen Data;
private DataFromScreen Data;
public PartyScreenChallengeConfig()
{
}
protected override void Init()
public override void Init()
{
base.Init();
_ThemeName = "PartyScreenChallengeConfig";
_ThemeSelectSlides = new string[] { SelectSlideNumPlayers, SelectSlideNumMics, SelectSlideNumRounds };
_ThemeButtons = new string[] { ButtonNext, ButtonBack };
_ScreenVersion = ScreenVersion;
_ThemeSelectSlides = new string[] {SelectSlideNumPlayers, SelectSlideNumMics, SelectSlideNumRounds};
_ThemeButtons = new string[] {ButtonNext, ButtonBack};
Data = new DataFromScreen();
FromScreenConfig config = new FromScreenConfig();
@@ -45,11 +39,6 @@ namespace Vocaluxe.PartyModes
Data.ScreenConfig = config;
}
public override void LoadTheme(string XmlPath)
{
base.LoadTheme(XmlPath);
}
public override void DataToScreen(object ReceivedData)
{
DataToScreenConfig config = new DataToScreenConfig();
@@ -63,22 +52,18 @@ namespace Vocaluxe.PartyModes
}
catch (Exception e)
{
CBase.Log.LogError("Error in party mode screen challenge config. Can't cast received data from game mode " + _ThemeName + ". " + e.Message);;
CBase.Log.LogError("Error in party mode screen challenge config. Can't cast received data from game mode " + ThemeName + ". " + e.Message);
}
}
}
public override bool HandleInput(KeyEvent KeyEvent)
public override bool HandleInput(KeyEvent keyEvent)
{
base.HandleInput(KeyEvent);
base.HandleInput(keyEvent);
if (KeyEvent.KeyPressed)
{
}
if (keyEvent.KeyPressed) {}
else
{
switch (KeyEvent.Key)
switch (keyEvent.Key)
{
case Keys.Back:
case Keys.Escape:
@@ -88,10 +73,10 @@ namespace Vocaluxe.PartyModes
case Keys.Enter:
UpdateSlides();
if (Buttons[htButtons(ButtonBack)].Selected)
if (Buttons[ButtonBack].Selected)
Back();
if (Buttons[htButtons(ButtonNext)].Selected)
if (Buttons[ButtonNext].Selected)
Next();
break;
@@ -107,24 +92,22 @@ namespace Vocaluxe.PartyModes
return true;
}
public override bool HandleMouse(MouseEvent MouseEvent)
public override bool HandleMouse(MouseEvent mouseEvent)
{
base.HandleMouse(MouseEvent);
base.HandleMouse(mouseEvent);
if (MouseEvent.LB && IsMouseOver(MouseEvent))
if (mouseEvent.LB && IsMouseOver(mouseEvent))
{
UpdateSlides();
if (Buttons[htButtons(ButtonBack)].Selected)
if (Buttons[ButtonBack].Selected)
Back();
if (Buttons[htButtons(ButtonNext)].Selected)
if (Buttons[ButtonNext].Selected)
Next();
}
if (MouseEvent.RB)
{
if (mouseEvent.RB)
Back();
}
return true;
}
@@ -153,20 +136,13 @@ namespace Vocaluxe.PartyModes
return true;
}
public override void OnClose()
{
base.OnClose();
}
private void RebuildSlides()
{
// build num player slide (min player ... max player);
SelectSlides[htSelectSlides(SelectSlideNumPlayers)].Clear();
SelectSlides[SelectSlideNumPlayers].Clear();
for (int i = _PartyMode.GetMinPlayer(); i <= _PartyMode.GetMaxPlayer(); i++)
{
SelectSlides[htSelectSlides(SelectSlideNumPlayers)].AddValue(i.ToString());
}
SelectSlides[htSelectSlides(SelectSlideNumPlayers)].Selection = Data.ScreenConfig.NumPlayer - _PartyMode.GetMinPlayer();
SelectSlides[SelectSlideNumPlayers].AddValue(i.ToString());
SelectSlides[SelectSlideNumPlayers].Selection = Data.ScreenConfig.NumPlayer - _PartyMode.GetMinPlayer();
UpdateMicsAtOnce();
SetRoundSteps();
@@ -177,9 +153,9 @@ namespace Vocaluxe.PartyModes
{
int player = Data.ScreenConfig.NumPlayer;
int mics = Data.ScreenConfig.NumPlayerAtOnce;
Data.ScreenConfig.NumPlayer = SelectSlides[htSelectSlides(SelectSlideNumPlayers)].Selection + _PartyMode.GetMinPlayer();
Data.ScreenConfig.NumPlayerAtOnce = SelectSlides[htSelectSlides(SelectSlideNumMics)].Selection + _PartyMode.GetMinPlayer();
Data.ScreenConfig.NumRounds = (SelectSlides[htSelectSlides(SelectSlideNumRounds)].Selection + 1) * _RoundSteps;
Data.ScreenConfig.NumPlayer = SelectSlides[SelectSlideNumPlayers].Selection + _PartyMode.GetMinPlayer();
Data.ScreenConfig.NumPlayerAtOnce = SelectSlides[SelectSlideNumMics].Selection + _PartyMode.GetMinPlayer();
Data.ScreenConfig.NumRounds = (SelectSlides[SelectSlideNumRounds].Selection + 1) * _RoundSteps;
UpdateMicsAtOnce();
SetRoundSteps();
@@ -188,9 +164,7 @@ namespace Vocaluxe.PartyModes
{
int num = CHelper.nCk(Data.ScreenConfig.NumPlayer, Data.ScreenConfig.NumPlayerAtOnce);
while (num > _MaxNumRounds)
{
num -= _RoundSteps;
}
Data.ScreenConfig.NumRounds = num;
}
@@ -208,23 +182,19 @@ namespace Vocaluxe.PartyModes
Data.ScreenConfig.NumPlayerAtOnce = MaxNum;
// build mics at once slide
SelectSlides[htSelectSlides(SelectSlideNumMics)].Clear();
SelectSlides[SelectSlideNumMics].Clear();
for (int i = 1; i <= MaxNum; i++)
{
SelectSlides[htSelectSlides(SelectSlideNumMics)].AddValue(i.ToString());
}
SelectSlides[htSelectSlides(SelectSlideNumMics)].Selection = Data.ScreenConfig.NumPlayerAtOnce - _PartyMode.GetMinPlayer();
SelectSlides[SelectSlideNumMics].AddValue(i.ToString());
SelectSlides[SelectSlideNumMics].Selection = Data.ScreenConfig.NumPlayerAtOnce - _PartyMode.GetMinPlayer();
}
private void UpdateSlideRounds()
{
// build num rounds slide
SelectSlides[htSelectSlides(SelectSlideNumRounds)].Clear();
SelectSlides[SelectSlideNumRounds].Clear();
for (int i = _RoundSteps; i <= _MaxNumRounds; i += _RoundSteps)
{
SelectSlides[htSelectSlides(SelectSlideNumRounds)].AddValue(i.ToString());
}
SelectSlides[htSelectSlides(SelectSlideNumRounds)].Selection = Data.ScreenConfig.NumRounds / _RoundSteps - 1;
SelectSlides[SelectSlideNumRounds].AddValue(i.ToString());
SelectSlides[SelectSlideNumRounds].Selection = Data.ScreenConfig.NumRounds / _RoundSteps - 1;
}
private void SetRoundSteps()
@@ -251,7 +221,7 @@ namespace Vocaluxe.PartyModes
private void Next()
{
_PartyMode.DataFromScreen(_ThemeName, Data);
_PartyMode.DataFromScreen(ThemeName, Data);
}
}
}
@@ -1,11 +1,9 @@
using System;
using System.Collections.Generic;
using System.Text;
using System.Windows.Forms;
using VocaluxeLib.Menu;
using Vocaluxe.Menu;
namespace Vocaluxe.PartyModes
namespace VocaluxeLib.PartyModes.ChallengeMedley
{
struct TableRow
{
@@ -24,41 +22,43 @@ namespace Vocaluxe.PartyModes
public List<CText> TextScores;
}
public class PartyScreenChallengeMain : CMenuParty
public class PartyScreenChallengeMedleyMain : CMenuParty
{
// Version number for theme files. Increment it, if you've changed something on the theme files!
const int ScreenVersion = 1;
protected override int _ScreenVersion
{
get { return 1; }
}
const string TextPosition = "TextPosition";
const string TextPlayerName = "TextPlayerName";
const string TextNumPlayed = "TextNumPlayed";
const string TextWon = "TextWon";
const string TextSingPoints = "TextSingPoints";
const string TextGamePoints = "TextGamePoints";
const string TextNextPlayer = "TextNextPlayer";
const string TextPopupReallyExit = "TextPopupReallyExit";
const string TextRoundPlayer = "TextRoundPlayer";
const string TextRoundScore = "TextRoundScore";
const string TextRoundNumber = "TextRoundNumber";
const string TextFinishMessage = "TextFinishMessage";
const string TextFinishPlayerWin = "TextFinishPlayerWin";
const string TextNextPlayerMessage = "TextNextPlayerMessage";
private const string TextPosition = "TextPosition";
private const string TextPlayerName = "TextPlayerName";
private const string TextNumPlayed = "TextNumPlayed";
private const string TextWon = "TextWon";
private const string TextSingPoints = "TextSingPoints";
private const string TextGamePoints = "TextGamePoints";
private const string TextNextPlayer = "TextNextPlayer";
private const string TextPopupReallyExit = "TextPopupReallyExit";
private const string TextRoundPlayer = "TextRoundPlayer";
private const string TextRoundScore = "TextRoundScore";
private const string TextRoundNumber = "TextRoundNumber";
private const string TextFinishMessage = "TextFinishMessage";
private const string TextFinishPlayerWin = "TextFinishPlayerWin";
private const string TextNextPlayerMessage = "TextNextPlayerMessage";
const string ButtonNextRound = "ButtonNextRound";
const string ButtonBack = "ButtonBack";
const string ButtonExit = "ButtonExit";
const string ButtonPopupYes = "ButtonPopupYes";
const string ButtonPopupNo = "ButtonPopupNo";
const string ButtonPlayerScrollUp = "ButtonPlayerScrollUp";
const string ButtonPlayerScrollDown = "ButtonPlayerScrollDown";
const string ButtonRoundsScrollUp = "ButtonRoundsScrollUp";
const string ButtonRoundsScrollDown = "ButtonRoundsScrollDown";
private const string ButtonNextRound = "ButtonNextRound";
private const string ButtonBack = "ButtonBack";
private const string ButtonExit = "ButtonExit";
private const string ButtonPopupYes = "ButtonPopupYes";
private const string ButtonPopupNo = "ButtonPopupNo";
private const string ButtonPlayerScrollUp = "ButtonPlayerScrollUp";
private const string ButtonPlayerScrollDown = "ButtonPlayerScrollDown";
private const string ButtonRoundsScrollUp = "ButtonRoundsScrollUp";
private const string ButtonRoundsScrollDown = "ButtonRoundsScrollDown";
const string StaticPopupBG = "StaticPopupBG";
const string StaticNextPlayer = "StaticNextPlayer";
private const string StaticPopupBG = "StaticPopupBG";
private const string StaticNextPlayer = "StaticNextPlayer";
private bool ExitPopupVisible = false;
private bool ExitPopupVisible;
private DataFromScreen Data;
private DataToScreenMain GameState;
@@ -70,26 +70,29 @@ namespace Vocaluxe.PartyModes
private SRectF RoundsTableScrollArea;
private SRectF PlayerTableScrollArea;
private int RoundsTableOffset = 0;
private int PlayerTableOffset = 0;
private int RoundsTableOffset;
private int PlayerTableOffset;
private int NumPlayerVisible = 10;
private int NumRoundsVisible = 3;
public PartyScreenChallengeMain()
public PartyScreenChallengeMedleyMain()
{
Data = new DataFromScreen();
Data.ScreenMain = new FromScreenMain();
}
protected override void Init()
public override void Init()
{
base.Init();
_ThemeName = "PartyScreenChallengeMain";
_ThemeTexts = new string[] { TextPosition, TextPlayerName, TextNumPlayed, TextWon, TextSingPoints, TextGamePoints, TextNextPlayer, TextPopupReallyExit, TextRoundNumber, TextRoundPlayer, TextRoundScore, TextFinishMessage, TextFinishPlayerWin, TextNextPlayerMessage };
_ThemeButtons = new string[] { ButtonNextRound, ButtonBack, ButtonExit, ButtonPopupYes, ButtonPopupNo, ButtonPlayerScrollDown, ButtonPlayerScrollUp, ButtonRoundsScrollDown, ButtonRoundsScrollUp };
_ThemeStatics = new string[] { StaticPopupBG, StaticNextPlayer };
_ScreenVersion = ScreenVersion;
_ThemeTexts = new string[]
{
TextPosition, TextPlayerName, TextNumPlayed, TextWon, TextSingPoints, TextGamePoints, TextNextPlayer, TextPopupReallyExit, TextRoundNumber, TextRoundPlayer,
TextRoundScore, TextFinishMessage, TextFinishPlayerWin, TextNextPlayerMessage
};
_ThemeButtons = new string[]
{ButtonNextRound, ButtonBack, ButtonExit, ButtonPopupYes, ButtonPopupNo, ButtonPlayerScrollDown, ButtonPlayerScrollUp, ButtonRoundsScrollDown, ButtonRoundsScrollUp};
_ThemeStatics = new string[] {StaticPopupBG, StaticNextPlayer};
}
public override void LoadTheme(string XmlPath)
@@ -104,9 +107,9 @@ namespace Vocaluxe.PartyModes
for (int i = 0; i < _PartyMode.GetMaxPlayer(); i++)
{
NextPlayerTexts.Add(GetNewText(Texts[htTexts(TextNextPlayer)]));
NextPlayerTexts.Add(GetNewText(Texts[TextNextPlayer]));
AddText(NextPlayerTexts[NextPlayerTexts.Count - 1]);
NextPlayerStatics.Add(GetNewStatic(Statics[htStatics(StaticNextPlayer)]));
NextPlayerStatics.Add(GetNewStatic(Statics[StaticNextPlayer]));
AddStatic(NextPlayerStatics[NextPlayerStatics.Count - 1]);
}
}
@@ -122,30 +125,28 @@ namespace Vocaluxe.PartyModes
}
catch (Exception e)
{
CBase.Log.LogError("Error in party mode screen challenge main. Can't cast received data from game mode " + _ThemeName + ". " + e.Message); ;
CBase.Log.LogError("Error in party mode screen challenge main. Can't cast received data from game mode " + ThemeName + ". " + e.Message);
}
}
}
public override bool HandleInput(KeyEvent KeyEvent)
public override bool HandleInput(KeyEvent keyEvent)
{
base.HandleInput(KeyEvent);
base.HandleInput(keyEvent);
if (KeyEvent.KeyPressed)
{
}
if (keyEvent.KeyPressed) {}
else
{
switch (KeyEvent.Key)
switch (keyEvent.Key)
{
case Keys.Back:
case Keys.Escape:
if (!ExitPopupVisible)
{
if (GameState.CurrentRoundNr == 1)
Back();
else
ShowPopup(true);
}
else
ShowPopup(false);
break;
@@ -153,26 +154,26 @@ namespace Vocaluxe.PartyModes
case Keys.Enter:
if (!ExitPopupVisible)
{
if (Buttons[htButtons(ButtonNextRound)].Selected)
if (Buttons[ButtonNextRound].Selected)
NextRound();
if (Buttons[htButtons(ButtonBack)].Selected && GameState.CurrentRoundNr == 1)
if (Buttons[ButtonBack].Selected && GameState.CurrentRoundNr == 1)
Back();
if (Buttons[htButtons(ButtonExit)].Selected && GameState.CurrentRoundNr > 1)
if (Buttons[ButtonExit].Selected && GameState.CurrentRoundNr > 1)
ShowPopup(true);
if (Buttons[htButtons(ButtonPlayerScrollUp)].Selected)
if (Buttons[ButtonPlayerScrollUp].Selected)
ScrollPlayerTable(-1);
if (Buttons[htButtons(ButtonPlayerScrollDown)].Selected)
if (Buttons[ButtonPlayerScrollDown].Selected)
ScrollPlayerTable(1);
if (Buttons[htButtons(ButtonRoundsScrollUp)].Selected)
if (Buttons[ButtonRoundsScrollUp].Selected)
ScrollRoundsTable(-1);
if (Buttons[htButtons(ButtonRoundsScrollDown)].Selected)
if (Buttons[ButtonRoundsScrollDown].Selected)
ScrollRoundsTable(1);
}
else
{
if (Buttons[htButtons(ButtonPopupYes)].Selected)
if (Buttons[ButtonPopupYes].Selected)
EndParty();
if (Buttons[htButtons(ButtonPopupNo)].Selected)
if (Buttons[ButtonPopupNo].Selected)
ShowPopup(false);
}
break;
@@ -181,55 +182,57 @@ namespace Vocaluxe.PartyModes
return true;
}
public override bool HandleMouse(MouseEvent MouseEvent)
public override bool HandleMouse(MouseEvent mouseEvent)
{
base.HandleMouse(MouseEvent);
base.HandleMouse(mouseEvent);
if (MouseEvent.LB && IsMouseOver(MouseEvent))
if (mouseEvent.LB && IsMouseOver(mouseEvent))
{
if (!ExitPopupVisible)
{
if (Buttons[htButtons(ButtonNextRound)].Selected)
if (Buttons[ButtonNextRound].Selected)
NextRound();
if (Buttons[htButtons(ButtonBack)].Selected && GameState.CurrentRoundNr == 1)
if (Buttons[ButtonBack].Selected && GameState.CurrentRoundNr == 1)
Back();
if (Buttons[htButtons(ButtonExit)].Selected && GameState.CurrentRoundNr > 1)
if (Buttons[ButtonExit].Selected && GameState.CurrentRoundNr > 1)
ShowPopup(true);
if (Buttons[htButtons(ButtonPlayerScrollUp)].Selected)
if (Buttons[ButtonPlayerScrollUp].Selected)
ScrollPlayerTable(-1);
if (Buttons[htButtons(ButtonPlayerScrollDown)].Selected)
if (Buttons[ButtonPlayerScrollDown].Selected)
ScrollPlayerTable(1);
if (Buttons[htButtons(ButtonRoundsScrollUp)].Selected)
if (Buttons[ButtonRoundsScrollUp].Selected)
ScrollRoundsTable(-1);
if (Buttons[htButtons(ButtonRoundsScrollDown)].Selected)
if (Buttons[ButtonRoundsScrollDown].Selected)
ScrollRoundsTable(1);
}
else
{
if (Buttons[htButtons(ButtonPopupYes)].Selected)
if (Buttons[ButtonPopupYes].Selected)
EndParty();
if (Buttons[htButtons(ButtonPopupNo)].Selected)
if (Buttons[ButtonPopupNo].Selected)
ShowPopup(false);
}
}
if (MouseEvent.RB)
if (mouseEvent.RB)
{
if (!ExitPopupVisible)
{
if (GameState.CurrentRoundNr == 1)
Back();
else
ShowPopup(true);
}
else
ShowPopup(false);
}
if (MouseEvent.Wheel != 0)
if (mouseEvent.Wheel != 0)
{
if(CHelper.IsInBounds(RoundsTableScrollArea, MouseEvent))
ScrollRoundsTable(MouseEvent.Wheel);
if(CHelper.IsInBounds(PlayerTableScrollArea, MouseEvent))
ScrollPlayerTable(MouseEvent.Wheel);
if (CHelper.IsInBounds(RoundsTableScrollArea, mouseEvent))
ScrollRoundsTable(mouseEvent.Wheel);
if (CHelper.IsInBounds(PlayerTableScrollArea, mouseEvent))
ScrollPlayerTable(mouseEvent.Wheel);
}
return true;
@@ -253,29 +256,29 @@ namespace Vocaluxe.PartyModes
if (GameState.CurrentRoundNr == 1)
{
Buttons[htButtons(ButtonBack)].Visible = true;
Buttons[htButtons(ButtonExit)].Visible = false;
Buttons[ButtonBack].Visible = true;
Buttons[ButtonExit].Visible = false;
}
else
{
Buttons[htButtons(ButtonBack)].Visible = false;
Buttons[htButtons(ButtonExit)].Visible = true;
Buttons[ButtonBack].Visible = false;
Buttons[ButtonExit].Visible = true;
}
if (GameState.CurrentRoundNr <= GameState.Combs.Count)
{
Buttons[htButtons(ButtonNextRound)].Visible = true;
Texts[htTexts(TextFinishMessage)].Visible = false;
Texts[htTexts(TextFinishPlayerWin)].Visible = false;
SetInteractionToButton(Buttons[htButtons(ButtonNextRound)]);
Buttons[ButtonNextRound].Visible = true;
Texts[TextFinishMessage].Visible = false;
Texts[TextFinishPlayerWin].Visible = false;
SetInteractionToButton(Buttons[ButtonNextRound]);
}
else
{
Buttons[htButtons(ButtonNextRound)].Visible = false;
Texts[htTexts(TextFinishMessage)].Visible = true;
Texts[htTexts(TextFinishPlayerWin)].Visible = true;
Texts[htTexts(TextFinishPlayerWin)].Text = GetPlayerWinString();
SetInteractionToButton(Buttons[htButtons(ButtonExit)]);
Buttons[ButtonNextRound].Visible = false;
Texts[TextFinishMessage].Visible = true;
Texts[TextFinishPlayerWin].Visible = true;
Texts[TextFinishPlayerWin].Text = GetPlayerWinString();
SetInteractionToButton(Buttons[ButtonExit]);
}
ShowPopup(false);
@@ -292,16 +295,11 @@ namespace Vocaluxe.PartyModes
return true;
}
public override void OnClose()
{
base.OnClose();
}
private void NextRound()
{
Data.ScreenMain.FadeToNameSelection = false;
Data.ScreenMain.FadeToSongSelection = true;
_PartyMode.DataFromScreen(_ThemeName, Data);
_PartyMode.DataFromScreen(ThemeName, Data);
}
private void EndParty()
@@ -313,25 +311,25 @@ namespace Vocaluxe.PartyModes
{
ExitPopupVisible = Visible;
Statics[htStatics(StaticPopupBG)].Visible = ExitPopupVisible;
Texts[htTexts(TextPopupReallyExit)].Visible = ExitPopupVisible;
Buttons[htButtons(ButtonPopupYes)].Visible = ExitPopupVisible;
Buttons[htButtons(ButtonPopupNo)].Visible = ExitPopupVisible;
Statics[StaticPopupBG].Visible = ExitPopupVisible;
Texts[TextPopupReallyExit].Visible = ExitPopupVisible;
Buttons[ButtonPopupYes].Visible = ExitPopupVisible;
Buttons[ButtonPopupNo].Visible = ExitPopupVisible;
if (ExitPopupVisible)
SetInteractionToButton(Buttons[htButtons(ButtonPopupNo)]);
SetInteractionToButton(Buttons[ButtonPopupNo]);
}
private void Back()
{
Data.ScreenMain.FadeToNameSelection = true;
Data.ScreenMain.FadeToSongSelection = false;
_PartyMode.DataFromScreen(_ThemeName, Data);
_PartyMode.DataFromScreen(ThemeName, Data);
}
private void UpdateNextPlayerPositions()
{
float x = CBase.Settings.GetRenderW()/2 - ((GameState.NumPlayerAtOnce * Statics[htStatics(StaticNextPlayer)].Rect.W) + ((GameState.NumPlayerAtOnce-1) * 15))/2;
float x = CBase.Settings.GetRenderW() / 2 - ((GameState.NumPlayerAtOnce * Statics[StaticNextPlayer].Rect.W) + ((GameState.NumPlayerAtOnce - 1) * 15)) / 2;
float static_y = 590;
float text_y = 550;
for (int i = 0; i < GameState.NumPlayerAtOnce; i++)
@@ -341,11 +339,11 @@ namespace Vocaluxe.PartyModes
NextPlayerStatics[i].Rect.Y = static_y;
NextPlayerStatics[i].Visible = true;
//text
NextPlayerTexts[i].X = x + Statics[htStatics(StaticNextPlayer)].Rect.W / 2;
NextPlayerTexts[i].X = x + Statics[StaticNextPlayer].Rect.W / 2;
NextPlayerTexts[i].Y = text_y;
NextPlayerTexts[i].Visible = true;
x += Statics[htStatics(StaticNextPlayer)].Rect.W + 15;
x += Statics[StaticNextPlayer].Rect.W + 15;
}
for (int i = GameState.NumPlayerAtOnce; i < _PartyMode.GetMaxPlayer(); i++)
{
@@ -358,19 +356,19 @@ namespace Vocaluxe.PartyModes
{
if (GameState.CurrentRoundNr <= GameState.Combs.Count)
{
Texts[htTexts(TextNextPlayerMessage)].Visible = true;
Texts[TextNextPlayerMessage].Visible = true;
SProfile[] profiles = CBase.Profiles.GetProfiles();
for (int i = 0; i < GameState.NumPlayerAtOnce; i++)
{
int pid = GameState.Combs[GameState.CurrentRoundNr - 1].Player[i];
NextPlayerStatics[i].Texture = profiles[GameState.ProfileIDs[pid]].Avatar.Texture;
NextPlayerTexts[i].Text = profiles[GameState.ProfileIDs[pid]].PlayerName;
NextPlayerTexts[i].Color = CBase.Theme.GetPlayerColor((i + 1));
NextPlayerTexts[i].Color = CBase.Theme.GetPlayerColor(i + 1);
}
}
else
{
Texts[htTexts(TextNextPlayerMessage)].Visible = false;
Texts[TextNextPlayerMessage].Visible = false;
for (int i = 0; i < GameState.NumPlayerAtOnce; i++)
{
NextPlayerStatics[i].Visible = false;
@@ -394,7 +392,7 @@ namespace Vocaluxe.PartyModes
for (int round = 0; round < RoundsTable.Count; round++)
{
//Round-number
CText text = GetNewText(Texts[htTexts(TextRoundNumber)]);
CText text = GetNewText(Texts[TextRoundNumber]);
AddText(text);
RoundsTable[round].Number = text;
for (int row = 0; row < 2; row++)
@@ -402,11 +400,11 @@ namespace Vocaluxe.PartyModes
for (int column = 0; column < 3; column++)
{
//Player
text = GetNewText(Texts[htTexts(TextRoundPlayer)]);
text = GetNewText(Texts[TextRoundPlayer]);
AddText(text);
RoundsTable[round].TextPlayer.Add(text);
//Score
text = GetNewText(Texts[htTexts(TextRoundScore)]);
text = GetNewText(Texts[TextRoundScore]);
AddText(text);
RoundsTable[round].TextScores.Add(text);
}
@@ -427,14 +425,14 @@ namespace Vocaluxe.PartyModes
if (NumRoundsVisible > GameState.Combs.Count)
NumRoundsVisible = GameState.Combs.Count;
float x = Texts[htTexts(TextRoundNumber)].X;
float y = Texts[htTexts(TextRoundNumber)].Y;
float x = Texts[TextRoundNumber].X;
float y = Texts[TextRoundNumber].Y;
RoundsTableScrollArea.X = x;
RoundsTableScrollArea.Y = y;
RoundsTableScrollArea.W = CBase.Settings.GetRenderW() - Texts[htTexts(TextRoundNumber)].X - 20;
RoundsTableScrollArea.W = CBase.Settings.GetRenderW() - Texts[TextRoundNumber].X - 20;
float delta = Texts[htTexts(TextRoundNumber)].Height;
float delta = Texts[TextRoundNumber].Height;
//Update statics and texts for rounds
for (int round = 0; round < RoundsTable.Count; round++)
@@ -455,8 +453,9 @@ namespace Vocaluxe.PartyModes
for (int column = row * NumPlayerInOneRow; column < num; column++)
{
//Player
float _x = x + 15 + (CBase.Settings.GetRenderW() - Texts[htTexts(TextRoundNumber)].X - 20) / NumPlayerInThisRow * (column - row * NumPlayerInOneRow) + ((CBase.Settings.GetRenderW() - Texts[htTexts(TextRoundNumber)].X - 20) / NumPlayerInThisRow) / 2;
float maxw = ((CBase.Settings.GetRenderW() - Texts[htTexts(TextRoundNumber)].X - 20) / NumPlayerInThisRow) / 2 - 5;
float _x = x + 15 + (CBase.Settings.GetRenderW() - Texts[TextRoundNumber].X - 20) / NumPlayerInThisRow * (column - row * NumPlayerInOneRow) +
((CBase.Settings.GetRenderW() - Texts[TextRoundNumber].X - 20) / NumPlayerInThisRow) / 2;
float maxw = ((CBase.Settings.GetRenderW() - Texts[TextRoundNumber].X - 20) / NumPlayerInThisRow) / 2 - 5;
RoundsTable[round].TextPlayer[column].X = _x;
RoundsTable[round].TextPlayer[column].Y = y;
RoundsTable[round].TextPlayer[column].MaxWidth = maxw;
@@ -478,7 +477,7 @@ namespace Vocaluxe.PartyModes
SProfile[] profile = CBase.Profiles.GetProfiles();
for (int i = 0; i < RoundsTable.Count; i++)
{
for(int p = 0; p < RoundsTable[i].TextPlayer.Count; p++)
for (int p = 0; p < RoundsTable[i].TextPlayer.Count; p++)
{
if (GameState.Combs.Count > i + RoundsTableOffset && GameState.Combs[i + RoundsTableOffset].Player.Count > p)
{
@@ -510,19 +509,19 @@ namespace Vocaluxe.PartyModes
}
}
Buttons[htButtons(ButtonRoundsScrollUp)].Visible = RoundsTableOffset > 0;
Buttons[htButtons(ButtonRoundsScrollDown)].Visible = GameState.Combs.Count - NumRoundsVisible - RoundsTableOffset > 0;
Buttons[ButtonRoundsScrollUp].Visible = RoundsTableOffset > 0;
Buttons[ButtonRoundsScrollDown].Visible = GameState.Combs.Count - NumRoundsVisible - RoundsTableOffset > 0;
}
private void BuildPlayerTable()
{
PlayerTableScrollArea = new SRectF();
PlayerTableScrollArea.X = Texts[htTexts(TextPosition)].X;
PlayerTableScrollArea.Y = Texts[htTexts(TextPosition)].Y;
PlayerTableScrollArea.W = Texts[htTexts(TextGamePoints)].X - Texts[htTexts(TextPosition)].X;
PlayerTableScrollArea.X = Texts[TextPosition].X;
PlayerTableScrollArea.Y = Texts[TextPosition].Y;
PlayerTableScrollArea.W = Texts[TextGamePoints].X - Texts[TextPosition].X;
PlayerTable = new List<TableRow>();
float delta = Texts[htTexts(TextPosition)].Height * 1.2f;
float delta = Texts[TextPosition].Height * 1.2f;
float h = 0;
@@ -530,12 +529,12 @@ namespace Vocaluxe.PartyModes
{
TableRow row = new TableRow();
row.Pos = GetNewText(Texts[htTexts(TextPosition)]);
row.Name = GetNewText(Texts[htTexts(TextPlayerName)]);
row.Rounds = GetNewText(Texts[htTexts(TextNumPlayed)]);
row.Won = GetNewText(Texts[htTexts(TextWon)]);
row.SingPoints = GetNewText(Texts[htTexts(TextSingPoints)]);
row.GamePoints = GetNewText(Texts[htTexts(TextGamePoints)]);
row.Pos = GetNewText(Texts[TextPosition]);
row.Name = GetNewText(Texts[TextPlayerName]);
row.Rounds = GetNewText(Texts[TextNumPlayed]);
row.Won = GetNewText(Texts[TextWon]);
row.SingPoints = GetNewText(Texts[TextSingPoints]);
row.GamePoints = GetNewText(Texts[TextGamePoints]);
row.Pos.Y += delta * (i + 1);
row.Name.Y += delta * (i + 1);
@@ -575,7 +574,7 @@ namespace Vocaluxe.PartyModes
{
TableRow row = PlayerTable[i];
if (i+PlayerTableOffset < GameState.ResultTable.Count)
if (i + PlayerTableOffset < GameState.ResultTable.Count)
{
row.Pos.Visible = true;
row.Name.Visible = true;
@@ -585,11 +584,11 @@ namespace Vocaluxe.PartyModes
row.GamePoints.Visible = true;
row.Pos.Text = GameState.ResultTable[i + PlayerTableOffset].Position.ToString() + ".";
row.Name.Text = profiles[GameState.ResultTable[i+PlayerTableOffset].PlayerID].PlayerName;
row.Rounds.Text = GameState.ResultTable[i+PlayerTableOffset].NumRounds.ToString();
row.Won.Text = GameState.ResultTable[i+PlayerTableOffset].NumWon.ToString();
row.SingPoints.Text = GameState.ResultTable[i+PlayerTableOffset].NumSingPoints.ToString();
row.GamePoints.Text = GameState.ResultTable[i+PlayerTableOffset].NumGamePoints.ToString();
row.Name.Text = profiles[GameState.ResultTable[i + PlayerTableOffset].PlayerID].PlayerName;
row.Rounds.Text = GameState.ResultTable[i + PlayerTableOffset].NumRounds.ToString();
row.Won.Text = GameState.ResultTable[i + PlayerTableOffset].NumWon.ToString();
row.SingPoints.Text = GameState.ResultTable[i + PlayerTableOffset].NumSingPoints.ToString();
row.GamePoints.Text = GameState.ResultTable[i + PlayerTableOffset].NumGamePoints.ToString();
}
else
{
@@ -602,8 +601,8 @@ namespace Vocaluxe.PartyModes
}
}
Buttons[htButtons(ButtonPlayerScrollUp)].Visible = PlayerTableOffset > 0;
Buttons[htButtons(ButtonPlayerScrollDown)].Visible = GameState.ProfileIDs.Count - NumPlayerVisible - PlayerTableOffset > 0;
Buttons[ButtonPlayerScrollUp].Visible = PlayerTableOffset > 0;
Buttons[ButtonPlayerScrollDown].Visible = GameState.ProfileIDs.Count - NumPlayerVisible - PlayerTableOffset > 0;
}
private void ScrollPlayerTable(int Offset)
@@ -1,21 +1,22 @@
using System;
using System.Collections.Generic;
using System.Text;
using System.Windows.Forms;
using VocaluxeLib.Menu;
using Vocaluxe.Menu;
namespace Vocaluxe.PartyModes
namespace VocaluxeLib.PartyModes.ChallengeMedley
{
public class PartyScreenChallengeNames : CMenuParty
public class PartyScreenChallengeMedleyNames : CMenuParty
{
// Version number for theme files. Increment it, if you've changed something on the theme files!
const int ScreenVersion = 1;
protected override int _ScreenVersion
{
get { return 1; }
}
const string ButtonNext = "ButtonNext";
const string ButtonBack = "ButtonBack";
const string ButtonPlayerDestination = "ButtonPlayerDestination";
const string ButtonPlayerChoose = "ButtonPlayerChoose";
private const string ButtonNext = "ButtonNext";
private const string ButtonBack = "ButtonBack";
private const string ButtonPlayerDestination = "ButtonPlayerDestination";
private const string ButtonPlayerChoose = "ButtonPlayerChoose";
private List<CPlayerChooseButton> PlayerChooseButtons;
private List<CButton> PlayerDestinationButtons;
@@ -37,11 +38,11 @@ namespace Vocaluxe.PartyModes
private int PlayerChooseButtonsOffset = 0;
private CStatic chooseAvatarStatic;
private bool SelectingMouseActive = false;
private int OldMouseX = 0;
private int OldMouseY = 0;
private bool SelectingMouseActive;
private int OldMouseX;
private int OldMouseY;
private int SelectedPlayerNr = -1;
private bool ButtonsAdded = false;
private bool ButtonsAdded;
private int NumPlayer = 4;
@@ -53,11 +54,7 @@ namespace Vocaluxe.PartyModes
public int ProfileID;
}
public PartyScreenChallengeNames()
{
}
protected override void Init()
public override void Init()
{
base.Init();
@@ -68,10 +65,8 @@ namespace Vocaluxe.PartyModes
Data.ScreenNames.ProfileIDs = new List<int>();
_ThemeName = "PartyScreenChallengeNames";
List<string> buttons = new List<string>();
_ThemeButtons = new string[] { ButtonBack, ButtonNext, ButtonPlayerDestination, ButtonPlayerChoose };
_ScreenVersion = ScreenVersion;
_ThemeButtons = new string[] {ButtonBack, ButtonNext, ButtonPlayerDestination, ButtonPlayerChoose};
Data = new DataFromScreen();
FromScreenNames names = new FromScreenNames();
@@ -81,11 +76,6 @@ namespace Vocaluxe.PartyModes
Data.ScreenNames = names;
}
public override void LoadTheme(string XmlPath)
{
base.LoadTheme(XmlPath);
}
public override void DataToScreen(object ReceivedData)
{
DataToScreenNames config = new DataToScreenNames();
@@ -100,30 +90,22 @@ namespace Vocaluxe.PartyModes
NumPlayer = config.NumPlayer;
while (Data.ScreenNames.ProfileIDs.Count > NumPlayer)
{
Data.ScreenNames.ProfileIDs.RemoveAt(Data.ScreenNames.ProfileIDs.Count - 1);
}
}
catch (Exception e)
{
CBase.Log.LogError("Error in party mode screen challenge names. Can't cast received data from game mode " + _ThemeName + ". " + e.Message); ;
CBase.Log.LogError("Error in party mode screen challenge names. Can't cast received data from game mode " + ThemeName + ". " + e.Message);
}
}
}
public override bool HandleInput(KeyEvent KeyEvent)
public override bool HandleInput(KeyEvent keyEvent)
{
base.HandleInput(KeyEvent);
base.HandleInput(keyEvent);
if (KeyEvent.KeyPressed)
{
}
if (keyEvent.KeyPressed) {}
else
{
switch (KeyEvent.Key)
switch (keyEvent.Key)
{
case Keys.Back:
case Keys.Escape:
@@ -131,10 +113,10 @@ namespace Vocaluxe.PartyModes
break;
case Keys.Enter:
if (Buttons[htButtons(ButtonBack)].Selected)
if (Buttons[ButtonBack].Selected)
Back();
if (Buttons[htButtons(ButtonNext)].Selected)
if (Buttons[ButtonNext].Selected)
Next();
if (!OnAdd())
@@ -149,9 +131,9 @@ namespace Vocaluxe.PartyModes
return true;
}
public override bool HandleMouse(MouseEvent MouseEvent)
public override bool HandleMouse(MouseEvent mouseEvent)
{
base.HandleMouse(MouseEvent);
base.HandleMouse(mouseEvent);
/*
//Check if LeftButton is hold and Select-Mode inactive
@@ -182,13 +164,13 @@ namespace Vocaluxe.PartyModes
}*/
//Check if LeftButton is hold and Select-Mode active
if (MouseEvent.LBH && SelectingMouseActive)
if (mouseEvent.LBH && SelectingMouseActive)
{
//Update coords for Drag/Drop-Texture
chooseAvatarStatic.Rect.X += (MouseEvent.X - OldMouseX);
chooseAvatarStatic.Rect.Y += (MouseEvent.Y - OldMouseY);
OldMouseX = MouseEvent.X;
OldMouseY = MouseEvent.Y;
chooseAvatarStatic.Rect.X += mouseEvent.X - OldMouseX;
chooseAvatarStatic.Rect.Y += mouseEvent.Y - OldMouseY;
OldMouseX = mouseEvent.X;
OldMouseY = mouseEvent.Y;
}
// LeftButton isn't hold anymore, but Selec-Mode is still active -> "Drop" of Avatar
else if (SelectingMouseActive)
@@ -200,10 +182,10 @@ namespace Vocaluxe.PartyModes
for (int i = 0; i < PlayerDestinationButtons.Count; i++)
{
//Check first, if area is "active"
if (PlayerDestinationButtons[i].Visible == true)
if (PlayerDestinationButtons[i].Visible)
{
//Check if Mouse is in area
if (CHelper.IsInBounds(PlayerDestinationButtons[i].Rect, MouseEvent))
if (CHelper.IsInBounds(PlayerDestinationButtons[i].Rect, mouseEvent))
{
int added = -1;
//Add Player-ID to list.
@@ -236,22 +218,20 @@ namespace Vocaluxe.PartyModes
chooseAvatarStatic.Visible = false;
}
if (MouseEvent.LB && IsMouseOver(MouseEvent))
if (mouseEvent.LB && IsMouseOver(mouseEvent))
{
if (Buttons[htButtons(ButtonBack)].Selected)
if (Buttons[ButtonBack].Selected)
Back();
if (Buttons[htButtons(ButtonNext)].Selected)
if (Buttons[ButtonNext].Selected)
Next();
if (!OnAdd())
OnRemove();
}
if (MouseEvent.RB)
{
if (mouseEvent.RB)
Back();
}
return true;
}
@@ -286,20 +266,15 @@ namespace Vocaluxe.PartyModes
return true;
}
public override void OnClose()
{
base.OnClose();
}
private void AddButtonPlayerDestination()
{
Buttons[htButtons(ButtonPlayerDestination)].Visible = false;
Buttons[ButtonPlayerDestination].Visible = false;
PlayerDestinationButtons = new List<CButton>();
int row = 0;
int column = 0;
for (int i = 1; i <= _PartyMode.GetMaxPlayer(); i++)
{
CButton b = GetNewButton(Buttons[htButtons(ButtonPlayerDestination)]);
CButton b = GetNewButton(Buttons[ButtonPlayerDestination]);
b.Rect.X = PlayerDestinationButtonsFirstX + column * (b.Rect.W + PlayerDestinationButtonsSpaceH);
b.Rect.Y = PlayerDestinationButtonsFirstY + row * (b.Rect.H + PlayerDestinationButtonsSpaceW);
PlayerDestinationButtons.Add(b);
@@ -317,13 +292,13 @@ namespace Vocaluxe.PartyModes
private void AddButtonPlayerChoose()
{
Buttons[htButtons(ButtonPlayerChoose)].Visible = false;
Buttons[ButtonPlayerChoose].Visible = false;
PlayerChooseButtons = new List<CPlayerChooseButton>();
int row = 0;
int column = 0;
for (int i = 1; i <= PlayerChooseButtonsNumH * PlayerChooseButtonsNumW; i++)
{
CButton b = GetNewButton(Buttons[htButtons(ButtonPlayerChoose)]);
CButton b = GetNewButton(Buttons[ButtonPlayerChoose]);
b.Rect.X = PlayerChooseButtonsFirstX + column * (b.Rect.W + PlayerChooseButtonsSpaceH);
b.Rect.Y = PlayerChooseButtonsFirstY + row * (b.Rect.H + PlayerChooseButtonsSpaceW);
CPlayerChooseButton pcb = new CPlayerChooseButton();
@@ -345,15 +320,12 @@ namespace Vocaluxe.PartyModes
private void UpdateButtonPlayerChoose()
{
UpdateVisibleProfiles();
if ((PlayerChooseButtonsNumW * PlayerChooseButtonsNumH) * (PlayerChooseButtonsOffset + 1) - PlayerChooseButtonsVisibleProfiles.Count >= (PlayerChooseButtonsNumW * PlayerChooseButtonsNumH) * PlayerChooseButtonsOffset)
{
if ((PlayerChooseButtonsNumW * PlayerChooseButtonsNumH) * (PlayerChooseButtonsOffset + 1) - PlayerChooseButtonsVisibleProfiles.Count >=
(PlayerChooseButtonsNumW * PlayerChooseButtonsNumH) * PlayerChooseButtonsOffset)
UpdateButtonPlayerChoose(PlayerChooseButtonsOffset - 1);
}
else
{
UpdateButtonPlayerChoose(PlayerChooseButtonsOffset);
}
}
private void UpdateButtonPlayerChoose(int Offset)
{
@@ -379,10 +351,10 @@ namespace Vocaluxe.PartyModes
{
PlayerChooseButtons[i].ProfileID = -1;
PlayerChooseButtons[i].Button.Text.Text = String.Empty;
PlayerChooseButtons[i].Button.Texture = Buttons[htButtons(ButtonPlayerChoose)].Texture;
PlayerChooseButtons[i].Button.STexture = Buttons[htButtons(ButtonPlayerChoose)].STexture;
PlayerChooseButtons[i].Button.Color = Buttons[htButtons(ButtonPlayerChoose)].Color;
PlayerChooseButtons[i].Button.SColor = Buttons[htButtons(ButtonPlayerChoose)].SColor;
PlayerChooseButtons[i].Button.Texture = Buttons[ButtonPlayerChoose].Texture;
PlayerChooseButtons[i].Button.STexture = Buttons[ButtonPlayerChoose].STexture;
PlayerChooseButtons[i].Button.Color = Buttons[ButtonPlayerChoose].Color;
PlayerChooseButtons[i].Button.SColor = Buttons[ButtonPlayerChoose].SColor;
PlayerChooseButtons[i].Button.Enabled = false;
}
}
@@ -411,11 +383,9 @@ namespace Vocaluxe.PartyModes
}
}
if (visible)
{
PlayerChooseButtonsVisibleProfiles.Add(i);
}
}
}
private void UpdateButtonPlayerDestination()
{
@@ -448,10 +418,10 @@ namespace Vocaluxe.PartyModes
}
else
{
PlayerDestinationButtons[i].Color = Buttons[htButtons(ButtonPlayerDestination)].Color;
PlayerDestinationButtons[i].SColor = Buttons[htButtons(ButtonPlayerDestination)].SColor;
PlayerDestinationButtons[i].Texture = Buttons[htButtons(ButtonPlayerDestination)].Texture;
PlayerDestinationButtons[i].STexture = Buttons[htButtons(ButtonPlayerDestination)].STexture;
PlayerDestinationButtons[i].Color = Buttons[ButtonPlayerDestination].Color;
PlayerDestinationButtons[i].SColor = Buttons[ButtonPlayerDestination].SColor;
PlayerDestinationButtons[i].Texture = Buttons[ButtonPlayerDestination].Texture;
PlayerDestinationButtons[i].STexture = Buttons[ButtonPlayerDestination].STexture;
PlayerDestinationButtons[i].Text.Text = String.Empty;
PlayerDestinationButtons[i].Enabled = false;
}
@@ -462,11 +432,11 @@ namespace Vocaluxe.PartyModes
{
if (Data.ScreenNames.ProfileIDs.Count == NumPlayer)
{
Buttons[htButtons(ButtonNext)].Visible = true;
SetInteractionToButton(Buttons[htButtons(ButtonNext)]);
Buttons[ButtonNext].Visible = true;
SetInteractionToButton(Buttons[ButtonNext]);
}
else
Buttons[htButtons(ButtonNext)].Visible = false;
Buttons[ButtonNext].Visible = false;
}
private bool OnAdd()
@@ -521,14 +491,14 @@ namespace Vocaluxe.PartyModes
{
Data.ScreenNames.FadeToConfig = true;
Data.ScreenNames.FadeToMain = false;
_PartyMode.DataFromScreen(_ThemeName, Data);
_PartyMode.DataFromScreen(ThemeName, Data);
}
private void Next()
{
Data.ScreenNames.FadeToConfig = false;
Data.ScreenNames.FadeToMain = true;
_PartyMode.DataFromScreen(_ThemeName, Data);
_PartyMode.DataFromScreen(ThemeName, Data);
}
}
}
@@ -0,0 +1,809 @@
<StyleCopSettings Version="105">
<Analyzers>
<Analyzer AnalyzerId="StyleCop.CSharp.DocumentationRules">
<Rules>
<Rule Name="ElementsMustBeDocumented">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="PartialElementsMustBeDocumented">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="EnumerationItemsMustBeDocumented">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="DocumentationMustContainValidXml">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ElementDocumentationMustHaveSummary">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="PartialElementDocumentationMustHaveSummary">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ElementDocumentationMustHaveSummaryText">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="PartialElementDocumentationMustHaveSummaryText">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ElementDocumentationMustNotHaveDefaultSummary">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ElementParametersMustBeDocumented">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ElementParameterDocumentationMustMatchElementParameters">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ElementParameterDocumentationMustDeclareParameterName">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ElementParameterDocumentationMustHaveText">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ElementReturnValueMustBeDocumented">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ElementReturnValueDocumentationMustHaveText">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="VoidReturnValueMustNotBeDocumented">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="GenericTypeParametersMustBeDocumented">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="GenericTypeParametersMustBeDocumentedPartialClass">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="GenericTypeParameterDocumentationMustMatchTypeParameters">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="GenericTypeParameterDocumentationMustDeclareParameterName">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="GenericTypeParameterDocumentationMustHaveText">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="PropertySummaryDocumentationMustMatchAccessors">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="PropertySummaryDocumentationMustOmitSetAccessorWithRestrictedAccess">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ElementDocumentationMustNotBeCopiedAndPasted">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="SingleLineCommentsMustNotUseDocumentationStyleSlashes">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="DocumentationTextMustNotBeEmpty">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="DocumentationTextMustContainWhitespace">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="DocumentationMustMeetCharacterPercentage">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ConstructorSummaryDocumentationMustBeginWithStandardText">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="DestructorSummaryDocumentationMustBeginWithStandardText">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="DocumentationHeadersMustNotContainBlankLines">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="IncludedDocumentationXPathDoesNotExist">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="IncludeNodeDoesNotContainValidFileAndPath">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="InheritDocMustBeUsedWithInheritingClass">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ElementDocumentationMustBeSpelledCorrectly">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="FileMustHaveHeader">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="FileHeaderMustShowCopyright">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="FileHeaderMustHaveCopyrightText">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="FileHeaderMustContainFileName">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="FileHeaderFileNameDocumentationMustMatchFileName">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="FileHeaderMustHaveValidCompanyText">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="FileHeaderFileNameDocumentationMustMatchTypeName">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
</Rules>
<AnalyzerSettings />
</Analyzer>
<Analyzer AnalyzerId="StyleCop.CSharp.LayoutRules">
<Rules>
<Rule Name="CurlyBracketsForMultiLineStatementsMustNotShareLine">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="StatementMustNotBeOnSingleLine">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ElementMustNotBeOnSingleLine">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="CurlyBracketsMustNotBeOmitted">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="AllAccessorsMustBeMultiLineOrSingleLine">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="OpeningCurlyBracketsMustNotBeFollowedByBlankLine">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ElementDocumentationHeadersMustNotBeFollowedByBlankLine">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="CodeMustNotContainMultipleBlankLinesInARow">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ClosingCurlyBracketsMustNotBePrecededByBlankLine">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="OpeningCurlyBracketsMustNotBePrecededByBlankLine">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ChainedStatementBlocksMustNotBePrecededByBlankLine">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="WhileDoFooterMustNotBePrecededByBlankLine">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="SingleLineCommentsMustNotBeFollowedByBlankLine">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ClosingCurlyBracketMustBeFollowedByBlankLine">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ElementDocumentationHeaderMustBePrecededByBlankLine">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="SingleLineCommentMustBePrecededByBlankLine">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ElementsMustBeSeparatedByBlankLine">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="CodeMustNotContainBlankLinesAtStartOfFile">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="CodeMustNotContainBlankLinesAtEndOfFile">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
</Rules>
<AnalyzerSettings />
</Analyzer>
<Analyzer AnalyzerId="StyleCop.CSharp.MaintainabilityRules">
<Rules>
<Rule Name="AccessModifierMustBeDeclared">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="FieldsMustBePrivate">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="CodeAnalysisSuppressionMustHaveJustification">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="DebugAssertMustProvideMessageText">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="DebugFailMustProvideMessageText">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="FileMayOnlyContainASingleClass">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="FileMayOnlyContainASingleNamespace">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="StatementMustNotUseUnnecessaryParenthesis">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ArithmeticExpressionsMustDeclarePrecedence">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ConditionalExpressionsMustDeclarePrecedence">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="RemoveDelegateParenthesisWhenPossible">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="AttributeConstructorMustNotUseUnnecessaryParenthesis">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="RemoveUnnecessaryCode">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
</Rules>
<AnalyzerSettings />
</Analyzer>
<Analyzer AnalyzerId="StyleCop.CSharp.NamingRules">
<Rules>
<Rule Name="ElementMustBeginWithUpperCaseLetter">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ElementMustBeginWithLowerCaseLetter">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="InterfaceNamesMustBeginWithI">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ConstFieldNamesMustBeginWithUpperCaseLetter">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="NonPrivateReadonlyFieldsMustBeginWithUpperCaseLetter">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="FieldNamesMustNotUseHungarianNotation">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="FieldNamesMustBeginWithLowerCaseLetter">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="AccessibleFieldsMustBeginWithUpperCaseLetter">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="VariableNamesMustNotBePrefixed">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="FieldNamesMustNotBeginWithUnderscore">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="FieldNamesMustNotContainUnderscore">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="StaticReadonlyFieldsMustBeginWithUpperCaseLetter">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
</Rules>
<AnalyzerSettings />
</Analyzer>
<Analyzer AnalyzerId="StyleCop.CSharp.OrderingRules">
<Rules>
<Rule Name="UsingDirectivesMustBePlacedWithinNamespace">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ElementsMustAppearInTheCorrectOrder">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ElementsMustBeOrderedByAccess">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ConstantsMustAppearBeforeFields">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="StaticElementsMustAppearBeforeInstanceElements">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="DeclarationKeywordsMustFollowOrder">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ProtectedMustComeBeforeInternal">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="PropertyAccessorsMustFollowOrder">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="EventAccessorsMustFollowOrder">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="StaticReadonlyElementsMustAppearBeforeStaticNonReadonlyElements">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="InstanceReadonlyElementsMustAppearBeforeInstanceNonReadonlyElements">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="SystemUsingDirectivesMustBePlacedBeforeOtherUsingDirectives">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="UsingAliasDirectivesMustBePlacedAfterOtherUsingDirectives">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="UsingDirectivesMustBeOrderedAlphabeticallyByNamespace">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="UsingAliasDirectivesMustBeOrderedAlphabeticallyByAliasName">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
</Rules>
<AnalyzerSettings />
</Analyzer>
<Analyzer AnalyzerId="StyleCop.CSharp.ReadabilityRules">
<Rules>
<Rule Name="CommentsMustContainText">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="DoNotPrefixCallsWithBaseUnlessLocalImplementationExists">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="PrefixLocalCallsWithThis">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="PrefixCallsCorrectly">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="OpeningParenthesisMustBeOnDeclarationLine">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ClosingParenthesisMustBeOnLineOfLastParameter">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ClosingParenthesisMustBeOnLineOfOpeningParenthesis">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="CommaMustBeOnSameLineAsPreviousParameter">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ParameterListMustFollowDeclaration">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ParameterMustFollowComma">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="SplitParametersMustStartOnLineAfterDeclaration">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ParametersMustBeOnSameLineOrSeparateLines">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ParameterMustNotSpanMultipleLines">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="QueryClauseMustFollowPreviousClause">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="QueryClausesMustBeOnSeparateLinesOrAllOnOneLine">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="QueryClauseMustBeginOnNewLineWhenPreviousClauseSpansMultipleLines">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="QueryClausesSpanningMultipleLinesMustBeginOnOwnLine">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="DoNotPlaceRegionsWithinElements">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="CodeMustNotContainEmptyStatements">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="CodeMustNotContainMultipleStatementsOnOneLine">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="BlockStatementsMustNotContainEmbeddedComments">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="BlockStatementsMustNotContainEmbeddedRegions">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="UseStringEmptyForEmptyStrings">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="UseBuiltInTypeAlias">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="UseShorthandForNullableTypes">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
</Rules>
<AnalyzerSettings />
</Analyzer>
<Analyzer AnalyzerId="StyleCop.CSharp.SpacingRules">
<Rules>
<Rule Name="KeywordsMustBeSpacedCorrectly">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="CommasMustBeSpacedCorrectly">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="SemicolonsMustBeSpacedCorrectly">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="SymbolsMustBeSpacedCorrectly">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="DocumentationLinesMustBeginWithSingleSpace">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="SingleLineCommentsMustBeginWithSingleSpace">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="PreprocessorKeywordsMustNotBePrecededBySpace">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="OperatorKeywordMustBeFollowedBySpace">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="OpeningParenthesisMustBeSpacedCorrectly">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ClosingParenthesisMustBeSpacedCorrectly">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="OpeningSquareBracketsMustBeSpacedCorrectly">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ClosingSquareBracketsMustBeSpacedCorrectly">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="OpeningCurlyBracketsMustBeSpacedCorrectly">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ClosingCurlyBracketsMustBeSpacedCorrectly">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="OpeningGenericBracketsMustBeSpacedCorrectly">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ClosingGenericBracketsMustBeSpacedCorrectly">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="OpeningAttributeBracketsMustBeSpacedCorrectly">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ClosingAttributeBracketsMustBeSpacedCorrectly">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="NullableTypeSymbolsMustNotBePrecededBySpace">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="MemberAccessSymbolsMustBeSpacedCorrectly">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="IncrementDecrementSymbolsMustBeSpacedCorrectly">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="NegativeSignsMustBeSpacedCorrectly">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="PositiveSignsMustBeSpacedCorrectly">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="DereferenceAndAccessOfSymbolsMustBeSpacedCorrectly">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ColonsMustBeSpacedCorrectly">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="CodeMustNotContainMultipleWhitespaceInARow">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="CodeMustNotContainSpaceAfterNewKeywordInImplicitlyTypedArrayAllocation">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="TabsMustNotBeUsed">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
</Rules>
<AnalyzerSettings />
</Analyzer>
</Analyzers>
</StyleCopSettings>
Binary file not shown.
@@ -1,10 +1,11 @@
using System;
using System.Collections.Generic;
using System.Text;
using System.Runtime.InteropServices;
using VocaluxeLib.Menu;
using Vocaluxe.Menu;
[assembly: ComVisible(false)]
namespace Vocaluxe.PartyModes
namespace VocaluxeLib.PartyModes.TicTacToe
{
public enum ESongSource
{
@@ -30,7 +31,9 @@ namespace Vocaluxe.PartyModes
public int Winner;
public bool Finished = false;
}
#region Communication
#region ToScreen
public struct DataToScreenConfig
{
@@ -105,6 +108,7 @@ namespace Vocaluxe.PartyModes
public List<int> Songs;
}
#endregion FromScreen
#endregion Communication
public sealed class PartyModeTicTacToe : CPartyMode
@@ -115,7 +119,7 @@ namespace Vocaluxe.PartyModes
private const int MinTeams = 2;
private const int NumFields = 9;
enum EStage
private enum EStage
{
NotStarted,
Config,
@@ -124,7 +128,7 @@ namespace Vocaluxe.PartyModes
Singing
}
struct Data
private struct Data
{
public int NumPlayerTeam1;
public int NumPlayerTeam2;
@@ -163,12 +167,12 @@ namespace Vocaluxe.PartyModes
_ScreenSongOptions.Selection.RandomOnly = false;
_ScreenSongOptions.Selection.PartyMode = true;
_ScreenSongOptions.Selection.CategoryChangeAllowed = true;
_ScreenSongOptions.Selection.NumJokers = new int[] { 5, 5 };
_ScreenSongOptions.Selection.TeamNames = new string[] { "foo", "bar" };
_ScreenSongOptions.Selection.NumJokers = new int[] {5, 5};
_ScreenSongOptions.Selection.TeamNames = new string[] {"foo", "bar"};
_ScreenSongOptions.Sorting.SearchString = String.Empty;
_ScreenSongOptions.Sorting.SearchActive = false;
_ScreenSongOptions.Sorting.ShowDuetSongs = false;
_ScreenSongOptions.Sorting.DuetOptions = EDuetOptions.NoDuets;
_Stage = EStage.NotStarted;
@@ -285,10 +289,8 @@ namespace Vocaluxe.PartyModes
GameData.PlayerTeam2 = data.ScreenMain.PlayerTeam2;
}
if (data.ScreenMain.FadeToNameSelection)
{
_Stage = EStage.Config;
}
}
catch (Exception e)
{
CBase.Log.LogError("Error in party mode TicTacToe. Can't cast received data from screen " + ScreenName + ". " + e.Message);
@@ -407,8 +409,6 @@ namespace Vocaluxe.PartyModes
Screen.DataToScreen(ToScreenMain);
}
break;
default:
break;
}
return Screen;
@@ -474,9 +474,7 @@ namespace Vocaluxe.PartyModes
return NumFields;
}
public override void JokerUsed(int TeamNr)
{
}
public override void JokerUsed(int TeamNr) {}
public override void SongSelected(int SongID)
{
@@ -531,14 +529,19 @@ namespace Vocaluxe.PartyModes
int num = 0;
int random = 0;
//Add IDs to team-list
while (GameData.PlayerTeam1.Count < GameData.NumFields + GameData.NumJokerRetry[0] && IDs1.Count == 0 && GameData.PlayerTeam2.Count < GameData.NumFields + GameData.NumJokerRetry[1] && IDs2.Count == 0)
while (GameData.PlayerTeam1.Count < GameData.NumFields + GameData.NumJokerRetry[0] && IDs1.Count == 0 &&
GameData.PlayerTeam2.Count < GameData.NumFields + GameData.NumJokerRetry[1] && IDs2.Count == 0)
{
if (IDs1.Count == 0)
{
for (int i = 0; i < GameData.NumPlayerTeam1; i++)
IDs1.Add(i);
}
if (IDs2.Count == 0)
{
for (int i = 0; i < GameData.NumPlayerTeam2; i++)
IDs2.Add(i);
}
if (GameData.PlayerTeam1.Count < GameData.NumFields + GameData.NumJokerRetry[0])
{
random = CBase.Game.GetRandom((IDs1.Count - 1) * 10);
@@ -569,8 +572,10 @@ namespace Vocaluxe.PartyModes
while (GameData.PlayerTeam1.Count < GameData.NumFields + GameData.NumJokerRetry[0] && IDs.Count == 0)
{
if (IDs.Count == 0)
{
for (int i = 0; i < GameData.NumPlayerTeam1; i++)
IDs.Add(i);
}
if (GameData.PlayerTeam1.Count < GameData.NumFields + GameData.NumJokerRetry[0])
{
random = CBase.Game.GetRandom((IDs.Count - 1) * 10);
@@ -592,8 +597,10 @@ namespace Vocaluxe.PartyModes
while (GameData.PlayerTeam2.Count < GameData.NumFields + GameData.NumJokerRetry[1] && IDs.Count == 0)
{
if (IDs.Count == 0)
{
for (int i = 0; i < GameData.NumPlayerTeam2; i++)
IDs.Add(i);
}
if (GameData.PlayerTeam2.Count < GameData.NumFields + GameData.NumJokerRetry[1])
{
random = CBase.Game.GetRandom((IDs.Count - 1) * 20);
@@ -626,7 +633,8 @@ namespace Vocaluxe.PartyModes
break;
}
while(GameData.Songs.Count < (GameData.NumFields + GameData.NumJokerRandom[0] + GameData.NumJokerRandom[1])){
while (GameData.Songs.Count < (GameData.NumFields + GameData.NumJokerRandom[0] + GameData.NumJokerRandom[1]))
{
List<int> Songs = new List<int>();
switch (GameData.SongSource)
{
@@ -635,32 +643,38 @@ namespace Vocaluxe.PartyModes
{
int id = CBase.Playlist.GetPlaylistSong(GameData.PlaylistID, i).SongID;
foreach (EGameMode mode in CBase.Songs.GetSongByID(id).AvailableGameModes)
{
if (mode == gm)
Songs.Add(id);
}
}
break;
case ESongSource.TR_ALLSONGS:
for (int i = 0; i < CBase.Songs.GetNumSongs(); i++)
{
foreach (EGameMode mode in CBase.Songs.GetSongByID(i).AvailableGameModes)
{
if (mode == gm)
Songs.Add(i);
}
}
break;
case ESongSource.TR_CATEGORY:
CBase.Songs.SetCategory(GameData.CategoryID);
for (int i = 0; i < CBase.Songs.NumSongsInCategory(GameData.CategoryID); i++)
{
foreach(EGameMode mode in CBase.Songs.GetVisibleSong(i).AvailableGameModes)
if(mode == gm)
foreach (EGameMode mode in CBase.Songs.GetVisibleSong(i).AvailableGameModes)
{
if (mode == gm)
Songs.Add(CBase.Songs.GetVisibleSong(i).ID);
}
}
CBase.Songs.SetCategory(-1);
break;
}
while(Songs.Count > 0)
while (Songs.Count > 0)
{
GameData.Songs.Add(Songs[CBase.Game.GetRandom(Songs.Count - 1)]);
Songs.Remove(GameData.Songs[GameData.Songs.Count - 1]);
@@ -776,13 +790,9 @@ namespace Vocaluxe.PartyModes
GameData.Rounds[GameData.SingRoundNr].PointsTeam2 = (int)Math.Round(results[1].Points);
GameData.Rounds[GameData.SingRoundNr].Finished = true;
if (GameData.Rounds[GameData.SingRoundNr].PointsTeam1 < GameData.Rounds[GameData.SingRoundNr].PointsTeam2)
{
GameData.Rounds[GameData.SingRoundNr].Winner = 2;
}
else if (GameData.Rounds[GameData.SingRoundNr].PointsTeam1 > GameData.Rounds[GameData.SingRoundNr].PointsTeam2)
{
GameData.Rounds[GameData.SingRoundNr].Winner = 1;
}
else
{
GameData.Rounds[GameData.SingRoundNr].Finished = false;
@@ -8,11 +8,10 @@
<ProjectGuid>{6F3E1874-F28A-40E9-AFBD-31934D593679}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>PartyModeTicTacToe</RootNamespace>
<AssemblyName>PartyModeTicTacToe</AssemblyName>
<TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
<TargetFrameworkProfile>
</TargetFrameworkProfile>
<RootNamespace>VocaluxeLib.PartyModes.TicTacToe</RootNamespace>
<AssemblyName>TicTacToe</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<TargetFrameworkProfile>Client</TargetFrameworkProfile>
<FileAlignment>512</FileAlignment>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'DebugWin|x86' ">
@@ -20,7 +19,7 @@
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>..\..\Output\PartyModes\TicTacToe\Code</OutputPath>
<OutputPath>bin</OutputPath>
<DefineConstants>TRACE;DEBUG;WIN</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
@@ -30,7 +29,7 @@
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>none</DebugType>
<Optimize>true</Optimize>
<OutputPath>..\..\Output\PartyModes\TicTacToe\Code</OutputPath>
<OutputPath>bin</OutputPath>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<UseVSHostingProcess>false</UseVSHostingProcess>
@@ -42,17 +41,18 @@
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>..\..\Output\PartyModes\TicTacToe\Code</OutputPath>
<OutputPath>bin</OutputPath>
<DefineConstants>TRACE;DEBUG;WIN</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
<CodeAnalysisRuleSet>..\..\CheckingRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'ReleaseWin|x64'">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>none</DebugType>
<Optimize>true</Optimize>
<OutputPath>..\..\Output\PartyModes\TicTacToe\Code</OutputPath>
<OutputPath>bin</OutputPath>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<UseVSHostingProcess>false</UseVSHostingProcess>
@@ -64,7 +64,7 @@
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>..\..\Output\PartyModes\TicTacToe\Code</OutputPath>
<OutputPath>bin</OutputPath>
<DefineConstants>TRACE;DEBUG;LINUX</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
@@ -74,7 +74,7 @@
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>none</DebugType>
<Optimize>true</Optimize>
<OutputPath>..\..\Output\PartyModes\TicTacToe\Code</OutputPath>
<OutputPath>bin</OutputPath>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<UseVSHostingProcess>false</UseVSHostingProcess>
@@ -86,7 +86,7 @@
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>..\..\Output\PartyModes\TicTacToe\Code</OutputPath>
<OutputPath>bin</OutputPath>
<DefineConstants>TRACE;DEBUG;LINUX</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
@@ -96,7 +96,7 @@
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>none</DebugType>
<Optimize>true</Optimize>
<OutputPath>..\..\Output\PartyModes\TicTacToe\Code</OutputPath>
<OutputPath>bin</OutputPath>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<UseVSHostingProcess>false</UseVSHostingProcess>
@@ -107,18 +107,11 @@
<StartupObject />
</PropertyGroup>
<ItemGroup>
<Compile Include="PartyModeTicTacToe.cs">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Compile>
<Compile Include="PartyScreenTicTacToeConfig.cs">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Compile>
<Compile Include="PartyScreenTicTacToeMain.cs">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Compile>
<Compile Include="PartyScreenTicTacToeNames.cs">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Compile>
<Compile Include="GlobalSuppressions.cs" />
<Compile Include="PartyModeTicTacToe.cs" />
<Compile Include="PartyScreenTicTacToeConfig.cs" />
<Compile Include="PartyScreenTicTacToeMain.cs" />
<Compile Include="PartyScreenTicTacToeNames.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\VocaluxeLib\VocaluxeLib.csproj">
@@ -134,7 +127,14 @@
<Reference Include="System.Windows.Forms" />
<Reference Include="System.XML" />
</ItemGroup>
<ItemGroup>
<Folder Include="Properties\" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
<PostBuildEvent>cd $(SolutionDir)Partymodes\
xcopy "$(ProjectDir)*.cs" "$(SolutionDir)Output\PartyModes\$(TargetName)\Code\" /EXCLUDE:Excludes.txt /I /Y</PostBuildEvent>
</PropertyGroup>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
@@ -1,43 +1,38 @@
using System;
using System.Collections.Generic;
using System.Text;
using System.Windows.Forms;
using VocaluxeLib.Menu;
using Vocaluxe.Menu;
namespace Vocaluxe.PartyModes
namespace VocaluxeLib.PartyModes.TicTacToe
{
public class PartyScreenTicTacToeConfig : CMenuParty
{
// Version number for theme files. Increment it, if you've changed something on the theme files!
const int ScreenVersion = 1;
protected override int _ScreenVersion
{
get { return 1; }
}
const string SelectSlideNumPlayerTeam1 = "SelectSlideNumPlayerTeam1";
const string SelectSlideNumPlayerTeam2 = "SelectSlideNumPlayerTeam2";
const string SelectSlideNumFields = "SelectSlideNumFields";
const string SelectSlideSongSource = "SelectSlideSongSource";
const string SelectSlidePlaylist = "SelectSlidePlaylist";
const string SelectSlideCategory = "SelectSlideCategory";
const string SelectSlideGameMode = "SelectSlideGameMode";
const string ButtonNext = "ButtonNext";
const string ButtonBack = "ButtonBack";
private const string SelectSlideNumPlayerTeam1 = "SelectSlideNumPlayerTeam1";
private const string SelectSlideNumPlayerTeam2 = "SelectSlideNumPlayerTeam2";
private const string SelectSlideNumFields = "SelectSlideNumFields";
private const string SelectSlideSongSource = "SelectSlideSongSource";
private const string SelectSlidePlaylist = "SelectSlidePlaylist";
private const string SelectSlideCategory = "SelectSlideCategory";
private const string SelectSlideGameMode = "SelectSlideGameMode";
private const string ButtonNext = "ButtonNext";
private const string ButtonBack = "ButtonBack";
private bool ConfigOk = true;
DataFromScreen Data;
private DataFromScreen Data;
public PartyScreenTicTacToeConfig()
{
}
protected override void Init()
public override void Init()
{
base.Init();
_ThemeName = "PartyScreenTicTacToeConfig";
_ThemeSelectSlides = new string[] { SelectSlideNumPlayerTeam1, SelectSlideNumPlayerTeam2, SelectSlideNumFields, SelectSlideSongSource, SelectSlidePlaylist, SelectSlideCategory, SelectSlideGameMode };
_ThemeButtons = new string[] { ButtonNext, ButtonBack };
_ScreenVersion = ScreenVersion;
_ThemeSelectSlides = new string[]
{SelectSlideNumPlayerTeam1, SelectSlideNumPlayerTeam2, SelectSlideNumFields, SelectSlideSongSource, SelectSlidePlaylist, SelectSlideCategory, SelectSlideGameMode};
_ThemeButtons = new string[] {ButtonNext, ButtonBack};
Data = new DataFromScreen();
FromScreenConfig config = new FromScreenConfig();
@@ -51,11 +46,6 @@ namespace Vocaluxe.PartyModes
Data.ScreenConfig = config;
}
public override void LoadTheme(string XmlPath)
{
base.LoadTheme(XmlPath);
}
public override void DataToScreen(object ReceivedData)
{
DataToScreenConfig config = new DataToScreenConfig();
@@ -73,22 +63,18 @@ namespace Vocaluxe.PartyModes
}
catch (Exception e)
{
CBase.Log.LogError("Error in party mode screen TicTacToe config. Can't cast received data from game mode " + _ThemeName + ". " + e.Message);;
CBase.Log.LogError("Error in party mode screen TicTacToe config. Can't cast received data from game mode " + ThemeName + ". " + e.Message);
}
}
}
public override bool HandleInput(KeyEvent KeyEvent)
public override bool HandleInput(KeyEvent keyEvent)
{
base.HandleInput(KeyEvent);
base.HandleInput(keyEvent);
if (KeyEvent.KeyPressed)
{
}
if (keyEvent.KeyPressed) {}
else
{
switch (KeyEvent.Key)
switch (keyEvent.Key)
{
case Keys.Back:
case Keys.Escape:
@@ -98,10 +84,10 @@ namespace Vocaluxe.PartyModes
case Keys.Enter:
UpdateSlides();
if (Buttons[htButtons(ButtonBack)].Selected)
if (Buttons[ButtonBack].Selected)
Back();
if (Buttons[htButtons(ButtonNext)].Selected)
if (Buttons[ButtonNext].Selected)
Next();
break;
@@ -117,24 +103,22 @@ namespace Vocaluxe.PartyModes
return true;
}
public override bool HandleMouse(MouseEvent MouseEvent)
public override bool HandleMouse(MouseEvent mouseEvent)
{
base.HandleMouse(MouseEvent);
base.HandleMouse(mouseEvent);
if (MouseEvent.LB && IsMouseOver(MouseEvent))
if (mouseEvent.LB && IsMouseOver(mouseEvent))
{
UpdateSlides();
if (Buttons[htButtons(ButtonBack)].Selected)
if (Buttons[ButtonBack].Selected)
Back();
if (Buttons[htButtons(ButtonNext)].Selected)
if (Buttons[ButtonNext].Selected)
Next();
}
if (MouseEvent.RB)
{
if (mouseEvent.RB)
Back();
}
return true;
}
@@ -152,7 +136,7 @@ namespace Vocaluxe.PartyModes
public override bool UpdateGame()
{
Buttons[htButtons(ButtonNext)].Visible = ConfigOk;
Buttons[ButtonNext].Visible = ConfigOk;
return true;
}
@@ -162,86 +146,75 @@ namespace Vocaluxe.PartyModes
return true;
}
public override void OnClose()
{
base.OnClose();
}
private void FillSlides()
{
// build num player slide (min player ... max player);
SelectSlides[htSelectSlides(SelectSlideNumPlayerTeam1)].Clear();
for (int i = _PartyMode.GetMinPlayer()/2; i <= _PartyMode.GetMaxPlayer() / 2; i++)
{
SelectSlides[htSelectSlides(SelectSlideNumPlayerTeam1)].AddValue(i.ToString());
}
SelectSlides[htSelectSlides(SelectSlideNumPlayerTeam1)].Selection = Data.ScreenConfig.NumPlayerTeam1 - (_PartyMode.GetMinPlayer()/2);
SelectSlides[SelectSlideNumPlayerTeam1].Clear();
for (int i = _PartyMode.GetMinPlayer() / 2; i <= _PartyMode.GetMaxPlayer() / 2; i++)
SelectSlides[SelectSlideNumPlayerTeam1].AddValue(i.ToString());
SelectSlides[SelectSlideNumPlayerTeam1].Selection = Data.ScreenConfig.NumPlayerTeam1 - (_PartyMode.GetMinPlayer() / 2);
SelectSlides[htSelectSlides(SelectSlideNumPlayerTeam2)].Clear();
for (int i = _PartyMode.GetMinPlayer()/2; i <= _PartyMode.GetMaxPlayer() / 2; i++)
{
SelectSlides[htSelectSlides(SelectSlideNumPlayerTeam2)].AddValue(i.ToString());
}
SelectSlides[htSelectSlides(SelectSlideNumPlayerTeam2)].Selection = Data.ScreenConfig.NumPlayerTeam2 -( _PartyMode.GetMinPlayer()/2);
SelectSlides[SelectSlideNumPlayerTeam2].Clear();
for (int i = _PartyMode.GetMinPlayer() / 2; i <= _PartyMode.GetMaxPlayer() / 2; i++)
SelectSlides[SelectSlideNumPlayerTeam2].AddValue(i.ToString());
SelectSlides[SelectSlideNumPlayerTeam2].Selection = Data.ScreenConfig.NumPlayerTeam2 - (_PartyMode.GetMinPlayer() / 2);
SelectSlides[htSelectSlides(SelectSlideNumFields)].Clear();
SelectSlides[htSelectSlides(SelectSlideNumFields)].AddValue("9");
SelectSlides[htSelectSlides(SelectSlideNumFields)].AddValue("16");
SelectSlides[htSelectSlides(SelectSlideNumFields)].AddValue("25");
SelectSlides[SelectSlideNumFields].Clear();
SelectSlides[SelectSlideNumFields].AddValue("9");
SelectSlides[SelectSlideNumFields].AddValue("16");
SelectSlides[SelectSlideNumFields].AddValue("25");
if (Data.ScreenConfig.NumFields == 9)
SelectSlides[htSelectSlides(SelectSlideNumFields)].Selection = 0;
SelectSlides[SelectSlideNumFields].Selection = 0;
else if (Data.ScreenConfig.NumFields == 16)
SelectSlides[htSelectSlides(SelectSlideNumFields)].Selection = 1;
SelectSlides[SelectSlideNumFields].Selection = 1;
else if (Data.ScreenConfig.NumFields == 25)
SelectSlides[htSelectSlides(SelectSlideNumFields)].Selection = 2;
SelectSlides[SelectSlideNumFields].Selection = 2;
SelectSlides[htSelectSlides(SelectSlideSongSource)].Clear();
SelectSlides[htSelectSlides(SelectSlideSongSource)].SetValues<ESongSource>((int)Data.ScreenConfig.SongSource);
SelectSlides[SelectSlideSongSource].Clear();
SelectSlides[SelectSlideSongSource].SetValues<ESongSource>((int)Data.ScreenConfig.SongSource);
string[] _Playlists = CBase.Playlist.GetPlaylistNames();
SelectSlides[htSelectSlides(SelectSlidePlaylist)].Clear();
SelectSlides[SelectSlidePlaylist].Clear();
for (int i = 0; i < _Playlists.Length; i++)
{
string value = _Playlists[i] + " (" + CBase.Playlist.GetPlaylistSongCount(i) + " " + CBase.Language.Translate("TR_SONGS", _PartyModeID) + ")";
SelectSlides[htSelectSlides(SelectSlidePlaylist)].AddValue(value);
SelectSlides[SelectSlidePlaylist].AddValue(value);
}
SelectSlides[htSelectSlides(SelectSlidePlaylist)].Selection = Data.ScreenConfig.PlaylistID;
SelectSlides[htSelectSlides(SelectSlidePlaylist)].Visible = Data.ScreenConfig.SongSource == ESongSource.TR_PLAYLIST;
SelectSlides[SelectSlidePlaylist].Selection = Data.ScreenConfig.PlaylistID;
SelectSlides[SelectSlidePlaylist].Visible = Data.ScreenConfig.SongSource == ESongSource.TR_PLAYLIST;
string[] _Categories = new string[CBase.Songs.GetNumCategories()];
for (int i = 0; i < CBase.Songs.GetNumCategories(); i++ )
{
for (int i = 0; i < CBase.Songs.GetNumCategories(); i++)
_Categories[i] = CBase.Songs.GetCategory(i).Name;
}
SelectSlides[htSelectSlides(SelectSlideCategory)].Clear();
SelectSlides[SelectSlideCategory].Clear();
for (int i = 0; i < _Categories.Length; i++)
{
string value = _Categories[i] + " (" + CBase.Songs.NumSongsInCategory(i) + " " + CBase.Language.Translate("TR_SONGS", _PartyModeID) + ")";
SelectSlides[htSelectSlides(SelectSlideCategory)].AddValue(value);
SelectSlides[SelectSlideCategory].AddValue(value);
}
SelectSlides[htSelectSlides(SelectSlideCategory)].Selection = Data.ScreenConfig.CategoryID;
SelectSlides[htSelectSlides(SelectSlideCategory)].Visible = Data.ScreenConfig.SongSource == ESongSource.TR_CATEGORY;
SelectSlides[SelectSlideCategory].Selection = Data.ScreenConfig.CategoryID;
SelectSlides[SelectSlideCategory].Visible = Data.ScreenConfig.SongSource == ESongSource.TR_CATEGORY;
SelectSlides[htSelectSlides(SelectSlideGameMode)].Visible = true;
SelectSlides[htSelectSlides(SelectSlideGameMode)].SetValues<EPartyGameMode>((int)Data.ScreenConfig.GameMode);
SelectSlides[SelectSlideGameMode].Visible = true;
SelectSlides[SelectSlideGameMode].SetValues<EPartyGameMode>((int)Data.ScreenConfig.GameMode);
}
private void UpdateSlides()
{
Data.ScreenConfig.NumPlayerTeam1 = SelectSlides[htSelectSlides(SelectSlideNumPlayerTeam1)].Selection + (_PartyMode.GetMinPlayer()/2);
Data.ScreenConfig.NumPlayerTeam2 = SelectSlides[htSelectSlides(SelectSlideNumPlayerTeam2)].Selection + (_PartyMode.GetMinPlayer()/2);
Data.ScreenConfig.NumPlayerTeam1 = SelectSlides[SelectSlideNumPlayerTeam1].Selection + (_PartyMode.GetMinPlayer() / 2);
Data.ScreenConfig.NumPlayerTeam2 = SelectSlides[SelectSlideNumPlayerTeam2].Selection + (_PartyMode.GetMinPlayer() / 2);
if (SelectSlides[htSelectSlides(SelectSlideNumFields)].Selection == 0)
if (SelectSlides[SelectSlideNumFields].Selection == 0)
Data.ScreenConfig.NumFields = 9;
else if (SelectSlides[htSelectSlides(SelectSlideNumFields)].Selection == 1)
else if (SelectSlides[SelectSlideNumFields].Selection == 1)
Data.ScreenConfig.NumFields = 16;
else if (SelectSlides[htSelectSlides(SelectSlideNumFields)].Selection == 2)
else if (SelectSlides[SelectSlideNumFields].Selection == 2)
Data.ScreenConfig.NumFields = 25;
Data.ScreenConfig.SongSource = (ESongSource)SelectSlides[htSelectSlides(SelectSlideSongSource)].Selection;
Data.ScreenConfig.PlaylistID = SelectSlides[htSelectSlides(SelectSlidePlaylist)].Selection;
Data.ScreenConfig.CategoryID = SelectSlides[htSelectSlides(SelectSlideCategory)].Selection;
Data.ScreenConfig.GameMode = (EPartyGameMode)SelectSlides[htSelectSlides(SelectSlideGameMode)].Selection;
Data.ScreenConfig.SongSource = (ESongSource)SelectSlides[SelectSlideSongSource].Selection;
Data.ScreenConfig.PlaylistID = SelectSlides[SelectSlidePlaylist].Selection;
Data.ScreenConfig.CategoryID = SelectSlides[SelectSlideCategory].Selection;
Data.ScreenConfig.GameMode = (EPartyGameMode)SelectSlides[SelectSlideGameMode].Selection;
EGameMode gm = EGameMode.TR_GAMEMODE_NORMAL;
@@ -263,6 +236,7 @@ namespace Vocaluxe.PartyModes
if (Data.ScreenConfig.SongSource == ESongSource.TR_PLAYLIST)
{
if (CBase.Playlist.GetNumPlaylists() > 0)
{
if (CBase.Playlist.GetPlaylistSongCount(Data.ScreenConfig.PlaylistID) > 0)
{
ConfigOk = false;
@@ -270,23 +244,27 @@ namespace Vocaluxe.PartyModes
{
int id = CBase.Playlist.GetPlaylistSong(Data.ScreenConfig.PlaylistID, i).SongID;
foreach (EGameMode mode in CBase.Songs.GetSongByID(id).AvailableGameModes)
{
if (mode == gm)
{
ConfigOk = true;
break;
}
}
if (ConfigOk)
break;
}
}
else
ConfigOk = false;
}
else
ConfigOk = false;
}
if (Data.ScreenConfig.SongSource == ESongSource.TR_CATEGORY)
{
if (CBase.Songs.GetNumCategories() > 0)
{
if (CBase.Songs.NumSongsInCategory(Data.ScreenConfig.CategoryID) > 0)
{
CBase.Songs.SetCategory(Data.ScreenConfig.CategoryID);
@@ -294,11 +272,13 @@ namespace Vocaluxe.PartyModes
for (int i = 0; i < CBase.Songs.NumSongsInCategory(Data.ScreenConfig.CategoryID); i++)
{
foreach (EGameMode mode in CBase.Songs.GetVisibleSong(i).AvailableGameModes)
{
if (mode == gm)
{
ConfigOk = true;
break;
}
}
if (ConfigOk)
break;
}
@@ -306,6 +286,7 @@ namespace Vocaluxe.PartyModes
}
else
ConfigOk = false;
}
else
ConfigOk = false;
}
@@ -316,11 +297,13 @@ namespace Vocaluxe.PartyModes
for (int i = 0; i < CBase.Songs.GetNumSongs(); i++)
{
foreach (EGameMode mode in CBase.Songs.GetSongByID(i).AvailableGameModes)
{
if (mode == gm)
{
ConfigOk = true;
break;
}
}
if (ConfigOk)
break;
}
@@ -328,8 +311,8 @@ namespace Vocaluxe.PartyModes
else
ConfigOk = false;
}
SelectSlides[htSelectSlides(SelectSlideCategory)].Visible = Data.ScreenConfig.SongSource == ESongSource.TR_CATEGORY;
SelectSlides[htSelectSlides(SelectSlidePlaylist)].Visible = Data.ScreenConfig.SongSource == ESongSource.TR_PLAYLIST;
SelectSlides[SelectSlideCategory].Visible = Data.ScreenConfig.SongSource == ESongSource.TR_CATEGORY;
SelectSlides[SelectSlidePlaylist].Visible = Data.ScreenConfig.SongSource == ESongSource.TR_PLAYLIST;
}
private void Back()
@@ -339,7 +322,7 @@ namespace Vocaluxe.PartyModes
private void Next()
{
_PartyMode.DataFromScreen(_ThemeName, Data);
_PartyMode.DataFromScreen(ThemeName, Data);
}
}
}
@@ -1,11 +1,10 @@
using System;
using System.Collections.Generic;
using System.Text;
using System.Windows.Forms;
using VocaluxeLib.Menu;
using VocaluxeLib.Menu.SongMenu;
using Vocaluxe.Menu;
namespace Vocaluxe.PartyModes
namespace VocaluxeLib.PartyModes.TicTacToe
{
public class Field
{
@@ -24,34 +23,36 @@ namespace Vocaluxe.PartyModes
public class PartyScreenTicTacToeMain : CMenuParty
{
// Version number for theme files. Increment it, if you've changed something on the theme files!
const int ScreenVersion = 1;
protected override int _ScreenVersion
{
get { return 1; }
}
const string TextPopupReallyExit = "TextPopupReallyExit";
const string TextTeamChoosing = "TextTeamChoosing";
const string TextFinishMessage = "TextFinishMessage";
const string TextNextPlayerT1 = "TextNextPlayerT1";
const string TextNextPlayerT2 = "TextNextPlayerT2";
const string TextNextPlayerNameT1 = "TextNextPlayerNameT1";
const string TextNextPlayerNameT2 = "TextNextPlayerNameT2";
private const string TextPopupReallyExit = "TextPopupReallyExit";
private const string TextTeamChoosing = "TextTeamChoosing";
private const string TextFinishMessage = "TextFinishMessage";
private const string TextNextPlayerT1 = "TextNextPlayerT1";
private const string TextNextPlayerT2 = "TextNextPlayerT2";
private const string TextNextPlayerNameT1 = "TextNextPlayerNameT1";
private const string TextNextPlayerNameT2 = "TextNextPlayerNameT2";
const string ButtonNextRound = "ButtonNextRound";
const string ButtonBack = "ButtonBack";
const string ButtonExit = "ButtonExit";
const string ButtonPopupYes = "ButtonPopupYes";
const string ButtonPopupNo = "ButtonPopupNo";
const string ButtonField = "ButtonField";
private const string ButtonNextRound = "ButtonNextRound";
private const string ButtonBack = "ButtonBack";
private const string ButtonExit = "ButtonExit";
private const string ButtonPopupYes = "ButtonPopupYes";
private const string ButtonPopupNo = "ButtonPopupNo";
private const string ButtonField = "ButtonField";
const string ButtonJokerRandomT1 = "ButtonJokerRandomT1";
const string ButtonJokerRandomT2 = "ButtonJokerRandomT2";
const string ButtonJokerRetryT1 = "ButtonJokerRetryT1";
const string ButtonJokerRetryT2 = "ButtonJokerRetryT2";
private const string ButtonJokerRandomT1 = "ButtonJokerRandomT1";
private const string ButtonJokerRandomT2 = "ButtonJokerRandomT2";
private const string ButtonJokerRetryT1 = "ButtonJokerRetryT1";
private const string ButtonJokerRetryT2 = "ButtonJokerRetryT2";
private const string StaticPopupBG = "StaticPopupBG";
private const string StaticAvatarT1 = "StaticAvatarT1";
private const string StaticAvatarT2 = "StaticAvatarT2";
const string StaticPopupBG = "StaticPopupBG";
const string StaticAvatarT1 = "StaticAvatarT1";
const string StaticAvatarT2 = "StaticAvatarT2";
private bool ExitPopupVisible = false;
private bool ExitPopupVisible;
private DataFromScreen Data;
private DataToScreenMain GameData;
@@ -69,19 +70,17 @@ namespace Vocaluxe.PartyModes
private int[,] Possibilities;
private EStatus Status;
public PartyScreenTicTacToeMain()
{
}
protected override void Init()
public override void Init()
{
base.Init();
_ThemeName = "PartyScreenTicTacToeMain";
_ThemeTexts = new string[] { TextPopupReallyExit, TextTeamChoosing, TextFinishMessage, TextNextPlayerT1, TextNextPlayerT2, TextNextPlayerNameT1, TextNextPlayerNameT2 };
_ThemeButtons = new string[] { ButtonNextRound, ButtonBack, ButtonExit, ButtonPopupYes, ButtonPopupNo, ButtonField, ButtonJokerRandomT1, ButtonJokerRandomT2, ButtonJokerRetryT1, ButtonJokerRetryT2 };
_ThemeStatics = new string[] { StaticPopupBG, StaticAvatarT1, StaticAvatarT2 };
_ScreenVersion = ScreenVersion;
_ThemeTexts = new string[] {TextPopupReallyExit, TextTeamChoosing, TextFinishMessage, TextNextPlayerT1, TextNextPlayerT2, TextNextPlayerNameT1, TextNextPlayerNameT2};
_ThemeButtons = new string[]
{
ButtonNextRound, ButtonBack, ButtonExit, ButtonPopupYes, ButtonPopupNo, ButtonField, ButtonJokerRandomT1, ButtonJokerRandomT2, ButtonJokerRetryT1,
ButtonJokerRetryT2
};
_ThemeStatics = new string[] {StaticPopupBG, StaticAvatarT1, StaticAvatarT2};
Data = new DataFromScreen();
FromScreenMain config = new FromScreenMain();
@@ -103,7 +102,7 @@ namespace Vocaluxe.PartyModes
base.LoadTheme(XmlPath);
CreateFields();
Buttons[htButtons(ButtonField)].Visible = false;
Buttons[ButtonField].Visible = false;
}
public override void DataToScreen(object ReceivedData)
@@ -117,32 +116,30 @@ namespace Vocaluxe.PartyModes
}
catch (Exception e)
{
CBase.Log.LogError("Error in party mode screen TicTacToe main. Can't cast received data from game mode " + _ThemeName + ". " + e.Message); ;
CBase.Log.LogError("Error in party mode screen TicTacToe main. Can't cast received data from game mode " + ThemeName + ". " + e.Message);
}
}
}
public override bool HandleInput(KeyEvent KeyEvent)
public override bool HandleInput(KeyEvent keyEvent)
{
base.HandleInput(KeyEvent);
base.HandleInput(keyEvent);
if (KeyEvent.KeyPressed)
{
}
if (keyEvent.KeyPressed) {}
else
{
switch (KeyEvent.Key)
switch (keyEvent.Key)
{
case Keys.Back:
case Keys.Escape:
if (!ExitPopupVisible)
{
if (GameData.CurrentRoundNr == 1 && Status != EStatus.FieldSelected)
Back();
else if(Status == EStatus.None)
else if (Status == EStatus.None)
EndParty();
else
ShowPopup(true);
}
else
ShowPopup(false);
break;
@@ -150,11 +147,11 @@ namespace Vocaluxe.PartyModes
case Keys.Enter:
if (!ExitPopupVisible)
{
if (Buttons[htButtons(ButtonNextRound)].Selected)
if (Buttons[ButtonNextRound].Selected)
NextRound();
if (Buttons[htButtons(ButtonBack)].Selected && GameData.CurrentRoundNr == 1 && Status != EStatus.FieldSelected)
if (Buttons[ButtonBack].Selected && GameData.CurrentRoundNr == 1 && Status != EStatus.FieldSelected)
Back();
if (Buttons[htButtons(ButtonExit)].Selected && (GameData.CurrentRoundNr > 1 || Status == EStatus.FieldSelected) && Status != EStatus.None)
if (Buttons[ButtonExit].Selected && (GameData.CurrentRoundNr > 1 || Status == EStatus.FieldSelected) && Status != EStatus.None)
ShowPopup(true);
else if (Status == EStatus.None)
EndParty();
@@ -181,21 +178,21 @@ namespace Vocaluxe.PartyModes
}
if (Status == EStatus.FieldSelected)
{
if (Buttons[htButtons(ButtonJokerRandomT1)].Selected)
if (Buttons[ButtonJokerRandomT1].Selected)
UseJoker(0, 0);
if (Buttons[htButtons(ButtonJokerRandomT2)].Selected)
if (Buttons[ButtonJokerRandomT2].Selected)
UseJoker(1, 0);
if (Buttons[htButtons(ButtonJokerRetryT1)].Selected)
if (Buttons[ButtonJokerRetryT1].Selected)
UseJoker(0, 1);
if (Buttons[htButtons(ButtonJokerRetryT2)].Selected)
if (Buttons[ButtonJokerRetryT2].Selected)
UseJoker(1, 1);
}
}
else
{
if (Buttons[htButtons(ButtonPopupYes)].Selected)
if (Buttons[ButtonPopupYes].Selected)
EndParty();
if (Buttons[htButtons(ButtonPopupNo)].Selected)
if (Buttons[ButtonPopupNo].Selected)
ShowPopup(false);
}
break;
@@ -204,23 +201,25 @@ namespace Vocaluxe.PartyModes
return true;
}
public override bool HandleMouse(MouseEvent MouseEvent)
public override bool HandleMouse(MouseEvent mouseEvent)
{
base.HandleMouse(MouseEvent);
base.HandleMouse(mouseEvent);
if (MouseEvent.LB && IsMouseOver(MouseEvent))
if (mouseEvent.LB && IsMouseOver(mouseEvent))
{
if (!ExitPopupVisible)
{
if (Buttons[htButtons(ButtonNextRound)].Selected)
if (Buttons[ButtonNextRound].Selected)
NextRound();
if (Buttons[htButtons(ButtonBack)].Selected)
if (Buttons[ButtonBack].Selected)
Back();
if (Buttons[htButtons(ButtonExit)].Selected)
if (Buttons[ButtonExit].Selected)
{
if (Status == EStatus.None)
EndParty();
else
ShowPopup(true);
}
for (int i = 0; i < GameData.NumFields; i++)
{
switch (Status)
@@ -242,44 +241,43 @@ namespace Vocaluxe.PartyModes
break;
}
}
if(Status == EStatus.FieldSelected)
if (Status == EStatus.FieldSelected)
{
if (Buttons[htButtons(ButtonJokerRandomT1)].Selected)
if (Buttons[ButtonJokerRandomT1].Selected)
UseJoker(0, 0);
if (Buttons[htButtons(ButtonJokerRandomT2)].Selected)
if (Buttons[ButtonJokerRandomT2].Selected)
UseJoker(1, 0);
if (Buttons[htButtons(ButtonJokerRetryT1)].Selected)
if (Buttons[ButtonJokerRetryT1].Selected)
UseJoker(0, 1);
if (Buttons[htButtons(ButtonJokerRetryT2)].Selected)
if (Buttons[ButtonJokerRetryT2].Selected)
UseJoker(1, 1);
}
}
else
{
if (Buttons[htButtons(ButtonPopupYes)].Selected)
if (Buttons[ButtonPopupYes].Selected)
EndParty();
if (Buttons[htButtons(ButtonPopupNo)].Selected)
if (Buttons[ButtonPopupNo].Selected)
ShowPopup(false);
}
}
if (MouseEvent.RB)
if (mouseEvent.RB)
{
if (!ExitPopupVisible)
{
if (GameData.CurrentRoundNr == 1 && Status != EStatus.FieldSelected)
Back();
else if(Status == EStatus.None)
else if (Status == EStatus.None)
EndParty();
else
ShowPopup(true);
}
else
ShowPopup(false);
}
if (MouseEvent.Wheel != 0)
{
}
if (mouseEvent.Wheel != 0) {}
return true;
}
@@ -294,15 +292,15 @@ namespace Vocaluxe.PartyModes
{
BuildWinnerPossibilities();
SelectedField = -1;
Buttons[htButtons(ButtonBack)].Visible = true;
Buttons[htButtons(ButtonExit)].Visible = false;
SetInteractionToButton(Buttons[htButtons(ButtonBack)]);
Buttons[ButtonBack].Visible = true;
Buttons[ButtonExit].Visible = false;
SetInteractionToButton(Buttons[ButtonBack]);
}
else
{
Buttons[htButtons(ButtonBack)].Visible = false;
Buttons[htButtons(ButtonExit)].Visible = true;
SetInteractionToButton(Buttons[htButtons(ButtonExit)]);
Buttons[ButtonBack].Visible = false;
Buttons[ButtonExit].Visible = true;
SetInteractionToButton(Buttons[ButtonExit]);
}
Status = EStatus.FieldChoosing;
@@ -314,36 +312,37 @@ namespace Vocaluxe.PartyModes
if (GameData.CurrentRoundNr <= GameData.NumFields && Winner == 0)
{
UpdateTeamChoosingMessage();
Texts[htTexts(TextNextPlayerT1)].Visible = false;
Texts[htTexts(TextNextPlayerT2)].Visible = false;
Texts[htTexts(TextNextPlayerNameT1)].Visible = false;
Texts[htTexts(TextNextPlayerNameT2)].Visible = false;
Statics[htStatics(StaticAvatarT1)].Visible = false;
Statics[htStatics(StaticAvatarT2)].Visible = false;
Buttons[htButtons(ButtonJokerRandomT1)].Visible = false;
Buttons[htButtons(ButtonJokerRandomT2)].Visible = false;
Buttons[htButtons(ButtonJokerRetryT1)].Visible = false;
Buttons[htButtons(ButtonJokerRetryT2)].Visible = false;
Buttons[htButtons(ButtonNextRound)].Visible = false;
Texts[htTexts(TextFinishMessage)].Visible = false;
Texts[TextNextPlayerT1].Visible = false;
Texts[TextNextPlayerT2].Visible = false;
Texts[TextNextPlayerNameT1].Visible = false;
Texts[TextNextPlayerNameT2].Visible = false;
Statics[StaticAvatarT1].Visible = false;
Statics[StaticAvatarT2].Visible = false;
Buttons[ButtonJokerRandomT1].Visible = false;
Buttons[ButtonJokerRandomT2].Visible = false;
Buttons[ButtonJokerRetryT1].Visible = false;
Buttons[ButtonJokerRetryT2].Visible = false;
Buttons[ButtonNextRound].Visible = false;
Texts[TextFinishMessage].Visible = false;
}
else
{
Status = EStatus.None;
Buttons[htButtons(ButtonNextRound)].Visible = false;
Texts[htTexts(TextFinishMessage)].Visible = true;
Texts[htTexts(TextTeamChoosing)].Visible = false;
Buttons[ButtonNextRound].Visible = false;
Texts[TextFinishMessage].Visible = true;
Texts[TextTeamChoosing].Visible = false;
if (Winner > 0)
{
Texts[htTexts(TextFinishMessage)].Color = CBase.Theme.GetPlayerColor(Winner);
Texts[htTexts(TextFinishMessage)].Text = CBase.Language.Translate("TR_SCREENMAIN_WINNER", _PartyModeID) + " " + CBase.Language.Translate("TR_TEAM", _PartyModeID) + " " + Winner;
Texts[TextFinishMessage].Color = CBase.Theme.GetPlayerColor(Winner);
Texts[TextFinishMessage].Text = CBase.Language.Translate("TR_SCREENMAIN_WINNER", _PartyModeID) + " " + CBase.Language.Translate("TR_TEAM", _PartyModeID) + " " +
Winner;
}
else
{
Texts[htTexts(TextFinishMessage)].Color = new SColorF(1, 1, 1, 1);
Texts[htTexts(TextFinishMessage)].Text = CBase.Language.Translate("TR_SCREENMAIN_NOWINNER", _PartyModeID);
Texts[TextFinishMessage].Color = new SColorF(1, 1, 1, 1);
Texts[TextFinishMessage].Text = CBase.Language.Translate("TR_SCREENMAIN_NOWINNER", _PartyModeID);
}
SetInteractionToButton(Buttons[htButtons(ButtonExit)]);
SetInteractionToButton(Buttons[ButtonExit]);
}
ShowPopup(false);
@@ -372,7 +371,7 @@ namespace Vocaluxe.PartyModes
for (int i = 0; i < 25; i++)
{
Field f = new Field();
f.Button = GetNewButton(Buttons[htButtons(ButtonField)]);
f.Button = GetNewButton(Buttons[ButtonField]);
f.Button.Visible = false;
f.Content = new Round();
AddButton(f.Button);
@@ -382,7 +381,7 @@ namespace Vocaluxe.PartyModes
private void UpdateFields()
{
int NumOneRow = (int)Math.Sqrt((double)GameData.NumFields);
int NumOneRow = (int)Math.Sqrt(GameData.NumFields);
float FieldSizeY = (CBase.Settings.GetRenderH() - 150 - NumOneRow * FieldSpace) / NumOneRow;
float FieldSizeX = (CBase.Settings.GetRenderW() - 300 - NumOneRow * FieldSpace) / NumOneRow;
if (FieldSizeX < FieldSizeY)
@@ -406,7 +405,7 @@ namespace Vocaluxe.PartyModes
Fields[i].Button.Visible = true;
Fields[i].Button.Enabled = true;
column++;
if ((i+1) >= NumOneRow * (row+1))
if ((i + 1) >= NumOneRow * (row + 1))
{
column = 0;
row++;
@@ -429,9 +428,9 @@ namespace Vocaluxe.PartyModes
for (int i = 0; i < GameData.Rounds.Count; i++)
{
Fields[i].Button.Enabled = true;
Fields[i].Button.Texture = Buttons[htButtons(ButtonField)].Texture;
Fields[i].Button.Color = Buttons[htButtons(ButtonField)].Color;
Fields[i].Button.SColor = Buttons[htButtons(ButtonField)].SColor;
Fields[i].Button.Texture = Buttons[ButtonField].Texture;
Fields[i].Button.Color = Buttons[ButtonField].Color;
Fields[i].Button.SColor = Buttons[ButtonField].SColor;
Fields[i].Content = GameData.Rounds[i];
if (Fields[i].Content.Finished)
{
@@ -449,19 +448,15 @@ namespace Vocaluxe.PartyModes
}
if (Status == EStatus.JokerRetry && Fields[i].Content.Finished)
{
Fields[i].Button.SColor = CBase.Theme.GetPlayerColor(GameData.Team+1);
Fields[i].Button.SColor = CBase.Theme.GetPlayerColor(GameData.Team + 1);
Fields[i].Button.Enabled = true;
}
if (Status == EStatus.JokerRetry && !Fields[i].Content.Finished)
{
Fields[i].Button.Enabled = false;
}
if(Status == EStatus.FieldSelected)
{
if (Status == EStatus.FieldSelected)
Fields[i].Button.Enabled = false;
}
}
}
private void FieldSelected()
{
@@ -484,7 +479,7 @@ namespace Vocaluxe.PartyModes
SingerTeam2 = GameData.PlayerTeam2[0];
GameData.PlayerTeam2.RemoveAt(0);
}
Menu.SongMenu.CSong Song = CBase.Songs.GetSongByID(SongID);
CSong Song = CBase.Songs.GetSongByID(SongID);
CBase.BackgroundMusic.SetStatus(true);
@@ -500,31 +495,31 @@ namespace Vocaluxe.PartyModes
GameData.Rounds[SelectedField].SingerTeam2 = SingerTeam2;
UpdateFieldContents();
Texts[htTexts(TextNextPlayerT1)].Visible = true;
Texts[htTexts(TextNextPlayerT2)].Visible = true;
Texts[htTexts(TextNextPlayerNameT1)].Visible = true;
Texts[htTexts(TextNextPlayerNameT2)].Visible = true;
Texts[TextNextPlayerT1].Visible = true;
Texts[TextNextPlayerT2].Visible = true;
Texts[TextNextPlayerNameT1].Visible = true;
Texts[TextNextPlayerNameT2].Visible = true;
SProfile[] profiles = CBase.Profiles.GetProfiles();
Texts[htTexts(TextNextPlayerNameT1)].Text = profiles[GameData.ProfileIDsTeam1[GameData.Rounds[SelectedField].SingerTeam1]].PlayerName;
Texts[htTexts(TextNextPlayerNameT2)].Text = profiles[GameData.ProfileIDsTeam2[GameData.Rounds[SelectedField].SingerTeam2]].PlayerName;
Statics[htStatics(StaticAvatarT1)].Visible = true;
Statics[htStatics(StaticAvatarT2)].Visible = true;
Statics[htStatics(StaticAvatarT1)].Texture = profiles[GameData.ProfileIDsTeam1[GameData.Rounds[SelectedField].SingerTeam1]].Avatar.Texture;
Statics[htStatics(StaticAvatarT2)].Texture = profiles[GameData.ProfileIDsTeam2[GameData.Rounds[SelectedField].SingerTeam2]].Avatar.Texture;
Texts[TextNextPlayerNameT1].Text = profiles[GameData.ProfileIDsTeam1[GameData.Rounds[SelectedField].SingerTeam1]].PlayerName;
Texts[TextNextPlayerNameT2].Text = profiles[GameData.ProfileIDsTeam2[GameData.Rounds[SelectedField].SingerTeam2]].PlayerName;
Statics[StaticAvatarT1].Visible = true;
Statics[StaticAvatarT2].Visible = true;
Statics[StaticAvatarT1].Texture = profiles[GameData.ProfileIDsTeam1[GameData.Rounds[SelectedField].SingerTeam1]].Avatar.Texture;
Statics[StaticAvatarT2].Texture = profiles[GameData.ProfileIDsTeam2[GameData.Rounds[SelectedField].SingerTeam2]].Avatar.Texture;
UpdateJokerButtons();
Buttons[htButtons(ButtonNextRound)].Visible = true;
Buttons[htButtons(ButtonExit)].Visible = true;
Buttons[htButtons(ButtonBack)].Visible = false;
Buttons[ButtonNextRound].Visible = true;
Buttons[ButtonExit].Visible = true;
Buttons[ButtonBack].Visible = false;
SetInteractionToButton(Buttons[htButtons(ButtonNextRound)]);
SetInteractionToButton(Buttons[ButtonNextRound]);
}
private void FieldSelectedAgain()
{
int SongID = Fields[SelectedField].Content.SongID;
Menu.SongMenu.CSong Song = CBase.Songs.GetSongByID(SongID);
CSong Song = CBase.Songs.GetSongByID(SongID);
CBase.BackgroundMusic.SetStatus(true);
PreviewStream = CBase.Sound.Load(Song.GetMP3(), false);
@@ -539,25 +534,25 @@ namespace Vocaluxe.PartyModes
GameData.Rounds[SelectedField].SingerTeam2 = GameData.Rounds[OldSelectedField].SingerTeam2;
UpdateFieldContents();
Texts[htTexts(TextNextPlayerT1)].Visible = true;
Texts[htTexts(TextNextPlayerT2)].Visible = true;
Texts[htTexts(TextNextPlayerNameT1)].Visible = true;
Texts[htTexts(TextNextPlayerNameT2)].Visible = true;
Texts[TextNextPlayerT1].Visible = true;
Texts[TextNextPlayerT2].Visible = true;
Texts[TextNextPlayerNameT1].Visible = true;
Texts[TextNextPlayerNameT2].Visible = true;
SProfile[] profiles = CBase.Profiles.GetProfiles();
Texts[htTexts(TextNextPlayerNameT1)].Text = profiles[GameData.ProfileIDsTeam1[GameData.Rounds[SelectedField].SingerTeam1]].PlayerName;
Texts[htTexts(TextNextPlayerNameT2)].Text = profiles[GameData.ProfileIDsTeam2[GameData.Rounds[SelectedField].SingerTeam2]].PlayerName;
Statics[htStatics(StaticAvatarT1)].Visible = true;
Statics[htStatics(StaticAvatarT2)].Visible = true;
Statics[htStatics(StaticAvatarT1)].Texture = profiles[GameData.ProfileIDsTeam1[GameData.Rounds[SelectedField].SingerTeam1]].Avatar.Texture;
Statics[htStatics(StaticAvatarT2)].Texture = profiles[GameData.ProfileIDsTeam2[GameData.Rounds[SelectedField].SingerTeam2]].Avatar.Texture;
Texts[TextNextPlayerNameT1].Text = profiles[GameData.ProfileIDsTeam1[GameData.Rounds[SelectedField].SingerTeam1]].PlayerName;
Texts[TextNextPlayerNameT2].Text = profiles[GameData.ProfileIDsTeam2[GameData.Rounds[SelectedField].SingerTeam2]].PlayerName;
Statics[StaticAvatarT1].Visible = true;
Statics[StaticAvatarT2].Visible = true;
Statics[StaticAvatarT1].Texture = profiles[GameData.ProfileIDsTeam1[GameData.Rounds[SelectedField].SingerTeam1]].Avatar.Texture;
Statics[StaticAvatarT2].Texture = profiles[GameData.ProfileIDsTeam2[GameData.Rounds[SelectedField].SingerTeam2]].Avatar.Texture;
UpdateJokerButtons();
Buttons[htButtons(ButtonNextRound)].Visible = true;
Buttons[htButtons(ButtonExit)].Visible = true;
Buttons[htButtons(ButtonBack)].Visible = false;
Buttons[ButtonNextRound].Visible = true;
Buttons[ButtonExit].Visible = true;
Buttons[ButtonBack].Visible = false;
SetInteractionToButton(Buttons[htButtons(ButtonNextRound)]);
SetInteractionToButton(Buttons[ButtonNextRound]);
}
private void UseJoker(int TeamNr, int JokerNum)
@@ -595,28 +590,29 @@ namespace Vocaluxe.PartyModes
private void UpdateTeamChoosingMessage()
{
Texts[htTexts(TextTeamChoosing)].Color = CBase.Theme.GetPlayerColor(GameData.Team + 1);
Texts[htTexts(TextTeamChoosing)].Text = CBase.Language.Translate("TR_TEAM", _PartyModeID) + " " + (GameData.Team + 1) + "! " + CBase.Language.Translate("TR_SCREENMAIN_TEAM_CHOOSE", _PartyModeID);
Texts[TextTeamChoosing].Color = CBase.Theme.GetPlayerColor(GameData.Team + 1);
Texts[TextTeamChoosing].Text = CBase.Language.Translate("TR_TEAM", _PartyModeID) + " " + (GameData.Team + 1) + "! " +
CBase.Language.Translate("TR_SCREENMAIN_TEAM_CHOOSE", _PartyModeID);
if (Status == EStatus.JokerRetry || Status == EStatus.FieldChoosing)
Texts[htTexts(TextTeamChoosing)].Visible = true;
Texts[TextTeamChoosing].Visible = true;
else
Texts[htTexts(TextTeamChoosing)].Visible = false;
Texts[TextTeamChoosing].Visible = false;
}
private void UpdateJokerButtons()
{
Buttons[htButtons(ButtonJokerRandomT1)].Visible = true;
Buttons[htButtons(ButtonJokerRandomT2)].Visible = true;
Buttons[htButtons(ButtonJokerRandomT1)].Text.Text = GameData.NumJokerRandom[0].ToString();
Buttons[htButtons(ButtonJokerRandomT2)].Text.Text = GameData.NumJokerRandom[1].ToString();
Buttons[htButtons(ButtonJokerRandomT1)].Enabled = GameData.NumJokerRandom[0] > 0;
Buttons[htButtons(ButtonJokerRandomT2)].Enabled = GameData.NumJokerRandom[1] > 0;
Buttons[htButtons(ButtonJokerRetryT1)].Visible = true;
Buttons[htButtons(ButtonJokerRetryT2)].Visible = true;
Buttons[htButtons(ButtonJokerRetryT1)].Text.Text = GameData.NumJokerRetry[0].ToString();
Buttons[htButtons(ButtonJokerRetryT2)].Text.Text = GameData.NumJokerRetry[1].ToString();
Buttons[htButtons(ButtonJokerRetryT1)].Enabled = GameData.NumJokerRetry[0] > 0;
Buttons[htButtons(ButtonJokerRetryT2)].Enabled = GameData.NumJokerRetry[1] > 0;
Buttons[ButtonJokerRandomT1].Visible = true;
Buttons[ButtonJokerRandomT2].Visible = true;
Buttons[ButtonJokerRandomT1].Text.Text = GameData.NumJokerRandom[0].ToString();
Buttons[ButtonJokerRandomT2].Text.Text = GameData.NumJokerRandom[1].ToString();
Buttons[ButtonJokerRandomT1].Enabled = GameData.NumJokerRandom[0] > 0;
Buttons[ButtonJokerRandomT2].Enabled = GameData.NumJokerRandom[1] > 0;
Buttons[ButtonJokerRetryT1].Visible = true;
Buttons[ButtonJokerRetryT2].Visible = true;
Buttons[ButtonJokerRetryT1].Text.Text = GameData.NumJokerRetry[0].ToString();
Buttons[ButtonJokerRetryT2].Text.Text = GameData.NumJokerRetry[1].ToString();
Buttons[ButtonJokerRetryT1].Enabled = GameData.NumJokerRetry[0] > 0;
Buttons[ButtonJokerRetryT2].Enabled = GameData.NumJokerRetry[1] > 0;
}
private void NextRound()
@@ -629,7 +625,7 @@ namespace Vocaluxe.PartyModes
Data.ScreenMain.SingRoundNr = SelectedField;
Data.ScreenMain.PlayerTeam1 = GameData.PlayerTeam1;
Data.ScreenMain.PlayerTeam2 = GameData.PlayerTeam2;
_PartyMode.DataFromScreen(_ThemeName, Data);
_PartyMode.DataFromScreen(ThemeName, Data);
}
private void EndParty()
@@ -642,13 +638,13 @@ namespace Vocaluxe.PartyModes
{
ExitPopupVisible = Visible;
Statics[htStatics(StaticPopupBG)].Visible = ExitPopupVisible;
Texts[htTexts(TextPopupReallyExit)].Visible = ExitPopupVisible;
Buttons[htButtons(ButtonPopupYes)].Visible = ExitPopupVisible;
Buttons[htButtons(ButtonPopupNo)].Visible = ExitPopupVisible;
Statics[StaticPopupBG].Visible = ExitPopupVisible;
Texts[TextPopupReallyExit].Visible = ExitPopupVisible;
Buttons[ButtonPopupYes].Visible = ExitPopupVisible;
Buttons[ButtonPopupNo].Visible = ExitPopupVisible;
if (ExitPopupVisible)
SetInteractionToButton(Buttons[htButtons(ButtonPopupNo)]);
SetInteractionToButton(Buttons[ButtonPopupNo]);
}
private void Back()
@@ -657,43 +653,36 @@ namespace Vocaluxe.PartyModes
Data.ScreenMain.FadeToNameSelection = true;
Data.ScreenMain.FadeToSinging = false;
Data.ScreenMain.SingRoundNr = SelectedField;
_PartyMode.DataFromScreen(_ThemeName, Data);
_PartyMode.DataFromScreen(ThemeName, Data);
}
private int BuildWinnerPossibilities()
{
int NumOneRow = (int)Math.Sqrt((double)GameData.NumFields);
Possibilities = new int[(NumOneRow * 2) + 2, NumOneRow];
int NumOneRow = (int)Math.Sqrt(GameData.NumFields);
Possibilities = new int[(NumOneRow * 2) + 2,NumOneRow];
for (int i = 0; i < Possibilities.GetLength(0); i++)
{
if (i < NumOneRow)
{
for(int c = 0; c < NumOneRow; c++){
for (int c = 0; c < NumOneRow; c++)
Possibilities[i, c] = i * NumOneRow + c;
}
}
else if (i < NumOneRow * 2)
{
for (int c = 0; c < NumOneRow; c++)
{
Possibilities[i, c] = (i-NumOneRow) + (c*NumOneRow);
Possibilities[i, c] = (i - NumOneRow) + (c * NumOneRow);
}
}
else if( i == Possibilities.GetLength(0) - 2)
{
for (int c = 0; c < NumOneRow;c++)
else if (i == Possibilities.GetLength(0) - 2)
{
for (int c = 0; c < NumOneRow; c++)
Possibilities[i, c] = (NumOneRow + 1) * c;
}
}
else if (i == Possibilities.GetLength(0) - 1)
{
for (int c = 0; c < NumOneRow; c++)
{
Possibilities[i, c] = (NumOneRow - 1) * c + (NumOneRow - 1);
}
}
}
return 0;
}
@@ -1,23 +1,24 @@
using System;
using System.Collections.Generic;
using System.Text;
using System.Windows.Forms;
using VocaluxeLib.Menu;
using Vocaluxe.Menu;
namespace Vocaluxe.PartyModes
namespace VocaluxeLib.PartyModes.TicTacToe
{
public class PartyScreenTicTacToeNames : CMenuParty
{
// Version number for theme files. Increment it, if you've changed something on the theme files!
const int ScreenVersion = 1;
protected override int _ScreenVersion
{
get { return 1; }
}
const string ButtonNext = "ButtonNext";
const string ButtonBack = "ButtonBack";
const string ButtonPlayerDestination = "ButtonPlayerDestination";
const string ButtonPlayerChoose = "ButtonPlayerChoose";
const string ButtonPlayerChooseScrollUp = "ButtonPlayerChooseScrollUp";
const string ButtonPlayerChooseScrollDown = "ButtonPlayerChooseScrollDown";
private const string ButtonNext = "ButtonNext";
private const string ButtonBack = "ButtonBack";
private const string ButtonPlayerDestination = "ButtonPlayerDestination";
private const string ButtonPlayerChoose = "ButtonPlayerChoose";
private const string ButtonPlayerChooseScrollUp = "ButtonPlayerChooseScrollUp";
private const string ButtonPlayerChooseScrollDown = "ButtonPlayerChooseScrollDown";
private List<CPlayerChooseButton> PlayerChooseButtons;
private List<CButton> PlayerDestinationButtons;
@@ -36,14 +37,14 @@ namespace Vocaluxe.PartyModes
private const int PlayerChooseButtonsFirstY = 105;
private const int PlayerChooseButtonsSpaceH = 15;
private const int PlayerChooseButtonsSpaceW = 25;
private int PlayerChooseButtonsOffset = 0;
private int PlayerChooseButtonsOffset;
private CStatic chooseAvatarStatic;
private bool SelectingMouseActive = false;
private int OldMouseX = 0;
private int OldMouseY = 0;
private bool SelectingMouseActive;
private int OldMouseX;
private int OldMouseY;
private int SelectedPlayerNr = -1;
private bool ButtonsAdded = false;
private bool ButtonsAdded;
private int NumPlayerTeam1 = 2;
private int NumPlayerTeam2 = 2;
@@ -56,11 +57,7 @@ namespace Vocaluxe.PartyModes
public int ProfileID;
}
public PartyScreenTicTacToeNames()
{
}
protected override void Init()
public override void Init()
{
base.Init();
@@ -72,10 +69,8 @@ namespace Vocaluxe.PartyModes
Data.ScreenNames.ProfileIDsTeam1 = new List<int>();
Data.ScreenNames.ProfileIDsTeam2 = new List<int>();
_ThemeName = "PartyScreenTicTacToeNames";
List<string> buttons = new List<string>();
_ThemeButtons = new string[] { ButtonBack, ButtonNext, ButtonPlayerDestination, ButtonPlayerChoose, ButtonPlayerChooseScrollUp, ButtonPlayerChooseScrollDown };
_ScreenVersion = ScreenVersion;
_ThemeButtons = new string[] {ButtonBack, ButtonNext, ButtonPlayerDestination, ButtonPlayerChoose, ButtonPlayerChooseScrollUp, ButtonPlayerChooseScrollDown};
Data = new DataFromScreen();
FromScreenNames names = new FromScreenNames();
@@ -86,11 +81,6 @@ namespace Vocaluxe.PartyModes
Data.ScreenNames = names;
}
public override void LoadTheme(string XmlPath)
{
base.LoadTheme(XmlPath);
}
public override void DataToScreen(object ReceivedData)
{
DataToScreenNames config = new DataToScreenNames();
@@ -109,34 +99,24 @@ namespace Vocaluxe.PartyModes
NumPlayerTeam2 = config.NumPlayerTeam2;
while (Data.ScreenNames.ProfileIDsTeam1.Count > NumPlayerTeam1)
{
Data.ScreenNames.ProfileIDsTeam1.RemoveAt(Data.ScreenNames.ProfileIDsTeam1.Count - 1);
}
while (Data.ScreenNames.ProfileIDsTeam2.Count > NumPlayerTeam2)
{
Data.ScreenNames.ProfileIDsTeam2.RemoveAt(Data.ScreenNames.ProfileIDsTeam2.Count - 1);
}
}
catch (Exception e)
{
CBase.Log.LogError("Error in party mode screen TicTacToe names. Can't cast received data from game mode " + _ThemeName + ". " + e.Message); ;
CBase.Log.LogError("Error in party mode screen TicTacToe names. Can't cast received data from game mode " + ThemeName + ". " + e.Message);
}
}
}
public override bool HandleInput(KeyEvent KeyEvent)
public override bool HandleInput(KeyEvent keyEvent)
{
base.HandleInput(KeyEvent);
base.HandleInput(keyEvent);
if (KeyEvent.KeyPressed)
{
}
if (keyEvent.KeyPressed) {}
else
{
switch (KeyEvent.Key)
switch (keyEvent.Key)
{
case Keys.Back:
case Keys.Escape:
@@ -144,16 +124,16 @@ namespace Vocaluxe.PartyModes
break;
case Keys.Enter:
if (Buttons[htButtons(ButtonBack)].Selected)
if (Buttons[ButtonBack].Selected)
Back();
if (Buttons[htButtons(ButtonNext)].Selected)
if (Buttons[ButtonNext].Selected)
Next();
if (Buttons[htButtons(ButtonPlayerChooseScrollUp)].Selected)
if (Buttons[ButtonPlayerChooseScrollUp].Selected)
Scroll(-1);
if (Buttons[htButtons(ButtonPlayerChooseScrollDown)].Selected)
if (Buttons[ButtonPlayerChooseScrollDown].Selected)
Scroll(1);
if (!OnAdd())
@@ -168,16 +148,16 @@ namespace Vocaluxe.PartyModes
return true;
}
public override bool HandleMouse(MouseEvent MouseEvent)
public override bool HandleMouse(MouseEvent mouseEvent)
{
base.HandleMouse(MouseEvent);
base.HandleMouse(mouseEvent);
//Check if LeftButton is hold and Select-Mode inactive
if (MouseEvent.LBH && !SelectingMouseActive)
if (mouseEvent.LBH && !SelectingMouseActive)
{
//Save mouse-coords
OldMouseX = MouseEvent.X;
OldMouseY = MouseEvent.Y;
OldMouseX = mouseEvent.X;
OldMouseY = mouseEvent.Y;
//Check if mouse if over tile
for (int i = 0; i < PlayerChooseButtons.Count; i++)
{
@@ -201,13 +181,13 @@ namespace Vocaluxe.PartyModes
}
//Check if LeftButton is hold and Select-Mode active
if (MouseEvent.LBH && SelectingMouseActive)
if (mouseEvent.LBH && SelectingMouseActive)
{
//Update coords for Drag/Drop-Texture
chooseAvatarStatic.Rect.X += (MouseEvent.X - OldMouseX);
chooseAvatarStatic.Rect.Y += (MouseEvent.Y - OldMouseY);
OldMouseX = MouseEvent.X;
OldMouseY = MouseEvent.Y;
chooseAvatarStatic.Rect.X += mouseEvent.X - OldMouseX;
chooseAvatarStatic.Rect.Y += mouseEvent.Y - OldMouseY;
OldMouseX = mouseEvent.X;
OldMouseY = mouseEvent.Y;
return true;
}
@@ -221,10 +201,10 @@ namespace Vocaluxe.PartyModes
for (int i = 0; i < PlayerDestinationButtons.Count; i++)
{
//Check first, if area is "active"
if (PlayerDestinationButtons[i].Visible == true)
if (PlayerDestinationButtons[i].Visible)
{
//Check if Mouse is in area
if (CHelper.IsInBounds(PlayerDestinationButtons[i].Rect, MouseEvent))
if (CHelper.IsInBounds(PlayerDestinationButtons[i].Rect, mouseEvent))
{
int added = -1;
//Add Player-ID to list.
@@ -275,30 +255,30 @@ namespace Vocaluxe.PartyModes
return true;
}
if (MouseEvent.LB && IsMouseOver(MouseEvent))
if (mouseEvent.LB && IsMouseOver(mouseEvent))
{
if (Buttons[htButtons(ButtonBack)].Selected)
if (Buttons[ButtonBack].Selected)
Back();
if (Buttons[htButtons(ButtonNext)].Selected)
if (Buttons[ButtonNext].Selected)
Next();
if (Buttons[htButtons(ButtonPlayerChooseScrollUp)].Selected)
if (Buttons[ButtonPlayerChooseScrollUp].Selected)
Scroll(-1);
if (Buttons[htButtons(ButtonPlayerChooseScrollDown)].Selected)
if (Buttons[ButtonPlayerChooseScrollDown].Selected)
Scroll(1);
}
if(MouseEvent.LD && IsMouseOver(MouseEvent))
if (mouseEvent.LD && IsMouseOver(mouseEvent))
{
if (!OnAdd())
OnRemove();
if (MouseEvent.RB)
{
Back();
}
if (mouseEvent.RB)
Back();
return true;
}
@@ -332,11 +312,6 @@ namespace Vocaluxe.PartyModes
return true;
}
public override void OnClose()
{
base.OnClose();
}
private void Scroll(int Offset)
{
if (Offset < 0 && PlayerChooseButtonsOffset > 0)
@@ -349,18 +324,17 @@ namespace Vocaluxe.PartyModes
PlayerChooseButtonsOffset += Offset;
UpdateButtonPlayerChoose();
}
}
private void AddButtonPlayerDestination()
{
Buttons[htButtons(ButtonPlayerDestination)].Visible = false;
Buttons[ButtonPlayerDestination].Visible = false;
PlayerDestinationButtons = new List<CButton>();
int row = 0;
int column = 0;
for (int i = 1; i <= _PartyMode.GetMaxPlayer(); i++)
{
CButton b = GetNewButton(Buttons[htButtons(ButtonPlayerDestination)]);
CButton b = GetNewButton(Buttons[ButtonPlayerDestination]);
b.Rect.X = PlayerDestinationButtonsFirstX + column * (b.Rect.W + PlayerDestinationButtonsSpaceH);
b.Rect.Y = PlayerDestinationButtonsFirstY + row * (b.Rect.H + PlayerDestinationButtonsSpaceW);
PlayerDestinationButtons.Add(b);
@@ -378,13 +352,13 @@ namespace Vocaluxe.PartyModes
private void AddButtonPlayerChoose()
{
Buttons[htButtons(ButtonPlayerChoose)].Visible = false;
Buttons[ButtonPlayerChoose].Visible = false;
PlayerChooseButtons = new List<CPlayerChooseButton>();
int row = 0;
int column = 0;
for (int i = 1; i <= PlayerChooseButtonsNumH * PlayerChooseButtonsNumW; i++)
{
CButton b = GetNewButton(Buttons[htButtons(ButtonPlayerChoose)]);
CButton b = GetNewButton(Buttons[ButtonPlayerChoose]);
b.Rect.X = PlayerChooseButtonsFirstX + column * (b.Rect.W + PlayerChooseButtonsSpaceH);
b.Rect.Y = PlayerChooseButtonsFirstY + row * (b.Rect.H + PlayerChooseButtonsSpaceW);
CPlayerChooseButton pcb = new CPlayerChooseButton();
@@ -406,16 +380,14 @@ namespace Vocaluxe.PartyModes
private void UpdateButtonPlayerChoose()
{
UpdateVisibleProfiles();
if ((PlayerChooseButtonsNumW * PlayerChooseButtonsNumH) * (PlayerChooseButtonsOffset + 1) - PlayerChooseButtonsVisibleProfiles.Count >= (PlayerChooseButtonsNumW * PlayerChooseButtonsNumH) * PlayerChooseButtonsOffset)
{
if ((PlayerChooseButtonsNumW * PlayerChooseButtonsNumH) * (PlayerChooseButtonsOffset + 1) - PlayerChooseButtonsVisibleProfiles.Count >=
(PlayerChooseButtonsNumW * PlayerChooseButtonsNumH) * PlayerChooseButtonsOffset)
UpdateButtonPlayerChoose(PlayerChooseButtonsOffset - 1);
}
else
{
UpdateButtonPlayerChoose(PlayerChooseButtonsOffset);
}
Buttons[htButtons(ButtonPlayerChooseScrollUp)].Enabled = PlayerChooseButtonsOffset > 0;
Buttons[htButtons(ButtonPlayerChooseScrollDown)].Enabled = PlayerChooseButtonsVisibleProfiles.Count > PlayerChooseButtons.Count + PlayerChooseButtonsOffset * PlayerChooseButtonsNumH;
Buttons[ButtonPlayerChooseScrollUp].Enabled = PlayerChooseButtonsOffset > 0;
Buttons[ButtonPlayerChooseScrollDown].Enabled = PlayerChooseButtonsVisibleProfiles.Count >
PlayerChooseButtons.Count + PlayerChooseButtonsOffset * PlayerChooseButtonsNumH;
}
private void UpdateButtonPlayerChoose(int Offset)
@@ -442,10 +414,10 @@ namespace Vocaluxe.PartyModes
{
PlayerChooseButtons[i].ProfileID = -1;
PlayerChooseButtons[i].Button.Text.Text = String.Empty;
PlayerChooseButtons[i].Button.Texture = Buttons[htButtons(ButtonPlayerChoose)].Texture;
PlayerChooseButtons[i].Button.STexture = Buttons[htButtons(ButtonPlayerChoose)].STexture;
PlayerChooseButtons[i].Button.Color = Buttons[htButtons(ButtonPlayerChoose)].Color;
PlayerChooseButtons[i].Button.SColor = Buttons[htButtons(ButtonPlayerChoose)].SColor;
PlayerChooseButtons[i].Button.Texture = Buttons[ButtonPlayerChoose].Texture;
PlayerChooseButtons[i].Button.STexture = Buttons[ButtonPlayerChoose].STexture;
PlayerChooseButtons[i].Button.Color = Buttons[ButtonPlayerChoose].Color;
PlayerChooseButtons[i].Button.SColor = Buttons[ButtonPlayerChoose].SColor;
PlayerChooseButtons[i].Button.Enabled = false;
}
}
@@ -484,11 +456,9 @@ namespace Vocaluxe.PartyModes
}
}
if (visible)
{
PlayerChooseButtonsVisibleProfiles.Add(i);
}
}
}
private void UpdateButtonPlayerDestination()
{
@@ -534,10 +504,10 @@ namespace Vocaluxe.PartyModes
}
else
{
PlayerDestinationButtons[i].Color = Buttons[htButtons(ButtonPlayerDestination)].Color;
PlayerDestinationButtons[i].SColor = Buttons[htButtons(ButtonPlayerDestination)].SColor;
PlayerDestinationButtons[i].Texture = Buttons[htButtons(ButtonPlayerDestination)].Texture;
PlayerDestinationButtons[i].STexture = Buttons[htButtons(ButtonPlayerDestination)].STexture;
PlayerDestinationButtons[i].Color = Buttons[ButtonPlayerDestination].Color;
PlayerDestinationButtons[i].SColor = Buttons[ButtonPlayerDestination].SColor;
PlayerDestinationButtons[i].Texture = Buttons[ButtonPlayerDestination].Texture;
PlayerDestinationButtons[i].STexture = Buttons[ButtonPlayerDestination].STexture;
PlayerDestinationButtons[i].Text.Text = String.Empty;
PlayerDestinationButtons[i].Enabled = false;
}
@@ -558,10 +528,10 @@ namespace Vocaluxe.PartyModes
}
else
{
PlayerDestinationButtons[i + PlayerDestinationButtonsNumH].Color = Buttons[htButtons(ButtonPlayerDestination)].Color;
PlayerDestinationButtons[i + PlayerDestinationButtonsNumH].SColor = Buttons[htButtons(ButtonPlayerDestination)].SColor;
PlayerDestinationButtons[i + PlayerDestinationButtonsNumH].Texture = Buttons[htButtons(ButtonPlayerDestination)].Texture;
PlayerDestinationButtons[i + PlayerDestinationButtonsNumH].STexture = Buttons[htButtons(ButtonPlayerDestination)].STexture;
PlayerDestinationButtons[i + PlayerDestinationButtonsNumH].Color = Buttons[ButtonPlayerDestination].Color;
PlayerDestinationButtons[i + PlayerDestinationButtonsNumH].SColor = Buttons[ButtonPlayerDestination].SColor;
PlayerDestinationButtons[i + PlayerDestinationButtonsNumH].Texture = Buttons[ButtonPlayerDestination].Texture;
PlayerDestinationButtons[i + PlayerDestinationButtonsNumH].STexture = Buttons[ButtonPlayerDestination].STexture;
PlayerDestinationButtons[i + PlayerDestinationButtonsNumH].Text.Text = String.Empty;
PlayerDestinationButtons[i + PlayerDestinationButtonsNumH].Enabled = false;
}
@@ -572,11 +542,11 @@ namespace Vocaluxe.PartyModes
{
if (Data.ScreenNames.ProfileIDsTeam1.Count == NumPlayerTeam1 && Data.ScreenNames.ProfileIDsTeam2.Count == NumPlayerTeam2)
{
Buttons[htButtons(ButtonNext)].Visible = true;
SetInteractionToButton(Buttons[htButtons(ButtonNext)]);
Buttons[ButtonNext].Visible = true;
SetInteractionToButton(Buttons[ButtonNext]);
}
else
Buttons[htButtons(ButtonNext)].Visible = false;
Buttons[ButtonNext].Visible = false;
}
private bool OnAdd()
@@ -641,11 +611,11 @@ namespace Vocaluxe.PartyModes
}
}
}
for (int i = PlayerDestinationButtonsNumH; i < PlayerDestinationButtonsNumH*2; i++)
for (int i = PlayerDestinationButtonsNumH; i < PlayerDestinationButtonsNumH * 2; i++)
{
if (PlayerDestinationButtons[i].Selected)
{
if (((i-PlayerDestinationButtonsNumH) + 1) <= Data.ScreenNames.ProfileIDsTeam2.Count)
if (((i - PlayerDestinationButtonsNumH) + 1) <= Data.ScreenNames.ProfileIDsTeam2.Count)
{
Data.ScreenNames.ProfileIDsTeam2.RemoveAt(i - PlayerDestinationButtonsNumH);
UpdateButtonNext();
@@ -663,14 +633,14 @@ namespace Vocaluxe.PartyModes
{
Data.ScreenNames.FadeToConfig = true;
Data.ScreenNames.FadeToMain = false;
_PartyMode.DataFromScreen(_ThemeName, Data);
_PartyMode.DataFromScreen(ThemeName, Data);
}
private void Next()
{
Data.ScreenNames.FadeToConfig = false;
Data.ScreenNames.FadeToMain = true;
_PartyMode.DataFromScreen(_ThemeName, Data);
_PartyMode.DataFromScreen(ThemeName, Data);
}
}
}
@@ -0,0 +1,809 @@
<StyleCopSettings Version="105">
<Analyzers>
<Analyzer AnalyzerId="StyleCop.CSharp.DocumentationRules">
<Rules>
<Rule Name="ElementsMustBeDocumented">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="PartialElementsMustBeDocumented">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="EnumerationItemsMustBeDocumented">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="DocumentationMustContainValidXml">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ElementDocumentationMustHaveSummary">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="PartialElementDocumentationMustHaveSummary">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ElementDocumentationMustHaveSummaryText">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="PartialElementDocumentationMustHaveSummaryText">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ElementDocumentationMustNotHaveDefaultSummary">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ElementParametersMustBeDocumented">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ElementParameterDocumentationMustMatchElementParameters">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ElementParameterDocumentationMustDeclareParameterName">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ElementParameterDocumentationMustHaveText">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ElementReturnValueMustBeDocumented">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ElementReturnValueDocumentationMustHaveText">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="VoidReturnValueMustNotBeDocumented">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="GenericTypeParametersMustBeDocumented">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="GenericTypeParametersMustBeDocumentedPartialClass">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="GenericTypeParameterDocumentationMustMatchTypeParameters">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="GenericTypeParameterDocumentationMustDeclareParameterName">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="GenericTypeParameterDocumentationMustHaveText">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="PropertySummaryDocumentationMustMatchAccessors">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="PropertySummaryDocumentationMustOmitSetAccessorWithRestrictedAccess">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ElementDocumentationMustNotBeCopiedAndPasted">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="SingleLineCommentsMustNotUseDocumentationStyleSlashes">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="DocumentationTextMustNotBeEmpty">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="DocumentationTextMustContainWhitespace">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="DocumentationMustMeetCharacterPercentage">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ConstructorSummaryDocumentationMustBeginWithStandardText">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="DestructorSummaryDocumentationMustBeginWithStandardText">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="DocumentationHeadersMustNotContainBlankLines">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="IncludedDocumentationXPathDoesNotExist">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="IncludeNodeDoesNotContainValidFileAndPath">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="InheritDocMustBeUsedWithInheritingClass">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ElementDocumentationMustBeSpelledCorrectly">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="FileMustHaveHeader">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="FileHeaderMustShowCopyright">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="FileHeaderMustHaveCopyrightText">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="FileHeaderMustContainFileName">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="FileHeaderFileNameDocumentationMustMatchFileName">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="FileHeaderMustHaveValidCompanyText">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="FileHeaderFileNameDocumentationMustMatchTypeName">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
</Rules>
<AnalyzerSettings />
</Analyzer>
<Analyzer AnalyzerId="StyleCop.CSharp.LayoutRules">
<Rules>
<Rule Name="CurlyBracketsForMultiLineStatementsMustNotShareLine">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="StatementMustNotBeOnSingleLine">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ElementMustNotBeOnSingleLine">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="CurlyBracketsMustNotBeOmitted">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="AllAccessorsMustBeMultiLineOrSingleLine">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="OpeningCurlyBracketsMustNotBeFollowedByBlankLine">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ElementDocumentationHeadersMustNotBeFollowedByBlankLine">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="CodeMustNotContainMultipleBlankLinesInARow">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ClosingCurlyBracketsMustNotBePrecededByBlankLine">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="OpeningCurlyBracketsMustNotBePrecededByBlankLine">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ChainedStatementBlocksMustNotBePrecededByBlankLine">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="WhileDoFooterMustNotBePrecededByBlankLine">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="SingleLineCommentsMustNotBeFollowedByBlankLine">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ClosingCurlyBracketMustBeFollowedByBlankLine">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ElementDocumentationHeaderMustBePrecededByBlankLine">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="SingleLineCommentMustBePrecededByBlankLine">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ElementsMustBeSeparatedByBlankLine">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="CodeMustNotContainBlankLinesAtStartOfFile">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="CodeMustNotContainBlankLinesAtEndOfFile">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
</Rules>
<AnalyzerSettings />
</Analyzer>
<Analyzer AnalyzerId="StyleCop.CSharp.MaintainabilityRules">
<Rules>
<Rule Name="AccessModifierMustBeDeclared">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="FieldsMustBePrivate">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="CodeAnalysisSuppressionMustHaveJustification">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="DebugAssertMustProvideMessageText">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="DebugFailMustProvideMessageText">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="FileMayOnlyContainASingleClass">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="FileMayOnlyContainASingleNamespace">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="StatementMustNotUseUnnecessaryParenthesis">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ArithmeticExpressionsMustDeclarePrecedence">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ConditionalExpressionsMustDeclarePrecedence">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="RemoveDelegateParenthesisWhenPossible">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="AttributeConstructorMustNotUseUnnecessaryParenthesis">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="RemoveUnnecessaryCode">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
</Rules>
<AnalyzerSettings />
</Analyzer>
<Analyzer AnalyzerId="StyleCop.CSharp.NamingRules">
<Rules>
<Rule Name="ElementMustBeginWithUpperCaseLetter">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ElementMustBeginWithLowerCaseLetter">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="InterfaceNamesMustBeginWithI">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ConstFieldNamesMustBeginWithUpperCaseLetter">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="NonPrivateReadonlyFieldsMustBeginWithUpperCaseLetter">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="FieldNamesMustNotUseHungarianNotation">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="FieldNamesMustBeginWithLowerCaseLetter">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="AccessibleFieldsMustBeginWithUpperCaseLetter">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="VariableNamesMustNotBePrefixed">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="FieldNamesMustNotBeginWithUnderscore">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="FieldNamesMustNotContainUnderscore">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="StaticReadonlyFieldsMustBeginWithUpperCaseLetter">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
</Rules>
<AnalyzerSettings />
</Analyzer>
<Analyzer AnalyzerId="StyleCop.CSharp.OrderingRules">
<Rules>
<Rule Name="UsingDirectivesMustBePlacedWithinNamespace">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ElementsMustAppearInTheCorrectOrder">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ElementsMustBeOrderedByAccess">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ConstantsMustAppearBeforeFields">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="StaticElementsMustAppearBeforeInstanceElements">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="DeclarationKeywordsMustFollowOrder">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ProtectedMustComeBeforeInternal">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="PropertyAccessorsMustFollowOrder">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="EventAccessorsMustFollowOrder">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="StaticReadonlyElementsMustAppearBeforeStaticNonReadonlyElements">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="InstanceReadonlyElementsMustAppearBeforeInstanceNonReadonlyElements">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="SystemUsingDirectivesMustBePlacedBeforeOtherUsingDirectives">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="UsingAliasDirectivesMustBePlacedAfterOtherUsingDirectives">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="UsingDirectivesMustBeOrderedAlphabeticallyByNamespace">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="UsingAliasDirectivesMustBeOrderedAlphabeticallyByAliasName">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
</Rules>
<AnalyzerSettings />
</Analyzer>
<Analyzer AnalyzerId="StyleCop.CSharp.ReadabilityRules">
<Rules>
<Rule Name="CommentsMustContainText">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="DoNotPrefixCallsWithBaseUnlessLocalImplementationExists">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="PrefixLocalCallsWithThis">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="PrefixCallsCorrectly">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="OpeningParenthesisMustBeOnDeclarationLine">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ClosingParenthesisMustBeOnLineOfLastParameter">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ClosingParenthesisMustBeOnLineOfOpeningParenthesis">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="CommaMustBeOnSameLineAsPreviousParameter">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ParameterListMustFollowDeclaration">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ParameterMustFollowComma">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="SplitParametersMustStartOnLineAfterDeclaration">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ParametersMustBeOnSameLineOrSeparateLines">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ParameterMustNotSpanMultipleLines">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="QueryClauseMustFollowPreviousClause">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="QueryClausesMustBeOnSeparateLinesOrAllOnOneLine">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="QueryClauseMustBeginOnNewLineWhenPreviousClauseSpansMultipleLines">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="QueryClausesSpanningMultipleLinesMustBeginOnOwnLine">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="DoNotPlaceRegionsWithinElements">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="CodeMustNotContainEmptyStatements">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="CodeMustNotContainMultipleStatementsOnOneLine">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="BlockStatementsMustNotContainEmbeddedComments">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="BlockStatementsMustNotContainEmbeddedRegions">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="UseStringEmptyForEmptyStrings">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="UseBuiltInTypeAlias">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="UseShorthandForNullableTypes">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
</Rules>
<AnalyzerSettings />
</Analyzer>
<Analyzer AnalyzerId="StyleCop.CSharp.SpacingRules">
<Rules>
<Rule Name="KeywordsMustBeSpacedCorrectly">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="CommasMustBeSpacedCorrectly">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="SemicolonsMustBeSpacedCorrectly">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="SymbolsMustBeSpacedCorrectly">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="DocumentationLinesMustBeginWithSingleSpace">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="SingleLineCommentsMustBeginWithSingleSpace">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="PreprocessorKeywordsMustNotBePrecededBySpace">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="OperatorKeywordMustBeFollowedBySpace">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="OpeningParenthesisMustBeSpacedCorrectly">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ClosingParenthesisMustBeSpacedCorrectly">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="OpeningSquareBracketsMustBeSpacedCorrectly">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ClosingSquareBracketsMustBeSpacedCorrectly">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="OpeningCurlyBracketsMustBeSpacedCorrectly">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ClosingCurlyBracketsMustBeSpacedCorrectly">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="OpeningGenericBracketsMustBeSpacedCorrectly">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ClosingGenericBracketsMustBeSpacedCorrectly">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="OpeningAttributeBracketsMustBeSpacedCorrectly">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ClosingAttributeBracketsMustBeSpacedCorrectly">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="NullableTypeSymbolsMustNotBePrecededBySpace">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="MemberAccessSymbolsMustBeSpacedCorrectly">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="IncrementDecrementSymbolsMustBeSpacedCorrectly">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="NegativeSignsMustBeSpacedCorrectly">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="PositiveSignsMustBeSpacedCorrectly">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="DereferenceAndAccessOfSymbolsMustBeSpacedCorrectly">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ColonsMustBeSpacedCorrectly">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="CodeMustNotContainMultipleWhitespaceInARow">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="CodeMustNotContainSpaceAfterNewKeywordInImplicitlyTypedArrayAllocation">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="TabsMustNotBeUsed">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
</Rules>
<AnalyzerSettings />
</Analyzer>
</Analyzers>
</StyleCopSettings>
+44
View File
@@ -0,0 +1,44 @@
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<s:String x:Key="/Default/CodeInspection/Highlighting/AnalysisEnabled/@EntryValue">SOLUTION</s:String>
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=RedundantExplicitArrayCreation/@EntryIndexedValue">DO_NOT_SHOW</s:String>
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=SpecifyACultureInStringConversionExplicitly/@EntryIndexedValue">DO_NOT_SHOW</s:String>
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=SuggestUseVarKeywordEverywhere/@EntryIndexedValue">DO_NOT_SHOW</s:String>
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=SuggestUseVarKeywordEvident/@EntryIndexedValue">DO_NOT_SHOW</s:String>
<s:String x:Key="/Default/CodeStyle/CodeCleanup/Profiles/=Cleanup/@EntryIndexedValue">&lt;?xml version="1.0" encoding="utf-16"?&gt;&lt;Profile name="Cleanup"&gt;&lt;CSArrangeThisQualifier&gt;True&lt;/CSArrangeThisQualifier&gt;&lt;CSRemoveCodeRedundancies&gt;True&lt;/CSRemoveCodeRedundancies&gt;&lt;CSMakeFieldReadonly&gt;True&lt;/CSMakeFieldReadonly&gt;&lt;CSUseVar&gt;&lt;BehavourStyle&gt;CAN_CHANGE_TO_EXPLICIT&lt;/BehavourStyle&gt;&lt;LocalVariableStyle&gt;ALWAYS_EXPLICIT&lt;/LocalVariableStyle&gt;&lt;ForeachVariableStyle&gt;ALWAYS_EXPLICIT&lt;/ForeachVariableStyle&gt;&lt;/CSUseVar&gt;&lt;CSOptimizeUsings&gt;&lt;OptimizeUsings&gt;False&lt;/OptimizeUsings&gt;&lt;EmbraceInRegion&gt;False&lt;/EmbraceInRegion&gt;&lt;RegionName&gt;&lt;/RegionName&gt;&lt;/CSOptimizeUsings&gt;&lt;CSReformatCode&gt;True&lt;/CSReformatCode&gt;&lt;CSharpFormatDocComments&gt;True&lt;/CSharpFormatDocComments&gt;&lt;CSShortenReferences&gt;True&lt;/CSShortenReferences&gt;&lt;StyleCop.Documentation&gt;&lt;SA1600ElementsMustBeDocumented&gt;False&lt;/SA1600ElementsMustBeDocumented&gt;&lt;SA1604ElementDocumentationMustHaveSummary&gt;False&lt;/SA1604ElementDocumentationMustHaveSummary&gt;&lt;SA1609PropertyDocumentationMustHaveValueDocumented&gt;False&lt;/SA1609PropertyDocumentationMustHaveValueDocumented&gt;&lt;SA1611ElementParametersMustBeDocumented&gt;False&lt;/SA1611ElementParametersMustBeDocumented&gt;&lt;SA1615ElementReturnValueMustBeDocumented&gt;False&lt;/SA1615ElementReturnValueMustBeDocumented&gt;&lt;SA1617VoidReturnValueMustNotBeDocumented&gt;False&lt;/SA1617VoidReturnValueMustNotBeDocumented&gt;&lt;SA1618GenericTypeParametersMustBeDocumented&gt;False&lt;/SA1618GenericTypeParametersMustBeDocumented&gt;&lt;SA1626SingleLineCommentsMustNotUseDocumentationStyleSlashes&gt;False&lt;/SA1626SingleLineCommentsMustNotUseDocumentationStyleSlashes&gt;&lt;SA1628DocumentationTextMustBeginWithACapitalLetter&gt;False&lt;/SA1628DocumentationTextMustBeginWithACapitalLetter&gt;&lt;SA1629DocumentationTextMustEndWithAPeriod&gt;False&lt;/SA1629DocumentationTextMustEndWithAPeriod&gt;&lt;SA1633SA1641UpdateFileHeader&gt;Ignore&lt;/SA1633SA1641UpdateFileHeader&gt;&lt;SA1639FileHeaderMustHaveSummary&gt;False&lt;/SA1639FileHeaderMustHaveSummary&gt;&lt;SA1642ConstructorSummaryDocumentationMustBeginWithStandardText&gt;False&lt;/SA1642ConstructorSummaryDocumentationMustBeginWithStandardText&gt;&lt;SA1643DestructorSummaryDocumentationMustBeginWithStandardText&gt;False&lt;/SA1643DestructorSummaryDocumentationMustBeginWithStandardText&gt;&lt;SA1644DocumentationHeadersMustNotContainBlankLines&gt;False&lt;/SA1644DocumentationHeadersMustNotContainBlankLines&gt;&lt;/StyleCop.Documentation&gt;&lt;StyleCop.Layout&gt;&lt;SA1500CurlyBracketsForMultiLineStatementsMustNotShareLine&gt;False&lt;/SA1500CurlyBracketsForMultiLineStatementsMustNotShareLine&gt;&lt;SA1509OpeningCurlyBracketsMustNotBePrecededByBlankLine&gt;True&lt;/SA1509OpeningCurlyBracketsMustNotBePrecededByBlankLine&gt;&lt;SA1510ChainedStatementBlocksMustNotBePrecededByBlankLine&gt;True&lt;/SA1510ChainedStatementBlocksMustNotBePrecededByBlankLine&gt;&lt;SA1511WhileDoFooterMustNotBePrecededByBlankLine&gt;True&lt;/SA1511WhileDoFooterMustNotBePrecededByBlankLine&gt;&lt;SA1512SingleLineCommentsMustNotBeFollowedByBlankLine&gt;True&lt;/SA1512SingleLineCommentsMustNotBeFollowedByBlankLine&gt;&lt;SA1513ClosingCurlyBracketMustBeFollowedByBlankLine&gt;False&lt;/SA1513ClosingCurlyBracketMustBeFollowedByBlankLine&gt;&lt;SA1514ElementDocumentationHeaderMustBePrecededByBlankLine&gt;False&lt;/SA1514ElementDocumentationHeaderMustBePrecededByBlankLine&gt;&lt;SA1515SingleLineCommentMustBeProceededByBlankLine&gt;False&lt;/SA1515SingleLineCommentMustBeProceededByBlankLine&gt;&lt;/StyleCop.Layout&gt;&lt;StyleCop.Readability&gt;&lt;SA1100DoNotPrefixCallsWithBaseUnlessLocalImplementationExists&gt;True&lt;/SA1100DoNotPrefixCallsWithBaseUnlessLocalImplementationExists&gt;&lt;SA1106CodeMustNotContainEmptyStatements&gt;True&lt;/SA1106CodeMustNotContainEmptyStatements&gt;&lt;SA1108BlockStatementsMustNotContainEmbeddedComments&gt;True&lt;/SA1108BlockStatementsMustNotContainEmbeddedComments&gt;&lt;SA1109BlockStatementsMustNotContainEmbeddedRegions&gt;True&lt;/SA1109BlockStatementsMustNotContainEmbeddedRegions&gt;&lt;SA1120CommentsMustContainText&gt;False&lt;/SA1120CommentsMustContainText&gt;&lt;SA1121UseBuiltInTypeAlias&gt;False&lt;/SA1121UseBuiltInTypeAlias&gt;&lt;SA1122UseStringEmptyForEmptyStrings&gt;False&lt;/SA1122UseStringEmptyForEmptyStrings&gt;&lt;SA1123DoNotPlaceRegionsWithinElements&gt;False&lt;/SA1123DoNotPlaceRegionsWithinElements&gt;&lt;SA1124CodeMustNotContainEmptyRegions&gt;True&lt;/SA1124CodeMustNotContainEmptyRegions&gt;&lt;/StyleCop.Readability&gt;&lt;StyleCop.Spacing&gt;&lt;SA1001CommasMustBeSpacedCorrectly&gt;False&lt;/SA1001CommasMustBeSpacedCorrectly&gt;&lt;SA1005SingleLineCommentsMustBeginWithSingleSpace&gt;False&lt;/SA1005SingleLineCommentsMustBeginWithSingleSpace&gt;&lt;SA1006PreprocessorKeywordsMustNotBePrecededBySpaLine truncated
<s:String x:Key="/Default/CodeStyle/CodeCleanup/Profiles/=Simple_0020Reformat/@EntryIndexedValue">&lt;?xml version="1.0" encoding="utf-16"?&gt;&lt;Profile name="Simple Reformat"&gt;&lt;CSOptimizeUsings&gt;&lt;OptimizeUsings&gt;False&lt;/OptimizeUsings&gt;&lt;EmbraceInRegion&gt;False&lt;/EmbraceInRegion&gt;&lt;RegionName&gt;&lt;/RegionName&gt;&lt;/CSOptimizeUsings&gt;&lt;CSReformatCode&gt;True&lt;/CSReformatCode&gt;&lt;StyleCop.Documentation&gt;&lt;SA1600ElementsMustBeDocumented&gt;False&lt;/SA1600ElementsMustBeDocumented&gt;&lt;SA1604ElementDocumentationMustHaveSummary&gt;False&lt;/SA1604ElementDocumentationMustHaveSummary&gt;&lt;SA1609PropertyDocumentationMustHaveValueDocumented&gt;False&lt;/SA1609PropertyDocumentationMustHaveValueDocumented&gt;&lt;SA1611ElementParametersMustBeDocumented&gt;False&lt;/SA1611ElementParametersMustBeDocumented&gt;&lt;SA1615ElementReturnValueMustBeDocumented&gt;False&lt;/SA1615ElementReturnValueMustBeDocumented&gt;&lt;SA1617VoidReturnValueMustNotBeDocumented&gt;False&lt;/SA1617VoidReturnValueMustNotBeDocumented&gt;&lt;SA1618GenericTypeParametersMustBeDocumented&gt;False&lt;/SA1618GenericTypeParametersMustBeDocumented&gt;&lt;SA1626SingleLineCommentsMustNotUseDocumentationStyleSlashes&gt;False&lt;/SA1626SingleLineCommentsMustNotUseDocumentationStyleSlashes&gt;&lt;SA1628DocumentationTextMustBeginWithACapitalLetter&gt;False&lt;/SA1628DocumentationTextMustBeginWithACapitalLetter&gt;&lt;SA1629DocumentationTextMustEndWithAPeriod&gt;False&lt;/SA1629DocumentationTextMustEndWithAPeriod&gt;&lt;SA1633SA1641UpdateFileHeader&gt;Ignore&lt;/SA1633SA1641UpdateFileHeader&gt;&lt;SA1639FileHeaderMustHaveSummary&gt;False&lt;/SA1639FileHeaderMustHaveSummary&gt;&lt;SA1642ConstructorSummaryDocumentationMustBeginWithStandardText&gt;False&lt;/SA1642ConstructorSummaryDocumentationMustBeginWithStandardText&gt;&lt;SA1643DestructorSummaryDocumentationMustBeginWithStandardText&gt;False&lt;/SA1643DestructorSummaryDocumentationMustBeginWithStandardText&gt;&lt;SA1644DocumentationHeadersMustNotContainBlankLines&gt;False&lt;/SA1644DocumentationHeadersMustNotContainBlankLines&gt;&lt;/StyleCop.Documentation&gt;&lt;StyleCop.Spacing&gt;&lt;SA1001CommasMustBeSpacedCorrectly&gt;False&lt;/SA1001CommasMustBeSpacedCorrectly&gt;&lt;SA1005SingleLineCommentsMustBeginWithSingleSpace&gt;False&lt;/SA1005SingleLineCommentsMustBeginWithSingleSpace&gt;&lt;SA1006PreprocessorKeywordsMustNotBePrecededBySpace&gt;True&lt;/SA1006PreprocessorKeywordsMustNotBePrecededBySpace&gt;&lt;SA1021NegativeSignsMustBeSpacedCorrectly&gt;True&lt;/SA1021NegativeSignsMustBeSpacedCorrectly&gt;&lt;SA1022PositiveSignsMustBeSpacedCorrectly&gt;True&lt;/SA1022PositiveSignsMustBeSpacedCorrectly&gt;&lt;SA1025CodeMustNotContainMultipleWhitespaceInARow&gt;True&lt;/SA1025CodeMustNotContainMultipleWhitespaceInARow&gt;&lt;/StyleCop.Spacing&gt;&lt;StyleCop.Readability&gt;&lt;SA1100DoNotPrefixCallsWithBaseUnlessLocalImplementationExists&gt;True&lt;/SA1100DoNotPrefixCallsWithBaseUnlessLocalImplementationExists&gt;&lt;SA1106CodeMustNotContainEmptyStatements&gt;True&lt;/SA1106CodeMustNotContainEmptyStatements&gt;&lt;SA1108BlockStatementsMustNotContainEmbeddedComments&gt;True&lt;/SA1108BlockStatementsMustNotContainEmbeddedComments&gt;&lt;SA1109BlockStatementsMustNotContainEmbeddedRegions&gt;True&lt;/SA1109BlockStatementsMustNotContainEmbeddedRegions&gt;&lt;SA1120CommentsMustContainText&gt;False&lt;/SA1120CommentsMustContainText&gt;&lt;SA1121UseBuiltInTypeAlias&gt;False&lt;/SA1121UseBuiltInTypeAlias&gt;&lt;SA1122UseStringEmptyForEmptyStrings&gt;False&lt;/SA1122UseStringEmptyForEmptyStrings&gt;&lt;SA1123DoNotPlaceRegionsWithinElements&gt;False&lt;/SA1123DoNotPlaceRegionsWithinElements&gt;&lt;SA1124CodeMustNotContainEmptyRegions&gt;True&lt;/SA1124CodeMustNotContainEmptyRegions&gt;&lt;/StyleCop.Readability&gt;&lt;StyleCop.Layout&gt;&lt;SA1500CurlyBracketsForMultiLineStatementsMustNotShareLine&gt;False&lt;/SA1500CurlyBracketsForMultiLineStatementsMustNotShareLine&gt;&lt;SA1509OpeningCurlyBracketsMustNotBePrecededByBlankLine&gt;True&lt;/SA1509OpeningCurlyBracketsMustNotBePrecededByBlankLine&gt;&lt;SA1510ChainedStatementBlocksMustNotBePrecededByBlankLine&gt;True&lt;/SA1510ChainedStatementBlocksMustNotBePrecededByBlankLine&gt;&lt;SA1511WhileDoFooterMustNotBePrecededByBlankLine&gt;True&lt;/SA1511WhileDoFooterMustNotBePrecededByBlankLine&gt;&lt;SA1512SingleLineCommentsMustNotBeFollowedByBlankLine&gt;True&lt;/SA1512SingleLineCommentsMustNotBeFollowedByBlankLine&gt;&lt;SA1513ClosingCurlyBracketMustBeFollowedByBlankLine&gt;False&lt;/SA1513ClosingCurlyBracketMustBeFollowedByBlankLine&gt;&lt;SA1514ElementDocumentationHeaderMustBePrecededByBlankLine&gt;False&lt;/SA1514ElementDocumentationHeaderMustBePrecededByBlankLine&gt;&lt;SA1515SingleLineCommentMustBeProceededByBlankLine&gt;False&lt;/SA1515SingleLineCommentMustBeProceededByBlankLine&gt;&lt;/StyleCop.Layout&gt;&lt;StyleCop.Ordering&gt;&lt;AlphabeticalUsingDirectives&gt;Ignore&lt;/AlphabeticalUsingDirectives&gt;&lt;ExpandUsingDirectiLine truncated
<s:String x:Key="/Default/CodeStyle/CodeCleanup/RecentlyUsedProfile/@EntryValue">Cleanup</s:String>
<s:String x:Key="/Default/CodeStyle/CodeCleanup/SilentCleanupProfile/@EntryValue">Simple Reformat</s:String>
<s:Int64 x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/BLANK_LINES_AROUND_FIELD/@EntryValue">0</s:Int64>
<s:Int64 x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/BLANK_LINES_INSIDE_REGION/@EntryValue">0</s:Int64>
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/EMPTY_BLOCK_STYLE/@EntryValue">TOGETHER_SAME_LINE</s:String>
<s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/EXPLICIT_INTERNAL_MODIFIER/@EntryValue">False</s:Boolean>
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/FORCE_ATTRIBUTE_STYLE/@EntryValue">JOIN</s:String>
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/FORCE_FIXED_BRACES_STYLE/@EntryValue">ONLY_FOR_MULTILINE</s:String>
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/FORCE_FOR_BRACES_STYLE/@EntryValue">ONLY_FOR_MULTILINE</s:String>
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/FORCE_FOREACH_BRACES_STYLE/@EntryValue">ONLY_FOR_MULTILINE</s:String>
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/FORCE_IFELSE_BRACES_STYLE/@EntryValue">ONLY_FOR_MULTILINE</s:String>
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/FORCE_USING_BRACES_STYLE/@EntryValue">ONLY_FOR_MULTILINE</s:String>
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/FORCE_WHILE_BRACES_STYLE/@EntryValue">ONLY_FOR_MULTILINE</s:String>
<s:Int64 x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/KEEP_BLANK_LINES_IN_DECLARATIONS/@EntryValue">1</s:Int64>
<s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/PLACE_COMPLEX_ACCESSOR_ATTRIBUTE_ON_SAME_LINE/@EntryValue">True</s:Boolean>
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/SIMPLE_EMBEDDED_STATEMENT_STYLE/@EntryValue">LINE_BREAK</s:String>
<s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/SPACE_AFTER_TYPECAST_PARENTHESES/@EntryValue">False</s:Boolean>
<s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/SPACE_AROUND_MULTIPLICATIVE_OP/@EntryValue">True</s:Boolean>
<s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/SPACE_BEFORE_SIZEOF_PARENTHESES/@EntryValue">False</s:Boolean>
<s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/SPACE_BEFORE_TYPEOF_PARENTHESES/@EntryValue">False</s:Boolean>
<s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/STICK_COMMENT/@EntryValue">False</s:Boolean>
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/WRAP_FOR_STMT_HEADER_STYLE/@EntryValue">WRAP_IF_LONG</s:String>
<s:Int64 x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/WRAP_LIMIT/@EntryValue">180</s:Int64>
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/WRAP_MULTIPLE_DECLARATION_STYLE/@EntryValue">WRAP_IF_LONG</s:String>
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/WRAP_TERNARY_EXPR_STYLE/@EntryValue">WRAP_IF_LONG</s:String>
<s:Boolean x:Key="/Default/CodeStyle/CSharpUsing/AllowAlias/@EntryValue">False</s:Boolean>
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/PredefinedNamingRules/=EnumMember/@EntryIndexedValue">&lt;Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" /&gt;</s:String>
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/PredefinedNamingRules/=PrivateConstants/@EntryIndexedValue">&lt;Policy Inspect="True" Prefix="_" Suffix="" Style="AaBb" /&gt;</s:String>
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/PredefinedNamingRules/=PrivateInstanceFields/@EntryIndexedValue">&lt;Policy Inspect="True" Prefix="_" Suffix="" Style="AaBb" /&gt;</s:String>
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/PredefinedNamingRules/=PrivateStaticFields/@EntryIndexedValue">&lt;Policy Inspect="True" Prefix="_" Suffix="" Style="AaBb" /&gt;</s:String>
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/PredefinedNamingRules/=PrivateStaticReadonly/@EntryIndexedValue">&lt;Policy Inspect="True" Prefix="_" Suffix="" Style="AaBb" /&gt;</s:String>
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/PredefinedNamingRules/=PublicFields/@EntryIndexedValue">&lt;Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" /&gt;</s:String>
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/UserRules/=27c8359b_002D97bf_002D4e1d_002Db126_002D4f613028bcc5/@EntryIndexedValue">&lt;Policy&gt;&lt;Descriptor Staticness="Static, Instance" AccessRightKinds="Private, Protected, ProtectedInternal, Internal, Public" Description="Enums"&gt;&lt;ElementKinds&gt;&lt;Kind Name="ENUM" /&gt;&lt;/ElementKinds&gt;&lt;/Descriptor&gt;&lt;Policy Inspect="True" Prefix="E" Suffix="" Style="AaBb" /&gt;&lt;/Policy&gt;</s:String>
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/UserRules/=8cff90ce_002Def0d_002D436d_002Db8f2_002D5b5bdb923d3b/@EntryIndexedValue">&lt;Policy&gt;&lt;Descriptor Staticness="Static, Instance" AccessRightKinds="Private, Protected, ProtectedInternal, Internal, Public" Description="Classes"&gt;&lt;ElementKinds&gt;&lt;Kind Name="CLASS" /&gt;&lt;/ElementKinds&gt;&lt;/Descriptor&gt;&lt;Policy Inspect="True" Prefix="C" Suffix="" Style="AaBb" /&gt;&lt;/Policy&gt;</s:String>
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/UserRules/=da335a8d_002D4b6e_002D4df6_002D8434_002D29ffe5e2547b/@EntryIndexedValue">&lt;Policy&gt;&lt;Descriptor Staticness="Static, Instance" AccessRightKinds="Private, Protected, ProtectedInternal, Internal, Public" Description="Structs"&gt;&lt;ElementKinds&gt;&lt;Kind Name="STRUCT" /&gt;&lt;/ElementKinds&gt;&lt;/Descriptor&gt;&lt;Policy Inspect="True" Prefix="S" Suffix="" Style="AaBb" /&gt;&lt;/Policy&gt;</s:String>
</wpf:ResourceDictionary>
+5 -3
View File
@@ -1,11 +1,13 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2012
# Visual Studio Express 2012 for Windows Desktop
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Vocaluxe", "Vocaluxe\Vocaluxe.csproj", "{2A1E0F2D-5392-4BB7-B0A1-A9DFA13E79FF}"
ProjectSection(ProjectDependencies) = postProject
{6F3E1874-F28A-40E9-AFBD-31934D593678} = {6F3E1874-F28A-40E9-AFBD-31934D593678}
{6F3E1874-F28A-40E9-AFBD-31934D593679} = {6F3E1874-F28A-40E9-AFBD-31934D593679}
{ED007796-367F-4142-AA55-5450C7645C2C} = {ED007796-367F-4142-AA55-5450C7645C2C}
{D2B6DDEF-E0E1-4DDF-A73A-E6ACEF5C95EC} = {D2B6DDEF-E0E1-4DDF-A73A-E6ACEF5C95EC}
{5A4053F1-5AD5-441F-B254-D97A088127B6} = {5A4053F1-5AD5-441F-B254-D97A088127B6}
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VocaluxeLib", "VocaluxeLib\VocaluxeLib.csproj", "{D2B6DDEF-E0E1-4DDF-A73A-E6ACEF5C95EC}"
@@ -111,13 +113,13 @@ Global
{6F3E1874-F28A-40E9-AFBD-31934D593678}.ReleaseWin|x86.ActiveCfg = ReleaseWin|x86
{6F3E1874-F28A-40E9-AFBD-31934D593678}.ReleaseWin|x86.Build.0 = ReleaseWin|x86
{ED007796-367F-4142-AA55-5450C7645C2C}.DebugLinux|x64.ActiveCfg = DebugWin|x64
{ED007796-367F-4142-AA55-5450C7645C2C}.DebugLinux|x86.ActiveCfg = DebugWin|Win32
{ED007796-367F-4142-AA55-5450C7645C2C}.DebugLinux|x86.ActiveCfg = DebugWin|x64
{ED007796-367F-4142-AA55-5450C7645C2C}.DebugWin|x64.ActiveCfg = DebugWin|x64
{ED007796-367F-4142-AA55-5450C7645C2C}.DebugWin|x64.Build.0 = DebugWin|x64
{ED007796-367F-4142-AA55-5450C7645C2C}.DebugWin|x86.ActiveCfg = DebugWin|Win32
{ED007796-367F-4142-AA55-5450C7645C2C}.DebugWin|x86.Build.0 = DebugWin|Win32
{ED007796-367F-4142-AA55-5450C7645C2C}.ReleaseLinux|x64.ActiveCfg = ReleaseWin|x64
{ED007796-367F-4142-AA55-5450C7645C2C}.ReleaseLinux|x86.ActiveCfg = ReleaseWin|Win32
{ED007796-367F-4142-AA55-5450C7645C2C}.ReleaseLinux|x86.ActiveCfg = ReleaseWin|x64
{ED007796-367F-4142-AA55-5450C7645C2C}.ReleaseWin|x64.ActiveCfg = ReleaseWin|x64
{ED007796-367F-4142-AA55-5450C7645C2C}.ReleaseWin|x64.Build.0 = ReleaseWin|x64
{ED007796-367F-4142-AA55-5450C7645C2C}.ReleaseWin|x86.ActiveCfg = ReleaseWin|Win32
+40 -80
View File
@@ -1,32 +1,27 @@
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Text;
using System.IO;
using Vocaluxe.Base;
using System.Diagnostics;
using Vocaluxe.Lib.Draw;
using Vocaluxe.Menu;
using Vocaluxe.Menu.SongMenu;
using System.IO;
using Vocaluxe.Base;
using VocaluxeLib.Menu;
using VocaluxeLib.Menu.SongMenu;
namespace Vocaluxe.Base
{
static class CBackgroundMusic
{
private static int _CurrentMusicStream = -1;
private static int _PreviousMusicIndex = 0;
private static int _PreviousMusicIndex;
private static PlaylistElement _CurrentPlaylistElement = new PlaylistElement();
private static List<PlaylistElement> _AllFileNames = new List<PlaylistElement>();
private static List<PlaylistElement> _NotPlayedFileNames = new List<PlaylistElement>();
private static List<PlaylistElement> _BGMusicFileNames = new List<PlaylistElement>();
private static List<PlaylistElement> _PreviousFileNames = new List<PlaylistElement>();
private static readonly List<PlaylistElement> _AllFileNames = new List<PlaylistElement>();
private static readonly List<PlaylistElement> _NotPlayedFileNames = new List<PlaylistElement>();
private static readonly List<PlaylistElement> _BGMusicFileNames = new List<PlaylistElement>();
private static readonly List<PlaylistElement> _PreviousFileNames = new List<PlaylistElement>();
private static int _Video = -1;
private static STexture _CurrentVideoTexture = new STexture(-1);
private static Stopwatch _FadeTimer = new Stopwatch();
private static readonly Stopwatch _FadeTimer = new Stopwatch();
private static bool _VideoEnabled;
private static bool _OwnMusicAdded;
@@ -38,17 +33,14 @@ namespace Vocaluxe.Base
public static bool VideoEnabled
{
get
{
return _VideoEnabled;
}
get { return _VideoEnabled; }
set
{
if (_VideoEnabled && value)
return;
if (!_VideoEnabled && !value)
return;
if(_VideoEnabled && !value)
if (_VideoEnabled && !value)
ToggleVideo();
if (!_VideoEnabled && value)
ToggleVideo();
@@ -58,23 +50,13 @@ namespace Vocaluxe.Base
public static bool CanSing
{
get
{
return _CanSing;
}
set
{
_CanSing = value;
}
get { return _CanSing; }
set { _CanSing = value; }
}
public static bool Disabled
{
get
{
return _Disabled;
}
get { return _Disabled; }
set
{
_Disabled = value;
@@ -87,53 +69,35 @@ namespace Vocaluxe.Base
public static bool RepeatSong
{
get
{
return _RepeatSong;
}
set
{
_RepeatSong = value;
}
get { return _RepeatSong; }
set { _RepeatSong = value; }
}
public static int SongID
{
get
{
return _CurrentPlaylistElement.SongID;
}
get { return _CurrentPlaylistElement.SongID; }
}
public static bool Duet
{
get
{
return _CurrentPlaylistElement.Duet;
}
get { return _CurrentPlaylistElement.Duet; }
}
public static bool SongHasVideo
{
get
{
return File.Exists(_CurrentPlaylistElement.VideoFilePath);
}
get { return File.Exists(_CurrentPlaylistElement.VideoFilePath); }
}
public static bool Playing
{
get
{
return _Playing;
}
get { return _Playing; }
}
public static string ArtistAndTitle
{
get
{
if (_CurrentPlaylistElement.Artist != "" && _CurrentPlaylistElement.Title != "")
if (_CurrentPlaylistElement.Artist.Length > 0 && _CurrentPlaylistElement.Title.Length > 0)
return _CurrentPlaylistElement.Artist + " - " + _CurrentPlaylistElement.Title;
else
return Path.GetFileNameWithoutExtension(_CurrentPlaylistElement.MusicFilePath);
@@ -142,27 +106,20 @@ namespace Vocaluxe.Base
public static STexture Cover
{
get
{
return _CurrentPlaylistElement.Cover;
}
get { return _CurrentPlaylistElement.Cover; }
}
public static void Init()
{
List<string> templist = new List<string>();
foreach(string ending in CSettings.MusicFileTypes)
{
foreach (string ending in CSettings.MusicFileTypes)
templist.AddRange(CHelper.ListFiles(CSettings.sFolderBackgroundMusic, ending, true, true));
}
foreach (string path in templist)
{
_BGMusicFileNames.Add(new PlaylistElement(path));
}
if(CConfig.BackgroundMusicSource != EBackgroundMusicSource.TR_CONFIG_ONLY_OWN_MUSIC)
if (CConfig.BackgroundMusicSource != EBackgroundMusicSource.TR_CONFIG_ONLY_OWN_MUSIC)
AddBackgroundMusic();
if (CConfig.VideoBackgrounds == EOffOn.TR_CONFIG_ON)
_VideoEnabled = true;
@@ -235,7 +192,7 @@ namespace Vocaluxe.Base
if (_AllFileNames.Count > 0 && _CurrentMusicStream != -1)
{
float timeToPlay;
if(_CurrentPlaylistElement.Finish == 0f) //No End-Tag defined
if (_CurrentPlaylistElement.Finish == 0f) //No End-Tag defined
timeToPlay = CSound.GetLength(_CurrentMusicStream) - CSound.GetPosition(_CurrentMusicStream);
else //End-Tag found
timeToPlay = _CurrentPlaylistElement.Finish - CSound.GetPosition(_CurrentMusicStream);
@@ -251,11 +208,13 @@ namespace Vocaluxe.Base
else
CSound.SetPosition(_CurrentMusicStream, 0);
if (_VideoEnabled && _Video != -1)
{
if (_CurrentPlaylistElement.Start != 0f && CConfig.BackgroundMusicUseStart == EOffOn.TR_CONFIG_ON)
CVideo.VdSkip(_Video, _CurrentPlaylistElement.Start, _CurrentPlaylistElement.VideoGap);
else
CVideo.VdSkip(_Video, 0f, _CurrentPlaylistElement.VideoGap);
}
}
else
Next();
}
@@ -266,8 +225,9 @@ namespace Vocaluxe.Base
{
if (_AllFileNames.Count > 0)
{
if (_PreviousMusicIndex == _PreviousFileNames.Count - 1 || _PreviousFileNames.Count == 0) //We are not currently in the previous list
if (_PreviousMusicIndex == _PreviousFileNames.Count - 1 || _PreviousFileNames.Count == 0)
{
//We are not currently in the previous list
Stop();
if (_NotPlayedFileNames.Count == 0)
_NotPlayedFileNames.AddRange(_AllFileNames);
@@ -278,8 +238,9 @@ namespace Vocaluxe.Base
_PreviousFileNames.Add(_CurrentPlaylistElement);
_PreviousMusicIndex = _PreviousFileNames.Count - 1;
}
else if(_PreviousFileNames.Count > 0) //We are in the previous list
else if (_PreviousFileNames.Count > 0)
{
//We are in the previous list
Stop();
_PreviousMusicIndex++;
@@ -314,11 +275,13 @@ namespace Vocaluxe.Base
else
CSound.SetPosition(_CurrentMusicStream, 0);
if (_VideoEnabled && _Video != -1)
{
if (_CurrentPlaylistElement.Start != 0f && CConfig.BackgroundMusicUseStart == EOffOn.TR_CONFIG_ON)
CVideo.VdSkip(_Video, _CurrentPlaylistElement.Start, _CurrentPlaylistElement.VideoGap);
else
CVideo.VdSkip(_Video, 0f, _CurrentPlaylistElement.VideoGap);
}
}
else
{
Stop();
@@ -344,12 +307,14 @@ namespace Vocaluxe.Base
else
CSound.SetPosition(_CurrentMusicStream, 0);
if (_VideoEnabled && _Video != -1)
{
if (_CurrentPlaylistElement.Start != 0f && CConfig.BackgroundMusicUseStart == EOffOn.TR_CONFIG_ON)
CVideo.VdSkip(_Video, _CurrentPlaylistElement.Start, _CurrentPlaylistElement.VideoGap);
else
CVideo.VdSkip(_Video, 0f, _CurrentPlaylistElement.VideoGap);
}
}
}
public static void ApplyVolume()
{
@@ -490,9 +455,7 @@ namespace Vocaluxe.Base
float vtime = 0f;
CVideo.VdGetFrame(_Video, ref _CurrentVideoTexture, CSound.GetPosition(_CurrentMusicStream), ref vtime);
if (_FadeTimer.ElapsedMilliseconds <= 3000L)
{
_CurrentVideoTexture.color.A = (_FadeTimer.ElapsedMilliseconds / 3000f);
}
_CurrentVideoTexture.color.A = _FadeTimer.ElapsedMilliseconds / 3000f;
else
{
_CurrentVideoTexture.color.A = 1f;
@@ -532,9 +495,9 @@ namespace Vocaluxe.Base
class PlaylistElement
{
private CSong _Song = null;
private readonly CSong _Song;
private int _SongID;
private readonly int _SongID;
public int SongID
{
get { return _SongID; }
@@ -552,10 +515,7 @@ class PlaylistElement
return _MusicFilePath;
}
set
{
_MusicFilePath = value;
}
set { _MusicFilePath = value; }
}
public string VideoFilePath
+65 -120
View File
@@ -1,23 +1,19 @@
using System;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.IO;
using System.Text;
using System.Text.RegularExpressions;
using System.Windows.Forms;
using System.Xml;
using OpenTK.Platform;
using Vocaluxe.Lib.Sound;
using Vocaluxe.Lib.Webcam;
using Vocaluxe.Menu;
using VocaluxeLib.Menu;
namespace Vocaluxe.Base
{
static class CConfig
{
private static XmlWriterSettings _settings = new XmlWriterSettings();
private static readonly XmlWriterSettings _settings = new XmlWriterSettings();
// Debug
public static EDebugLevel DebugLevel = EDebugLevel.TR_CONFIG_OFF;
@@ -53,7 +49,7 @@ namespace Vocaluxe.Base
public static ETimerLook TimerLook = ETimerLook.TR_CONFIG_TIMERLOOK_EXPANDED;
public static EPlayerInfo PlayerInfo = EPlayerInfo.TR_CONFIG_PLAYERINFO_BOTH;
public static EFadePlayerInfo FadePlayerInfo = EFadePlayerInfo.TR_CONFIG_FADEPLAYERINFO_OFF;
public static ECoverLoading CoverLoading = ECoverLoading.TR_CONFIG_COVERLOADING_ATSTART;
public static ECoverLoading CoverLoading = ECoverLoading.TR_CONFIG_COVERLOADING_DYNAMIC;
public static ELyricStyle LyricStyle = ELyricStyle.Slide;
// Sound
@@ -97,11 +93,11 @@ namespace Vocaluxe.Base
public static SWebcamConfig WebcamConfig;
//Lists to save parameters and values
private static List<string> _Params = new List<string>();
private static List<string> _Values = new List<string>();
private static readonly List<string> _Params = new List<string>();
private static readonly List<string> _Values = new List<string>();
//Variables to save old values for commandline-parameters
private static List<string> SongFolderOld = new List<string>();
private static readonly List<string> SongFolderOld = new List<string>();
public static void Init()
{
@@ -128,22 +124,21 @@ namespace Vocaluxe.Base
string value = string.Empty;
#region Debug
xmlReader.TryGetEnumValue<EDebugLevel>("//root/Debug/DebugLevel", ref DebugLevel);
#endregion Debug
xmlReader.TryGetEnumValue("//root/Debug/DebugLevel", ref DebugLevel);
#region Graphics
xmlReader.TryGetEnumValue<ERenderer>("//root/Graphics/Renderer", ref Renderer);
xmlReader.TryGetEnumValue<ETextureQuality>("//root/Graphics/TextureQuality", ref TextureQuality);
xmlReader.TryGetEnumValue("//root/Graphics/Renderer", ref Renderer);
xmlReader.TryGetEnumValue("//root/Graphics/TextureQuality", ref TextureQuality);
xmlReader.TryGetIntValueRange("//root/Graphics/CoverSize", ref CoverSize, 32, 1024);
xmlReader.TryGetIntValue("//root/Graphics/ScreenW", ref ScreenW);
xmlReader.TryGetIntValue("//root/Graphics/ScreenH", ref ScreenH);
xmlReader.TryGetEnumValue<EAntiAliasingModes>("//root/Graphics/AAMode", ref AAMode);
xmlReader.TryGetEnumValue<EColorDeep>("//root/Graphics/Colors", ref Colors);
xmlReader.TryGetEnumValue("//root/Graphics/AAMode", ref AAMode);
xmlReader.TryGetEnumValue("//root/Graphics/Colors", ref Colors);
xmlReader.TryGetFloatValue("//root/Graphics/MaxFPS", ref MaxFPS);
xmlReader.TryGetEnumValue<EOffOn>("//root/Graphics/VSync", ref VSync);
xmlReader.TryGetEnumValue<EOffOn>("//root/Graphics/FullScreen", ref FullScreen);
xmlReader.TryGetEnumValue("//root/Graphics/VSync", ref VSync);
xmlReader.TryGetEnumValue("//root/Graphics/FullScreen", ref FullScreen);
xmlReader.TryGetFloatValue("//root/Graphics/FadeTime", ref FadeTime);
#endregion Graphics
@@ -161,16 +156,16 @@ namespace Vocaluxe.Base
#endregion Theme
#region Sound
xmlReader.TryGetEnumValue<EPlaybackLib>("//root/Sound/PlayBackLib", ref PlayBackLib);
xmlReader.TryGetEnumValue<ERecordLib>("//root/Sound/RecordLib", ref RecordLib);
xmlReader.TryGetEnumValue<EBufferSize>("//root/Sound/AudioBufferSize", ref AudioBufferSize);
xmlReader.TryGetEnumValue("//root/Sound/PlayBackLib", ref PlayBackLib);
xmlReader.TryGetEnumValue("//root/Sound/RecordLib", ref RecordLib);
xmlReader.TryGetEnumValue("//root/Sound/AudioBufferSize", ref AudioBufferSize);
xmlReader.TryGetIntValueRange("//root/Sound/AudioLatency", ref AudioLatency, -500, 500);
xmlReader.TryGetEnumValue("//root/Sound/BackgroundMusic", ref BackgroundMusic);
xmlReader.TryGetIntValueRange("//root/Sound/BackgroundMusicVolume", ref BackgroundMusicVolume);
xmlReader.TryGetEnumValue("//root/Sound/BackgroundMusicSource", ref BackgroundMusicSource);
xmlReader.TryGetEnumValue<EOffOn>("//root/Sound/BackgroundMusicUseStart", ref BackgroundMusicUseStart);
xmlReader.TryGetEnumValue("//root/Sound/BackgroundMusicUseStart", ref BackgroundMusicUseStart);
xmlReader.TryGetIntValueRange("//root/Sound/PreviewMusicVolume", ref PreviewMusicVolume);
xmlReader.TryGetIntValueRange("//root/Sound/GameMusicVolume", ref GameMusicVolume);
#endregion Sound
@@ -189,21 +184,19 @@ namespace Vocaluxe.Base
i++;
}
xmlReader.TryGetEnumValue<ESongMenu>("//root/Game/SongMenu", ref SongMenu);
xmlReader.TryGetEnumValue<ESongSorting>("//root/Game/SongSorting", ref SongSorting);
xmlReader.TryGetEnumValue<EOffOn>("//root/Game/IgnoreArticles", ref IgnoreArticles);
xmlReader.TryGetEnumValue("//root/Game/SongMenu", ref SongMenu);
xmlReader.TryGetEnumValue("//root/Game/SongSorting", ref SongSorting);
xmlReader.TryGetEnumValue("//root/Game/IgnoreArticles", ref IgnoreArticles);
xmlReader.TryGetFloatValue("//root/Game/ScoreAnimationTime", ref ScoreAnimationTime);
xmlReader.TryGetEnumValue<ETimerMode>("//root/Game/TimerMode", ref TimerMode);
xmlReader.TryGetEnumValue("//root/Game/TimerMode", ref TimerMode);
xmlReader.TryGetIntValue("//root/Game/NumPlayer", ref NumPlayer);
xmlReader.TryGetEnumValue("//root/Game/Tabs", ref Tabs);
xmlReader.GetValue("//root/Game/Language", ref Language, Language);
xmlReader.TryGetEnumValue<EOffOn>("//root/Game/LyricsOnTop", ref LyricsOnTop);
xmlReader.TryGetEnumValue("//root/Game/LyricsOnTop", ref LyricsOnTop);
xmlReader.TryGetFloatValue("//root/Game/MinLineBreakTime", ref MinLineBreakTime);
if ((ScoreAnimationTime > 0 && ScoreAnimationTime < 1) || ScoreAnimationTime < 0)
{
ScoreAnimationTime = 1;
}
if (MinLineBreakTime < 0)
MinLineBreakTime = 0.1f;
@@ -211,42 +204,25 @@ namespace Vocaluxe.Base
if (NumPlayer < 1 || NumPlayer > CSettings.MaxNumPlayer)
NumPlayer = 2;
List<string> _Languages = new List<string>();
_Languages = CLanguage.GetLanguages();
bool _LangExists = false;
for (i = 0; i < _Languages.Count; i++)
{
if (_Languages[i] == Language)
{
_LangExists = true;
}
}
bool _LangExists = CLanguage.SetLanguage(Language);
//TODO: What should we do, if English not exists?
if(_LangExists == false){
if (_LangExists == false)
Language = "English";
}
CLanguage.SetLanguage(Language);
//Read players from config
for (i = 1; i <= CSettings.MaxNumPlayer; i++)
{
xmlReader.GetValue("//root/Game/Players/Player" + i.ToString(), ref Players[i - 1], string.Empty);
}
#endregion Game
#region Video
xmlReader.TryGetEnumValue<EVideoDecoder>("//root/Video/VideoDecoder", ref VideoDecoder);
xmlReader.TryGetEnumValue<EOffOn>("//root/Video/VideoBackgrounds", ref VideoBackgrounds);
xmlReader.TryGetEnumValue<EOffOn>("//root/Video/VideoPreview", ref VideoPreview);
xmlReader.TryGetEnumValue<EOffOn>("//root/Video/VideosInSongs", ref VideosInSongs);
xmlReader.TryGetEnumValue<EOffOn>("//root/Video/VideosToBackground", ref VideosToBackground);
xmlReader.TryGetEnumValue("//root/Video/VideoDecoder", ref VideoDecoder);
xmlReader.TryGetEnumValue("//root/Video/VideoBackgrounds", ref VideoBackgrounds);
xmlReader.TryGetEnumValue("//root/Video/VideoPreview", ref VideoPreview);
xmlReader.TryGetEnumValue("//root/Video/VideosInSongs", ref VideosInSongs);
xmlReader.TryGetEnumValue("//root/Video/VideosToBackground", ref VideosToBackground);
xmlReader.TryGetEnumValue<EWebcamLib>("//root/Video/WebcamLib", ref WebcamLib);
xmlReader.TryGetEnumValue("//root/Video/WebcamLib", ref WebcamLib);
WebcamConfig = new SWebcamConfig();
xmlReader.GetValue("//root/Video/WebcamConfig/MonikerString", ref WebcamConfig.MonikerString, String.Empty);
xmlReader.TryGetIntValue("//root/Video/WebcamConfig/Framerate", ref WebcamConfig.Framerate);
@@ -275,27 +251,28 @@ namespace Vocaluxe.Base
public static bool SaveConfig()
{
XmlWriter writer = XmlWriter.Create(CSettings.sFileConfig, _settings);
XmlWriter writer = null;
try
{
writer = XmlWriter.Create(CSettings.sFileConfig, _settings);
writer.WriteStartDocument();
writer.WriteStartElement("root");
#region Info
writer.WriteStartElement("Info");
writer.WriteElementString("Version", CSettings.GetFullVersionText());
writer.WriteElementString("Time", System.DateTime.Now.ToString());
writer.WriteElementString("Platform", System.Environment.OSVersion.Platform.ToString());
writer.WriteElementString("OSVersion", System.Environment.OSVersion.ToString());
writer.WriteElementString("ProcessorCount", System.Environment.ProcessorCount.ToString());
writer.WriteElementString("Time", DateTime.Now.ToString());
writer.WriteElementString("Platform", Environment.OSVersion.Platform.ToString());
writer.WriteElementString("OSVersion", Environment.OSVersion.ToString());
writer.WriteElementString("ProcessorCount", Environment.ProcessorCount.ToString());
writer.WriteElementString("Screens", Screen.AllScreens.Length.ToString());
writer.WriteElementString("PrimaryScreenResolution", Screen.PrimaryScreen.Bounds.Size.ToString());
writer.WriteElementString("Directory", System.Environment.CurrentDirectory.ToString());
writer.WriteElementString("Directory", Environment.CurrentDirectory);
writer.WriteEndElement();
#endregion Info
#region Debug
writer.WriteStartElement("Debug");
@@ -402,13 +379,15 @@ namespace Vocaluxe.Base
writer.WriteComment("Background Music Source");
writer.WriteElementString("BackgroundMusicSource", Enum.GetName(typeof(EBackgroundMusicSource), BackgroundMusicSource));
writer.WriteComment("Background Music use start-tag of songs");
writer.WriteElementString("BackgroundMusicUseStart", Enum.GetName(typeof(EOffOn), BackgroundMusicUseStart));
writer.WriteComment("Preview Volume from 0 to 100");
writer.WriteElementString("PreviewMusicVolume", PreviewMusicVolume.ToString());
writer.WriteComment("Preview Volume from 0 to 100");
writer.WriteElementString("PreviewMusicVolume", PreviewMusicVolume.ToString());
writer.WriteComment("Game Volume from 0 to 100");
writer.WriteElementString("GameMusicVolume", GameMusicVolume.ToString());
@@ -428,19 +407,15 @@ namespace Vocaluxe.Base
//Write "old" song-folders to config.
writer.WriteComment("SongFolder: SongFolder1, SongFolder2, SongFolder3, ...");
for (int i = 0; i < SongFolderOld.Count; i++)
{
writer.WriteElementString("SongFolder" + (i + 1).ToString(), SongFolderOld[i]);
}
}
else
{
//Write "normal" song-folders to config.
writer.WriteComment("SongFolder: SongFolder1, SongFolder2, SongFolder3, ...");
for (int i = 0; i < SongFolder.Count; i++)
{
writer.WriteElementString("SongFolder" + (i + 1).ToString(), SongFolder[i]);
}
}
writer.WriteComment("SongMenu: " + CHelper.ListStrings(Enum.GetNames(typeof(ESongMenu))));
writer.WriteElementString("SongMenu", Enum.GetName(typeof(ESongMenu), SongMenu));
@@ -472,9 +447,7 @@ namespace Vocaluxe.Base
writer.WriteComment("Default profile for players 1..." + CSettings.MaxNumPlayer.ToString() + ":");
writer.WriteStartElement("Players");
for (int i = 1; i <= CSettings.MaxNumPlayer; i++)
{
writer.WriteElementString("Player" + i.ToString(), Path.GetFileName(Players[i - 1]));
}
writer.WriteEndElement();
writer.WriteEndElement();
@@ -518,7 +491,7 @@ namespace Vocaluxe.Base
for (int p = 1; p <= CSettings.MaxNumPlayer; p++)
{
if (MicConfig[p - 1].DeviceName != String.Empty && MicConfig[p - 1].InputName != String.Empty && MicConfig[p - 1].Channel > 0)
if (MicConfig[p - 1].DeviceName.Length > 0 && MicConfig[p - 1].InputName.Length > 0 && MicConfig[p - 1].Channel > 0)
{
writer.WriteStartElement("MicConfig" + p.ToString());
@@ -540,9 +513,16 @@ namespace Vocaluxe.Base
// End of File
writer.WriteEndElement(); //end of root
writer.WriteEndDocument();
writer.Flush();
writer.Close();
writer = null;
}
catch (Exception)
{
if (writer != null)
writer.Close();
return false;
}
return true;
}
@@ -551,7 +531,7 @@ namespace Vocaluxe.Base
/// </summary>
public static float CalcCycleTime()
{
return (1f / MaxFPS)*1000f;
return (1f / MaxFPS) * 1000f;
}
/// <summary>
@@ -569,11 +549,9 @@ namespace Vocaluxe.Base
for (int inp = 0; inp < Devices[dev].Inputs.Count; inp++)
{
if (Devices[dev].Inputs[inp].PlayerChannel1 != 0 || Devices[dev].Inputs[inp].PlayerChannel2 != 0)
{
return true;
}
}
}
return false;
}
@@ -595,10 +573,8 @@ namespace Vocaluxe.Base
for (int inp = 0; inp < Devices[dev].Inputs.Count; inp++)
{
if (Devices[dev].Inputs[inp].PlayerChannel1 == player || Devices[dev].Inputs[inp].PlayerChannel2 == player)
{
return true;
}
}
}
return false;
}
@@ -652,7 +628,6 @@ namespace Vocaluxe.Base
//Check if there are inputs.
if (Devices[dev].Inputs.Count >= 1)
{
bool micfound = false;
//Check if there is one or more channels
if (Devices[dev].Inputs[0].Channels >= 1)
{
@@ -662,8 +637,6 @@ namespace Vocaluxe.Base
MicConfig[0].InputName = Devices[dev].Inputs[0].Name;
MicConfig[0].Channel = 1;
micfound = true;
}
if (Devices[dev].Inputs[0].Channels >= 2)
{
//Set this device to player 2
@@ -672,15 +645,12 @@ namespace Vocaluxe.Base
MicConfig[1].InputName = Devices[dev].Inputs[0].Name;
MicConfig[1].Channel = 2;
micfound = true;
}
if (micfound)
{
return true;
}
}
}
}
}
return false;
}
@@ -696,9 +666,7 @@ namespace Vocaluxe.Base
//Complete argument string
string arguments = string.Empty;
foreach (string arg in args)
{
arguments += arg + " ";
}
args = SpliterParam.Split(arguments);
@@ -714,10 +682,9 @@ namespace Vocaluxe.Base
switch (parts.Length)
{
//Only found a parameter
case 1:
if (!Regex.IsMatch(parts[0], @"\s") && parts[0] != string.Empty)
if (!Regex.IsMatch(parts[0], @"\s") && parts[0].Length > 0)
{
//Add parameter
_Params.Add(parts[0]);
@@ -730,7 +697,7 @@ namespace Vocaluxe.Base
//Found parameter and value
case 2:
if (!Regex.IsMatch(parts[0], @"\s") && parts[0] != string.Empty)
if (!Regex.IsMatch(parts[0], @"\s") && parts[0].Length > 0)
{
//Add parameter
_Params.Add(parts[0]);
@@ -746,8 +713,8 @@ namespace Vocaluxe.Base
/// <summary>
/// Apply command-line-parameters (before reading config.xml)
/// </summary>
public static void UseCommandLineParamsBefore(){
public static void UseCommandLineParamsBefore()
{
//Check each parameter
for (int i = 0; i < _Params.Count; i++)
{
@@ -763,17 +730,13 @@ namespace Vocaluxe.Base
case "configfile":
//Check if value is valid
if (CheckFile(value))
{
CSettings.sFileConfig = value;
}
break;
case "scorefile":
//Check if value is valid
if (CheckFile(value))
{
CSettings.sFileHighscoreDB = value;
}
break;
case "playlistfolder":
@@ -794,7 +757,6 @@ namespace Vocaluxe.Base
/// </summary>
public static void UseCommandLineParamsAfter()
{
//Check each parameter
for (int i = 0; i < _Params.Count; i++)
{
@@ -808,17 +770,6 @@ namespace Vocaluxe.Base
switch (param)
{
case "songfolder":
//Check if SongFolders from config.xml are saved
if (SongFolderOld.Count == 0)
{
SongFolderOld.Clear();
SongFolderOld.AddRange(SongFolder);
SongFolder.Clear();
}
//Add parameter-value to SongFolder
SongFolder.Add(value);
break;
case "songpath":
//Check if SongFolders from config.xml are saved
if (SongFolderOld.Count == 0)
@@ -836,20 +787,16 @@ namespace Vocaluxe.Base
private static bool CheckFile(string value)
{
char [] chars = Path.GetInvalidPathChars();
for(int i=0; i<chars.Length; i++){
if(value.Contains(chars[i].ToString())){
return false;
}
}
if (Path.GetFileName(value) == string.Empty)
char[] chars = Path.GetInvalidPathChars();
for (int i = 0; i < chars.Length; i++)
{
if (value.Contains(chars[i].ToString()))
return false;
}
if (Path.GetFileName(value).Length == 0)
return false;
if (!Path.HasExtension(value))
{
return false;
}
return true;
}
@@ -862,7 +809,7 @@ namespace Vocaluxe.Base
{
for (int j = 0; j < CSettings.MaxNumPlayer; j++)
{
if (Players[j] != string.Empty)
if (Players[j].Length > 0)
{
if (Path.GetFileName(CProfiles.Profiles[i].ProfileFile) == Players[j] && CProfiles.Profiles[i].Active == EOffOn.TR_CONFIG_ON)
{
@@ -873,11 +820,9 @@ namespace Vocaluxe.Base
}
}
else
{
CGame.Player[j].ProfileID = -1;
}
}
}
}
}
}
+11 -26
View File
@@ -3,9 +3,7 @@ using System.Collections.Generic;
using System.IO;
using System.Text;
using System.Xml;
using Vocaluxe.Lib.Draw;
using Vocaluxe.Menu;
using VocaluxeLib.Menu;
namespace Vocaluxe.Base
{
@@ -25,12 +23,12 @@ namespace Vocaluxe.Base
abstract class CCover
{
private static XmlWriterSettings _settings = new XmlWriterSettings();
private static List<SCover> _Cover = new List<SCover>();
private static List<SCoverTheme> _CoverThemes = new List<SCoverTheme>();
private static readonly XmlWriterSettings _settings = new XmlWriterSettings();
private static readonly List<SCover> _Cover = new List<SCover>();
private static readonly List<SCoverTheme> _CoverThemes = new List<SCoverTheme>();
private static STexture _NoCover = new STexture(-1);
private static Object _MutexCover = new Object();
private static readonly Object _MutexCover = new Object();
public static STexture NoCover
{
@@ -56,9 +54,7 @@ namespace Vocaluxe.Base
{
List<string> CoverThemes = new List<string>();
for (int i = 0; i < _CoverThemes.Count; i++)
{
CoverThemes.Add(_CoverThemes[i].Name);
}
return CoverThemes.ToArray();
}
@@ -73,10 +69,8 @@ namespace Vocaluxe.Base
for (int i = 0; i < _CoverThemes.Count; i++)
{
if (_CoverThemes[i].Name == CConfig.CoverTheme)
{
return i;
}
}
return -1;
}
@@ -111,11 +105,9 @@ namespace Vocaluxe.Base
foreach (SCover cover in _Cover)
{
if (cover.Name == Name)
{
return true;
}
}
}
return false;
}
@@ -162,7 +154,7 @@ namespace Vocaluxe.Base
foreach (string file in files)
{
CXMLReader xmlReader = CXMLReader.OpenFile((Path.Combine(path, file)));
CXMLReader xmlReader = CXMLReader.OpenFile(Path.Combine(path, file));
if (xmlReader != null)
{
@@ -171,7 +163,7 @@ namespace Vocaluxe.Base
xmlReader.GetValue("//root/Info/Name", ref coverTheme.Name, String.Empty);
xmlReader.GetValue("//root/Info/Folder", ref coverTheme.Folder, String.Empty);
if (coverTheme.Folder != String.Empty && coverTheme.Name != String.Empty)
if (coverTheme.Folder.Length > 0 && coverTheme.Name.Length > 0)
{
coverTheme.File = file;
@@ -190,10 +182,9 @@ namespace Vocaluxe.Base
coverTheme = CoverTheme(coverThemeName);
if (coverTheme.Name != String.Empty)
if (coverTheme.Name.Length > 0)
{
CXMLReader xmlReader = CXMLReader.OpenFile((Path.Combine(CSettings.sFolderCover, coverTheme.File)));
CXMLReader xmlReader = CXMLReader.OpenFile(Path.Combine(CSettings.sFolderCover, coverTheme.File));
if (xmlReader != null)
{
@@ -209,25 +200,19 @@ namespace Vocaluxe.Base
xmlReader.GetValue("//root/Cover/" + cover[i] + "/Name", ref name, String.Empty);
xmlReader.GetValue("//root/Cover/" + cover[i] + "/Path", ref value, String.Empty);
sk.Name = name;
sk.Value = Path.Combine(coverTheme.Folder,value);
sk.Value = Path.Combine(coverTheme.Folder, value);
if (File.Exists(Path.Combine(CSettings.sFolderCover, Path.Combine(coverTheme.Folder, value))))
{
sk.Texture = CDraw.AddTexture(Path.Combine(CSettings.sFolderCover, Path.Combine(coverTheme.Folder, value)));
}
else
{
sk.Texture = _NoCover;
}
_Cover.Add(sk);
if (sk.Name == "NoCover")
{
_NoCover = sk.Texture;
}
}
}
}
List<string> files = new List<string>();
@@ -248,7 +233,7 @@ namespace Vocaluxe.Base
string value = String.Empty;
sk.Name = name;
sk.Value = Path.Combine(coverTheme.Folder,Path.GetFileName(file));
sk.Value = Path.Combine(coverTheme.Folder, Path.GetFileName(file));
sk.Texture = CDraw.AddTexture(Path.Combine(CSettings.sFolderCover, sk.Value));
+257 -463
View File
File diff suppressed because it is too large. Load diff
+13 -13
View File
@@ -1,19 +1,15 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Drawing;
using System.Text;
using System.IO;
using System.Windows.Forms;
using Vocaluxe.Base;
using Vocaluxe.Lib.Draw;
using Vocaluxe.Menu;
using VocaluxeLib.Menu;
namespace Vocaluxe.Base
{
static class CDraw
{
private static IDraw _Draw = null;
private static IDraw _Draw;
public static void InitDraw()
{
@@ -73,7 +69,9 @@ namespace Vocaluxe.Base
public static bool Unload()
{
return _Draw.Unload();
bool result = _Draw.Unload();
_Draw = null;
return result;
}
public static int GetScreenWidth()
@@ -163,10 +161,11 @@ namespace Vocaluxe.Base
if (MaxSize == 0)
return _Draw.AddTexture(TexturePath);
if (!System.IO.File.Exists(TexturePath))
if (!File.Exists(TexturePath))
return new STexture(-1);
Bitmap origin = new Bitmap(TexturePath);
using (Bitmap origin = new Bitmap(TexturePath))
{
int w = MaxSize;
int h = MaxSize;
@@ -175,12 +174,13 @@ namespace Vocaluxe.Base
else if (origin.Height > origin.Width && origin.Height > h)
w = (int)Math.Round((float)h / origin.Height * origin.Width);
Bitmap bmp = new Bitmap(origin, w, h);
using (Bitmap bmp = new Bitmap(origin, w, h))
{
STexture tex = _Draw.AddTexture(bmp);
bmp.Dispose();
origin.Dispose();
return tex;
}
}
}
public static STexture AddTexture(int W, int H, IntPtr Data)
{
+191 -384
View File
@@ -1,23 +1,19 @@
using System;
using System.Collections;
using System.Collections.Generic;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Drawing.Imaging;
using System.Drawing.Text;
using System.IO;
using System.Text;
using System.Windows.Forms;
using System.Xml;
using Vocaluxe.Lib.Draw;
using Vocaluxe.Menu;
using VocaluxeLib.Menu;
namespace Vocaluxe.Base
{
class CGlyph
{
private float _SIZEh = 50f;
private readonly float _SIZEh = 50f;
public float SIZEh
{
get { return _SIZEh; }
@@ -36,32 +32,34 @@ namespace Vocaluxe.Base
float factor = GetFactor(chr, flags);
CFonts.Height = SIZEh * factor;
Bitmap bmp = new Bitmap(10, 10);
System.Drawing.Graphics g = System.Drawing.Graphics.FromImage(bmp);
Font fo;
Size sizeB;
SizeF size;
using (Graphics g = Graphics.FromHwnd(IntPtr.Zero))
{
fo = CFonts.GetFont();
sizeB = TextRenderer.MeasureText(g, chr.ToString(), fo, new Size(int.MaxValue, int.MaxValue), flags);
Font fo = CFonts.GetFont();
Size sizeB = TextRenderer.MeasureText(g, chr.ToString(), fo, new Size(int.MaxValue, int.MaxValue), flags);
size = g.MeasureString(chr.ToString(), fo);
}
SizeF size = g.MeasureString(chr.ToString(), fo);
g.Dispose();
bmp.Dispose();
bmp = new Bitmap((int)(sizeB.Width * 2f), sizeB.Height);
g = System.Drawing.Graphics.FromImage(bmp);
g.Clear(System.Drawing.Color.Transparent);
using (Bitmap bmp = new Bitmap((int)(sizeB.Width * 2f), sizeB.Height))
{
Graphics g = Graphics.FromImage(bmp);
g.Clear(Color.Transparent);
g.SmoothingMode = SmoothingMode.AntiAlias;
g.InterpolationMode = InterpolationMode.HighQualityBicubic;
g.TextRenderingHint = System.Drawing.Text.TextRenderingHint.ClearTypeGridFit;
g.TextRenderingHint = TextRenderingHint.ClearTypeGridFit;
CFonts.Height = SIZEh;
fo = CFonts.GetFont();
PointF point = new PointF(
outline * Math.Abs(sizeB.Width - size.Width) + (sizeB.Width - size.Width) / 2f + SIZEh / 5f,
(sizeB.Height - size.Height - (size.Height + SIZEh/4f) * (1f - factor)) / 2f);
(sizeB.Height - size.Height - (size.Height + SIZEh / 4f) * (1f - factor)) / 2f);
GraphicsPath path = new GraphicsPath();
using (GraphicsPath path = new GraphicsPath())
{
path.AddString(
chr.ToString(),
fo.FontFamily,
@@ -70,17 +68,19 @@ namespace Vocaluxe.Base
point,
new StringFormat());
Pen pen = new Pen(
using (Pen pen = new Pen(
Color.FromArgb(
(int)CFonts.OutlineColor.A * 255,
(int)CFonts.OutlineColor.R * 255,
(int)CFonts.OutlineColor.G * 255,
(int)CFonts.OutlineColor.B * 255),
SIZEh * outline);
SIZEh * outline))
{
pen.LineJoin = LineJoin.Round;
g.DrawPath(pen, path);
g.FillPath(Brushes.White, path);
}
}
/*
g.DrawString(
@@ -89,14 +89,12 @@ namespace Vocaluxe.Base
Brushes.White,
point);
* */
Texture = CDraw.AddTexture(bmp);
//bmp.Save("test.png", ImageFormat.Png);
Chr = chr;
width = (int)((1f + outline / 2f) * sizeB.Width * Texture.width/factor / bmp.Width);
bmp.Dispose();
width = (int)((1f + outline / 2f) * sizeB.Width * Texture.width / factor / bmp.Width);
g.Dispose();
}
fo.Dispose();
}
@@ -114,63 +112,40 @@ namespace Vocaluxe.Base
CFonts.Style = EStyle.Normal;
CFonts.Height = SIZEh;
Bitmap bmp = new Bitmap(10, 10);
System.Drawing.Graphics g = System.Drawing.Graphics.FromImage(bmp);
float h_style, h_normal;
using (Graphics g = Graphics.FromHwnd(IntPtr.Zero))
{
Font fo = CFonts.GetFont();
Size sizeB = TextRenderer.MeasureText(g, chr.ToString(), fo, new Size(int.MaxValue, int.MaxValue), flags);
//SizeF size = g.MeasureString(chr.ToString(), fo);
float h_normal = sizeB.Height;
h_normal = sizeB.Height;
}
CFonts.Style = style;
bmp = new Bitmap(10, 10);
g = System.Drawing.Graphics.FromImage(bmp);
fo = CFonts.GetFont();
sizeB = TextRenderer.MeasureText(g, chr.ToString(), fo, new Size(int.MaxValue, int.MaxValue), flags);
using (Graphics g = Graphics.FromHwnd(IntPtr.Zero))
{
Font fo = CFonts.GetFont();
Size sizeB = TextRenderer.MeasureText(g, chr.ToString(), fo, new Size(int.MaxValue, int.MaxValue), flags);
//size = g.MeasureString(chr.ToString(), fo);
float h_style = sizeB.Height;
g.Dispose();
h_style = sizeB.Height;
}
return h_normal / h_style;
}
}
class CFont
class CFont : IDisposable
{
private List<CGlyph> _Glyphs;
private Hashtable _htGlyphs;
private readonly Dictionary<char, CGlyph> _Glyphs;
private PrivateFontCollection fonts;
private FontFamily family;
private float SIZEh;
private readonly float SIZEh;
public string FilePath;
public Font GetFont()
{
if (fonts == null)
{
fonts = new PrivateFontCollection();
try
{
fonts.AddFontFile(FilePath);
family = fonts.Families[0];
}
catch (Exception e)
{
CLog.LogError("Error opening font file " + FilePath + ": " + e.Message);
}
}
return new Font(family, CFonts.Height, CFonts.GetFontStyle(), GraphicsUnit.Pixel);
}
public CFont(string File)
{
FilePath = File;
_Glyphs = new List<CGlyph>();
_htGlyphs = new Hashtable();
_Glyphs = new Dictionary<char, CGlyph>();
switch (CConfig.TextureQuality)
{
@@ -195,79 +170,109 @@ namespace Vocaluxe.Base
}
}
public void DrawGlyph(char chr, float x, float y, float h, float z, SColorF color)
public Font GetFont()
{
AddGlyph(chr);
CFonts.Height = h;
CGlyph glyph = _Glyphs[(int)_htGlyphs[chr]];
float factor = h / glyph.Texture.height;
float d = glyph.SIZEh / 5f * factor;
CDraw.DrawTexture(glyph.Texture, new SRectF(x - d, y, glyph.Texture.width * factor, h, z), color);
if (fonts == null)
{
fonts = new PrivateFontCollection();
try
{
fonts.AddFontFile(FilePath);
family = fonts.Families[0];
}
catch (Exception e)
{
CLog.LogError("Error opening font file " + FilePath + ": " + e.Message);
}
}
public void DrawGlyphReflection(char chr, float x, float y, float h, float z, SColorF color, float rspace, float rheight)
{
AddGlyph(chr);
return new Font(family, CFonts.Height, CFonts.GetFontStyle(), GraphicsUnit.Pixel);
}
CFonts.Height = h;
CGlyph glyph = _Glyphs[(int)_htGlyphs[chr]];
float factor = h / glyph.Texture.height;
float d = glyph.SIZEh / 5f * factor;
SRectF rect = new SRectF(x - d, y, glyph.Texture.width * factor, h, z);
CDraw.DrawTextureReflection(glyph.Texture, rect, color, rect, rspace, rheight);
public void DrawGlyph(char chr, float x, float y, float h, float z, SColorF color)
{
STexture texture;
SRectF rect;
_GetGlyphTextureAndRect(chr, x, y, z, h, out texture, out rect);
CDraw.DrawTexture(texture, rect, color);
}
public void DrawGlyph(char chr, float x, float y, float h, float z, SColorF color, float begin, float end)
{
STexture texture;
SRectF rect;
_GetGlyphTextureAndRect(chr, x, y, z, h, out texture, out rect);
CDraw.DrawTexture(texture, rect, color, begin, end);
}
public void DrawGlyphReflection(char chr, float x, float y, float h, float z, SColorF color, float rspace, float rheight)
{
STexture texture;
SRectF rect;
_GetGlyphTextureAndRect(chr, x, y, z, h, out texture, out rect);
CDraw.DrawTextureReflection(texture, rect, color, rect, rspace, rheight);
}
private void _GetGlyphTextureAndRect(char chr, float x, float y, float z, float h, out STexture texture, out SRectF rect)
{
AddGlyph(chr);
CFonts.Height = h;
CGlyph glyph = _Glyphs[(int)_htGlyphs[chr]];
float factor = h / glyph.Texture.height;
float width = glyph.Texture.width * factor;
CGlyph glyph = _Glyphs[chr];
texture = glyph.Texture;
float factor = h / texture.height;
float width = texture.width * factor;
float d = glyph.SIZEh / 5f * factor;
CDraw.DrawTexture(glyph.Texture, new SRectF(x - d, y, width, h, z), color, begin, end);
rect = new SRectF(x - d, y, width, h, z);
}
public float GetWidth(char chr)
{
AddGlyph(chr);
CGlyph glyph = _Glyphs[(int)_htGlyphs[chr]];
CGlyph glyph = _Glyphs[chr];
float factor = CFonts.Height / glyph.Texture.height;
return glyph.width * factor;
}
public float GetHeight(char chr)
{
return CFonts.Height;
/*WTF???
AddGlyph(chr);
CGlyph glyph = _Glyphs[(int)_htGlyphs[chr]];
CGlyph glyph = _Glyphs[chr];
float factor = CFonts.Height / glyph.Texture.height;
return glyph.Texture.height * factor;
return glyph.Texture.height * factor;*/
}
public void AddGlyph(char chr)
{
if (_htGlyphs.ContainsKey(chr))
if (_Glyphs.ContainsKey(chr))
return;
float h = CFonts.Height;
_Glyphs.Add(new CGlyph(chr, SIZEh));
_htGlyphs.Add(chr, _Glyphs.Count - 1);
_Glyphs.Add(chr, new CGlyph(chr, SIZEh));
CFonts.Height = h;
}
public void UnloadAllGlyphs()
{
foreach (CGlyph glyph in _Glyphs)
{
foreach (CGlyph glyph in _Glyphs.Values)
glyph.UnloadTexture();
}
_Glyphs.Clear();
}
public void Dispose()
{
if (fonts != null)
{
fonts.Dispose();
fonts = null;
UnloadAllGlyphs();
}
GC.SuppressFinalize(this);
}
}
struct SFont
@@ -295,14 +300,13 @@ namespace Vocaluxe.Base
static class CFonts
{
private static XmlWriterSettings _settings = new XmlWriterSettings();
private static readonly XmlWriterSettings _settings = new XmlWriterSettings();
private static List<SFont> _Fonts;
private static int _CurrentFont;
private static float _Height = 1f;
public static int PartyModeID
{ get; set; }
public static int PartyModeID { get; set; }
public static EStyle Style = EStyle.Normal;
@@ -354,7 +358,7 @@ namespace Vocaluxe.Base
public static void Init()
{
_settings.Indent = true;
_settings.Encoding = System.Text.Encoding.UTF8;
_settings.Encoding = Encoding.UTF8;
_settings.ConformanceLevel = ConformanceLevel.Document;
_CurrentFont = 0;
@@ -371,22 +375,25 @@ namespace Vocaluxe.Base
}
public static Font GetFont()
{
return _GetCurrentFont().GetFont();
}
private static CFont _GetCurrentFont()
{
switch (Style)
{
case EStyle.Normal:
return _Fonts[_CurrentFont].Normal.GetFont();
return _Fonts[_CurrentFont].Normal;
case EStyle.Italic:
return _Fonts[_CurrentFont].Italic.GetFont();
return _Fonts[_CurrentFont].Italic;
case EStyle.Bold:
return _Fonts[_CurrentFont].Bold.GetFont();
return _Fonts[_CurrentFont].Bold;
case EStyle.BoldItalic:
return _Fonts[_CurrentFont].BoldItalic.GetFont();
default:
break;
return _Fonts[_CurrentFont].BoldItalic;
}
// should never happen...
return null;
//Just in case...
return _Fonts[_CurrentFont].Normal;
}
#region DrawText
@@ -405,35 +412,17 @@ namespace Vocaluxe.Base
if (h <= 0f)
return;
if (Text == String.Empty)
if (Text.Length == 0)
return;
Height = h;
CFont Font = _GetCurrentFont();
float dx = x;
foreach (char chr in Text)
{
switch (Style)
{
case EStyle.Normal:
_Fonts[_CurrentFont].Normal.DrawGlyph(chr, dx, y, Height, z, color);
dx += _Fonts[_CurrentFont].Normal.GetWidth(chr);
break;
case EStyle.Italic:
_Fonts[_CurrentFont].Italic.DrawGlyph(chr, dx, y, Height, z, color);
dx += _Fonts[_CurrentFont].Italic.GetWidth(chr);
break;
case EStyle.Bold:
_Fonts[_CurrentFont].Bold.DrawGlyph(chr, dx, y, Height, z, color);
dx += _Fonts[_CurrentFont].Bold.GetWidth(chr);
break;
case EStyle.BoldItalic:
_Fonts[_CurrentFont].BoldItalic.DrawGlyph(chr, dx, y, Height, z, color);
dx += _Fonts[_CurrentFont].BoldItalic.GetWidth(chr);
break;
default:
break;
}
Font.DrawGlyph(chr, dx, y, Height, z, color);
dx += Font.GetWidth(chr);
}
}
@@ -442,35 +431,17 @@ namespace Vocaluxe.Base
if (h <= 0f)
return;
if (Text == String.Empty)
if (Text.Length == 0)
return;
Height = h;
CFont Font = _GetCurrentFont();
float dx = x;
foreach (char chr in Text)
{
switch (Style)
{
case EStyle.Normal:
_Fonts[_CurrentFont].Normal.DrawGlyphReflection(chr, dx, y, Height, z, color, rspace, rheight);
dx += _Fonts[_CurrentFont].Normal.GetWidth(chr);
break;
case EStyle.Italic:
_Fonts[_CurrentFont].Italic.DrawGlyphReflection(chr, dx, y, Height, z, color, rspace, rheight);
dx += _Fonts[_CurrentFont].Italic.GetWidth(chr);
break;
case EStyle.Bold:
_Fonts[_CurrentFont].Bold.DrawGlyphReflection(chr, dx, y, Height, z, color, rspace, rheight);
dx += _Fonts[_CurrentFont].Bold.GetWidth(chr);
break;
case EStyle.BoldItalic:
_Fonts[_CurrentFont].BoldItalic.DrawGlyphReflection(chr, dx, y, Height, z, color, rspace, rheight);
dx += _Fonts[_CurrentFont].BoldItalic.GetWidth(chr);
break;
default:
break;
}
Font.DrawGlyphReflection(chr, dx, y, Height, z, color, rspace, rheight);
dx += Font.GetWidth(chr);
}
}
@@ -479,7 +450,7 @@ namespace Vocaluxe.Base
if (h <= 0f)
return;
if (Text == String.Empty)
if (Text.Length == 0)
return;
Height = h;
@@ -492,56 +463,23 @@ namespace Vocaluxe.Base
float x1 = x + w * begin;
float x2 = x + w * end;
CFont Font = _GetCurrentFont();
foreach (char chr in Text)
{
float w2 = 0f;
switch (Style)
{
case EStyle.Normal:
w2 = _Fonts[_CurrentFont].Normal.GetWidth(chr);
break;
case EStyle.Italic:
w2 = _Fonts[_CurrentFont].Italic.GetWidth(chr);
break;
case EStyle.Bold:
w2 = _Fonts[_CurrentFont].Bold.GetWidth(chr);
break;
case EStyle.BoldItalic:
w2 = _Fonts[_CurrentFont].BoldItalic.GetWidth(chr);
break;
default:
break;
}
float w2 = Font.GetWidth(chr);
float b = (x1 - dx) / w2;
if (b < 0f)
b = 0f;
if (b < 1f)
{
if (b < 0f)
b = 0f;
float e = (x2 - dx) / w2;
if (e > 1f)
e = 1f;
if (e > 0f)
{
switch (Style)
{
case EStyle.Normal:
_Fonts[_CurrentFont].Normal.DrawGlyph(chr, dx, y, Height, z, color, b, e);
break;
case EStyle.Italic:
_Fonts[_CurrentFont].Italic.DrawGlyph(chr, dx, y, Height, z, color, b, e);
break;
case EStyle.Bold:
_Fonts[_CurrentFont].Bold.DrawGlyph(chr, dx, y, Height, z, color, b, e);
break;
case EStyle.BoldItalic:
_Fonts[_CurrentFont].BoldItalic.DrawGlyph(chr, dx, y, Height, z, color, b, e);
break;
default:
break;
}
if (e > 1f)
e = 1f;
Font.DrawGlyph(chr, dx, y, Height, z, color, b, e);
}
}
dx += w2;
@@ -607,32 +545,16 @@ namespace Vocaluxe.Base
public static RectangleF GetTextBounds(CText text, float height)
{
Height = height;
return new RectangleF(text.X, text.Y, GetTextWidth(CLanguage.Translate(text.Text, text.TranslationID)), GetTextHeight(CLanguage.Translate(text.Text, text.TranslationID)));
return new RectangleF(text.X, text.Y, GetTextWidth(CLanguage.Translate(text.Text, text.TranslationID)),
GetTextHeight(CLanguage.Translate(text.Text, text.TranslationID)));
}
public static float GetTextWidth(string text)
{
float dx = 0;
CFont Font = _GetCurrentFont();
foreach (char chr in text)
{
switch (Style)
{
case EStyle.Normal:
dx += _Fonts[_CurrentFont].Normal.GetWidth(chr);
break;
case EStyle.Italic:
dx += _Fonts[_CurrentFont].Italic.GetWidth(chr);
break;
case EStyle.Bold:
dx += _Fonts[_CurrentFont].Bold.GetWidth(chr);
break;
case EStyle.BoldItalic:
dx += _Fonts[_CurrentFont].BoldItalic.GetWidth(chr);
break;
default:
break;
}
}
dx += Font.GetWidth(chr);
return dx;
}
@@ -640,102 +562,17 @@ namespace Vocaluxe.Base
{
//return TextRenderer.MeasureText(text, GetFont()).Height;
float h = 0f;
CFont Font = _GetCurrentFont();
foreach (char chr in text)
{
float hh = 0f;
switch (Style)
{
case EStyle.Normal:
hh = _Fonts[_CurrentFont].Normal.GetHeight(chr);
break;
case EStyle.Italic:
hh = _Fonts[_CurrentFont].Italic.GetHeight(chr);
break;
case EStyle.Bold:
hh = _Fonts[_CurrentFont].Bold.GetHeight(chr);
break;
case EStyle.BoldItalic:
hh = _Fonts[_CurrentFont].BoldItalic.GetHeight(chr);
break;
default:
break;
}
if (hh>h)
float hh = Font.GetHeight(chr);
if (hh > h)
h = hh;
}
return h;
}
/// <summary>
/// Load default fonts
/// </summary>
/// <returns></returns>
private static bool LoadFontList()
{
CXMLReader xmlReader = CXMLReader.OpenFile(System.IO.Path.Combine(CSettings.sFolderFonts, CSettings.sFileFonts));
if (xmlReader == null)
return false;
_Fonts.Clear();
string value = string.Empty;
int i = 1;
while (xmlReader.GetValue("//root/Font" + i.ToString() + "/Folder", ref value, value))
{
string Folder = value;
xmlReader.GetValue("//root/Font" + i.ToString() + "/FileNormal", ref value, value);
value = Path.Combine(Directory.GetCurrentDirectory(),
Path.Combine(CSettings.sFolderFonts, Path.Combine(Folder, value)));
CFont f = new CFont(value);
SFont sf = new SFont();
sf.Normal = f;
string name = String.Empty;
xmlReader.GetValue("//root/Font" + i.ToString() + "/Name", ref name, value);
sf.Name = name;
sf.IsThemeFont = false;
sf.ThemeName = String.Empty;
sf.PartyModeID = -1;
xmlReader.GetValue("//root/Font" + i.ToString() + "/FileItalic", ref value, value);
value = Path.Combine(Directory.GetCurrentDirectory(),
Path.Combine(CSettings.sFolderFonts, Path.Combine(Folder, value)));
f = new CFont(value);
sf.Italic = f;
xmlReader.GetValue("//root/Font" + i.ToString() + "/FileBold", ref value, value);
value = Path.Combine(Directory.GetCurrentDirectory(),
Path.Combine(CSettings.sFolderFonts, Path.Combine(Folder, value)));
f = new CFont(value);
sf.Bold = f;
xmlReader.GetValue("//root/Font" + i.ToString() + "/FileBoldItalic", ref value, value);
value = Path.Combine(Directory.GetCurrentDirectory(),
Path.Combine(CSettings.sFolderFonts, Path.Combine(Folder, value)));
f = new CFont(value);
sf.BoldItalic = f;
sf.Outline = 0f;
xmlReader.TryGetFloatValue("//root/Font" + i.ToString() + "/Outline", ref sf.Outline);
sf.OutlineColor = new SColorF(0f, 0f, 0f, 1f);
xmlReader.TryGetFloatValue("//root/Font" + i.ToString() + "/OutlineColorR", ref sf.OutlineColor.R);
xmlReader.TryGetFloatValue("//root/Font" + i.ToString() + "/OutlineColorG", ref sf.OutlineColor.G);
xmlReader.TryGetFloatValue("//root/Font" + i.ToString() + "/OutlineColorB", ref sf.OutlineColor.B);
xmlReader.TryGetFloatValue("//root/Font" + i.ToString() + "/OutlineColorA", ref sf.OutlineColor.A);
_Fonts.Add(sf);
i++;
}
return true;
}
/// <summary>
/// Loads theme fonts from skin file
/// </summary>
public static void LoadThemeFonts(string ThemeName, string FontFolder, CXMLReader xmlReader)
private static void _LoadFontFiles(CXMLReader xmlReader, string FontFolder, string ThemeName = "", int PartyModeId = -1)
{
string value = string.Empty;
int i = 1;
@@ -743,23 +580,22 @@ namespace Vocaluxe.Base
{
SFont sf = new SFont();
sf.Folder = value;
sf.IsThemeFont = true;
sf.IsThemeFont = ThemeName.Length > 0;
sf.ThemeName = ThemeName;
sf.PartyModeID = -1;
sf.PartyModeID = PartyModeId;
bool ok = true;
string name = String.Empty;
ok &= xmlReader.GetValue("//root/Fonts/Font" + i.ToString() + "/Name", ref name, value);
sf.Name = name;
ok &= xmlReader.GetValue("//root/Fonts/Font" + i.ToString() + "/FileNormal", ref value, value);
sf.FileNormal = value;
value = Path.Combine(FontFolder, Path.Combine(sf.Folder, value));
CFont f = new CFont(value);
sf.Normal = f;
string name = String.Empty;
ok &= xmlReader.GetValue("//root/Fonts/Font" + i.ToString() + "/Name", ref name, value);
sf.Name = name;
ok &= xmlReader.GetValue("//root/Fonts/Font" + i.ToString() + "/FileItalic", ref value, value);
sf.FileItalic = value;
value = Path.Combine(FontFolder, Path.Combine(sf.Folder, value));
@@ -791,11 +627,52 @@ namespace Vocaluxe.Base
_Fonts.Add(sf);
else
{
CLog.LogError("Error loading theme fonts for theme \"" + ThemeName + "\": Error in Font" + i.ToString());
string fontTypes;
if (PartyModeId >= 0)
fontTypes = "theme fonts for party mode";
else if (ThemeName.Length > 0)
fontTypes = "theme fonts for theme \"" + ThemeName + "\"";
else
fontTypes = "basic fonts";
CLog.LogError("Error loading " + fontTypes + ": Error in Font" + i.ToString());
}
i++;
}
}
/// <summary>
/// Load default fonts
/// </summary>
/// <returns></returns>
private static bool LoadFontList()
{
CXMLReader xmlReader = CXMLReader.OpenFile(Path.Combine(CSettings.sFolderFonts, CSettings.sFileFonts));
if (xmlReader == null)
return false;
_Fonts.Clear();
_LoadFontFiles(xmlReader, Path.Combine(Directory.GetCurrentDirectory(), CSettings.sFolderFonts));
return true;
}
/// <summary>
/// Loads theme fonts from skin file
/// </summary>
public static void LoadThemeFonts(string ThemeName, string FontFolder, CXMLReader xmlReader)
{
_LoadFontFiles(xmlReader, FontFolder, ThemeName);
CLog.StartBenchmark(1, "BuildGlyphs");
BuildGlyphs();
CLog.StopBenchmark(1, "BuildGlyphs");
}
/// <summary>
/// Loads party mode fonts from skin file
/// </summary>
public static void LoadPartyModeFonts(int PartyModeID, string FontFolder, CXMLReader xmlReader)
{
_LoadFontFiles(xmlReader, FontFolder, "", PartyModeID);
CLog.StartBenchmark(1, "BuildGlyphs");
BuildGlyphs();
CLog.StopBenchmark(1, "BuildGlyphs");
@@ -867,78 +744,9 @@ namespace Vocaluxe.Base
}
}
/// <summary>
/// Loads party mode fonts from skin file
/// </summary>
public static void LoadPartyModeFonts(int PartyModeID, string FontFolder, CXMLReader xmlReader)
{
string value = string.Empty;
int i = 1;
while (xmlReader.GetValue("//root/Fonts/Font" + i.ToString() + "/Folder", ref value, value))
{
SFont sf = new SFont();
sf.Folder = value;
sf.IsThemeFont = false;
sf.ThemeName = String.Empty;
sf.PartyModeID = PartyModeID;
bool ok = true;
ok &= xmlReader.GetValue("//root/Fonts/Font" + i.ToString() + "/FileNormal", ref value, value);
sf.FileNormal = value;
value = Path.Combine(FontFolder, Path.Combine(sf.Folder, value));
CFont f = new CFont(value);
sf.Normal = f;
string name = String.Empty;
ok &= xmlReader.GetValue("//root/Fonts/Font" + i.ToString() + "/Name", ref name, value);
sf.Name = name;
ok &= xmlReader.GetValue("//root/Fonts/Font" + i.ToString() + "/FileItalic", ref value, value);
sf.FileItalic = value;
value = Path.Combine(FontFolder, Path.Combine(sf.Folder, value));
f = new CFont(value);
sf.Italic = f;
ok &= xmlReader.GetValue("//root/Fonts/Font" + i.ToString() + "/FileBold", ref value, value);
sf.FileBold = value;
value = Path.Combine(FontFolder, Path.Combine(sf.Folder, value));
f = new CFont(value);
sf.Bold = f;
ok &= xmlReader.GetValue("//root/Fonts/Font" + i.ToString() + "/FileBoldItalic", ref value, value);
sf.FileBoldItalic = value;
value = Path.Combine(FontFolder, Path.Combine(sf.Folder, value));
f = new CFont(value);
sf.BoldItalic = f;
sf.Outline = 0f;
ok &= xmlReader.TryGetFloatValue("//root/Fonts/Font" + i.ToString() + "/Outline", ref sf.Outline);
sf.OutlineColor = new SColorF(0f, 0f, 0f, 1f);
ok &= xmlReader.TryGetFloatValue("//root/Fonts/Font" + i.ToString() + "/OutlineColorR", ref sf.OutlineColor.R);
ok &= xmlReader.TryGetFloatValue("//root/Fonts/Font" + i.ToString() + "/OutlineColorG", ref sf.OutlineColor.G);
ok &= xmlReader.TryGetFloatValue("//root/Fonts/Font" + i.ToString() + "/OutlineColorB", ref sf.OutlineColor.B);
ok &= xmlReader.TryGetFloatValue("//root/Fonts/Font" + i.ToString() + "/OutlineColorA", ref sf.OutlineColor.A);
if (ok)
_Fonts.Add(sf);
else
{
CLog.LogError("Error loading theme fonts for party mode from Folder \"" + FontFolder + "\": Error in Font" + i.ToString());
}
i++;
}
CLog.StartBenchmark(1, "BuildGlyphs");
BuildGlyphs();
CLog.StopBenchmark(1, "BuildGlyphs");
}
private static int GetFontIndex(string ThemeName, string FontName)
{
if (ThemeName == String.Empty || FontName == String.Empty)
if (ThemeName.Length == 0 || FontName.Length == 0)
return -1;
for (int i = 0; i < _Fonts.Count; i++)
@@ -952,7 +760,7 @@ namespace Vocaluxe.Base
private static int GetFontIndexParty(int PartyModeID, string FontName)
{
if (PartyModeID == -1 || FontName == String.Empty)
if (PartyModeID == -1 || FontName.Length == 0)
return -1;
for (int i = 0; i < _Fonts.Count; i++)
@@ -986,7 +794,6 @@ namespace Vocaluxe.Base
}
Style = EStyle.Normal;
SetFont("Normal");
}
}
}
+14 -35
View File
@@ -1,14 +1,9 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Text;
using Vocaluxe.GameModes;
using Vocaluxe.Lib.Draw;
using Vocaluxe.Menu;
using Vocaluxe.Menu.SingNotes;
using Vocaluxe.Menu.SongMenu;
using VocaluxeLib.Menu;
using VocaluxeLib.Menu.SingNotes;
using VocaluxeLib.Menu.SongMenu;
namespace Vocaluxe.Base
{
@@ -18,13 +13,13 @@ namespace Vocaluxe.Base
private static SPlayer[] _Player;
private static int _NumPlayer = CConfig.NumPlayer;
private static float _Beat = 0f;
private static int _CurrentBeat = 0;
private static float _Beat;
private static int _CurrentBeat;
private static float _MidBeatD = 0f;
private static int _CurrentBeatD = 0;
private static int _OldBeatD = 0;
private static Random _Rand = new Random();
private static float _MidBeatD;
private static int _CurrentBeatD;
private static int _OldBeatD;
private static readonly Random _Rand = new Random();
public static Random Rand
{
@@ -221,20 +216,17 @@ namespace Vocaluxe.Base
_Beat = b;
_CurrentBeat = (int)Math.Floor(_Beat);
_MidBeatD = -0.5f + GetBeatFromTime(Time, song.BPM, song.Gap + CConfig.MicDelay/1000f);
_MidBeatD = -0.5f + GetBeatFromTime(Time, song.BPM, song.Gap + CConfig.MicDelay / 1000f);
_CurrentBeatD = (int)Math.Floor(_MidBeatD);
for (int p = 0; p < _NumPlayer; p++)
{
CSound.AnalyzeBuffer(p);
}
if (_OldBeatD >= _CurrentBeatD)
return;
for (int p = 0; p < _NumPlayer; p++)
{
for (int beat = _OldBeatD + 1; beat <= _CurrentBeatD; beat++)
{
if ((_GameMode.GetCurrentGameMode() == EGameMode.TR_GAMEMODE_MEDLEY && song.Medley.EndBeat == beat) ||
@@ -261,9 +253,7 @@ namespace Vocaluxe.Base
_Player[p].CurrentLine = Line;
while (_Player[p].SingLine.Count <= Line)
{
_Player[p].SingLine.Add(new CLine());
}
CNote[] notes = lines[Line].Notes;
int Note = -1;
@@ -304,12 +294,13 @@ namespace Vocaluxe.Base
TonePlayer = Tone;
_Player[p].NoteDiff = Math.Abs(Tone - TonePlayer);
bool Hit=_Player[p].NoteDiff <= (2 - (int)_Player[p].Difficulty);
bool Hit = _Player[p].NoteDiff <= (2 - (int)_Player[p].Difficulty);
if (Hit)
{
// valid
//CSound.RecordSetTone(p, Tone);
double points = (CSettings.MaxScore - CSettings.LinebonusScore) * (double)notes[Note].PointsForBeat / (double)song.Notes.GetLines(_Player[p].LineNr).Points;
double points = (CSettings.MaxScore - CSettings.LinebonusScore) * (double)notes[Note].PointsForBeat /
song.Notes.GetLines(_Player[p].LineNr).Points;
if (notes[Note].NoteType == ENoteType.Golden)
_Player[p].PointsGoldenNotes += points;
@@ -322,14 +313,10 @@ namespace Vocaluxe.Base
if (notes[Note].StartBeat == beat || nt.EndBeat + 1 != beat || nt.Tone != Tone || !nt.Hit)
_Player[p].SingLine[Line].AddNote(new CNote(beat, 1, Tone, String.Empty, true, notes[Note].NoteType));
else
{
_Player[p].SingLine[Line].IncLastNoteLength();
}
}
else
{
_Player[p].SingLine[Line].AddNote(new CNote(beat, 1, Tone, String.Empty, true, notes[Note].NoteType));
}
_Player[p].SingLine[Line].LastNote.IsPerfect(notes[Note]);
_Player[p].SingLine[Line].IsPerfect(lines[Line]);
@@ -340,20 +327,13 @@ namespace Vocaluxe.Base
{
CNote nt = _Player[p].SingLine[Line].LastNote;
if (nt.Tone == TonePlayer && nt.EndBeat + 1 == beat && !nt.Hit)
{
_Player[p].SingLine[Line].IncLastNoteLength();
}
else
{
_Player[p].SingLine[Line].AddNote(new CNote(beat, 1, TonePlayer, String.Empty, false, ENoteType.Freestyle));
}
}
else
{
_Player[p].SingLine[Line].AddNote(new CNote(beat, 1, TonePlayer, String.Empty, false, ENoteType.Freestyle));
}
}
}
// Line Bonus
@@ -362,7 +342,7 @@ namespace Vocaluxe.Base
{
if (notes[Note].EndBeat == beat && lines[Line].Points > 0f)
{
double factor = (double)_Player[p].SingLine[Line].Points / (double)lines[Line].Points;
double factor = _Player[p].SingLine[Line].Points / (double)lines[Line].Points;
if (factor < 0.4)
factor = 0.0;
else if (factor > 0.9)
@@ -381,7 +361,6 @@ namespace Vocaluxe.Base
}
}
}
}
}
_OldBeatD = _CurrentBeatD;
+25 -53
View File
@@ -2,12 +2,10 @@
using System.Collections.Generic;
using System.Diagnostics;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using Vocaluxe.Menu;
using Vocaluxe.PartyModes;
using Vocaluxe.Screens;
using VocaluxeLib.Menu;
using VocaluxeLib.PartyModes;
namespace Vocaluxe.Base
{
@@ -21,14 +19,14 @@ namespace Vocaluxe.Base
class CCursor
{
private Stopwatch _CursorFadingTimer;
private readonly Stopwatch _CursorFadingTimer;
private float _CursorTargetAlpha;
private float _CursorStartAlpha;
private float _CursorFadingTime;
private STexture _Cursor;
private string _CursorName = String.Empty;
private readonly string _CursorName = String.Empty;
private Stopwatch _Movetimer;
private readonly Stopwatch _Movetimer;
public bool ShowCursor;
public bool Visible = true;
@@ -162,7 +160,7 @@ namespace Vocaluxe.Base
static class CGraphics
{
private static bool _Fading = false;
private static bool _Fading;
private static Stopwatch _FadingTimer;
private static CCursor _Cursor;
private static float _GlobalAlpha;
@@ -173,11 +171,11 @@ namespace Vocaluxe.Base
private static EScreens _NextScreen;
private static EPopupScreens _CurrentPopupScreen;
private static List<IMenu> _Screens = new List<IMenu>();
private static List<IMenu> _PopupScreens = new List<IMenu>();
private static readonly List<IMenu> _Screens = new List<IMenu>();
private static readonly List<IMenu> _PopupScreens = new List<IMenu>();
private static Stopwatch _VolumePopupTimer;
private static bool CursorOverVolumeControl = false;
private static bool CursorOverVolumeControl;
public static float GlobalAlpha
{
@@ -251,14 +249,14 @@ namespace Vocaluxe.Base
for (int i = 0; i < _Screens.Count; i++)
{
CLog.StartBenchmark(1, "Load Theme " + Enum.GetNames(typeof(EScreens))[i]);
_Screens[i].Initialize();
_Screens[i].Init();
_Screens[i].LoadTheme(CTheme.GetThemeScreensPath(-1));
CLog.StopBenchmark(1, "Load Theme " + Enum.GetNames(typeof(EScreens))[i]);
}
for (int i = 0; i < _PopupScreens.Count; i++)
{
_PopupScreens[i].Initialize();
_PopupScreens[i].Init();
_PopupScreens[i].LoadTheme(CTheme.GetThemeScreensPath(-1));
}
}
@@ -267,43 +265,31 @@ namespace Vocaluxe.Base
{
ReloadCursor();
for (int i = 0; i < _Screens.Count; i++)
{
_Screens[i].ReloadTheme(CTheme.GetThemeScreensPath(-1));
}
for (int i = 0; i < _PopupScreens.Count; i++)
{
_PopupScreens[i].ReloadTheme(CTheme.GetThemeScreensPath(-1));
}
}
public static void ReloadSkin()
{
ReloadCursor();
for (int i = 0; i < _Screens.Count; i++)
{
_Screens[i].ReloadTextures();
}
for (int i = 0; i < _PopupScreens.Count; i++)
{
_PopupScreens[i].ReloadTextures();
}
}
public static void SaveTheme()
{
CTheme.SaveTheme();
for (int i = 0; i < _Screens.Count; i++)
{
_Screens[i].SaveTheme();
}
for (int i = 0; i < _PopupScreens.Count; i++)
{
_PopupScreens[i].SaveTheme();
}
}
public static void InitFirstScreen()
{
@@ -374,8 +360,8 @@ namespace Vocaluxe.Base
float factor = (float)ms / FadeTime;
_GlobalAlpha = 1f;// -factor / 100f;
_ZOffset = CSettings.zFar/2;
_GlobalAlpha = 1f; // -factor / 100f;
_ZOffset = CSettings.zFar / 2;
if (_CurrentScreen == EScreens.ScreenPartyDummy)
{
@@ -407,7 +393,7 @@ namespace Vocaluxe.Base
GC.Collect();
_CurrentScreen = _NextScreen;
_NextScreen = EScreens.ScreenNull;
if(CBackgroundMusic.Playing)
if (CBackgroundMusic.Playing)
CBackgroundMusic.Play();
_Screens[(int)_CurrentScreen].OnShowFinish();
_Screens[(int)_CurrentScreen].ProcessMouseMove(_Cursor.X, _Cursor.Y);
@@ -440,9 +426,7 @@ namespace Vocaluxe.Base
}
for (int i = 0; i < _PopupScreens.Count; i++)
{
_PopupScreens[i].Draw();
}
_Cursor.Draw();
DrawDebugInfos();
@@ -492,7 +476,6 @@ namespace Vocaluxe.Base
{
_Cursor.ShowCursor = true;
}
#endregion public methods
#region private stuff
@@ -504,7 +487,8 @@ namespace Vocaluxe.Base
MouseEvent InputMouseEvent = new MouseEvent();
bool PopupPlayerControlAllowed = _CurrentScreen != EScreens.ScreenOptionsRecord && _CurrentScreen != EScreens.ScreenSing &&
(_CurrentScreen != EScreens.ScreenSong || (_CurrentScreen == EScreens.ScreenSong && CSongs.Category == -1 && CConfig.Tabs ==EOffOn.TR_CONFIG_ON))
(_CurrentScreen != EScreens.ScreenSong ||
(_CurrentScreen == EScreens.ScreenSong && !CSongs.IsInCategory && CConfig.Tabs == EOffOn.TR_CONFIG_ON))
&& _CurrentScreen != EScreens.ScreenCredits && !CBackgroundMusic.Disabled;
bool PopupVolumeControlAllowed = _CurrentScreen != EScreens.ScreenCredits && _CurrentScreen != EScreens.ScreenOptionsRecord;
@@ -557,15 +541,16 @@ namespace Vocaluxe.Base
int Diff = 0;
if ((KeyEvent.ModSHIFT && (KeyEvent.Key == Keys.Add || KeyEvent.Key == Keys.PageUp)) || (KeyEvent.Sender == ESender.WiiMote && KeyEvent.Key == Keys.Add))
Diff = 5;
else if ((KeyEvent.ModSHIFT && (KeyEvent.Key == Keys.Subtract || KeyEvent.Key == Keys.PageDown)) || (KeyEvent.Sender == ESender.WiiMote && KeyEvent.Key == Keys.Subtract))
else if ((KeyEvent.ModSHIFT && (KeyEvent.Key == Keys.Subtract || KeyEvent.Key == Keys.PageDown)) ||
(KeyEvent.Sender == ESender.WiiMote && KeyEvent.Key == Keys.Subtract))
Diff = -5;
if (Diff != 0)
{
switch (CGraphics.CurrentScreen)
switch (CurrentScreen)
{
case EScreens.ScreenSong:
if (CSongs.Category != -1)
if (CSongs.IsInCategory)
{
CConfig.PreviewMusicVolume += Diff;
_Screens[(int)_CurrentScreen].ApplyVolume();
@@ -601,17 +586,11 @@ namespace Vocaluxe.Base
}
if (KeyEvent.ModSHIFT && (KeyEvent.Key == Keys.F1))
{
CSettings.GameState = EGameState.EditTheme;
}
else if (KeyEvent.ModALT && (KeyEvent.Key == Keys.Enter ))
{
else if (KeyEvent.ModALT && (KeyEvent.Key == Keys.Enter))
CSettings.bFullScreen = !CSettings.bFullScreen;
}
else if (KeyEvent.ModALT && (KeyEvent.Key == Keys.P))
{
CDraw.MakeScreenShot();
}
else
{
if (!_Fading)
@@ -644,7 +623,7 @@ namespace Vocaluxe.Base
UpdateMousePosition(MouseEvent.X, MouseEvent.Y);
bool isOverPopupPlayerControl = CHelper.IsInBounds(_PopupScreens[(int)EPopupScreens.PopupPlayerControl].GetScreenArea(), MouseEvent);
bool isOverPopupPlayerControl = CHelper.IsInBounds(_PopupScreens[(int)EPopupScreens.PopupPlayerControl].ScreenArea, MouseEvent);
if (PopupPlayerControlAllowed && isOverPopupPlayerControl)
{
if (_CurrentPopupScreen == EPopupScreens.NoPopup && CConfig.BackgroundMusic == EOffOn.TR_CONFIG_ON)
@@ -654,7 +633,7 @@ namespace Vocaluxe.Base
if (!isOverPopupPlayerControl && _CurrentPopupScreen == EPopupScreens.PopupPlayerControl)
HidePopup(EPopupScreens.PopupPlayerControl);
bool isOverPopupVolumeControl = CHelper.IsInBounds(_PopupScreens[(int)EPopupScreens.PopupVolumeControl].GetScreenArea(), MouseEvent);
bool isOverPopupVolumeControl = CHelper.IsInBounds(_PopupScreens[(int)EPopupScreens.PopupVolumeControl].ScreenArea, MouseEvent);
if (PopupVolumeControlAllowed && isOverPopupVolumeControl)
{
if (_CurrentPopupScreen == EPopupScreens.NoPopup)
@@ -705,13 +684,9 @@ namespace Vocaluxe.Base
_Screens[(int)_CurrentScreen].NextInteraction();
}
else if (KeyEvent.ModALT && (KeyEvent.Key == Keys.Enter))
{
CSettings.bFullScreen = !CSettings.bFullScreen;
}
else if (KeyEvent.ModALT && (KeyEvent.Key == Keys.P))
{
CDraw.MakeScreenShot();
}
else
{
if (!_Fading)
@@ -736,16 +711,14 @@ namespace Vocaluxe.Base
private static bool Update()
{
if(_VolumePopupTimer.IsRunning && _VolumePopupTimer.ElapsedMilliseconds >= 1500 && _CurrentPopupScreen == EPopupScreens.PopupVolumeControl)
if (_VolumePopupTimer.IsRunning && _VolumePopupTimer.ElapsedMilliseconds >= 1500 && _CurrentPopupScreen == EPopupScreens.PopupVolumeControl)
{
_VolumePopupTimer.Reset();
HidePopup(EPopupScreens.PopupVolumeControl);
}
if (_VolumePopupTimer.IsRunning)
{
_Cursor.FadeIn();
}
if (_CurrentPopupScreen != EPopupScreens.NoPopup)
_PopupScreens[(int)_CurrentPopupScreen].UpdateGame();
@@ -754,7 +727,6 @@ namespace Vocaluxe.Base
private static void DrawDebugInfos()
{
string txt = String.Empty;
CFonts.Style = EStyle.Normal;
CFonts.SetFont("Normal");
@@ -881,7 +853,7 @@ namespace Vocaluxe.Base
{
_Cursor.UnloadTextures();
if (CTheme.Cursor.color != string.Empty)
if (CTheme.Cursor.color.Length > 0)
{
SColorF color;
color = CTheme.GetColor(CTheme.Cursor.color, -1);
Loaded 100 of 225 files, more files were not shown because too many files have changed in this diff. Show more