public void doLoginDisplay(Rectangle bounds, SpriteBatch sb) { int num1 = bounds.X + 20; int num2 = bounds.Y + 100; string[] strArray = this.os.displayCache.Split(new string[1] { "#$#$#$$#$&$#$#$#$#" }, StringSplitOptions.None); string text1 = ""; string text2 = ""; int num3 = -1; int num4 = 0; if (strArray[0].Equals("loginData")) { text1 = !(strArray[1] != "") ? this.os.terminal.currentLine : strArray[1]; if (strArray.Length > 2) { num4 = 1; text2 = strArray[2]; if (text2.Equals("")) { for (int index = 0; index < this.os.terminal.currentLine.Length; ++index) { text2 += "*"; } } else { string str = ""; for (int index = 0; index < text2.Length; ++index) { str += "*"; } text2 = str; } } if (strArray.Length > 3) { num4 = 2; num3 = Convert.ToInt32(strArray[3]); } } Rectangle tmpRect = GuiData.tmpRect; tmpRect.X = bounds.X + 2; tmpRect.Y = num2; tmpRect.Height = 200; tmpRect.Width = bounds.Width - 4; sb.Draw(Utils.white, tmpRect, num3 == 0 ? this.os.lockedColor : this.os.indentBackgroundColor); if (num3 != 0 && num3 != -1) { for (int index1 = 0; index1 < this.comp.users.Count; ++index1) { if (this.comp.users[index1].name.Equals(text1)) { this.user = this.comp.users[index1]; for (int index2 = 0; index2 < this.accounts.folders.Count; ++index2) { if (this.accounts.folders[index2].name.Equals(this.user.name)) { this.userFolder = this.accounts.folders[index2]; break; } } break; } } this.state = 3; } tmpRect.Height = 22; int num5 = num2 + 30; Vector2 vector2 = TextItem.doMeasuredLabel(new Vector2((float)num1, (float)num5), LocaleTerms.Loc("Login") + " ", new Color?(this.textColor)); if (num3 == 0) { int num6 = num1 + (int)vector2.X; TextItem.doLabel(new Vector2((float)num6, (float)num5), LocaleTerms.Loc("Failed"), new Color?(this.os.brightLockedColor)); num1 = num6 - (int)vector2.X; } int num7 = num5 + 60; if (num4 == 0) { tmpRect.Y = num7; sb.Draw(Utils.white, tmpRect, this.os.subtleTextColor); } sb.DrawString(GuiData.smallfont, LocaleTerms.Loc("username") + " :", new Vector2((float)num1, (float)num7), this.textColor); int num8 = num1 + 100; sb.DrawString(GuiData.smallfont, text1, new Vector2((float)num8, (float)num7), this.textColor); int num9 = num8 - 100; int num10 = num7 + 30; if (num4 == 1) { tmpRect.Y = num10; sb.Draw(Utils.white, tmpRect, this.os.subtleTextColor); } sb.DrawString(GuiData.smallfont, LocaleTerms.Loc("password") + " :", new Vector2((float)num9, (float)num10), this.textColor); int num11 = num9 + 100; sb.DrawString(GuiData.smallfont, text2, new Vector2((float)num11, (float)num10), this.textColor); int y1 = num10 + 30; int x = num11 - 100; if (num3 != -1) { if (Button.doButton(12345, x, y1, 70, 30, LocaleTerms.Loc("Back"), new Color?(this.os.indentBackgroundColor))) { this.state = 0; } if (!Button.doButton(123456, x + 75, y1, 70, 30, LocaleTerms.Loc("Retry"), new Color?(this.os.indentBackgroundColor))) { return; } this.os.displayCache = ""; this.os.execute("login"); do { ; }while (this.os.displayCache.Equals("")); this.os.display.command = this.name; } else { int y2 = y1 + 65; for (int index = 0; index < this.comp.users.Count; ++index) { if (this.comp.users[index].known && MailServer.validUser(this.comp.users[index].type)) { if (Button.doButton(123457 + index, x, y2, 300, 25, "User: "******" Pass: " + this.comp.users[index].pass, new Color?(this.os.darkBackgroundColor))) { this.forceLogin(this.comp.users[index].name, this.comp.users[index].pass); } y2 += 27; } } } }
private void doLoginDisplay() { var strArray = os.displayCache.Split(new string[1] { "#$#$#$$#$&$#$#$#$#" }, StringSplitOptions.None); var text1 = ""; var text2 = ""; var num1 = -1; var num2 = 0; if (strArray[0].Equals("loginData")) { text1 = !(strArray[1] != "") ? os.terminal.currentLine : strArray[1]; if (strArray.Length > 2) { num2 = 1; text2 = strArray[2]; if (text2.Equals("")) { for (var index = 0; index < os.terminal.currentLine.Length; ++index) { text2 += "*"; } } else { var str = ""; for (var index = 0; index < text2.Length; ++index) { str += "*"; } text2 = str; } } if (strArray.Length > 3) { num2 = 2; num1 = Convert.ToInt32(strArray[3]); } } doConnectHeader(); var destinationRectangle = GuiData.tmpRect; destinationRectangle.X = bounds.X + 2; destinationRectangle.Y = this.y; destinationRectangle.Height = 200; destinationRectangle.Width = bounds.Width - 4; spriteBatch.Draw(Utils.white, destinationRectangle, num1 == 0 ? os.lockedColor : os.indentBackgroundColor); destinationRectangle.Height = 22; this.y += 30; var vector2 = TextItem.doMeasuredLabel(new Vector2(this.x, this.y), "Login ", Color.White); if (num1 == 0) { x += (int)vector2.X; TextItem.doLabel(new Vector2(x, y), "Failed", os.brightLockedColor); x -= (int)vector2.X; } else if (num1 != -1) { x += (int)vector2.X; TextItem.doLabel(new Vector2(x, y), "Successful", os.brightUnlockedColor); x -= (int)vector2.X; } this.y += 60; if (num2 == 0) { destinationRectangle.Y = y; spriteBatch.Draw(Utils.white, destinationRectangle, os.subtleTextColor); } spriteBatch.DrawString(GuiData.smallfont, "username :"******"password :"******"Complete" : "Back", os.indentBackgroundColor)) { command = "connect"; } if (num1 > 0 || !Button.doButton(123456, x + 75, y, 70, 30, "Retry", os.indentBackgroundColor)) { return; } os.runCommand("login"); } else { this.y += 65; var x = this.x; var y = this.y; var computer = os.connectedComp == null ? os.thisComputer : os.connectedComp; for (var index = 0; index < computer.users.Count; ++index) { if (computer.users[index].known && Daemon.validUser(computer.users[index].type)) { x = this.x + 320; if (Button.doButton(123457 + index, this.x, this.y, 300, 25, "Login - User: "******" Pass: "******"Cancel", os.lockedColor)) { return; } forceLogin("", ""); command = "connect"; } }
public void doLoginDisplay(Rectangle bounds, SpriteBatch sb) { var num1 = bounds.X + 20; var num2 = bounds.Y + 100; var strArray = os.displayCache.Split(new string[1] { "#$#$#$$#$&$#$#$#$#" }, StringSplitOptions.None); var text1 = ""; var text2 = ""; var num3 = -1; var num4 = 0; if (strArray[0].Equals("loginData")) { text1 = !(strArray[1] != "") ? os.terminal.currentLine : strArray[1]; if (strArray.Length > 2) { num4 = 1; text2 = strArray[2]; if (text2.Equals("")) { for (var index = 0; index < os.terminal.currentLine.Length; ++index) { text2 += "*"; } } else { var str = ""; for (var index = 0; index < text2.Length; ++index) { str += "*"; } text2 = str; } } if (strArray.Length > 3) { num4 = 2; num3 = Convert.ToInt32(strArray[3]); } } var destinationRectangle = GuiData.tmpRect; destinationRectangle.X = bounds.X + 2; destinationRectangle.Y = num2; destinationRectangle.Height = 200; destinationRectangle.Width = bounds.Width - 4; sb.Draw(Utils.white, destinationRectangle, num3 == 0 ? os.lockedColor : os.indentBackgroundColor); if (num3 != 0 && num3 != -1) { for (var index1 = 0; index1 < comp.users.Count; ++index1) { if (comp.users[index1].name.Equals(text1)) { user = comp.users[index1]; for (var index2 = 0; index2 < accounts.folders.Count; ++index2) { if (accounts.folders[index2].name.Equals(user.name)) { userFolder = accounts.folders[index2]; break; } } break; } } state = 3; } destinationRectangle.Height = 22; var num5 = num2 + 30; var vector2 = TextItem.doMeasuredLabel(new Vector2(num1, num5), "Login ", textColor); if (num3 == 0) { var num6 = num1 + (int)vector2.X; TextItem.doLabel(new Vector2(num6, num5), "Failed", os.brightLockedColor); num1 = num6 - (int)vector2.X; } var num7 = num5 + 60; if (num4 == 0) { destinationRectangle.Y = num7; sb.Draw(Utils.white, destinationRectangle, os.subtleTextColor); } sb.DrawString(GuiData.smallfont, "username :"******"password :"******"Back", os.indentBackgroundColor)) { state = 0; } if (!Button.doButton(123456, x + 75, y1, 70, 30, "Retry", os.indentBackgroundColor)) { return; } os.displayCache = ""; os.execute("login"); do { ; } while (os.displayCache.Equals("")); os.display.command = name; } else { var y2 = y1 + 65; for (var index = 0; index < comp.users.Count; ++index) { if (comp.users[index].known && validUser(comp.users[index].type)) { if (Button.doButton(123457 + index, x, y2, 300, 25, "User: "******" Pass: " + comp.users[index].pass, os.darkBackgroundColor)) { forceLogin(comp.users[index].name, comp.users[index].pass); } y2 += 27; } } } }
private void doLoginDisplay() { string[] separator = new string[1] { "#$#$#$$#$&$#$#$#$#" }; if (!this.lockLoginDisplayCache) { this.loginDetailsCache = this.os.displayCache; } string[] strArray = this.loginDetailsCache.Split(separator, StringSplitOptions.None); string text1 = ""; string text2 = ""; int num1 = -1; int num2 = 0; if (strArray[0].Equals("loginData")) { text1 = !(strArray[1] != "") ? this.os.terminal.currentLine : strArray[1]; if (strArray.Length > 2) { num2 = 1; text2 = strArray[2]; if (text2.Equals("")) { for (int index = 0; index < this.os.terminal.currentLine.Length; ++index) { text2 += "*"; } } else { string str = ""; for (int index = 0; index < text2.Length; ++index) { str += "*"; } text2 = str; } } if (strArray.Length > 3) { num2 = 2; num1 = Convert.ToInt32(strArray[3]); } } this.doConnectHeader(); Rectangle tmpRect = GuiData.tmpRect; tmpRect.X = this.bounds.X + 2; tmpRect.Y = this.y; tmpRect.Height = 200; tmpRect.Width = this.bounds.Width - 4; this.spriteBatch.Draw(Utils.white, tmpRect, num1 == 0 ? this.os.lockedColor : this.os.indentBackgroundColor); if (num1 != 0) { ; } tmpRect.Height = 22; this.y += 30; Vector2 vector2 = TextItem.doMeasuredLabel(new Vector2((float)this.x, (float)this.y), LocaleTerms.Loc("Login "), new Color?(Color.White)); if (num1 == 0) { this.x += (int)vector2.X; TextItem.doLabel(new Vector2((float)this.x, (float)this.y), LocaleTerms.Loc("Failed"), new Color?(this.os.brightLockedColor)); this.x -= (int)vector2.X; this.lockLoginDisplayCache = true; } else if (num1 != -1) { this.x += (int)vector2.X; TextItem.doLabel(new Vector2((float)this.x, (float)this.y), LocaleTerms.Loc("Successful"), new Color?(this.os.brightUnlockedColor)); this.x -= (int)vector2.X; this.lockLoginDisplayCache = true; } this.y += 60; if (num2 == 0) { tmpRect.Y = this.y; this.spriteBatch.Draw(Utils.white, tmpRect, this.os.subtleTextColor); } int num3 = 100; string text3 = LocaleTerms.Loc("username :"******"password :"******"Complete") : LocaleTerms.Loc("Back"), new Color?(this.os.indentBackgroundColor))) { this.command = "connect"; } if (num1 > 0 || !Button.doButton(123456, this.x + width + 5, this.y, width, 30, LocaleTerms.Loc("Retry"), new Color?(this.os.indentBackgroundColor))) { return; } this.lockLoginDisplayCache = false; this.loginDetailsCache = (string)null; this.os.runCommand("login"); } else { this.y += 65; int x = this.x; int y = this.y; Computer computer = this.os.connectedComp == null ? this.os.thisComputer : this.os.connectedComp; for (int index = 0; index < computer.users.Count; ++index) { if (computer.users[index].known && Daemon.validUser(computer.users[index].type)) { x = this.x + 320; if (Button.doButton(123457 + index, this.x, this.y, 300, 25, "Login - User: "******" Pass: "******"Cancel"), new Color?(this.os.lockedColor))) { this.forceLogin("", ""); this.command = "connect"; } } }