Merge remote-tracking branch 'remotes/origin/develop' into RemoteControl
Conflicts: Vocaluxe/Base/CProfiles.cs
This commit is contained in:
commit
584f80ac2c
89 files changed
+656
-489
No files matched your search
@@ -21,6 +21,7 @@ using System;
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
using VocaluxeLib.Menu;
|
using VocaluxeLib.Menu;
|
||||||
|
using VocaluxeLib.Profile;
|
||||||
|
|
||||||
[assembly: ComVisible(false)]
|
[assembly: ComVisible(false)]
|
||||||
|
|
||||||
@@ -532,7 +533,7 @@ namespace VocaluxeLib.PartyModes.Challenge
|
|||||||
|
|
||||||
private void _SetTeamNames()
|
private void _SetTeamNames()
|
||||||
{
|
{
|
||||||
SProfile[] profiles = CBase.Profiles.GetProfiles();
|
CProfile[] profiles = CBase.Profiles.GetProfiles();
|
||||||
|
|
||||||
if (profiles == null)
|
if (profiles == null)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ using System;
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
using VocaluxeLib.Menu;
|
using VocaluxeLib.Menu;
|
||||||
|
using VocaluxeLib.Profile;
|
||||||
|
|
||||||
namespace VocaluxeLib.PartyModes.Challenge
|
namespace VocaluxeLib.PartyModes.Challenge
|
||||||
{
|
{
|
||||||
@@ -379,7 +380,7 @@ namespace VocaluxeLib.PartyModes.Challenge
|
|||||||
if (_GameState.CurrentRoundNr <= _GameState.Combs.Count)
|
if (_GameState.CurrentRoundNr <= _GameState.Combs.Count)
|
||||||
{
|
{
|
||||||
_Texts[_TextNextPlayerMessage].Visible = true;
|
_Texts[_TextNextPlayerMessage].Visible = true;
|
||||||
SProfile[] profiles = CBase.Profiles.GetProfiles();
|
CProfile[] profiles = CBase.Profiles.GetProfiles();
|
||||||
for (int i = 0; i < _GameState.NumPlayerAtOnce; i++)
|
for (int i = 0; i < _GameState.NumPlayerAtOnce; i++)
|
||||||
{
|
{
|
||||||
int pid = _GameState.Combs[_GameState.CurrentRoundNr - 1].Player[i];
|
int pid = _GameState.Combs[_GameState.CurrentRoundNr - 1].Player[i];
|
||||||
@@ -491,7 +492,7 @@ namespace VocaluxeLib.PartyModes.Challenge
|
|||||||
|
|
||||||
private void _UpdateRoundsTable()
|
private void _UpdateRoundsTable()
|
||||||
{
|
{
|
||||||
SProfile[] profile = CBase.Profiles.GetProfiles();
|
CProfile[] profile = CBase.Profiles.GetProfiles();
|
||||||
for (int i = 0; i < _RoundsTable.Count; i++)
|
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++)
|
||||||
@@ -585,7 +586,7 @@ namespace VocaluxeLib.PartyModes.Challenge
|
|||||||
|
|
||||||
private void _UpdatePlayerTable()
|
private void _UpdatePlayerTable()
|
||||||
{
|
{
|
||||||
SProfile[] profiles = CBase.Profiles.GetProfiles();
|
CProfile[] profiles = CBase.Profiles.GetProfiles();
|
||||||
|
|
||||||
for (int i = 0; i < _PlayerTable.Count; i++)
|
for (int i = 0; i < _PlayerTable.Count; i++)
|
||||||
{
|
{
|
||||||
@@ -657,7 +658,7 @@ namespace VocaluxeLib.PartyModes.Challenge
|
|||||||
private string _GetPlayerWinString()
|
private string _GetPlayerWinString()
|
||||||
{
|
{
|
||||||
string s = "";
|
string s = "";
|
||||||
SProfile[] profiles = CBase.Profiles.GetProfiles();
|
CProfile[] profiles = CBase.Profiles.GetProfiles();
|
||||||
|
|
||||||
for (int i = 0; i < _GameState.ResultTable.Count; i++)
|
for (int i = 0; i < _GameState.ResultTable.Count; i++)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -21,8 +21,10 @@ using System;
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Collections.ObjectModel;
|
using System.Collections.ObjectModel;
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
|
using VocaluxeLib.Game;
|
||||||
using VocaluxeLib.Menu;
|
using VocaluxeLib.Menu;
|
||||||
using VocaluxeLib.Menu.SongMenu;
|
using VocaluxeLib.Songs;
|
||||||
|
using VocaluxeLib.Profile;
|
||||||
|
|
||||||
[assembly: ComVisible(false)]
|
[assembly: ComVisible(false)]
|
||||||
|
|
||||||
@@ -577,7 +579,7 @@ namespace VocaluxeLib.PartyModes.ChallengeMedley
|
|||||||
|
|
||||||
private void _SetTeamNames()
|
private void _SetTeamNames()
|
||||||
{
|
{
|
||||||
SProfile[] profiles = CBase.Profiles.GetProfiles();
|
CProfile[] profiles = CBase.Profiles.GetProfiles();
|
||||||
|
|
||||||
if (profiles == null)
|
if (profiles == null)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ using System;
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
using VocaluxeLib.Menu;
|
using VocaluxeLib.Menu;
|
||||||
|
using VocaluxeLib.Profile;
|
||||||
|
|
||||||
namespace VocaluxeLib.PartyModes.ChallengeMedley
|
namespace VocaluxeLib.PartyModes.ChallengeMedley
|
||||||
{
|
{
|
||||||
@@ -379,7 +380,7 @@ namespace VocaluxeLib.PartyModes.ChallengeMedley
|
|||||||
if (_GameState.CurrentRoundNr <= _GameState.Combs.Count)
|
if (_GameState.CurrentRoundNr <= _GameState.Combs.Count)
|
||||||
{
|
{
|
||||||
_Texts[_TextNextPlayerMessage].Visible = true;
|
_Texts[_TextNextPlayerMessage].Visible = true;
|
||||||
SProfile[] profiles = CBase.Profiles.GetProfiles();
|
CProfile[] profiles = CBase.Profiles.GetProfiles();
|
||||||
for (int i = 0; i < _GameState.NumPlayerAtOnce; i++)
|
for (int i = 0; i < _GameState.NumPlayerAtOnce; i++)
|
||||||
{
|
{
|
||||||
int pid = _GameState.Combs[_GameState.CurrentRoundNr - 1].Player[i];
|
int pid = _GameState.Combs[_GameState.CurrentRoundNr - 1].Player[i];
|
||||||
@@ -491,7 +492,7 @@ namespace VocaluxeLib.PartyModes.ChallengeMedley
|
|||||||
|
|
||||||
private void _UpdateRoundsTable()
|
private void _UpdateRoundsTable()
|
||||||
{
|
{
|
||||||
SProfile[] profile = CBase.Profiles.GetProfiles();
|
CProfile[] profile = CBase.Profiles.GetProfiles();
|
||||||
for (int i = 0; i < _RoundsTable.Count; i++)
|
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++)
|
||||||
@@ -585,7 +586,7 @@ namespace VocaluxeLib.PartyModes.ChallengeMedley
|
|||||||
|
|
||||||
private void _UpdatePlayerTable()
|
private void _UpdatePlayerTable()
|
||||||
{
|
{
|
||||||
SProfile[] profiles = CBase.Profiles.GetProfiles();
|
CProfile[] profiles = CBase.Profiles.GetProfiles();
|
||||||
|
|
||||||
for (int i = 0; i < _PlayerTable.Count; i++)
|
for (int i = 0; i < _PlayerTable.Count; i++)
|
||||||
{
|
{
|
||||||
@@ -657,7 +658,7 @@ namespace VocaluxeLib.PartyModes.ChallengeMedley
|
|||||||
private string _GetPlayerWinString()
|
private string _GetPlayerWinString()
|
||||||
{
|
{
|
||||||
string s = "";
|
string s = "";
|
||||||
SProfile[] profiles = CBase.Profiles.GetProfiles();
|
CProfile[] profiles = CBase.Profiles.GetProfiles();
|
||||||
|
|
||||||
for (int i = 0; i < _GameState.ResultTable.Count; i++)
|
for (int i = 0; i < _GameState.ResultTable.Count; i++)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ using System;
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
using VocaluxeLib.Menu;
|
using VocaluxeLib.Menu;
|
||||||
|
using VocaluxeLib.Profile;
|
||||||
|
|
||||||
[assembly: ComVisible(false)]
|
[assembly: ComVisible(false)]
|
||||||
|
|
||||||
@@ -725,7 +726,7 @@ namespace VocaluxeLib.PartyModes.TicTacToe
|
|||||||
if (players.Length < 2)
|
if (players.Length < 2)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
SProfile[] profiles = CBase.Profiles.GetProfiles();
|
CProfile[] profiles = CBase.Profiles.GetProfiles();
|
||||||
CRound r = _GameData.Rounds[roundNr];
|
CRound r = _GameData.Rounds[roundNr];
|
||||||
bool isDuet = CBase.Songs.GetSongByID(r.SongID).IsDuet;
|
bool isDuet = CBase.Songs.GetSongByID(r.SongID).IsDuet;
|
||||||
|
|
||||||
|
|||||||
@@ -21,7 +21,8 @@ using System;
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
using VocaluxeLib.Menu;
|
using VocaluxeLib.Menu;
|
||||||
using VocaluxeLib.Menu.SongMenu;
|
using VocaluxeLib.Songs;
|
||||||
|
using VocaluxeLib.Profile;
|
||||||
|
|
||||||
namespace VocaluxeLib.PartyModes.TicTacToe
|
namespace VocaluxeLib.PartyModes.TicTacToe
|
||||||
{
|
{
|
||||||
@@ -513,7 +514,7 @@ namespace VocaluxeLib.PartyModes.TicTacToe
|
|||||||
_Texts[_TextNextPlayerT2].Visible = true;
|
_Texts[_TextNextPlayerT2].Visible = true;
|
||||||
_Texts[_TextNextPlayerNameT1].Visible = true;
|
_Texts[_TextNextPlayerNameT1].Visible = true;
|
||||||
_Texts[_TextNextPlayerNameT2].Visible = true;
|
_Texts[_TextNextPlayerNameT2].Visible = true;
|
||||||
SProfile[] profiles = CBase.Profiles.GetProfiles();
|
CProfile[] profiles = CBase.Profiles.GetProfiles();
|
||||||
_Texts[_TextNextPlayerNameT1].Text = profiles[_GameData.ProfileIDsTeam1[_GameData.Rounds[_SelectedField].SingerTeam1]].PlayerName;
|
_Texts[_TextNextPlayerNameT1].Text = profiles[_GameData.ProfileIDsTeam1[_GameData.Rounds[_SelectedField].SingerTeam1]].PlayerName;
|
||||||
_Texts[_TextNextPlayerNameT2].Text = profiles[_GameData.ProfileIDsTeam2[_GameData.Rounds[_SelectedField].SingerTeam2]].PlayerName;
|
_Texts[_TextNextPlayerNameT2].Text = profiles[_GameData.ProfileIDsTeam2[_GameData.Rounds[_SelectedField].SingerTeam2]].PlayerName;
|
||||||
_Statics[_StaticAvatarT1].Visible = true;
|
_Statics[_StaticAvatarT1].Visible = true;
|
||||||
@@ -552,7 +553,7 @@ namespace VocaluxeLib.PartyModes.TicTacToe
|
|||||||
_Texts[_TextNextPlayerT2].Visible = true;
|
_Texts[_TextNextPlayerT2].Visible = true;
|
||||||
_Texts[_TextNextPlayerNameT1].Visible = true;
|
_Texts[_TextNextPlayerNameT1].Visible = true;
|
||||||
_Texts[_TextNextPlayerNameT2].Visible = true;
|
_Texts[_TextNextPlayerNameT2].Visible = true;
|
||||||
SProfile[] profiles = CBase.Profiles.GetProfiles();
|
CProfile[] profiles = CBase.Profiles.GetProfiles();
|
||||||
_Texts[_TextNextPlayerNameT1].Text = profiles[_GameData.ProfileIDsTeam1[_GameData.Rounds[_SelectedField].SingerTeam1]].PlayerName;
|
_Texts[_TextNextPlayerNameT1].Text = profiles[_GameData.ProfileIDsTeam1[_GameData.Rounds[_SelectedField].SingerTeam1]].PlayerName;
|
||||||
_Texts[_TextNextPlayerNameT2].Text = profiles[_GameData.ProfileIDsTeam2[_GameData.Rounds[_SelectedField].SingerTeam2]].PlayerName;
|
_Texts[_TextNextPlayerNameT2].Text = profiles[_GameData.ProfileIDsTeam2[_GameData.Rounds[_SelectedField].SingerTeam2]].PlayerName;
|
||||||
_Statics[_StaticAvatarT1].Visible = true;
|
_Statics[_StaticAvatarT1].Visible = true;
|
||||||
|
|||||||
@@ -23,8 +23,8 @@ using System.Diagnostics;
|
|||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using Vocaluxe.Base;
|
using Vocaluxe.Base;
|
||||||
using VocaluxeLib.Menu;
|
using VocaluxeLib;
|
||||||
using VocaluxeLib.Menu.SongMenu;
|
using VocaluxeLib.Songs;
|
||||||
|
|
||||||
namespace Vocaluxe.Base
|
namespace Vocaluxe.Base
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -28,6 +28,7 @@ using System.Windows.Forms;
|
|||||||
using System.Xml;
|
using System.Xml;
|
||||||
using Vocaluxe.Lib.Sound;
|
using Vocaluxe.Lib.Sound;
|
||||||
using Vocaluxe.Lib.Webcam;
|
using Vocaluxe.Lib.Webcam;
|
||||||
|
using VocaluxeLib;
|
||||||
using VocaluxeLib.Menu;
|
using VocaluxeLib.Menu;
|
||||||
|
|
||||||
namespace Vocaluxe.Base
|
namespace Vocaluxe.Base
|
||||||
@@ -811,7 +812,7 @@ namespace Vocaluxe.Base
|
|||||||
continue;
|
continue;
|
||||||
for (int i = 0; i < CProfiles.Profiles.Length; i++)
|
for (int i = 0; i < CProfiles.Profiles.Length; i++)
|
||||||
{
|
{
|
||||||
if (Path.GetFileName(CProfiles.Profiles[i].ProfileFile) == Players[j] && CProfiles.Profiles[i].Active == EOffOn.TR_CONFIG_ON)
|
if (Path.GetFileName(CProfiles.Profiles[i].FileName) == Players[j] && CProfiles.Profiles[i].Active == EOffOn.TR_CONFIG_ON)
|
||||||
{
|
{
|
||||||
//Update Game-infos with player
|
//Update Game-infos with player
|
||||||
CGame.Players[j].ProfileID = i;
|
CGame.Players[j].ProfileID = i;
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ using System.Collections.Generic;
|
|||||||
using Vocaluxe.Base.Server;
|
using Vocaluxe.Base.Server;
|
||||||
using Vocaluxe.Lib.Input;
|
using Vocaluxe.Lib.Input;
|
||||||
using Vocaluxe.Lib.Input.WiiMote;
|
using Vocaluxe.Lib.Input.WiiMote;
|
||||||
using VocaluxeLib.Menu;
|
using VocaluxeLib;
|
||||||
|
|
||||||
namespace Vocaluxe.Base
|
namespace Vocaluxe.Base
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ using System.IO;
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Xml;
|
using System.Xml;
|
||||||
|
using VocaluxeLib;
|
||||||
using VocaluxeLib.Menu;
|
using VocaluxeLib.Menu;
|
||||||
|
|
||||||
namespace Vocaluxe.Base
|
namespace Vocaluxe.Base
|
||||||
|
|||||||
@@ -35,8 +35,8 @@ using SQLiteCommand = Mono.Data.Sqlite.SqliteCommand;
|
|||||||
using SQLiteDataReader = Mono.Data.Sqlite.SqliteDataReader;
|
using SQLiteDataReader = Mono.Data.Sqlite.SqliteDataReader;
|
||||||
#endif
|
#endif
|
||||||
using Community.CsharpSqlite;
|
using Community.CsharpSqlite;
|
||||||
using VocaluxeLib.Menu;
|
using VocaluxeLib;
|
||||||
using VocaluxeLib.Menu.SongMenu;
|
using VocaluxeLib.Songs;
|
||||||
|
|
||||||
namespace Vocaluxe.Base
|
namespace Vocaluxe.Base
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ using System.Drawing;
|
|||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
using Vocaluxe.Lib.Draw;
|
using Vocaluxe.Lib.Draw;
|
||||||
|
using VocaluxeLib;
|
||||||
using VocaluxeLib.Menu;
|
using VocaluxeLib.Menu;
|
||||||
|
|
||||||
namespace Vocaluxe.Base
|
namespace Vocaluxe.Base
|
||||||
|
|||||||
@@ -20,9 +20,9 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using Vocaluxe.SongQueue;
|
using Vocaluxe.SongQueue;
|
||||||
using VocaluxeLib.Menu;
|
using VocaluxeLib;
|
||||||
using VocaluxeLib.Menu.SingNotes;
|
using VocaluxeLib.Game;
|
||||||
using VocaluxeLib.Menu.SongMenu;
|
using VocaluxeLib.Songs;
|
||||||
|
|
||||||
namespace Vocaluxe.Base
|
namespace Vocaluxe.Base
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -24,6 +24,7 @@ using System.Drawing;
|
|||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
using Vocaluxe.Base.Font;
|
using Vocaluxe.Base.Font;
|
||||||
using Vocaluxe.Screens;
|
using Vocaluxe.Screens;
|
||||||
|
using VocaluxeLib;
|
||||||
using VocaluxeLib.Menu;
|
using VocaluxeLib.Menu;
|
||||||
using VocaluxeLib.PartyModes;
|
using VocaluxeLib.PartyModes;
|
||||||
|
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ using System.IO;
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Xml;
|
using System.Xml;
|
||||||
|
using VocaluxeLib;
|
||||||
using VocaluxeLib.Menu;
|
using VocaluxeLib.Menu;
|
||||||
|
|
||||||
namespace Vocaluxe.Base
|
namespace Vocaluxe.Base
|
||||||
|
|||||||
+10
-1
@@ -22,8 +22,12 @@ using System.Collections.Generic;
|
|||||||
using System.Collections.ObjectModel;
|
using System.Collections.ObjectModel;
|
||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
using Vocaluxe.Base.Font;
|
using Vocaluxe.Base.Font;
|
||||||
|
using VocaluxeLib;
|
||||||
|
using VocaluxeLib.Game;
|
||||||
using VocaluxeLib.Menu;
|
using VocaluxeLib.Menu;
|
||||||
using VocaluxeLib.Menu.SongMenu;
|
using VocaluxeLib.Menu.SongMenu;
|
||||||
|
using VocaluxeLib.Songs;
|
||||||
|
using VocaluxeLib.Profile;
|
||||||
|
|
||||||
namespace Vocaluxe.Base
|
namespace Vocaluxe.Base
|
||||||
{
|
{
|
||||||
@@ -370,6 +374,11 @@ namespace Vocaluxe.Base
|
|||||||
CDraw.DrawTextureReflection(texture, rect, color, bounds, reflectionSpace, reflectionHeight);
|
CDraw.DrawTextureReflection(texture, rect, color, bounds, reflectionSpace, reflectionHeight);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public STexture AddTexture(string fileName)
|
||||||
|
{
|
||||||
|
return CDraw.AddTexture(fileName);
|
||||||
|
}
|
||||||
|
|
||||||
public void RemoveTexture(ref STexture texture)
|
public void RemoveTexture(ref STexture texture)
|
||||||
{
|
{
|
||||||
CDraw.RemoveTexture(ref texture);
|
CDraw.RemoveTexture(ref texture);
|
||||||
@@ -538,7 +547,7 @@ namespace Vocaluxe.Base
|
|||||||
|
|
||||||
class CBprofiles : IProfiles
|
class CBprofiles : IProfiles
|
||||||
{
|
{
|
||||||
public SProfile[] GetProfiles()
|
public CProfile[] GetProfiles()
|
||||||
{
|
{
|
||||||
return CProfiles.Profiles;
|
return CProfiles.Profiles;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ using System.CodeDom.Compiler;
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
|
using VocaluxeLib;
|
||||||
using VocaluxeLib.Menu;
|
using VocaluxeLib.Menu;
|
||||||
using VocaluxeLib.PartyModes;
|
using VocaluxeLib.PartyModes;
|
||||||
|
|
||||||
|
|||||||
@@ -23,8 +23,9 @@ using System.Collections.ObjectModel;
|
|||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using Vocaluxe.Lib.Playlist;
|
using Vocaluxe.Lib.Playlist;
|
||||||
|
using VocaluxeLib;
|
||||||
using VocaluxeLib.Menu;
|
using VocaluxeLib.Menu;
|
||||||
using VocaluxeLib.Menu.SongMenu;
|
using VocaluxeLib.Songs;
|
||||||
|
|
||||||
namespace Vocaluxe.Base
|
namespace Vocaluxe.Base
|
||||||
{
|
{
|
||||||
|
|||||||
+50
-106
@@ -22,17 +22,18 @@ using System.Collections.Generic;
|
|||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Xml;
|
using System.Xml;
|
||||||
using VocaluxeLib.Menu;
|
using VocaluxeLib;
|
||||||
|
using VocaluxeLib.Game;
|
||||||
|
using VocaluxeLib.Profile;
|
||||||
|
|
||||||
namespace Vocaluxe.Base
|
namespace Vocaluxe.Base
|
||||||
{
|
{
|
||||||
static class CProfiles
|
static class CProfiles
|
||||||
{
|
{
|
||||||
private static readonly XmlWriterSettings _Settings = new XmlWriterSettings();
|
private static List<CProfile> _Profiles;
|
||||||
private static List<SProfile> _Profiles;
|
private static readonly List<CAvatar> _Avatars = new List<CAvatar>();
|
||||||
private static readonly List<SAvatar> _Avatars = new List<SAvatar>();
|
|
||||||
|
|
||||||
public static SProfile[] Profiles
|
public static CProfile[] Profiles
|
||||||
{
|
{
|
||||||
get { return _Profiles.ToArray(); }
|
get { return _Profiles.ToArray(); }
|
||||||
}
|
}
|
||||||
@@ -42,7 +43,7 @@ namespace Vocaluxe.Base
|
|||||||
get { return _Profiles.Count; }
|
get { return _Profiles.Count; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public static SAvatar[] Avatars
|
public static CAvatar[] Avatars
|
||||||
{
|
{
|
||||||
get { return _Avatars.ToArray(); }
|
get { return _Avatars.ToArray(); }
|
||||||
}
|
}
|
||||||
@@ -54,16 +55,12 @@ namespace Vocaluxe.Base
|
|||||||
|
|
||||||
public static void Init()
|
public static void Init()
|
||||||
{
|
{
|
||||||
_Settings.Indent = true;
|
|
||||||
_Settings.Encoding = Encoding.UTF8;
|
|
||||||
_Settings.ConformanceLevel = ConformanceLevel.Document;
|
|
||||||
|
|
||||||
LoadProfiles();
|
LoadProfiles();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static string GetPlayerName(int profileID, int playerNum = 0)
|
public static string GetPlayerName(int profileID, int playerNum = 0)
|
||||||
{
|
{
|
||||||
if (IsProfileIDValid(profileID))
|
if (ICProfileIDValid(profileID))
|
||||||
return _Profiles[profileID].PlayerName;
|
return _Profiles[profileID].PlayerName;
|
||||||
string playerName = CLanguage.Translate("TR_SCREENNAMES_PLAYER");
|
string playerName = CLanguage.Translate("TR_SCREENNAMES_PLAYER");
|
||||||
if (playerNum > 0)
|
if (playerNum > 0)
|
||||||
@@ -73,17 +70,17 @@ namespace Vocaluxe.Base
|
|||||||
|
|
||||||
public static int NewProfile(string fileName = "")
|
public static int NewProfile(string fileName = "")
|
||||||
{
|
{
|
||||||
SProfile profile = new SProfile
|
CProfile profile = new CProfile
|
||||||
{
|
{
|
||||||
PlayerName = String.Empty,
|
PlayerName = String.Empty,
|
||||||
Difficulty = EGameDifficulty.TR_CONFIG_EASY,
|
Difficulty = EGameDifficulty.TR_CONFIG_EASY,
|
||||||
Avatar = new SAvatar(-1),
|
Avatar = new CAvatar(-1),
|
||||||
GuestProfile = EOffOn.TR_CONFIG_OFF,
|
GuestProfile = EOffOn.TR_CONFIG_OFF,
|
||||||
Active = EOffOn.TR_CONFIG_ON,
|
Active = EOffOn.TR_CONFIG_ON,
|
||||||
ProfileFile = fileName != "" ? Path.Combine(CSettings.FolderProfiles, fileName) : String.Empty
|
FileName = fileName != "" ? Path.Combine(CSettings.FolderProfiles, fileName) : String.Empty
|
||||||
};
|
};
|
||||||
|
|
||||||
if (File.Exists(profile.ProfileFile))
|
if (File.Exists(profile.FileName))
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
_Profiles.Add(profile);
|
_Profiles.Add(profile);
|
||||||
@@ -100,7 +97,7 @@ namespace Vocaluxe.Base
|
|||||||
public static void LoadProfiles()
|
public static void LoadProfiles()
|
||||||
{
|
{
|
||||||
LoadAvatars();
|
LoadAvatars();
|
||||||
_Profiles = new List<SProfile>();
|
_Profiles = new List<CProfile>();
|
||||||
List<string> files = new List<string>();
|
List<string> files = new List<string>();
|
||||||
files.AddRange(CHelper.ListFiles(CSettings.FolderProfiles, "*.xml", true, true));
|
files.AddRange(CHelper.ListFiles(CSettings.FolderProfiles, "*.xml", true, true));
|
||||||
|
|
||||||
@@ -130,7 +127,7 @@ namespace Vocaluxe.Base
|
|||||||
STexture tex = CDraw.AddTexture(file);
|
STexture tex = CDraw.AddTexture(file);
|
||||||
if (tex.Index != -1)
|
if (tex.Index != -1)
|
||||||
{
|
{
|
||||||
SAvatar avatar = new SAvatar {Texture = tex, FileName = Path.GetFileName(file)};
|
CAvatar avatar = new CAvatar(-1) {Texture = tex, FileName = Path.GetFileName(file)};
|
||||||
_Avatars.Add(avatar);
|
_Avatars.Add(avatar);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -138,10 +135,10 @@ namespace Vocaluxe.Base
|
|||||||
|
|
||||||
public static string AddGetPlayerName(int profileID, char chr)
|
public static string AddGetPlayerName(int profileID, char chr)
|
||||||
{
|
{
|
||||||
if (!IsProfileIDValid(profileID))
|
if (!ICProfileIDValid(profileID))
|
||||||
return String.Empty;
|
return String.Empty;
|
||||||
|
|
||||||
SProfile profile = _Profiles[profileID];
|
CProfile profile = _Profiles[profileID];
|
||||||
profile.PlayerName += chr;
|
profile.PlayerName += chr;
|
||||||
_Profiles[profileID] = profile;
|
_Profiles[profileID] = profile;
|
||||||
|
|
||||||
@@ -150,10 +147,10 @@ namespace Vocaluxe.Base
|
|||||||
|
|
||||||
public static string GetDeleteCharInPlayerName(int profileID)
|
public static string GetDeleteCharInPlayerName(int profileID)
|
||||||
{
|
{
|
||||||
if (!IsProfileIDValid(profileID))
|
if (!ICProfileIDValid(profileID))
|
||||||
return String.Empty;
|
return String.Empty;
|
||||||
|
|
||||||
SProfile profile = _Profiles[profileID];
|
CProfile profile = _Profiles[profileID];
|
||||||
if (profile.PlayerName != "")
|
if (profile.PlayerName != "")
|
||||||
profile.PlayerName = profile.PlayerName.Remove(profile.PlayerName.Length - 1);
|
profile.PlayerName = profile.PlayerName.Remove(profile.PlayerName.Length - 1);
|
||||||
_Profiles[profileID] = profile;
|
_Profiles[profileID] = profile;
|
||||||
@@ -161,58 +158,58 @@ namespace Vocaluxe.Base
|
|||||||
return profile.PlayerName;
|
return profile.PlayerName;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static bool IsProfileIDValid(int profileID)
|
public static bool ICProfileIDValid(int profileID)
|
||||||
{
|
{
|
||||||
return profileID >= 0 && profileID < _Profiles.Count;
|
return profileID >= 0 && profileID < _Profiles.Count;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static EGameDifficulty GetDifficulty(int profileID)
|
public static EGameDifficulty GetDifficulty(int profileID)
|
||||||
{
|
{
|
||||||
return IsProfileIDValid(profileID) ? _Profiles[profileID].Difficulty : EGameDifficulty.TR_CONFIG_NORMAL;
|
return ICProfileIDValid(profileID) ? _Profiles[profileID].Difficulty : EGameDifficulty.TR_CONFIG_NORMAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void SetDifficulty(int profileID, EGameDifficulty difficulty)
|
public static void SetDifficulty(int profileID, EGameDifficulty difficulty)
|
||||||
{
|
{
|
||||||
if (!IsProfileIDValid(profileID))
|
if (!ICProfileIDValid(profileID))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
SProfile profile = _Profiles[profileID];
|
CProfile profile = _Profiles[profileID];
|
||||||
profile.Difficulty = difficulty;
|
profile.Difficulty = difficulty;
|
||||||
_Profiles[profileID] = profile;
|
_Profiles[profileID] = profile;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static EOffOn GetGuestProfile(int profileID)
|
public static EOffOn GetGuestProfile(int profileID)
|
||||||
{
|
{
|
||||||
return IsProfileIDValid(profileID) ? _Profiles[profileID].GuestProfile : EOffOn.TR_CONFIG_OFF;
|
return ICProfileIDValid(profileID) ? _Profiles[profileID].GuestProfile : EOffOn.TR_CONFIG_OFF;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static EOffOn GetActive(int profileID)
|
public static EOffOn GetActive(int profileID)
|
||||||
{
|
{
|
||||||
return IsProfileIDValid(profileID) ? _Profiles[profileID].Active : EOffOn.TR_CONFIG_OFF;
|
return ICProfileIDValid(profileID) ? _Profiles[profileID].Active : EOffOn.TR_CONFIG_OFF;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void SetGuestProfile(int profileID, EOffOn option)
|
public static void SetGuestProfile(int profileID, EOffOn option)
|
||||||
{
|
{
|
||||||
if (!IsProfileIDValid(profileID))
|
if (!ICProfileIDValid(profileID))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
SProfile profile = _Profiles[profileID];
|
CProfile profile = _Profiles[profileID];
|
||||||
profile.GuestProfile = option;
|
profile.GuestProfile = option;
|
||||||
_Profiles[profileID] = profile;
|
_Profiles[profileID] = profile;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void SetActive(int profileID, EOffOn option)
|
public static void SetActive(int profileID, EOffOn option)
|
||||||
{
|
{
|
||||||
if (!IsProfileIDValid(profileID))
|
if (!ICProfileIDValid(profileID))
|
||||||
return;
|
return;
|
||||||
SProfile profile = _Profiles[profileID];
|
CProfile profile = _Profiles[profileID];
|
||||||
profile.Active = option;
|
profile.Active = option;
|
||||||
_Profiles[profileID] = profile;
|
_Profiles[profileID] = profile;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static bool IsGuestProfile(int profileID)
|
public static bool IsGuestProfile(int profileID)
|
||||||
{
|
{
|
||||||
if (!IsProfileIDValid(profileID))
|
if (!ICProfileIDValid(profileID))
|
||||||
return true; // this will prevent from saving dummy profiles to highscore db
|
return true; // this will prevent from saving dummy profiles to highscore db
|
||||||
|
|
||||||
return _Profiles[profileID].GuestProfile == EOffOn.TR_CONFIG_ON;
|
return _Profiles[profileID].GuestProfile == EOffOn.TR_CONFIG_ON;
|
||||||
@@ -220,24 +217,24 @@ namespace Vocaluxe.Base
|
|||||||
|
|
||||||
public static bool IsActive(int profileID)
|
public static bool IsActive(int profileID)
|
||||||
{
|
{
|
||||||
if (!IsProfileIDValid(profileID))
|
if (!ICProfileIDValid(profileID))
|
||||||
return false;
|
return false;
|
||||||
return _Profiles[profileID].Active == EOffOn.TR_CONFIG_ON;
|
return _Profiles[profileID].Active == EOffOn.TR_CONFIG_ON;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void SetAvatar(int profileID, int avatarNr)
|
public static void SetAvatar(int profileID, int avatarNr)
|
||||||
{
|
{
|
||||||
if (!IsProfileIDValid(profileID) || avatarNr < 0 || avatarNr >= _Avatars.Count)
|
if (!ICProfileIDValid(profileID) || avatarNr < 0 || avatarNr >= _Avatars.Count)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
SProfile profile = _Profiles[profileID];
|
CProfile profile = _Profiles[profileID];
|
||||||
profile.Avatar = _Avatars[avatarNr];
|
profile.Avatar = _Avatars[avatarNr];
|
||||||
_Profiles[profileID] = profile;
|
_Profiles[profileID] = profile;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static int GetAvatarNr(int profileID)
|
public static int GetAvatarNr(int profileID)
|
||||||
{
|
{
|
||||||
if (!IsProfileIDValid(profileID))
|
if (!ICProfileIDValid(profileID))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
for (int i = 0; i < _Avatars.Count; i++)
|
for (int i = 0; i < _Avatars.Count; i++)
|
||||||
@@ -251,22 +248,22 @@ namespace Vocaluxe.Base
|
|||||||
|
|
||||||
public static void DeleteProfile(int profileID)
|
public static void DeleteProfile(int profileID)
|
||||||
{
|
{
|
||||||
if (!IsProfileIDValid(profileID))
|
if (!ICProfileIDValid(profileID))
|
||||||
return;
|
return;
|
||||||
if (_Profiles[profileID].ProfileFile == "")
|
if (_Profiles[profileID].FileName == "")
|
||||||
return;
|
return;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
//Check if profile saved in config
|
//Check if profile saved in config
|
||||||
for (int i = 0; i < CConfig.Players.Length; i++)
|
for (int i = 0; i < CConfig.Players.Length; i++)
|
||||||
{
|
{
|
||||||
if (CConfig.Players[i] == _Profiles[profileID].ProfileFile)
|
if (CConfig.Players[i] == _Profiles[profileID].FileName)
|
||||||
{
|
{
|
||||||
CConfig.Players[i] = string.Empty;
|
CConfig.Players[i] = string.Empty;
|
||||||
CConfig.SaveConfig();
|
CConfig.SaveConfig();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
File.Delete(_Profiles[profileID].ProfileFile);
|
File.Delete(_Profiles[profileID].FileName);
|
||||||
_Profiles.RemoveAt(profileID);
|
_Profiles.RemoveAt(profileID);
|
||||||
//Check if profile is selected in game
|
//Check if profile is selected in game
|
||||||
for (int i = 0; i < CGame.Players.Length; i++)
|
for (int i = 0; i < CGame.Players.Length; i++)
|
||||||
@@ -279,7 +276,7 @@ namespace Vocaluxe.Base
|
|||||||
}
|
}
|
||||||
catch (Exception)
|
catch (Exception)
|
||||||
{
|
{
|
||||||
CLog.LogError("Can't delete Profile File " + _Profiles[profileID].ProfileFile + ".xml");
|
CLog.LogError("Can't delete Profile File " + _Profiles[profileID].FileName + ".xml");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -288,28 +285,28 @@ namespace Vocaluxe.Base
|
|||||||
_Profiles.Sort(_CompareByPlayerName);
|
_Profiles.Sort(_CompareByPlayerName);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static int _CompareByPlayerName(SProfile a, SProfile b)
|
private static int _CompareByPlayerName(CProfile a, CProfile b)
|
||||||
{
|
{
|
||||||
return String.CompareOrdinal(a.PlayerName, b.PlayerName);
|
return String.CompareOrdinal(a.PlayerName, b.PlayerName);
|
||||||
}
|
}
|
||||||
|
|
||||||
#region private methods
|
#region private methods
|
||||||
private static SAvatar _GetAvatar(string fileName)
|
private static CAvatar _GetAvatar(string fileName)
|
||||||
{
|
{
|
||||||
foreach (SAvatar avatar in _Avatars)
|
foreach (CAvatar avatar in _Avatars)
|
||||||
{
|
{
|
||||||
if (fileName == avatar.FileName)
|
if (fileName == avatar.FileName)
|
||||||
return avatar;
|
return avatar;
|
||||||
}
|
}
|
||||||
return new SAvatar(-1);
|
return new CAvatar(-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void _SaveProfile(int profileID)
|
private static void _SaveProfile(int profileID)
|
||||||
{
|
{
|
||||||
if (!IsProfileIDValid(profileID))
|
if (!ICProfileIDValid(profileID))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (_Profiles[profileID].ProfileFile == "")
|
if (_Profiles[profileID].FileName == "")
|
||||||
{
|
{
|
||||||
string filename = string.Empty;
|
string filename = string.Empty;
|
||||||
foreach (char chr in _Profiles[profileID].PlayerName)
|
foreach (char chr in _Profiles[profileID].PlayerName)
|
||||||
@@ -329,75 +326,22 @@ namespace Vocaluxe.Base
|
|||||||
filename += i;
|
filename += i;
|
||||||
}
|
}
|
||||||
|
|
||||||
SProfile profile = _Profiles[profileID];
|
CProfile profile = _Profiles[profileID];
|
||||||
profile.ProfileFile = Path.Combine(CSettings.FolderProfiles, filename + ".xml");
|
profile.FileName = Path.Combine(CSettings.FolderProfiles, filename + ".xml");
|
||||||
_Profiles[profileID] = profile;
|
_Profiles[profileID] = profile;
|
||||||
}
|
}
|
||||||
|
|
||||||
XmlWriter writer;
|
_Profiles[profileID].SaveProfile();
|
||||||
try
|
|
||||||
{
|
|
||||||
writer = XmlWriter.Create(_Profiles[profileID].ProfileFile, _Settings);
|
|
||||||
}
|
|
||||||
catch (Exception e)
|
|
||||||
{
|
|
||||||
CLog.LogError("Error creating/opening Profile File " + _Profiles[profileID].ProfileFile + ": " + e.Message);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
try
|
|
||||||
{
|
|
||||||
writer.WriteStartDocument();
|
|
||||||
writer.WriteStartElement("root");
|
|
||||||
|
|
||||||
writer.WriteStartElement("Info");
|
|
||||||
writer.WriteElementString("PlayerName", _Profiles[profileID].PlayerName);
|
|
||||||
writer.WriteElementString("Difficulty", Enum.GetName(typeof(EGameDifficulty), _Profiles[profileID].Difficulty));
|
|
||||||
writer.WriteElementString("Avatar", _Profiles[profileID].Avatar.FileName);
|
|
||||||
writer.WriteElementString("GuestProfile", Enum.GetName(typeof(EOffOn), _Profiles[profileID].GuestProfile));
|
|
||||||
writer.WriteElementString("Active", Enum.GetName(typeof(EOffOn), _Profiles[profileID].Active));
|
|
||||||
writer.WriteEndElement();
|
|
||||||
|
|
||||||
writer.WriteEndElement(); //end of root
|
|
||||||
writer.WriteEndDocument();
|
|
||||||
|
|
||||||
writer.Flush();
|
|
||||||
}
|
|
||||||
finally
|
|
||||||
{
|
|
||||||
writer.Close();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void _LoadProfile(string fileName)
|
private static void _LoadProfile(string fileName)
|
||||||
{
|
{
|
||||||
SProfile profile = new SProfile {ProfileFile = Path.Combine(CSettings.FolderProfiles, fileName)};
|
CProfile profile = new CProfile {FileName = Path.Combine(CSettings.FolderProfiles, fileName)};
|
||||||
|
if (profile.LoadProfile())
|
||||||
CXMLReader xmlReader = CXMLReader.OpenFile(profile.ProfileFile);
|
|
||||||
if (xmlReader == null)
|
|
||||||
return;
|
|
||||||
|
|
||||||
string value = String.Empty;
|
|
||||||
if (xmlReader.GetValue("//root/Info/PlayerName", out value, value))
|
|
||||||
{
|
{
|
||||||
profile.PlayerName = value;
|
profile.Avatar = _GetAvatar(profile.AvatarFileName);
|
||||||
|
|
||||||
profile.Difficulty = EGameDifficulty.TR_CONFIG_EASY;
|
|
||||||
xmlReader.TryGetEnumValue("//root/Info/Difficulty", ref profile.Difficulty);
|
|
||||||
|
|
||||||
profile.Avatar = new SAvatar(-1);
|
|
||||||
if (xmlReader.GetValue("//root/Info/Avatar", out value, value))
|
|
||||||
profile.Avatar = _GetAvatar(value);
|
|
||||||
|
|
||||||
profile.GuestProfile = EOffOn.TR_CONFIG_OFF;
|
|
||||||
xmlReader.TryGetEnumValue("//root/Info/GuestProfile", ref profile.GuestProfile);
|
|
||||||
|
|
||||||
profile.Active = EOffOn.TR_CONFIG_ON;
|
|
||||||
xmlReader.TryGetEnumValue("//root/Info/Active", ref profile.Active);
|
|
||||||
|
|
||||||
_Profiles.Add(profile);
|
_Profiles.Add(profile);
|
||||||
}
|
}
|
||||||
else
|
|
||||||
CLog.LogError("Can't find PlayerName in Profile File: " + fileName);
|
|
||||||
}
|
}
|
||||||
#endregion private methods
|
#endregion private methods
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ using System;
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using VocaluxeLib.Menu;
|
using VocaluxeLib;
|
||||||
|
|
||||||
namespace Vocaluxe.Base
|
namespace Vocaluxe.Base
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -20,8 +20,9 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using VocaluxeLib.Menu;
|
using VocaluxeLib;
|
||||||
using VocaluxeLib.Menu.SongMenu;
|
using VocaluxeLib.Menu.SongMenu;
|
||||||
|
using VocaluxeLib.Songs;
|
||||||
|
|
||||||
namespace Vocaluxe.Base
|
namespace Vocaluxe.Base
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -20,8 +20,8 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using VocaluxeLib.Menu;
|
using VocaluxeLib;
|
||||||
using VocaluxeLib.Menu.SongMenu;
|
using VocaluxeLib.Songs;
|
||||||
|
|
||||||
namespace Vocaluxe.Base
|
namespace Vocaluxe.Base
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -20,8 +20,8 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using VocaluxeLib.Menu;
|
using VocaluxeLib;
|
||||||
using VocaluxeLib.Menu.SongMenu;
|
using VocaluxeLib.Songs;
|
||||||
|
|
||||||
namespace Vocaluxe.Base
|
namespace Vocaluxe.Base
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -22,8 +22,10 @@ using System.Collections.Generic;
|
|||||||
using System.Collections.ObjectModel;
|
using System.Collections.ObjectModel;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
|
using VocaluxeLib;
|
||||||
using VocaluxeLib.Menu;
|
using VocaluxeLib.Menu;
|
||||||
using VocaluxeLib.Menu.SongMenu;
|
using VocaluxeLib.Menu.SongMenu;
|
||||||
|
using VocaluxeLib.Songs;
|
||||||
|
|
||||||
namespace Vocaluxe.Base
|
namespace Vocaluxe.Base
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ using System.Collections.ObjectModel;
|
|||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using Vocaluxe.Lib.Sound;
|
using Vocaluxe.Lib.Sound;
|
||||||
using VocaluxeLib.Menu;
|
using VocaluxeLib;
|
||||||
|
|
||||||
namespace Vocaluxe.Base
|
namespace Vocaluxe.Base
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -24,6 +24,7 @@ using System.Text;
|
|||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
using System.Xml;
|
using System.Xml;
|
||||||
using Vocaluxe.Base.Font;
|
using Vocaluxe.Base.Font;
|
||||||
|
using VocaluxeLib;
|
||||||
using VocaluxeLib.Menu;
|
using VocaluxeLib.Menu;
|
||||||
|
|
||||||
namespace Vocaluxe.Base
|
namespace Vocaluxe.Base
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ using System;
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
using VocaluxeLib.Menu;
|
using VocaluxeLib;
|
||||||
|
|
||||||
namespace Vocaluxe.Base
|
namespace Vocaluxe.Base
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -20,7 +20,7 @@
|
|||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
using Vocaluxe.Lib.Video;
|
using Vocaluxe.Lib.Video;
|
||||||
using VocaluxeLib.Menu;
|
using VocaluxeLib;
|
||||||
|
|
||||||
namespace Vocaluxe.Base
|
namespace Vocaluxe.Base
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -19,7 +19,7 @@
|
|||||||
|
|
||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
using Vocaluxe.Lib.Webcam;
|
using Vocaluxe.Lib.Webcam;
|
||||||
using VocaluxeLib.Menu;
|
using VocaluxeLib;
|
||||||
|
|
||||||
namespace Vocaluxe.Base
|
namespace Vocaluxe.Base
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ using System;
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
using System.Drawing.Text;
|
using System.Drawing.Text;
|
||||||
|
using VocaluxeLib;
|
||||||
using VocaluxeLib.Menu;
|
using VocaluxeLib.Menu;
|
||||||
|
|
||||||
namespace Vocaluxe.Base.Font
|
namespace Vocaluxe.Base.Font
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ using System.IO;
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Xml;
|
using System.Xml;
|
||||||
|
using VocaluxeLib;
|
||||||
using VocaluxeLib.Menu;
|
using VocaluxeLib.Menu;
|
||||||
|
|
||||||
namespace Vocaluxe.Base.Font
|
namespace Vocaluxe.Base.Font
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ using System.Drawing;
|
|||||||
using System.Drawing.Drawing2D;
|
using System.Drawing.Drawing2D;
|
||||||
using System.Drawing.Text;
|
using System.Drawing.Text;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
|
using VocaluxeLib;
|
||||||
using VocaluxeLib.Menu;
|
using VocaluxeLib.Menu;
|
||||||
|
|
||||||
namespace Vocaluxe.Base.Font
|
namespace Vocaluxe.Base.Font
|
||||||
|
|||||||
@@ -18,7 +18,7 @@
|
|||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
using Vocaluxe.Base;
|
using Vocaluxe.Base;
|
||||||
using VocaluxeLib.Menu.SongMenu;
|
using VocaluxeLib.Songs;
|
||||||
|
|
||||||
namespace Vocaluxe.GameModes
|
namespace Vocaluxe.GameModes
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -19,8 +19,8 @@
|
|||||||
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using Vocaluxe.Base;
|
using Vocaluxe.Base;
|
||||||
using VocaluxeLib.Menu;
|
using VocaluxeLib;
|
||||||
using VocaluxeLib.Menu.SongMenu;
|
using VocaluxeLib.Songs;
|
||||||
|
|
||||||
namespace Vocaluxe.GameModes
|
namespace Vocaluxe.GameModes
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -17,7 +17,7 @@
|
|||||||
// */
|
// */
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
using VocaluxeLib.Menu.SongMenu;
|
using VocaluxeLib.Songs;
|
||||||
|
|
||||||
namespace Vocaluxe.GameModes
|
namespace Vocaluxe.GameModes
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -32,6 +32,7 @@ using System.Windows.Forms;
|
|||||||
using SlimDX.Windows;
|
using SlimDX.Windows;
|
||||||
using Vocaluxe.Base;
|
using Vocaluxe.Base;
|
||||||
using Vocaluxe.Base.Font;
|
using Vocaluxe.Base.Font;
|
||||||
|
using VocaluxeLib;
|
||||||
using VocaluxeLib.Menu;
|
using VocaluxeLib.Menu;
|
||||||
|
|
||||||
namespace Vocaluxe.Lib.Draw
|
namespace Vocaluxe.Lib.Draw
|
||||||
|
|||||||
@@ -28,6 +28,7 @@ using System.Threading;
|
|||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
using Vocaluxe.Base;
|
using Vocaluxe.Base;
|
||||||
using Vocaluxe.Base.Font;
|
using Vocaluxe.Base.Font;
|
||||||
|
using VocaluxeLib;
|
||||||
using VocaluxeLib.Menu;
|
using VocaluxeLib.Menu;
|
||||||
|
|
||||||
namespace Vocaluxe.Lib.Draw
|
namespace Vocaluxe.Lib.Draw
|
||||||
|
|||||||
@@ -31,6 +31,7 @@ using System.Runtime.InteropServices;
|
|||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
using Vocaluxe.Base;
|
using Vocaluxe.Base;
|
||||||
using Vocaluxe.Base.Font;
|
using Vocaluxe.Base.Font;
|
||||||
|
using VocaluxeLib;
|
||||||
using VocaluxeLib.Menu;
|
using VocaluxeLib.Menu;
|
||||||
using BeginMode = OpenTK.Graphics.OpenGL.BeginMode;
|
using BeginMode = OpenTK.Graphics.OpenGL.BeginMode;
|
||||||
using BlendingFactorDest = OpenTK.Graphics.OpenGL.BlendingFactorDest;
|
using BlendingFactorDest = OpenTK.Graphics.OpenGL.BlendingFactorDest;
|
||||||
|
|||||||
@@ -19,6 +19,7 @@
|
|||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
|
using VocaluxeLib;
|
||||||
using VocaluxeLib.Menu;
|
using VocaluxeLib.Menu;
|
||||||
|
|
||||||
namespace Vocaluxe.Lib.Draw
|
namespace Vocaluxe.Lib.Draw
|
||||||
|
|||||||
@@ -20,7 +20,7 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
using VocaluxeLib.Menu;
|
using VocaluxeLib;
|
||||||
|
|
||||||
namespace Vocaluxe.Lib.Input
|
namespace Vocaluxe.Lib.Input
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ using System.Drawing;
|
|||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
using Vocaluxe.Base;
|
using Vocaluxe.Base;
|
||||||
using VocaluxeLib.Menu;
|
using VocaluxeLib;
|
||||||
|
|
||||||
namespace Vocaluxe.Lib.Input.WiiMote
|
namespace Vocaluxe.Lib.Input.WiiMote
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ using System;
|
|||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using Vocaluxe.Base;
|
using Vocaluxe.Base;
|
||||||
using VocaluxeLib.Menu;
|
using VocaluxeLib;
|
||||||
|
|
||||||
namespace Vocaluxe.Lib.Input.WiiMote
|
namespace Vocaluxe.Lib.Input.WiiMote
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -23,8 +23,9 @@ using System.IO;
|
|||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Xml;
|
using System.Xml;
|
||||||
using Vocaluxe.Base;
|
using Vocaluxe.Base;
|
||||||
|
using VocaluxeLib;
|
||||||
using VocaluxeLib.Menu;
|
using VocaluxeLib.Menu;
|
||||||
using VocaluxeLib.Menu.SongMenu;
|
using VocaluxeLib.Songs;
|
||||||
|
|
||||||
namespace Vocaluxe.Lib.Playlist
|
namespace Vocaluxe.Lib.Playlist
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -19,7 +19,7 @@
|
|||||||
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using VocaluxeLib.Menu;
|
using VocaluxeLib;
|
||||||
|
|
||||||
namespace Vocaluxe.Lib.Video
|
namespace Vocaluxe.Lib.Video
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ using System.Runtime.InteropServices;
|
|||||||
using System.Threading;
|
using System.Threading;
|
||||||
using Vocaluxe.Base;
|
using Vocaluxe.Base;
|
||||||
using Vocaluxe.Lib.Video.Acinerella;
|
using Vocaluxe.Lib.Video.Acinerella;
|
||||||
using VocaluxeLib.Menu;
|
using VocaluxeLib;
|
||||||
|
|
||||||
namespace Vocaluxe.Lib.Video
|
namespace Vocaluxe.Lib.Video
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -20,7 +20,7 @@
|
|||||||
using System;
|
using System;
|
||||||
using Vocaluxe.Base;
|
using Vocaluxe.Base;
|
||||||
using Vocaluxe.Lib.Video.Gstreamer;
|
using Vocaluxe.Lib.Video.Gstreamer;
|
||||||
using VocaluxeLib.Menu;
|
using VocaluxeLib;
|
||||||
|
|
||||||
namespace Vocaluxe.Lib.Video
|
namespace Vocaluxe.Lib.Video
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -17,7 +17,7 @@
|
|||||||
// */
|
// */
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
using VocaluxeLib.Menu;
|
using VocaluxeLib;
|
||||||
|
|
||||||
namespace Vocaluxe.Lib.Video
|
namespace Vocaluxe.Lib.Video
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ using System.Drawing;
|
|||||||
using System.Drawing.Imaging;
|
using System.Drawing.Imaging;
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
using Vocaluxe.Base;
|
using Vocaluxe.Base;
|
||||||
using VocaluxeLib.Menu;
|
using VocaluxeLib;
|
||||||
|
|
||||||
namespace Vocaluxe.Lib.Webcam
|
namespace Vocaluxe.Lib.Webcam
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -19,7 +19,7 @@
|
|||||||
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
using VocaluxeLib.Menu;
|
using VocaluxeLib;
|
||||||
|
|
||||||
namespace Vocaluxe.Lib.Webcam
|
namespace Vocaluxe.Lib.Webcam
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -20,6 +20,7 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
using Vocaluxe.Base;
|
using Vocaluxe.Base;
|
||||||
|
using VocaluxeLib;
|
||||||
using VocaluxeLib.Menu;
|
using VocaluxeLib.Menu;
|
||||||
|
|
||||||
namespace Vocaluxe.Screens
|
namespace Vocaluxe.Screens
|
||||||
|
|||||||
@@ -18,6 +18,7 @@
|
|||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
using Vocaluxe.Base;
|
using Vocaluxe.Base;
|
||||||
|
using VocaluxeLib;
|
||||||
using VocaluxeLib.Menu;
|
using VocaluxeLib.Menu;
|
||||||
|
|
||||||
namespace Vocaluxe.Screens
|
namespace Vocaluxe.Screens
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ using System.Collections.Generic;
|
|||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
using Vocaluxe.Base;
|
using Vocaluxe.Base;
|
||||||
|
using VocaluxeLib;
|
||||||
using VocaluxeLib.Menu;
|
using VocaluxeLib.Menu;
|
||||||
|
|
||||||
enum EDirection
|
enum EDirection
|
||||||
|
|||||||
@@ -22,8 +22,10 @@ using System.Collections.Generic;
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
using Vocaluxe.Base;
|
using Vocaluxe.Base;
|
||||||
|
using VocaluxeLib;
|
||||||
|
using VocaluxeLib.Game;
|
||||||
using VocaluxeLib.Menu;
|
using VocaluxeLib.Menu;
|
||||||
using VocaluxeLib.Menu.SongMenu;
|
using VocaluxeLib.Songs;
|
||||||
|
|
||||||
namespace Vocaluxe.Screens
|
namespace Vocaluxe.Screens
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ using System.Diagnostics;
|
|||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
using Vocaluxe.Base;
|
using Vocaluxe.Base;
|
||||||
|
using VocaluxeLib;
|
||||||
using VocaluxeLib.Menu;
|
using VocaluxeLib.Menu;
|
||||||
|
|
||||||
namespace Vocaluxe.Screens
|
namespace Vocaluxe.Screens
|
||||||
|
|||||||
@@ -20,6 +20,7 @@
|
|||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
using Vocaluxe.Base;
|
using Vocaluxe.Base;
|
||||||
using Vocaluxe.Base.Font;
|
using Vocaluxe.Base.Font;
|
||||||
|
using VocaluxeLib;
|
||||||
using VocaluxeLib.Menu;
|
using VocaluxeLib.Menu;
|
||||||
|
|
||||||
namespace Vocaluxe.Screens
|
namespace Vocaluxe.Screens
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ using System;
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
using Vocaluxe.Base;
|
using Vocaluxe.Base;
|
||||||
|
using VocaluxeLib;
|
||||||
using VocaluxeLib.Menu;
|
using VocaluxeLib.Menu;
|
||||||
|
|
||||||
namespace Vocaluxe.Screens
|
namespace Vocaluxe.Screens
|
||||||
@@ -169,7 +170,7 @@ namespace Vocaluxe.Screens
|
|||||||
//Update Game-infos with new player
|
//Update Game-infos with new player
|
||||||
CGame.Players[_SelectingFastPlayerNr - 1].ProfileID = _SelectedPlayerNr;
|
CGame.Players[_SelectingFastPlayerNr - 1].ProfileID = _SelectedPlayerNr;
|
||||||
//Update config for default players.
|
//Update config for default players.
|
||||||
CConfig.Players[_SelectingFastPlayerNr - 1] = CProfiles.Profiles[_SelectedPlayerNr].ProfileFile;
|
CConfig.Players[_SelectingFastPlayerNr - 1] = CProfiles.Profiles[_SelectedPlayerNr].FileName;
|
||||||
CConfig.SaveConfig();
|
CConfig.SaveConfig();
|
||||||
//Update texture and name
|
//Update texture and name
|
||||||
_Statics[_StaticPlayerAvatar[_SelectingFastPlayerNr - 1]].Texture = CProfiles.Profiles[_SelectedPlayerNr].Avatar.Texture;
|
_Statics[_StaticPlayerAvatar[_SelectingFastPlayerNr - 1]].Texture = CProfiles.Profiles[_SelectedPlayerNr].Avatar.Texture;
|
||||||
@@ -417,7 +418,7 @@ namespace Vocaluxe.Screens
|
|||||||
//Update Game-infos with new player
|
//Update Game-infos with new player
|
||||||
CGame.Players[_SelectingSwitchNr].ProfileID = CGame.Players[i].ProfileID;
|
CGame.Players[_SelectingSwitchNr].ProfileID = CGame.Players[i].ProfileID;
|
||||||
//Update config for default players.
|
//Update config for default players.
|
||||||
CConfig.Players[_SelectingSwitchNr] = CProfiles.Profiles[i].ProfileFile;
|
CConfig.Players[_SelectingSwitchNr] = CProfiles.Profiles[i].FileName;
|
||||||
//Update texture and name
|
//Update texture and name
|
||||||
_Statics[_StaticPlayerAvatar[_SelectingSwitchNr]].Texture = CProfiles.Profiles[CGame.Players[i].ProfileID].Avatar.Texture;
|
_Statics[_StaticPlayerAvatar[_SelectingSwitchNr]].Texture = CProfiles.Profiles[CGame.Players[i].ProfileID].Avatar.Texture;
|
||||||
_Texts[_TextPlayer[_SelectingSwitchNr]].Text = CProfiles.Profiles[CGame.Players[i].ProfileID].PlayerName;
|
_Texts[_TextPlayer[_SelectingSwitchNr]].Text = CProfiles.Profiles[CGame.Players[i].ProfileID].PlayerName;
|
||||||
@@ -435,7 +436,7 @@ namespace Vocaluxe.Screens
|
|||||||
//Update Game-infos with new player
|
//Update Game-infos with new player
|
||||||
CGame.Players[i].ProfileID = _SelectedPlayerNr;
|
CGame.Players[i].ProfileID = _SelectedPlayerNr;
|
||||||
//Update config for default players.
|
//Update config for default players.
|
||||||
CConfig.Players[i] = CProfiles.Profiles[_SelectedPlayerNr].ProfileFile;
|
CConfig.Players[i] = CProfiles.Profiles[_SelectedPlayerNr].FileName;
|
||||||
CConfig.SaveConfig();
|
CConfig.SaveConfig();
|
||||||
//Update texture and name
|
//Update texture and name
|
||||||
_Statics[_StaticPlayerAvatar[i]].Texture = _ChooseAvatarStatic.Texture;
|
_Statics[_StaticPlayerAvatar[i]].Texture = _ChooseAvatarStatic.Texture;
|
||||||
@@ -475,7 +476,7 @@ namespace Vocaluxe.Screens
|
|||||||
//Update Game-infos with new player
|
//Update Game-infos with new player
|
||||||
CGame.Players[_SelectingFastPlayerNr - 1].ProfileID = _SelectedPlayerNr;
|
CGame.Players[_SelectingFastPlayerNr - 1].ProfileID = _SelectedPlayerNr;
|
||||||
//Update config for default players.
|
//Update config for default players.
|
||||||
CConfig.Players[_SelectingFastPlayerNr - 1] = CProfiles.Profiles[_SelectedPlayerNr].ProfileFile;
|
CConfig.Players[_SelectingFastPlayerNr - 1] = CProfiles.Profiles[_SelectedPlayerNr].FileName;
|
||||||
CConfig.SaveConfig();
|
CConfig.SaveConfig();
|
||||||
//Update texture and name
|
//Update texture and name
|
||||||
_Statics[_StaticPlayerAvatar[_SelectingFastPlayerNr - 1]].Texture = CProfiles.Profiles[_SelectedPlayerNr].Avatar.Texture;
|
_Statics[_StaticPlayerAvatar[_SelectingFastPlayerNr - 1]].Texture = CProfiles.Profiles[_SelectedPlayerNr].Avatar.Texture;
|
||||||
@@ -518,7 +519,7 @@ namespace Vocaluxe.Screens
|
|||||||
//Update Game-infos with new player
|
//Update Game-infos with new player
|
||||||
CGame.Players[i].ProfileID = _SelectedPlayerNr;
|
CGame.Players[i].ProfileID = _SelectedPlayerNr;
|
||||||
//Update config for default players.
|
//Update config for default players.
|
||||||
CConfig.Players[i] = CProfiles.Profiles[_SelectedPlayerNr].ProfileFile;
|
CConfig.Players[i] = CProfiles.Profiles[_SelectedPlayerNr].FileName;
|
||||||
CConfig.SaveConfig();
|
CConfig.SaveConfig();
|
||||||
//Update texture and name
|
//Update texture and name
|
||||||
_Statics[_StaticPlayerAvatar[i]].Texture = CProfiles.Profiles[_SelectedPlayerNr].Avatar.Texture;
|
_Statics[_StaticPlayerAvatar[i]].Texture = CProfiles.Profiles[_SelectedPlayerNr].Avatar.Texture;
|
||||||
@@ -622,7 +623,7 @@ namespace Vocaluxe.Screens
|
|||||||
|
|
||||||
for (int i = 0; i < CSettings.MaxNumPlayer; i++)
|
for (int i = 0; i < CSettings.MaxNumPlayer; i++)
|
||||||
{
|
{
|
||||||
_Statics[_StaticPlayerAvatar[i]].Texture = CProfiles.IsProfileIDValid(CGame.Players[i].ProfileID) ?
|
_Statics[_StaticPlayerAvatar[i]].Texture = CProfiles.ICProfileIDValid(CGame.Players[i].ProfileID) ?
|
||||||
CProfiles.Profiles[CGame.Players[i].ProfileID].Avatar.Texture :
|
CProfiles.Profiles[CGame.Players[i].ProfileID].Avatar.Texture :
|
||||||
_OriginalPlayerAvatarTextures[i];
|
_OriginalPlayerAvatarTextures[i];
|
||||||
_Texts[_TextPlayer[i]].Text = CProfiles.GetPlayerName(CGame.Players[i].ProfileID, i + 1);
|
_Texts[_TextPlayer[i]].Text = CProfiles.GetPlayerName(CGame.Players[i].ProfileID, i + 1);
|
||||||
|
|||||||
@@ -19,6 +19,7 @@
|
|||||||
|
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
using Vocaluxe.Base;
|
using Vocaluxe.Base;
|
||||||
|
using VocaluxeLib;
|
||||||
using VocaluxeLib.Menu;
|
using VocaluxeLib.Menu;
|
||||||
|
|
||||||
namespace Vocaluxe.Screens
|
namespace Vocaluxe.Screens
|
||||||
|
|||||||
@@ -19,6 +19,7 @@
|
|||||||
|
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
using Vocaluxe.Base;
|
using Vocaluxe.Base;
|
||||||
|
using VocaluxeLib;
|
||||||
using VocaluxeLib.Menu;
|
using VocaluxeLib.Menu;
|
||||||
|
|
||||||
namespace Vocaluxe.Screens
|
namespace Vocaluxe.Screens
|
||||||
|
|||||||
@@ -19,6 +19,7 @@
|
|||||||
|
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
using Vocaluxe.Base;
|
using Vocaluxe.Base;
|
||||||
|
using VocaluxeLib;
|
||||||
using VocaluxeLib.Menu;
|
using VocaluxeLib.Menu;
|
||||||
|
|
||||||
namespace Vocaluxe.Screens
|
namespace Vocaluxe.Screens
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ using System.Diagnostics;
|
|||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
using Vocaluxe.Base;
|
using Vocaluxe.Base;
|
||||||
using Vocaluxe.Lib.Sound;
|
using Vocaluxe.Lib.Sound;
|
||||||
|
using VocaluxeLib;
|
||||||
using VocaluxeLib.Menu;
|
using VocaluxeLib.Menu;
|
||||||
|
|
||||||
namespace Vocaluxe.Screens
|
namespace Vocaluxe.Screens
|
||||||
|
|||||||
@@ -19,6 +19,7 @@
|
|||||||
|
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
using Vocaluxe.Base;
|
using Vocaluxe.Base;
|
||||||
|
using VocaluxeLib;
|
||||||
using VocaluxeLib.Menu;
|
using VocaluxeLib.Menu;
|
||||||
|
|
||||||
namespace Vocaluxe.Screens
|
namespace Vocaluxe.Screens
|
||||||
|
|||||||
@@ -20,6 +20,7 @@
|
|||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
using Vocaluxe.Base;
|
using Vocaluxe.Base;
|
||||||
using Vocaluxe.Base.Font;
|
using Vocaluxe.Base.Font;
|
||||||
|
using VocaluxeLib;
|
||||||
using VocaluxeLib.Menu;
|
using VocaluxeLib.Menu;
|
||||||
|
|
||||||
namespace Vocaluxe.Screens
|
namespace Vocaluxe.Screens
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ using System;
|
|||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
using Vocaluxe.Base;
|
using Vocaluxe.Base;
|
||||||
using Vocaluxe.Lib.Webcam;
|
using Vocaluxe.Lib.Webcam;
|
||||||
|
using VocaluxeLib;
|
||||||
using VocaluxeLib.Menu;
|
using VocaluxeLib.Menu;
|
||||||
|
|
||||||
namespace Vocaluxe.Screens
|
namespace Vocaluxe.Screens
|
||||||
|
|||||||
@@ -20,6 +20,7 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
using Vocaluxe.Base;
|
using Vocaluxe.Base;
|
||||||
|
using VocaluxeLib;
|
||||||
using VocaluxeLib.Menu;
|
using VocaluxeLib.Menu;
|
||||||
|
|
||||||
namespace Vocaluxe.Screens
|
namespace Vocaluxe.Screens
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ using System.Drawing.Imaging;
|
|||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
using Vocaluxe.Base;
|
using Vocaluxe.Base;
|
||||||
|
using VocaluxeLib;
|
||||||
using VocaluxeLib.Menu;
|
using VocaluxeLib.Menu;
|
||||||
|
|
||||||
namespace Vocaluxe.Screens
|
namespace Vocaluxe.Screens
|
||||||
|
|||||||
@@ -22,8 +22,10 @@ using System.Collections.Generic;
|
|||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
using Vocaluxe.Base;
|
using Vocaluxe.Base;
|
||||||
|
using VocaluxeLib;
|
||||||
|
using VocaluxeLib.Game;
|
||||||
using VocaluxeLib.Menu;
|
using VocaluxeLib.Menu;
|
||||||
using VocaluxeLib.Menu.SongMenu;
|
using VocaluxeLib.Songs;
|
||||||
|
|
||||||
namespace Vocaluxe.Screens
|
namespace Vocaluxe.Screens
|
||||||
{
|
{
|
||||||
@@ -331,7 +333,7 @@ namespace Vocaluxe.Screens
|
|||||||
_Statics[_StaticPointsBarBG[p, CGame.NumPlayer - 1]].Rect.Y -
|
_Statics[_StaticPointsBarBG[p, CGame.NumPlayer - 1]].Rect.Y -
|
||||||
_Statics[_StaticPointsBar[p, CGame.NumPlayer - 1]].Rect.H;
|
_Statics[_StaticPointsBar[p, CGame.NumPlayer - 1]].Rect.H;
|
||||||
}
|
}
|
||||||
if (CProfiles.IsProfileIDValid(players[p].ProfileID))
|
if (CProfiles.ICProfileIDValid(players[p].ProfileID))
|
||||||
_Statics[_StaticAvatar[p, CGame.NumPlayer - 1]].Texture = CProfiles.Profiles[players[p].ProfileID].Avatar.Texture;
|
_Statics[_StaticAvatar[p, CGame.NumPlayer - 1]].Texture = CProfiles.Profiles[players[p].ProfileID].Avatar.Texture;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -26,9 +26,11 @@ using System.Linq;
|
|||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
using Vocaluxe.Base;
|
using Vocaluxe.Base;
|
||||||
using Vocaluxe.Base.Font;
|
using Vocaluxe.Base.Font;
|
||||||
|
using VocaluxeLib;
|
||||||
using VocaluxeLib.Menu;
|
using VocaluxeLib.Menu;
|
||||||
using VocaluxeLib.Menu.SingNotes;
|
using VocaluxeLib.Menu.SingNotes;
|
||||||
using VocaluxeLib.Menu.SongMenu;
|
using VocaluxeLib.Menu.SongMenu;
|
||||||
|
using VocaluxeLib.Songs;
|
||||||
|
|
||||||
namespace Vocaluxe.Screens
|
namespace Vocaluxe.Screens
|
||||||
{
|
{
|
||||||
@@ -1381,7 +1383,7 @@ namespace Vocaluxe.Screens
|
|||||||
{
|
{
|
||||||
for (int i = 0; i < CGame.NumPlayer; i++)
|
for (int i = 0; i < CGame.NumPlayer; i++)
|
||||||
{
|
{
|
||||||
if (CProfiles.IsProfileIDValid(CGame.Players[i].ProfileID))
|
if (CProfiles.ICProfileIDValid(CGame.Players[i].ProfileID))
|
||||||
_Statics[_StaticAvatars[i, CGame.NumPlayer - 1]].Texture = CProfiles.Profiles[CGame.Players[i].ProfileID].Avatar.Texture;
|
_Statics[_StaticAvatars[i, CGame.NumPlayer - 1]].Texture = CProfiles.Profiles[CGame.Players[i].ProfileID].Avatar.Texture;
|
||||||
else
|
else
|
||||||
_Statics[_StaticAvatars[i, CGame.NumPlayer - 1]].Visible = false;
|
_Statics[_StaticAvatars[i, CGame.NumPlayer - 1]].Visible = false;
|
||||||
@@ -1392,7 +1394,7 @@ namespace Vocaluxe.Screens
|
|||||||
{
|
{
|
||||||
for (int i = 0; i < CGame.NumPlayer; i++)
|
for (int i = 0; i < CGame.NumPlayer; i++)
|
||||||
{
|
{
|
||||||
if (CProfiles.IsProfileIDValid(CGame.Players[i].ProfileID))
|
if (CProfiles.ICProfileIDValid(CGame.Players[i].ProfileID))
|
||||||
_Texts[_TextNames[i, CGame.NumPlayer - 1]].Text = CProfiles.Profiles[CGame.Players[i].ProfileID].PlayerName;
|
_Texts[_TextNames[i, CGame.NumPlayer - 1]].Text = CProfiles.Profiles[CGame.Players[i].ProfileID].PlayerName;
|
||||||
else
|
else
|
||||||
_Texts[_TextNames[i, CGame.NumPlayer - 1]].Visible = false;
|
_Texts[_TextNames[i, CGame.NumPlayer - 1]].Visible = false;
|
||||||
|
|||||||
@@ -22,9 +22,11 @@ using System.Collections.Generic;
|
|||||||
using System.Collections.ObjectModel;
|
using System.Collections.ObjectModel;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
using Vocaluxe.Base;
|
using Vocaluxe.Base;
|
||||||
|
using VocaluxeLib;
|
||||||
using VocaluxeLib.Menu;
|
using VocaluxeLib.Menu;
|
||||||
using VocaluxeLib.Menu.SongMenu;
|
using VocaluxeLib.Menu.SongMenu;
|
||||||
using VocaluxeLib.PartyModes;
|
using VocaluxeLib.PartyModes;
|
||||||
|
using VocaluxeLib.Songs;
|
||||||
|
|
||||||
namespace Vocaluxe.Screens
|
namespace Vocaluxe.Screens
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -20,6 +20,7 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
using Vocaluxe.Base;
|
using Vocaluxe.Base;
|
||||||
|
using VocaluxeLib;
|
||||||
using VocaluxeLib.Menu;
|
using VocaluxeLib.Menu;
|
||||||
|
|
||||||
namespace Vocaluxe.Screens
|
namespace Vocaluxe.Screens
|
||||||
|
|||||||
@@ -20,8 +20,9 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using Vocaluxe.Base;
|
using Vocaluxe.Base;
|
||||||
using Vocaluxe.GameModes;
|
using Vocaluxe.GameModes;
|
||||||
using VocaluxeLib.Menu;
|
using VocaluxeLib;
|
||||||
using VocaluxeLib.Menu.SongMenu;
|
using VocaluxeLib.Game;
|
||||||
|
using VocaluxeLib.Songs;
|
||||||
|
|
||||||
namespace Vocaluxe.SongQueue
|
namespace Vocaluxe.SongQueue
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -17,8 +17,9 @@
|
|||||||
// */
|
// */
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
using VocaluxeLib.Menu;
|
using VocaluxeLib;
|
||||||
using VocaluxeLib.Menu.SongMenu;
|
using VocaluxeLib.Game;
|
||||||
|
using VocaluxeLib.Songs;
|
||||||
|
|
||||||
namespace Vocaluxe.SongQueue
|
namespace Vocaluxe.SongQueue
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -17,7 +17,9 @@
|
|||||||
// */
|
// */
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
namespace VocaluxeLib.Menu
|
using VocaluxeLib.Menu;
|
||||||
|
|
||||||
|
namespace VocaluxeLib
|
||||||
{
|
{
|
||||||
public static class CBase
|
public static class CBase
|
||||||
{
|
{
|
||||||
@@ -24,7 +24,7 @@ using System.Globalization;
|
|||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
|
||||||
namespace VocaluxeLib.Menu
|
namespace VocaluxeLib
|
||||||
{
|
{
|
||||||
public static class CHelper
|
public static class CHelper
|
||||||
{
|
{
|
||||||
@@ -21,7 +21,7 @@ using System;
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Xml.XPath;
|
using System.Xml.XPath;
|
||||||
|
|
||||||
namespace VocaluxeLib.Menu
|
namespace VocaluxeLib
|
||||||
{
|
{
|
||||||
public class CXMLReader
|
public class CXMLReader
|
||||||
{
|
{
|
||||||
@@ -19,7 +19,7 @@
|
|||||||
|
|
||||||
using System;
|
using System;
|
||||||
|
|
||||||
namespace VocaluxeLib.Menu
|
namespace VocaluxeLib
|
||||||
{
|
{
|
||||||
|
|
||||||
#region Inputs
|
#region Inputs
|
||||||
@@ -19,7 +19,7 @@
|
|||||||
|
|
||||||
using System;
|
using System;
|
||||||
|
|
||||||
namespace VocaluxeLib.Menu
|
namespace VocaluxeLib.Game
|
||||||
{
|
{
|
||||||
public class CPoints
|
public class CPoints
|
||||||
{
|
{
|
||||||
@@ -0,0 +1,286 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Collections.ObjectModel;
|
||||||
|
using System.Drawing;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
|
||||||
|
using VocaluxeLib.Game;
|
||||||
|
using VocaluxeLib.Menu;
|
||||||
|
using VocaluxeLib.PartyModes;
|
||||||
|
using VocaluxeLib.Profile;
|
||||||
|
using VocaluxeLib.Songs;
|
||||||
|
|
||||||
|
namespace VocaluxeLib
|
||||||
|
{
|
||||||
|
public interface IMenuParty
|
||||||
|
{
|
||||||
|
void SetPartyModeID(int partyModeID);
|
||||||
|
int GetPartyModeID();
|
||||||
|
|
||||||
|
void AssingPartyMode(IPartyMode partyMode);
|
||||||
|
void DataToScreen(Object data);
|
||||||
|
}
|
||||||
|
|
||||||
|
public interface IConfig
|
||||||
|
{
|
||||||
|
void SetBackgroundMusicVolume(int newVolume);
|
||||||
|
int GetBackgroundMusicVolume();
|
||||||
|
|
||||||
|
int GetPreviewMusicVolume();
|
||||||
|
|
||||||
|
EOffOn GetVideosToBackground();
|
||||||
|
EOffOn GetVideoBackgrounds();
|
||||||
|
EOffOn GetVideoPreview();
|
||||||
|
|
||||||
|
ESongMenu GetSongMenuType();
|
||||||
|
|
||||||
|
EOffOn GetDrawNoteLines();
|
||||||
|
EOffOn GetDrawToneHelper();
|
||||||
|
|
||||||
|
int GetCoverSize();
|
||||||
|
|
||||||
|
IEnumerable<string> GetSongFolder();
|
||||||
|
ESongSorting GetSongSorting();
|
||||||
|
EOffOn GetTabs();
|
||||||
|
EOffOn GetIgnoreArticles();
|
||||||
|
|
||||||
|
bool IsMicConfigured(int playerNr);
|
||||||
|
int GetMaxNumMics();
|
||||||
|
}
|
||||||
|
|
||||||
|
public interface ISettings
|
||||||
|
{
|
||||||
|
int GetRenderW();
|
||||||
|
int GetRenderH();
|
||||||
|
bool IsTabNavigation();
|
||||||
|
|
||||||
|
float GetZFar();
|
||||||
|
float GetZNear();
|
||||||
|
|
||||||
|
EGameState GetGameState();
|
||||||
|
|
||||||
|
int GetToneMin();
|
||||||
|
int GetToneMax();
|
||||||
|
|
||||||
|
int GetNumNoteLines();
|
||||||
|
int GetMaxNumPlayer();
|
||||||
|
|
||||||
|
float GetDefaultMedleyFadeInTime();
|
||||||
|
float GetDefaultMedleyFadeOutTime();
|
||||||
|
int GetMedleyMinSeriesLength();
|
||||||
|
float GetMedleyMinDuration();
|
||||||
|
}
|
||||||
|
|
||||||
|
public interface ITheme
|
||||||
|
{
|
||||||
|
string GetThemeScreensPath(int partyModeID);
|
||||||
|
int GetSkinIndex(int partyModeID);
|
||||||
|
STexture GetSkinTexture(string textureName, int partyModeID);
|
||||||
|
STexture GetSkinVideoTexture(string videoName, int partyModeID);
|
||||||
|
|
||||||
|
void SkinVideoResume(string videoName, int partyModeID);
|
||||||
|
void SkinVideoPause(string videoName, int partyModeID);
|
||||||
|
|
||||||
|
SColorF GetColor(string colorName, int partyModeID);
|
||||||
|
bool GetColor(string colorName, int skinIndex, out SColorF color);
|
||||||
|
SColorF GetPlayerColor(int playerNr);
|
||||||
|
|
||||||
|
void UnloadSkins();
|
||||||
|
void ListSkins();
|
||||||
|
void LoadSkins();
|
||||||
|
void LoadTheme();
|
||||||
|
}
|
||||||
|
|
||||||
|
public interface IBackgroundMusic
|
||||||
|
{
|
||||||
|
bool IsDisabled();
|
||||||
|
bool IsPlaying();
|
||||||
|
bool SongHasVideo();
|
||||||
|
bool VideoEnabled();
|
||||||
|
|
||||||
|
void SetStatus(bool disabled);
|
||||||
|
void Next();
|
||||||
|
void Previous();
|
||||||
|
void Pause();
|
||||||
|
void Play();
|
||||||
|
|
||||||
|
void ApplyVolume();
|
||||||
|
|
||||||
|
STexture GetVideoTexture();
|
||||||
|
}
|
||||||
|
|
||||||
|
public interface IDrawing
|
||||||
|
{
|
||||||
|
RectangleF GetTextBounds(CText text);
|
||||||
|
|
||||||
|
void DrawTexture(STexture texture, SRectF rect);
|
||||||
|
void DrawTexture(STexture texture, SRectF rect, SColorF color);
|
||||||
|
void DrawTexture(STexture texture, SRectF rect, SColorF color, SRectF bounds);
|
||||||
|
void DrawTexture(STexture texture, SRectF rect, SColorF color, SRectF bounds, bool mirrored);
|
||||||
|
void DrawTextureReflection(STexture texture, SRectF rect, SColorF color, SRectF bounds, float reflectionSpace, float reflectionHeight);
|
||||||
|
|
||||||
|
STexture AddTexture(string fileName);
|
||||||
|
void RemoveTexture(ref STexture texture);
|
||||||
|
|
||||||
|
void DrawColor(SColorF color, SRectF rect);
|
||||||
|
void DrawColorReflection(SColorF color, SRectF rect, float space, float height);
|
||||||
|
}
|
||||||
|
|
||||||
|
public interface IGraphics
|
||||||
|
{
|
||||||
|
void ReloadTheme();
|
||||||
|
void SaveTheme();
|
||||||
|
void FadeTo(EScreens nextScreen);
|
||||||
|
|
||||||
|
float GetGlobalAlpha();
|
||||||
|
}
|
||||||
|
|
||||||
|
public interface ILog
|
||||||
|
{
|
||||||
|
void LogError(string errorText);
|
||||||
|
}
|
||||||
|
|
||||||
|
public interface IFonts
|
||||||
|
{
|
||||||
|
void SetFont(string fontName);
|
||||||
|
void SetStyle(EStyle fontStyle);
|
||||||
|
|
||||||
|
RectangleF GetTextBounds(CText text, float textHeight);
|
||||||
|
|
||||||
|
void DrawText(string text, float textHeight, float x, float y, float z, SColorF color);
|
||||||
|
void DrawTextReflection(string text, float textHeight, float x, float y, float z, SColorF color, float reflectionSpace, float reflectionHeight);
|
||||||
|
void DrawText(string text, float textHeight, float x, float y, float z, SColorF color, float begin, float end);
|
||||||
|
}
|
||||||
|
|
||||||
|
public interface ILanguage
|
||||||
|
{
|
||||||
|
string Translate(string keyWord);
|
||||||
|
string Translate(string keyWord, int partyModeID);
|
||||||
|
bool TranslationExists(string keyWord);
|
||||||
|
}
|
||||||
|
|
||||||
|
public interface IGame
|
||||||
|
{
|
||||||
|
int GetNumPlayer();
|
||||||
|
void SetNumPlayer(int numPlayer);
|
||||||
|
SPlayer[] GetPlayers();
|
||||||
|
CPoints GetPoints();
|
||||||
|
float GetMidBeatD();
|
||||||
|
int GetCurrentBeatD();
|
||||||
|
|
||||||
|
int GetRandom(int max);
|
||||||
|
double GetRandomDouble();
|
||||||
|
|
||||||
|
float GetTimeFromBeats(float beat, float bpm);
|
||||||
|
|
||||||
|
void AddSong(int songID, EGameMode gameMode);
|
||||||
|
void Reset();
|
||||||
|
void ClearSongs();
|
||||||
|
int GetNumSongs();
|
||||||
|
}
|
||||||
|
|
||||||
|
public interface IRecording
|
||||||
|
{
|
||||||
|
int GetToneAbs(int playerNr);
|
||||||
|
}
|
||||||
|
|
||||||
|
public interface IProfiles
|
||||||
|
{
|
||||||
|
CProfile[] GetProfiles();
|
||||||
|
EGameDifficulty GetDifficulty(int profileID);
|
||||||
|
string GetPlayerName(int profileID, int playerNum = 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
public interface ISongs
|
||||||
|
{
|
||||||
|
int GetNumSongs();
|
||||||
|
int GetNumSongsVisible();
|
||||||
|
int GetNumCategories();
|
||||||
|
int NumSongsInCategory(int categoryIndex);
|
||||||
|
bool IsInCategory();
|
||||||
|
|
||||||
|
int GetCurrentCategoryIndex();
|
||||||
|
EOffOn GetTabs();
|
||||||
|
string GetSearchFilter();
|
||||||
|
|
||||||
|
void SetCategory(int categoryIndex);
|
||||||
|
void UpdateRandomSongList();
|
||||||
|
|
||||||
|
CSong GetVisibleSong(int visibleIndex);
|
||||||
|
CSong GetSongByID(int songID);
|
||||||
|
ReadOnlyCollection<CSong> GetVisibleSongs();
|
||||||
|
CCategory GetCategory(int index);
|
||||||
|
|
||||||
|
void AddPartySongSung(int songID);
|
||||||
|
void ResetSongSung(int catIndex = -1);
|
||||||
|
|
||||||
|
void SortSongs(ESongSorting sorting, EOffOn tabs, EOffOn ignoreArticles, String searchString, EDuetOptions duetOptions);
|
||||||
|
|
||||||
|
void NextCategory();
|
||||||
|
void PrevCategory();
|
||||||
|
}
|
||||||
|
|
||||||
|
public interface IVideo
|
||||||
|
{
|
||||||
|
int Load(string videoFileName);
|
||||||
|
bool Skip(int videoStream, float startPosition, float videoGap);
|
||||||
|
bool GetFrame(int videoStream, ref STexture videoTexture, float time, out float videoTime);
|
||||||
|
bool IsFinished(int videoStream);
|
||||||
|
bool Close(int videoStream);
|
||||||
|
}
|
||||||
|
|
||||||
|
public interface ISound
|
||||||
|
{
|
||||||
|
int Load(string soundFile, bool prescan);
|
||||||
|
void SetPosition(int soundStream, float newPosition);
|
||||||
|
void Play(int soundStream);
|
||||||
|
void Fade(int soundStream, float targetVolume, float duration);
|
||||||
|
|
||||||
|
bool IsFinished(int soundStream);
|
||||||
|
float GetPosition(int soundStream);
|
||||||
|
float GetLength(int soundStream);
|
||||||
|
void FadeAndStop(int soundStream, float targetVolume, float duration);
|
||||||
|
|
||||||
|
void SetStreamVolume(int soundStream, float volume);
|
||||||
|
void SetStreamVolumeMax(int soundStream, float maxVolume);
|
||||||
|
}
|
||||||
|
|
||||||
|
public interface ICover
|
||||||
|
{
|
||||||
|
STexture GetNoCover();
|
||||||
|
}
|
||||||
|
|
||||||
|
public interface IDataBase
|
||||||
|
{
|
||||||
|
bool GetCover(string fileName, ref STexture texture, int coverSize);
|
||||||
|
}
|
||||||
|
|
||||||
|
public interface IControllers
|
||||||
|
{
|
||||||
|
void SetRumble(float duration);
|
||||||
|
}
|
||||||
|
|
||||||
|
public interface IPlaylist
|
||||||
|
{
|
||||||
|
string GetPlaylistName(int playlistID);
|
||||||
|
List<string> GetPlaylistNames();
|
||||||
|
|
||||||
|
void SetPlaylistName(int playlistID, string name);
|
||||||
|
void DeletePlaylist(int playlistID);
|
||||||
|
void SavePlaylist(int playlistID);
|
||||||
|
int GetNumPlaylists();
|
||||||
|
|
||||||
|
void AddPlaylistSong(int playlistID, int songID);
|
||||||
|
void AddPlaylistSong(int playlistID, int songID, EGameMode gameMode);
|
||||||
|
void InsertPlaylistSong(int playlistID, int positionIndex, int songID, EGameMode gameMode);
|
||||||
|
|
||||||
|
void MovePlaylistSong(int playlistID, int sourceIndex, int destIndex);
|
||||||
|
void MovePlaylistSongDown(int playlistID, int songIndex);
|
||||||
|
void MovePlaylistSongUp(int playlistID, int songIndex);
|
||||||
|
void DeletePlaylistSong(int playlistID, int songIndex);
|
||||||
|
|
||||||
|
int GetPlaylistSongCount(int playlistID);
|
||||||
|
CPlaylistSong GetPlaylistSong(int playlistID, int songIndex);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -21,7 +21,7 @@ using System;
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
using System.Xml;
|
using System.Xml;
|
||||||
using VocaluxeLib.Menu.SingNotes;
|
using VocaluxeLib.Songs;
|
||||||
|
|
||||||
namespace VocaluxeLib.Menu
|
namespace VocaluxeLib.Menu
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ using System.Collections.Generic;
|
|||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
using System.Xml;
|
using System.Xml;
|
||||||
using VocaluxeLib.Menu.SongMenu;
|
using VocaluxeLib.Menu.SongMenu;
|
||||||
|
using VocaluxeLib.Songs;
|
||||||
|
|
||||||
namespace VocaluxeLib.Menu
|
namespace VocaluxeLib.Menu
|
||||||
{
|
{
|
||||||
|
|||||||
+4
-270
@@ -21,8 +21,12 @@ using System;
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Collections.ObjectModel;
|
using System.Collections.ObjectModel;
|
||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
|
using VocaluxeLib;
|
||||||
|
using VocaluxeLib.Game;
|
||||||
using VocaluxeLib.Menu.SongMenu;
|
using VocaluxeLib.Menu.SongMenu;
|
||||||
using VocaluxeLib.PartyModes;
|
using VocaluxeLib.PartyModes;
|
||||||
|
using VocaluxeLib.Profile;
|
||||||
|
using VocaluxeLib.Songs;
|
||||||
|
|
||||||
namespace VocaluxeLib.Menu
|
namespace VocaluxeLib.Menu
|
||||||
{
|
{
|
||||||
@@ -59,274 +63,4 @@ namespace VocaluxeLib.Menu
|
|||||||
void ProcessMouseClick(int x, int y);
|
void ProcessMouseClick(int x, int y);
|
||||||
void ProcessMouseMove(int x, int y);
|
void ProcessMouseMove(int x, int y);
|
||||||
}
|
}
|
||||||
|
|
||||||
public interface IMenuParty
|
|
||||||
{
|
|
||||||
void SetPartyModeID(int partyModeID);
|
|
||||||
int GetPartyModeID();
|
|
||||||
|
|
||||||
void AssingPartyMode(IPartyMode partyMode);
|
|
||||||
void DataToScreen(Object data);
|
|
||||||
}
|
|
||||||
|
|
||||||
public interface IConfig
|
|
||||||
{
|
|
||||||
void SetBackgroundMusicVolume(int newVolume);
|
|
||||||
int GetBackgroundMusicVolume();
|
|
||||||
|
|
||||||
int GetPreviewMusicVolume();
|
|
||||||
|
|
||||||
EOffOn GetVideosToBackground();
|
|
||||||
EOffOn GetVideoBackgrounds();
|
|
||||||
EOffOn GetVideoPreview();
|
|
||||||
|
|
||||||
ESongMenu GetSongMenuType();
|
|
||||||
|
|
||||||
EOffOn GetDrawNoteLines();
|
|
||||||
EOffOn GetDrawToneHelper();
|
|
||||||
|
|
||||||
int GetCoverSize();
|
|
||||||
|
|
||||||
IEnumerable<string> GetSongFolder();
|
|
||||||
ESongSorting GetSongSorting();
|
|
||||||
EOffOn GetTabs();
|
|
||||||
EOffOn GetIgnoreArticles();
|
|
||||||
|
|
||||||
bool IsMicConfigured(int playerNr);
|
|
||||||
int GetMaxNumMics();
|
|
||||||
}
|
|
||||||
|
|
||||||
public interface ISettings
|
|
||||||
{
|
|
||||||
int GetRenderW();
|
|
||||||
int GetRenderH();
|
|
||||||
bool IsTabNavigation();
|
|
||||||
|
|
||||||
float GetZFar();
|
|
||||||
float GetZNear();
|
|
||||||
|
|
||||||
EGameState GetGameState();
|
|
||||||
|
|
||||||
int GetToneMin();
|
|
||||||
int GetToneMax();
|
|
||||||
|
|
||||||
int GetNumNoteLines();
|
|
||||||
int GetMaxNumPlayer();
|
|
||||||
|
|
||||||
float GetDefaultMedleyFadeInTime();
|
|
||||||
float GetDefaultMedleyFadeOutTime();
|
|
||||||
int GetMedleyMinSeriesLength();
|
|
||||||
float GetMedleyMinDuration();
|
|
||||||
}
|
|
||||||
|
|
||||||
public interface ITheme
|
|
||||||
{
|
|
||||||
string GetThemeScreensPath(int partyModeID);
|
|
||||||
int GetSkinIndex(int partyModeID);
|
|
||||||
STexture GetSkinTexture(string textureName, int partyModeID);
|
|
||||||
STexture GetSkinVideoTexture(string videoName, int partyModeID);
|
|
||||||
|
|
||||||
void SkinVideoResume(string videoName, int partyModeID);
|
|
||||||
void SkinVideoPause(string videoName, int partyModeID);
|
|
||||||
|
|
||||||
SColorF GetColor(string colorName, int partyModeID);
|
|
||||||
bool GetColor(string colorName, int skinIndex, out SColorF color);
|
|
||||||
SColorF GetPlayerColor(int playerNr);
|
|
||||||
|
|
||||||
void UnloadSkins();
|
|
||||||
void ListSkins();
|
|
||||||
void LoadSkins();
|
|
||||||
void LoadTheme();
|
|
||||||
}
|
|
||||||
|
|
||||||
public interface IBackgroundMusic
|
|
||||||
{
|
|
||||||
bool IsDisabled();
|
|
||||||
bool IsPlaying();
|
|
||||||
bool SongHasVideo();
|
|
||||||
bool VideoEnabled();
|
|
||||||
|
|
||||||
void SetStatus(bool disabled);
|
|
||||||
void Next();
|
|
||||||
void Previous();
|
|
||||||
void Pause();
|
|
||||||
void Play();
|
|
||||||
|
|
||||||
void ApplyVolume();
|
|
||||||
|
|
||||||
STexture GetVideoTexture();
|
|
||||||
}
|
|
||||||
|
|
||||||
public interface IDrawing
|
|
||||||
{
|
|
||||||
RectangleF GetTextBounds(CText text);
|
|
||||||
|
|
||||||
void DrawTexture(STexture texture, SRectF rect);
|
|
||||||
void DrawTexture(STexture texture, SRectF rect, SColorF color);
|
|
||||||
void DrawTexture(STexture texture, SRectF rect, SColorF color, SRectF bounds);
|
|
||||||
void DrawTexture(STexture texture, SRectF rect, SColorF color, SRectF bounds, bool mirrored);
|
|
||||||
void DrawTextureReflection(STexture texture, SRectF rect, SColorF color, SRectF bounds, float reflectionSpace, float reflectionHeight);
|
|
||||||
|
|
||||||
void RemoveTexture(ref STexture texture);
|
|
||||||
|
|
||||||
void DrawColor(SColorF color, SRectF rect);
|
|
||||||
void DrawColorReflection(SColorF color, SRectF rect, float space, float height);
|
|
||||||
}
|
|
||||||
|
|
||||||
public interface IGraphics
|
|
||||||
{
|
|
||||||
void ReloadTheme();
|
|
||||||
void SaveTheme();
|
|
||||||
void FadeTo(EScreens nextScreen);
|
|
||||||
|
|
||||||
float GetGlobalAlpha();
|
|
||||||
}
|
|
||||||
|
|
||||||
public interface ILog
|
|
||||||
{
|
|
||||||
void LogError(string errorText);
|
|
||||||
}
|
|
||||||
|
|
||||||
public interface IFonts
|
|
||||||
{
|
|
||||||
void SetFont(string fontName);
|
|
||||||
void SetStyle(EStyle fontStyle);
|
|
||||||
|
|
||||||
RectangleF GetTextBounds(CText text, float textHeight);
|
|
||||||
|
|
||||||
void DrawText(string text, float textHeight, float x, float y, float z, SColorF color);
|
|
||||||
void DrawTextReflection(string text, float textHeight, float x, float y, float z, SColorF color, float reflectionSpace, float reflectionHeight);
|
|
||||||
void DrawText(string text, float textHeight, float x, float y, float z, SColorF color, float begin, float end);
|
|
||||||
}
|
|
||||||
|
|
||||||
public interface ILanguage
|
|
||||||
{
|
|
||||||
string Translate(string keyWord);
|
|
||||||
string Translate(string keyWord, int partyModeID);
|
|
||||||
bool TranslationExists(string keyWord);
|
|
||||||
}
|
|
||||||
|
|
||||||
public interface IGame
|
|
||||||
{
|
|
||||||
int GetNumPlayer();
|
|
||||||
void SetNumPlayer(int numPlayer);
|
|
||||||
SPlayer[] GetPlayers();
|
|
||||||
CPoints GetPoints();
|
|
||||||
float GetMidBeatD();
|
|
||||||
int GetCurrentBeatD();
|
|
||||||
|
|
||||||
int GetRandom(int max);
|
|
||||||
double GetRandomDouble();
|
|
||||||
|
|
||||||
float GetTimeFromBeats(float beat, float bpm);
|
|
||||||
|
|
||||||
void AddSong(int songID, EGameMode gameMode);
|
|
||||||
void Reset();
|
|
||||||
void ClearSongs();
|
|
||||||
int GetNumSongs();
|
|
||||||
}
|
|
||||||
|
|
||||||
public interface IRecording
|
|
||||||
{
|
|
||||||
int GetToneAbs(int playerNr);
|
|
||||||
}
|
|
||||||
|
|
||||||
public interface IProfiles
|
|
||||||
{
|
|
||||||
SProfile[] GetProfiles();
|
|
||||||
EGameDifficulty GetDifficulty(int profileID);
|
|
||||||
string GetPlayerName(int profileID, int playerNum = 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
public interface ISongs
|
|
||||||
{
|
|
||||||
int GetNumSongs();
|
|
||||||
int GetNumSongsVisible();
|
|
||||||
int GetNumCategories();
|
|
||||||
int NumSongsInCategory(int categoryIndex);
|
|
||||||
bool IsInCategory();
|
|
||||||
|
|
||||||
int GetCurrentCategoryIndex();
|
|
||||||
EOffOn GetTabs();
|
|
||||||
string GetSearchFilter();
|
|
||||||
|
|
||||||
void SetCategory(int categoryIndex);
|
|
||||||
void UpdateRandomSongList();
|
|
||||||
|
|
||||||
CSong GetVisibleSong(int visibleIndex);
|
|
||||||
CSong GetSongByID(int songID);
|
|
||||||
ReadOnlyCollection<CSong> GetVisibleSongs();
|
|
||||||
CCategory GetCategory(int index);
|
|
||||||
|
|
||||||
void AddPartySongSung(int songID);
|
|
||||||
void ResetSongSung(int catIndex = -1);
|
|
||||||
|
|
||||||
void SortSongs(ESongSorting sorting, EOffOn tabs, EOffOn ignoreArticles, String searchString, EDuetOptions duetOptions);
|
|
||||||
|
|
||||||
void NextCategory();
|
|
||||||
void PrevCategory();
|
|
||||||
}
|
|
||||||
|
|
||||||
public interface IVideo
|
|
||||||
{
|
|
||||||
int Load(string videoFileName);
|
|
||||||
bool Skip(int videoStream, float startPosition, float videoGap);
|
|
||||||
bool GetFrame(int videoStream, ref STexture videoTexture, float time, out float videoTime);
|
|
||||||
bool IsFinished(int videoStream);
|
|
||||||
bool Close(int videoStream);
|
|
||||||
}
|
|
||||||
|
|
||||||
public interface ISound
|
|
||||||
{
|
|
||||||
int Load(string soundFile, bool prescan);
|
|
||||||
void SetPosition(int soundStream, float newPosition);
|
|
||||||
void Play(int soundStream);
|
|
||||||
void Fade(int soundStream, float targetVolume, float duration);
|
|
||||||
|
|
||||||
bool IsFinished(int soundStream);
|
|
||||||
float GetPosition(int soundStream);
|
|
||||||
float GetLength(int soundStream);
|
|
||||||
void FadeAndStop(int soundStream, float targetVolume, float duration);
|
|
||||||
|
|
||||||
void SetStreamVolume(int soundStream, float volume);
|
|
||||||
void SetStreamVolumeMax(int soundStream, float maxVolume);
|
|
||||||
}
|
|
||||||
|
|
||||||
public interface ICover
|
|
||||||
{
|
|
||||||
STexture GetNoCover();
|
|
||||||
}
|
|
||||||
|
|
||||||
public interface IDataBase
|
|
||||||
{
|
|
||||||
bool GetCover(string fileName, ref STexture texture, int coverSize);
|
|
||||||
}
|
|
||||||
|
|
||||||
public interface IControllers
|
|
||||||
{
|
|
||||||
void SetRumble(float duration);
|
|
||||||
}
|
|
||||||
|
|
||||||
public interface IPlaylist
|
|
||||||
{
|
|
||||||
string GetPlaylistName(int playlistID);
|
|
||||||
List<string> GetPlaylistNames();
|
|
||||||
|
|
||||||
void SetPlaylistName(int playlistID, string name);
|
|
||||||
void DeletePlaylist(int playlistID);
|
|
||||||
void SavePlaylist(int playlistID);
|
|
||||||
int GetNumPlaylists();
|
|
||||||
|
|
||||||
void AddPlaylistSong(int playlistID, int songID);
|
|
||||||
void AddPlaylistSong(int playlistID, int songID, EGameMode gameMode);
|
|
||||||
void InsertPlaylistSong(int playlistID, int positionIndex, int songID, EGameMode gameMode);
|
|
||||||
|
|
||||||
void MovePlaylistSong(int playlistID, int sourceIndex, int destIndex);
|
|
||||||
void MovePlaylistSongDown(int playlistID, int songIndex);
|
|
||||||
void MovePlaylistSongUp(int playlistID, int songIndex);
|
|
||||||
void DeletePlaylistSong(int playlistID, int songIndex);
|
|
||||||
|
|
||||||
int GetPlaylistSongCount(int playlistID);
|
|
||||||
CPlaylistSong GetPlaylistSong(int playlistID, int songIndex);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -22,6 +22,8 @@ using System.Collections.Generic;
|
|||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using System.Xml;
|
using System.Xml;
|
||||||
|
|
||||||
|
using VocaluxeLib.Songs;
|
||||||
|
|
||||||
namespace VocaluxeLib.Menu.SingNotes
|
namespace VocaluxeLib.Menu.SingNotes
|
||||||
{
|
{
|
||||||
struct SPlayerNotes
|
struct SPlayerNotes
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ using System.Drawing;
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
using VocaluxeLib.PartyModes;
|
using VocaluxeLib.PartyModes;
|
||||||
|
using VocaluxeLib.Songs;
|
||||||
|
|
||||||
namespace VocaluxeLib.Menu.SongMenu
|
namespace VocaluxeLib.Menu.SongMenu
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -0,0 +1,42 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
|
||||||
|
using VocaluxeLib.Menu;
|
||||||
|
|
||||||
|
namespace VocaluxeLib.Profile
|
||||||
|
{
|
||||||
|
public class CAvatar
|
||||||
|
{
|
||||||
|
private int _ID;
|
||||||
|
|
||||||
|
public int ID
|
||||||
|
{
|
||||||
|
get { return _ID; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public string FileName;
|
||||||
|
public STexture Texture;
|
||||||
|
|
||||||
|
public CAvatar(int ID)
|
||||||
|
{
|
||||||
|
_ID = ID;
|
||||||
|
FileName = String.Empty;
|
||||||
|
Texture = new STexture(-1);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void LoadFromFile(string NewFileName)
|
||||||
|
{
|
||||||
|
FileName = NewFileName;
|
||||||
|
CBase.Drawing.RemoveTexture(ref Texture);
|
||||||
|
Texture = CBase.Drawing.AddTexture(FileName);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Reload()
|
||||||
|
{
|
||||||
|
CBase.Drawing.RemoveTexture(ref Texture);
|
||||||
|
Texture = CBase.Drawing.AddTexture(FileName);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,118 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.IO;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Xml;
|
||||||
|
|
||||||
|
namespace VocaluxeLib.Profile
|
||||||
|
{
|
||||||
|
public class CProfile
|
||||||
|
{
|
||||||
|
private static readonly XmlWriterSettings _Settings = new XmlWriterSettings()
|
||||||
|
{
|
||||||
|
Indent = true,
|
||||||
|
Encoding = Encoding.UTF8,
|
||||||
|
ConformanceLevel = ConformanceLevel.Document
|
||||||
|
};
|
||||||
|
|
||||||
|
private int _ID;
|
||||||
|
private int _AvatarID;
|
||||||
|
|
||||||
|
public int ID
|
||||||
|
{
|
||||||
|
get { return _ID; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public string PlayerName;
|
||||||
|
public string FileName;
|
||||||
|
public string AvatarFileName;
|
||||||
|
|
||||||
|
public EGameDifficulty Difficulty;
|
||||||
|
public CAvatar Avatar; //should be removed! use avatar id
|
||||||
|
|
||||||
|
public EOffOn GuestProfile;
|
||||||
|
public EOffOn Active;
|
||||||
|
|
||||||
|
public CProfile()
|
||||||
|
{
|
||||||
|
PlayerName = String.Empty;
|
||||||
|
Difficulty = EGameDifficulty.TR_CONFIG_EASY;
|
||||||
|
Avatar = new CAvatar(-1);
|
||||||
|
GuestProfile = EOffOn.TR_CONFIG_OFF;
|
||||||
|
Active = EOffOn.TR_CONFIG_ON;
|
||||||
|
|
||||||
|
AvatarFileName = String.Empty;
|
||||||
|
FileName = String.Empty;
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool LoadProfile()
|
||||||
|
{
|
||||||
|
return LoadProfile(FileName);
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool LoadProfile(string NewFileName)
|
||||||
|
{
|
||||||
|
FileName = NewFileName;
|
||||||
|
|
||||||
|
CXMLReader xmlReader = CXMLReader.OpenFile(FileName);
|
||||||
|
if (xmlReader == null)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
string value = String.Empty;
|
||||||
|
if (xmlReader.GetValue("//root/Info/PlayerName", out value, value))
|
||||||
|
{
|
||||||
|
PlayerName = value;
|
||||||
|
|
||||||
|
xmlReader.TryGetEnumValue("//root/Info/Difficulty", ref Difficulty);
|
||||||
|
xmlReader.GetValue("//root/Info/Avatar", out AvatarFileName, String.Empty);
|
||||||
|
xmlReader.TryGetEnumValue("//root/Info/GuestProfile", ref GuestProfile);
|
||||||
|
xmlReader.TryGetEnumValue("//root/Info/Active", ref Active);
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
CBase.Log.LogError("Can't find PlayerName in Profile File: " + FileName);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void SaveProfile()
|
||||||
|
{
|
||||||
|
if (FileName == String.Empty)
|
||||||
|
return;
|
||||||
|
|
||||||
|
XmlWriter writer;
|
||||||
|
try
|
||||||
|
{
|
||||||
|
writer = XmlWriter.Create(FileName, _Settings);
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
CBase.Log.LogError("Error creating/opening Profile File " + FileName + ": " + e.Message);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
try
|
||||||
|
{
|
||||||
|
writer.WriteStartDocument();
|
||||||
|
writer.WriteStartElement("root");
|
||||||
|
|
||||||
|
writer.WriteStartElement("Info");
|
||||||
|
writer.WriteElementString("PlayerName", PlayerName);
|
||||||
|
writer.WriteElementString("Difficulty", Enum.GetName(typeof(EGameDifficulty), Difficulty));
|
||||||
|
writer.WriteElementString("Avatar", Avatar.FileName);
|
||||||
|
writer.WriteElementString("GuestProfile", Enum.GetName(typeof(EOffOn), GuestProfile));
|
||||||
|
writer.WriteElementString("Active", Enum.GetName(typeof(EOffOn), Active));
|
||||||
|
writer.WriteEndElement();
|
||||||
|
|
||||||
|
writer.WriteEndElement(); //end of root
|
||||||
|
writer.WriteEndDocument();
|
||||||
|
|
||||||
|
writer.Flush();
|
||||||
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
|
writer.Close();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -18,8 +18,9 @@
|
|||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using VocaluxeLib;
|
||||||
|
|
||||||
namespace VocaluxeLib.Menu.SongMenu
|
namespace VocaluxeLib.Songs
|
||||||
{
|
{
|
||||||
public class CCategory
|
public class CCategory
|
||||||
{
|
{
|
||||||
@@ -21,7 +21,7 @@ using System;
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
|
||||||
namespace VocaluxeLib.Menu.SingNotes
|
namespace VocaluxeLib.Songs
|
||||||
{
|
{
|
||||||
public class CNotes
|
public class CNotes
|
||||||
{
|
{
|
||||||
@@ -22,9 +22,8 @@ using System.Collections.Generic;
|
|||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Text.RegularExpressions;
|
using System.Text.RegularExpressions;
|
||||||
using VocaluxeLib.Menu.SingNotes;
|
|
||||||
|
|
||||||
namespace VocaluxeLib.Menu.SongMenu
|
namespace VocaluxeLib.Songs
|
||||||
{
|
{
|
||||||
public class CSongPointer
|
public class CSongPointer
|
||||||
{
|
{
|
||||||
@@ -20,9 +20,9 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
using VocaluxeLib.Menu.SingNotes;
|
using VocaluxeLib.Songs;
|
||||||
|
|
||||||
namespace VocaluxeLib.Menu
|
namespace VocaluxeLib
|
||||||
{
|
{
|
||||||
|
|
||||||
#region Drawing
|
#region Drawing
|
||||||
@@ -211,33 +211,6 @@ namespace VocaluxeLib.Menu
|
|||||||
}
|
}
|
||||||
#endregion Inputs
|
#endregion Inputs
|
||||||
|
|
||||||
#region Profiles
|
|
||||||
public struct SProfile
|
|
||||||
{
|
|
||||||
public string PlayerName;
|
|
||||||
public string ProfileFile;
|
|
||||||
|
|
||||||
public EGameDifficulty Difficulty;
|
|
||||||
public SAvatar Avatar;
|
|
||||||
public EOffOn GuestProfile;
|
|
||||||
public EOffOn Active;
|
|
||||||
}
|
|
||||||
|
|
||||||
public struct SAvatar
|
|
||||||
{
|
|
||||||
public string FileName;
|
|
||||||
public STexture Texture;
|
|
||||||
|
|
||||||
// ReSharper disable UnusedParameter.Local
|
|
||||||
public SAvatar(int dummy)
|
|
||||||
// ReSharper restore UnusedParameter.Local
|
|
||||||
{
|
|
||||||
FileName = String.Empty;
|
|
||||||
Texture = new STexture(-1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endregion Profiles
|
|
||||||
|
|
||||||
#region Game
|
#region Game
|
||||||
public struct SPlayer
|
public struct SPlayer
|
||||||
{
|
{
|
||||||
@@ -111,11 +111,12 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Compile Include="GlobalSuppressions.cs" />
|
<Compile Include="GlobalSuppressions.cs" />
|
||||||
|
<Compile Include="IBasic.cs" />
|
||||||
<Compile Include="Menu\CBackground.cs" />
|
<Compile Include="Menu\CBackground.cs" />
|
||||||
<Compile Include="Menu\CBasic.cs" />
|
<Compile Include="CBasic.cs" />
|
||||||
<Compile Include="Menu\CButton.cs" />
|
<Compile Include="Menu\CButton.cs" />
|
||||||
<Compile Include="Menu\CEqualizer.cs" />
|
<Compile Include="Menu\CEqualizer.cs" />
|
||||||
<Compile Include="Menu\CHelper.cs" />
|
<Compile Include="CHelper.cs" />
|
||||||
<Compile Include="Menu\CInteraction.cs" />
|
<Compile Include="Menu\CInteraction.cs" />
|
||||||
<Compile Include="Menu\CLyric.cs" />
|
<Compile Include="Menu\CLyric.cs" />
|
||||||
<Compile Include="Menu\CMenu.cs" />
|
<Compile Include="Menu\CMenu.cs" />
|
||||||
@@ -125,20 +126,22 @@
|
|||||||
<Compile Include="Menu\COrderedDictionaryLite.cs" />
|
<Compile Include="Menu\COrderedDictionaryLite.cs" />
|
||||||
<Compile Include="Menu\CParticle.cs" />
|
<Compile Include="Menu\CParticle.cs" />
|
||||||
<Compile Include="Menu\CPlaylist.cs" />
|
<Compile Include="Menu\CPlaylist.cs" />
|
||||||
<Compile Include="Menu\CPoints.cs" />
|
<Compile Include="Game\CPoints.cs" />
|
||||||
<Compile Include="Menu\CSelectSlide.cs" />
|
<Compile Include="Menu\CSelectSlide.cs" />
|
||||||
<Compile Include="Menu\CStatic.cs" />
|
<Compile Include="Menu\CStatic.cs" />
|
||||||
<Compile Include="Menu\CText.cs" />
|
<Compile Include="Menu\CText.cs" />
|
||||||
<Compile Include="Menu\CScreenSetting.cs" />
|
<Compile Include="Menu\CScreenSetting.cs" />
|
||||||
<Compile Include="Menu\CXMLReader.cs" />
|
<Compile Include="CXMLReader.cs" />
|
||||||
<Compile Include="Menu\Enums.cs" />
|
<Compile Include="Enums.cs" />
|
||||||
<Compile Include="Menu\IMenu.cs" />
|
<Compile Include="Menu\IMenu.cs" />
|
||||||
<Compile Include="Menu\IMenuElement.cs" />
|
<Compile Include="Menu\IMenuElement.cs" />
|
||||||
<Compile Include="Menu\SingNotes\CNotes.cs" />
|
<Compile Include="Profile\CAvatar.cs" />
|
||||||
|
<Compile Include="Profile\CProfile.cs" />
|
||||||
|
<Compile Include="Songs\CNotes.cs" />
|
||||||
<Compile Include="Menu\SingNotes\CSingNotes.cs" />
|
<Compile Include="Menu\SingNotes\CSingNotes.cs" />
|
||||||
<Compile Include="Menu\SingNotes\CSingNotesClassic.cs" />
|
<Compile Include="Menu\SingNotes\CSingNotesClassic.cs" />
|
||||||
<Compile Include="Menu\SongMenu\CCategory.cs" />
|
<Compile Include="Songs\CCategory.cs" />
|
||||||
<Compile Include="Menu\SongMenu\CSong.cs" />
|
<Compile Include="Songs\CSong.cs" />
|
||||||
<Compile Include="Menu\SongMenu\CSongMenu.cs" />
|
<Compile Include="Menu\SongMenu\CSongMenu.cs" />
|
||||||
<Compile Include="Menu\SongMenu\CSongMenuBook.cs" />
|
<Compile Include="Menu\SongMenu\CSongMenuBook.cs" />
|
||||||
<Compile Include="Menu\SongMenu\CSongMenuDreidel.cs" />
|
<Compile Include="Menu\SongMenu\CSongMenuDreidel.cs" />
|
||||||
@@ -146,7 +149,7 @@
|
|||||||
<Compile Include="Menu\SongMenu\CSongMenuList.cs" />
|
<Compile Include="Menu\SongMenu\CSongMenuList.cs" />
|
||||||
<Compile Include="Menu\SongMenu\CSongMenuTileBoard.cs" />
|
<Compile Include="Menu\SongMenu\CSongMenuTileBoard.cs" />
|
||||||
<Compile Include="Menu\SongMenu\ISongMenu.cs" />
|
<Compile Include="Menu\SongMenu\ISongMenu.cs" />
|
||||||
<Compile Include="Menu\Structs.cs" />
|
<Compile Include="Structs.cs" />
|
||||||
<Compile Include="PartyModes\CPartyMode.cs" />
|
<Compile Include="PartyModes\CPartyMode.cs" />
|
||||||
<Compile Include="PartyModes\CPartyModeNone.cs" />
|
<Compile Include="PartyModes\CPartyModeNone.cs" />
|
||||||
<Compile Include="PartyModes\CScreenPartyDummy.cs" />
|
<Compile Include="PartyModes\CScreenPartyDummy.cs" />
|
||||||
|
|||||||
Reference in new issue
Block a user