本文整理汇总了C#中ScreenState.ToString方法的典型用法代码示例。如果您正苦于以下问题:C# ScreenState.ToString方法的具体用法?C# ScreenState.ToString怎么用?C# ScreenState.ToString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ScreenState
的用法示例。
在下文中一共展示了ScreenState.ToString方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ReadMSG
public void ReadMSG(string[] MSG)
{
#region OOG
if (MSG[0] == "1")
{
switch (MSG[1])
{
case "1":
//FINIALY IN THE FUCKINGLOBBY!!!§
screenState = ScreenState.Lobby;
setD2Screen(1);
break;
case "8": //Main Menu
screenState = ScreenState.MainMenu;
Characters.Clear();
SendMSG("1");
setD2Screen(1);
break;
case "27": //Select Realm
screenState = ScreenState.RealmMenu;
setD2Screen(1);
break;
case "9": //Login
screenState = ScreenState.Login;
setD2Screen(1);
SendMSG("4;" + Account + ";" + Password);
console.SendToConsole("Sent: 4;" + Account + ";*******");
break;
case "12": // Character screen!
screenState = ScreenState.CharScreen;
setD2Screen(1);
break;
case "26": // Game Exists OWND!
screenState = ScreenState.GameExists;
setD2Screen(1);
break;
case "9999"://InGame WE SUCCSEEDED!
screenState = ScreenState.inGame;
setD2Screen(2);
setD2Screen(5);
SendfromIngameOnce = true;
break;
case "19":
screenState = ScreenState.CDKeyInUse;
//setD2Screen(1);
break;
case "42":
// screenState = ScreenState.RealmDown;
break;
case "109234": //Game Was Created
Creator = true;
break;
}
if(screenState != OldscreenState)
{
console.SendToConsole("ScreenState: " + screenState.ToString());
OldscreenState = screenState;
}
}
if (MSG[0] == "2")
{
if (MSG[1].ToLower() != Realm.ToLower())
{
SendMSG("2;" + Realm);
console.SendToConsole("Sent: 2; " + Realm);
}
else
{
// Thread.Sleep(1000);
SendMSG("3;");
console.SendToConsole("Sent:Request For Bnet");
}
//SendMSG("3:" + Account + ";" + Password);
}
if(MSG[0] == "3")
SetCharacters(MSG[1]);
if(MSG[0] == "4")
WasIngame = true;
if(MSG[0] == "100")
{
Characters.Clear();
console.SendToConsole("Character List Cleared! Waiting for refil..");
}
if(MSG[0] == "200")
SetUiCharacters = true;
if(MSG[0] == "44")
{
string fullGameInfo = MSG[1];
Bnetgame.Clear();
try
{
string[] gameInfo = fullGameInfo.Split(':');
string[] bNetGame;
for (int i = 0; i < gameInfo.Length; i++ )
{
bNetGame = gameInfo[i].Split(',');
BnetGames bnet = new BnetGames();
bnet.Name = bNetGame[0];
//.........这里部分代码省略.........
示例2: IsScreen
public static bool IsScreen(ScreenState screen)
{
if (screen == ScreenState.Invalid)
{
return false;
}
return screen.ToString().StartsWith("s");
}