/* */ package NET.worlds.console; /* */ /* */ import NET.worlds.core.IniFile; /* */ import NET.worlds.core.Std; /* */ import NET.worlds.network.Cache; /* */ import NET.worlds.network.CacheFile; /* */ import NET.worlds.network.Galaxy; /* */ import NET.worlds.network.NetworkObject; /* */ import NET.worlds.network.RemoteFileConst; /* */ import NET.worlds.network.URL; /* */ import NET.worlds.scape.SendURLAction; /* */ import java.awt.Button; /* */ import java.awt.CardLayout; /* */ import java.awt.Checkbox; /* */ import java.awt.Component; /* */ import java.awt.Container; /* */ import java.awt.Dimension; /* */ import java.awt.Event; /* */ import java.awt.Font; /* */ import java.awt.GridBagConstraints; /* */ import java.awt.GridBagLayout; /* */ import java.awt.GridLayout; /* */ import java.awt.Label; /* */ import java.awt.Panel; /* */ import java.awt.TextField; /* */ import java.io.DataInputStream; /* */ import java.io.FileInputStream; /* */ import java.io.FileNotFoundException; /* */ import java.io.IOException; /* */ import java.io.PrintStream; /* */ import java.text.MessageFormat; /* */ import java.util.Enumeration; /* */ import java.util.Vector; /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ public class LoginWizard /* */ extends PolledDialog /* */ implements DialogReceiver, DialogDisabled, RemoteFileConst /* */ { /* */ private static final long serialVersionUID = -1951115972999605117L; /* */ private static final int HAVE_USERS = 0; /* */ private static final int ACCOUNT_TYPE = 1; /* */ private static final int REGWAIT = 2; /* */ private static final int WELCOME = 3; /* */ private static final int CODEWORD_WAIT = 4; /* */ private static final int NEW_USER_INFO = 5; /* */ private static final int LOGGING_IN = 7; /* */ private static final int NOT_LOGGED_IN = 8; /* */ private static final int ERROR = 9; /* */ private static final int CONNECTION_DIED = 10; /* */ private static final int AUTO_LOGIN_FAILED = 11; /* */ private static final int REGWAIT2 = 12; /* */ private static final int SCREEN_COUNT = 14; /* */ private static final int STATE_GET_INFO = 0; /* */ private static final int STATE_SEND_INFO = 1; /* */ private static final int STATE_WAIT = 2; /* */ private static final int STATE_AUTO_LOGIN = 3; /* */ private static final int STATE_LOGGED_IN = 4; /* 172 */ private static final String defaultRegisterScriptL = "register" + /* 173 */ Console.message(".pl"); /* */ /* */ /* */ private static final String defaultRegisterScript = "register.pl"; /* */ /* 178 */ private static final String nameConstraints = Console.message("n-contain-letters"); /* */ /* */ /* 181 */ private static final String passwordConstraints1 = Console.message("p-contain-letters"); /* */ /* */ /* */ /* */ private static final int oldMinPasswordLen = 4; /* */ /* */ /* */ /* */ private static final int newMinPasswordLen = 6; /* */ /* */ /* */ /* 193 */ private static final String savePasswordText = Console.message("Remember-password"); /* */ /* */ /* 196 */ private static final String passwordMismatchText = Console.message("do-not-match"); /* */ /* */ private static final String userNameIniKey = "User"; /* */ /* */ private static final String passwordIniKey = "Password"; /* */ /* */ private static final String serialNumIniKey = "SNum"; /* */ private static final String handshakeIDIniKey = "handshakeID"; /* */ private static final String defaultUserIniKey = "DefaultUser"; /* */ static final int width = 480; /* */ static final int height = 280; /* */ static final int textWidth = 400; /* */ private Galaxy galaxy; /* */ private IniFile iniFile; /* 210 */ private CardLayout cardLayout = new CardLayout(); /* 211 */ private int currentScreen = -1; /* 212 */ private int lastScreen = -1; /* 213 */ private int loginFrom = -1; /* */ private int errorFrom; /* 215 */ private Panel[] screens = new Panel[14]; /* */ /* */ private boolean queryingServer; /* */ /* */ private Button createNewUsernameButton; /* */ /* */ private Button alternateBrowserButton; /* */ private Button signInButton; /* */ private Button noEmailButton; /* */ private Button showRegButton; /* */ private Button pwMailbackButtonKnown; /* 226 */ private TextField codewordField = null; /* 227 */ private TextField newUserName = null; /* 228 */ private TextField newPassword1 = null; /* 229 */ private TextField newPassword2 = null; /* 230 */ private TextField typedUsername = null; /* */ /* 232 */ private static Font font = new Font(Console.message("GammaTextFont"), /* 233 */ 0, 12); /* 234 */ private static Font bfont = new Font(Console.message("ButtonFont"), /* 235 */ 0, 12); /* */ /* 237 */ private TextField knownPassword = null; /* 238 */ private Checkbox savePassword = new Checkbox(savePasswordText, true); /* */ /* 240 */ private Vector users = new Vector(); /* 241 */ private Vector passwords = new Vector(); /* */ /* */ private int defaultUser; /* */ /* */ private String loginUserName; /* */ /* */ private String loginPassword; /* */ private String loginSerialNumber; /* */ private String newSerialNumber; /* */ private String newHandshakeID; /* */ private int loginMode; /* 252 */ private int loginIndex = 0; /* */ /* */ private int loginState; /* */ private String errMsg; /* */ private boolean isDialogDisabled; /* */ private Component defComponent; /* */ private int id; /* 259 */ private static boolean startUp = true; /* */ /* */ /* */ private static boolean firstTimeDone; /* */ /* */ /* */ private static int seq; /* */ /* */ private CacheFile cf; /* */ /* */ /* */ public static boolean isFirstTimeDone() /* */ { /* 272 */ return firstTimeDone; /* */ } /* */ /* */ /* */ /* */ /* */ public boolean safeToQueryServer() /* */ { /* 280 */ return this.queryingServer; /* */ } /* */ /* */ public LoginWizard(Galaxy galaxy, IniFile iniFile) /* */ { /* 285 */ this(galaxy, iniFile, null); /* */ } /* */ /* */ boolean isAnonServer() { /* 289 */ return (this.galaxy.getGalaxyType() == 4) || /* 290 */ (this.galaxy.getGalaxyType() == 2); /* */ } /* */ /* */ /* */ /* */ /* */ /* */ public LoginWizard(Galaxy galaxy, IniFile iniFile, String errMsg) /* */ { /* 299 */ super(Console.getFrame(), galaxy, "", false); /* 300 */ this.galaxy = galaxy; /* 301 */ this.iniFile = iniFile; /* 302 */ this.errMsg = errMsg; /* 303 */ this.id = (seq++); /* */ /* 305 */ this.queryingServer = false; /* */ /* */ /* 308 */ int userNum = 0; /* */ for (;;) { /* 310 */ String user = iniFile.getIniString("User" + userNum, ""); /* 311 */ if (user.length() == 0) /* */ break; /* 313 */ this.users.addElement(user); /* 314 */ this.passwords.addElement(Console.decode(iniFile.getIniString( /* 315 */ "Password" + userNum, ""))); /* 316 */ userNum++; /* */ } /* */ /* */ /* 320 */ this.defaultUser = iniFile.getIniInt("DefaultUser", 0); /* 321 */ this.newSerialNumber = iniFile.getIniString("SNum", ""); /* 322 */ if (this.newSerialNumber.length() == 0) /* 323 */ this.newSerialNumber = null; /* 324 */ this.newHandshakeID = iniFile.getIniString("handshakeID", ""); /* 325 */ if (this.newHandshakeID.length() == 0) { /* 326 */ this.newHandshakeID = null; /* */ } /* */ /* 329 */ setTitle(Console.message("Logging-in")); /* 330 */ setLayout(this.cardLayout); /* */ /* */ /* 333 */ this.loginState = 0; /* 334 */ if (errMsg != null) { /* 335 */ this.currentScreen = 10; /* 336 */ } else if ((this.users.size() > 0) || (isAnonServer()) || /* 337 */ (IniFile.override().getIniInt("nocreateaccount", 0) == 1)) { /* 338 */ this.currentScreen = 0; /* */ } else { /* 340 */ setTitle(Console.message("Setting-Up-Acct")); /* */ /* 342 */ if (this.newSerialNumber == null) { /* 343 */ if (this.newHandshakeID == null) { /* 344 */ this.currentScreen = 1; /* */ } else /* 346 */ this.currentScreen = 12; /* */ } else { /* 348 */ this.currentScreen = 5; /* */ } /* */ } /* 351 */ startUp = false; /* 352 */ if (this.loginState != 3) { /* 353 */ disableParent(); /* 354 */ ready(); /* */ } /* */ } /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ public boolean waitingForConnection() /* */ { /* 366 */ return (this.loginState == 3) || (this.loginState == 2); /* */ } /* */ /* */ /* */ /* */ /* */ public void setConnected() /* */ { /* 374 */ int oldState = this.loginState; /* 375 */ this.loginState = 4; /* */ /* */ /* 378 */ if ((this.loginFrom != 0) || (this.users.size() <= this.loginIndex)) { /* 379 */ this.users.addElement(this.loginUserName); /* 380 */ this.passwords.addElement(null); /* 381 */ this.iniFile.setIniString("User" + this.loginIndex, this.loginUserName); /* 382 */ if (this.loginFrom == 5) { /* 383 */ this.iniFile.setIniString("SNum" + this.loginIndex, /* 384 */ this.loginSerialNumber); /* */ } /* */ } /* 387 */ boolean save = this.savePassword.getState(); /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* 399 */ String pass = this.galaxy.getPassword(); /* 400 */ if ((this.loginPassword != null) && /* 401 */ (pass != null) && ( /* 402 */ (save != isPasswordSaved(this.loginIndex)) || /* 403 */ (!pass.equals((String)this.passwords.elementAt(this.loginIndex))))) /* */ { /* */ /* */ /* 407 */ String val = save ? pass : null; /* 408 */ this.passwords.setElementAt(val, this.loginIndex); /* 409 */ this.iniFile.setIniString("Password" + this.loginIndex, /* 410 */ Console.encode(val)); /* */ } /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* 422 */ String name = this.galaxy.getChatname(); /* 423 */ String nameU = this.galaxy.getUsernameU(); /* */ /* 425 */ if ((this.loginFrom != 5) && /* 426 */ (!name.equals((String)this.users.elementAt(this.loginIndex)))) { /* 427 */ this.users.setElementAt(name, this.loginIndex); /* 428 */ this.iniFile.setIniString("User" + this.loginIndex, nameU); /* */ } /* 430 */ this.iniFile.setIniInt("DefaultUser", this.loginIndex); /* 431 */ this.defaultUser = this.loginIndex; /* */ /* 433 */ if (this.newSerialNumber != null) /* */ { /* 435 */ this.newHandshakeID = null; /* 436 */ this.newSerialNumber = null; /* 437 */ this.iniFile.setIniString("handshakeID", ""); /* 438 */ this.iniFile.setIniString("SNum", ""); /* */ } /* */ /* 441 */ if (this.loginFrom != 0) { /* 442 */ selectScreen(3); /* 443 */ } else if (oldState != 3) { /* 444 */ done(true); /* */ } /* */ else /* */ { /* 448 */ assert (Main.isMainThread()); /* 449 */ this.galaxy.dialogDone(this, true); /* 450 */ firstTimeDone = true; /* */ } /* */ } /* */ /* */ /* */ /* */ /* */ public void loginError(String errMsg) /* */ { /* 459 */ removeScreen(8); /* */ /* 461 */ if (errMsg == null) { /* 462 */ errMsg = Console.message("Unknown-error"); /* */ } /* 464 */ this.errMsg = errMsg; /* 465 */ if (this.loginState == 3) { /* 466 */ this.currentScreen = 11; /* 467 */ disableParent(); /* 468 */ ready(); /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ } /* */ else /* */ { /* */ /* */ /* */ /* */ /* */ /* */ /* 485 */ if (this.loginFrom == -1) /* 486 */ this.loginFrom = 0; /* 487 */ selectScreen(8); /* */ } /* 489 */ this.loginState = 0; /* */ } /* */ /* */ /* */ /* */ /* */ /* */ public void setVisible(boolean visible) /* */ { /* 498 */ super.setVisible(visible); /* 499 */ if ((visible) && (this.defComponent != null)) { /* 500 */ this.defComponent.requestFocus(); /* */ } /* */ } /* */ /* */ public void dispose() { /* 505 */ super.dispose(); /* */ } /* */ /* */ protected void activeCallback() { /* 509 */ if (this.loginState == 1) { /* 510 */ this.loginState = 2; /* 511 */ this.galaxy.setAuthInfo(this.loginUserName, null, this.loginPassword, null, /* 512 */ this.loginSerialNumber, this.loginMode); /* */ } /* */ } /* */ /* */ protected void build() { /* 517 */ selectScreen(this.currentScreen); /* */ } /* */ /* */ @Deprecated /* */ public Dimension size() { /* 522 */ return new Dimension(480, 280); /* */ } /* */ /* */ private void selectScreen(int which) { /* 526 */ String name = which; /* 527 */ if (this.screens[which] == null) /* 528 */ add(name, this.screens[which] = buildScreen(which)); /* 529 */ this.cardLayout.show(this, name); /* */ /* 531 */ if ((this.lastScreen != which) && (this.lastScreen >= 0) && /* 532 */ (this.screens[this.lastScreen] != null)) { /* 533 */ removeScreen(this.lastScreen); /* */ } /* */ /* 536 */ this.currentScreen = which; /* 537 */ this.lastScreen = which; /* */ /* 539 */ if (which == 2) { /* 540 */ new SendURLAction(getRegisterScriptName()).startBrowser(); /* 541 */ } else if (which == 4) /* 542 */ new AwaitCodeword(this.codewordField.getText()); /* */ } /* */ /* */ private Panel buildScreen(int which) { /* 546 */ GridBagLayout gbag = new GridBagLayout(); /* 547 */ GridBagConstraints c = new GridBagConstraints(); /* 548 */ Panel p = new Panel(gbag); /* 549 */ c.weightx = 1.0D; /* 550 */ c.weighty = 1.0D; /* 551 */ c.gridwidth = 0; /* */ /* 553 */ switch (which) { /* */ case 0: /* 555 */ return buildKnownUsersScreen(p, gbag, c); /* */ case 1: /* 557 */ return buildAccountTypeScreen(p, gbag, c); /* */ case 2: /* 559 */ return buildRegWait(p, gbag, c); /* */ case 12: /* 561 */ return buildRegWait2(p, gbag, c); /* */ case 4: /* 563 */ return buildCodewordWaitScreen(p, gbag, c); /* */ case 5: /* 565 */ return buildNewUserInfoScreen(p, gbag, c); /* */ case 7: /* 567 */ return buildLoggingInScreen(p, gbag, c); /* */ case 3: /* 569 */ return buildWelcome(p, gbag, c); /* */ case 8: /* */ case 9: /* */ case 10: /* */ case 11: /* 574 */ return buildErrorScreen(p, gbag, c, which); /* */ } /* 576 */ return null; /* */ } /* */ /* */ private void removeScreen(int screen) /* */ { /* 581 */ if (this.screens[screen] != null) { /* 582 */ remove(this.screens[screen]); /* 583 */ this.screens[screen] = null; /* */ } /* */ } /* */ /* */ private void selectErrorScreen(String msg) { /* 588 */ this.errMsg = msg; /* 589 */ this.errorFrom = this.currentScreen; /* 590 */ selectScreen(9); /* */ } /* */ /* */ private Panel buildKnownUsersScreen(Panel p, GridBagLayout gbag, GridBagConstraints c) /* */ { /* 595 */ this.typedUsername = new TextField(16); /* 596 */ this.knownPassword = new TextField(12); /* 597 */ this.knownPassword.setEchoChar('*'); /* */ /* 599 */ Panel tmp = new Panel(); /* 600 */ String enterText = Console.message("one-username"); /* */ /* 602 */ if (isAnonServer()) { /* 603 */ enterText = Console.message("a-username"); /* */ } /* 605 */ TextCanvas text = new TextCanvas(enterText, 400); /* */ /* */ /* 608 */ tmp.add(text); /* */ /* */ /* 611 */ add(p, tmp, gbag, c); /* */ /* 613 */ if (this.createNewUsernameButton == null) /* 614 */ this.createNewUsernameButton = new Button( /* 615 */ Console.message("Create-Username")); /* 616 */ if (this.pwMailbackButtonKnown == null) { /* 617 */ this.pwMailbackButtonKnown = new Button(Console.message("Remind-Me")); /* */ } /* 619 */ if (this.defaultUser < this.users.size()) { /* 620 */ String pass = (String)this.passwords.elementAt(this.defaultUser); /* 621 */ boolean knowPassword = pass != null; /* 622 */ this.knownPassword.setText(knowPassword ? pass : ""); /* 623 */ this.savePassword.setState(knowPassword); /* 624 */ this.typedUsername.setText((String)this.users.elementAt(this.defaultUser)); /* */ } /* */ /* 627 */ tmp = new Panel(new GridLayout(2, 2)); /* 628 */ Label uName = new Label(Console.message("Username"), 1); /* 629 */ uName.setFont(font); /* 630 */ this.typedUsername.setFont(font); /* 631 */ this.knownPassword.setFont(font); /* 632 */ tmp.add(uName); /* 633 */ tmp.add(this.typedUsername); /* 634 */ if (isAnonServer()) { /* 635 */ this.knownPassword.setText(Console.message("anonymous")); /* */ /* 637 */ add(p, tmp, gbag, c); /* */ } else { /* 639 */ Label pWord = new Label(Console.message("Password"), 1); /* 640 */ pWord.setFont(font); /* 641 */ tmp.add(pWord); /* 642 */ tmp.add(this.knownPassword); /* */ /* 644 */ add(p, tmp, gbag, c); /* 645 */ this.savePassword.setFont(font); /* 646 */ add(p, this.savePassword, gbag, c); /* */ } /* */ /* 649 */ tmp = new Panel(); /* */ /* */ /* */ /* 653 */ String help = Console.message("youve-upgraded"); /* 654 */ if ((this.iniFile.getIniString("AutoLogin", "").equals("")) && /* 655 */ (this.iniFile.getIniString("User1", "").equals(""))) { /* 656 */ help = ""; /* */ } /* */ /* 659 */ String instr = Console.message("first-time-user" + help); /* */ /* 661 */ if (isAnonServer()) { /* 662 */ instr = help; /* */ } /* 664 */ text = new TextCanvas(instr, 400); /* */ /* 666 */ tmp.add(text); /* 667 */ add(p, tmp, gbag, c); /* 668 */ if ((isAnonServer()) || /* 669 */ (IniFile.override().getIniInt("nocreateaccount", 0) == 1)) { /* 670 */ addButtons(p, gbag, Console.message("Cancel"), null, null, /* 671 */ Console.message("Sign-In")); /* */ } else /* 673 */ addButtons(p, gbag, /* 674 */ "<< " + Console.message("Back"), /* 675 */ this.createNewUsernameButton, this.pwMailbackButtonKnown, /* 676 */ Console.message("Sign-In")); /* 677 */ if (this.knownPassword.getText().length() == 0) { /* 678 */ if (this.typedUsername.getText().length() == 0) { /* 679 */ this.defComponent = this.typedUsername; /* */ } else { /* 681 */ this.defComponent = this.knownPassword; /* */ } /* */ } /* 684 */ return p; /* */ } /* */ /* */ private void validateKnownUserInfo() { /* 688 */ if ((!acceptLoginUserName(this.typedUsername.getText())) || /* */ /* 690 */ (!acceptLoginPassword(this.knownPassword.getText(), this.loginUserName, 4))) /* 691 */ return; /* 692 */ this.loginSerialNumber = null; /* 693 */ this.loginMode = 2; /* 694 */ this.loginIndex = 0; /* 695 */ doLogin(); /* */ } /* */ /* */ private Panel buildAccountTypeScreen(Panel p, GridBagLayout gbag, GridBagConstraints c) /* */ { /* 700 */ TextCanvas text = new TextCanvas(Console.message("first-time-user2"), /* 701 */ 400); /* 702 */ add(p, text, gbag, c); /* */ /* 704 */ if (this.alternateBrowserButton == null) /* 705 */ this.alternateBrowserButton = new Button(Console.message("Alt-Browser")); /* 706 */ if (this.signInButton == null) { /* 707 */ this.signInButton = new Button(Console.message("Sign-In")); /* */ } /* 709 */ return addButtons(p, gbag, Console.message("Cancel"), this.signInButton, /* 710 */ this.alternateBrowserButton, Console.message("Next")); /* */ } /* */ /* */ /* */ private Panel buildRegWaitCommon(Panel p, GridBagLayout gbag, GridBagConstraints c, int which) /* */ { /* 716 */ String start = ""; /* 717 */ if (which == 0) /* 718 */ start = Console.message("registration"); /* 719 */ TextCanvas text = new TextCanvas(start + Console.message("completed"), /* 720 */ 400); /* 721 */ add(p, text, gbag, c); /* */ /* 723 */ Panel tmp = new Panel(new GridLayout()); /* 724 */ Label code = new Label(Console.message("Codeword"), 1); /* 725 */ code.setFont(font); /* 726 */ tmp.add(code); /* 727 */ this.codewordField = new TextField(10); /* 728 */ if (this.newSerialNumber != null) /* 729 */ this.codewordField.setText(this.newSerialNumber); /* 730 */ this.codewordField.setFont(font); /* 731 */ tmp.add(this.codewordField); /* */ /* 733 */ add(p, tmp, gbag, c); /* */ /* */ /* */ /* 737 */ String browserSpecific = new String(); /* 738 */ if (WebBrowser.isDisabled()) { /* 739 */ if (which == 0) { /* 740 */ browserSpecific = browserSpecific + Console.message("manually-view"); /* */ } else /* 742 */ browserSpecific = browserSpecific + Console.message("just-view"); /* 743 */ browserSpecific = browserSpecific + getRegisterScriptName(); /* */ } else { /* 745 */ browserSpecific = browserSpecific + Console.message("click-Back"); /* */ } /* */ /* */ /* 749 */ if (this.users.size() == 0) { /* 750 */ String ifText = Console.message("within-20"); /* 751 */ if (which == 1) { /* 752 */ ifText = Console.message("Show-Reg-Form1"); /* */ } /* 754 */ text = new TextCanvas(new String(ifText + browserSpecific), /* 755 */ 400); /* 756 */ add(p, text, gbag, c); /* 757 */ } else if (which == 1) { /* 758 */ text = new TextCanvas(Console.message("Show-Reg-Form1"), 400); /* 759 */ add(p, text, gbag, c); /* */ } /* */ /* 762 */ if (this.noEmailButton == null) /* 763 */ this.noEmailButton = new Button(Console.message("Didnt-Get-Email")); /* 764 */ if (this.showRegButton == null) { /* 765 */ this.showRegButton = new Button(Console.message("Show-Reg-Form3")); /* */ } /* 767 */ Button showReg = which == 0 ? null : this.showRegButton; /* */ /* 769 */ return addButtons(p, gbag, "<< " + Console.message("Back"), showReg, /* 770 */ this.noEmailButton, Console.message("Next") + " >>"); /* */ } /* */ /* */ private Panel buildRegWait(Panel p, GridBagLayout gbag, GridBagConstraints c) { /* 774 */ return buildRegWaitCommon(p, gbag, c, 0); /* */ } /* */ /* */ private Panel buildRegWait2(Panel p, GridBagLayout gbag, GridBagConstraints c) /* */ { /* 779 */ return buildRegWaitCommon(p, gbag, c, 1); /* */ } /* */ /* */ private Panel buildWelcome(Panel p, GridBagLayout gbag, GridBagConstraints c) { /* 783 */ add(p, new Label(""), gbag, c); /* */ /* 785 */ Object[] arguments = { new String(Std.getProductName()) }; /* 786 */ add(p, new Label(MessageFormat.format( /* 787 */ Console.message("Youre-signed"), arguments), 1), gbag, c); /* */ /* */ /* */ /* */ /* */ /* */ /* 794 */ Panel tmp = new Panel(); /* 795 */ TextCanvas text = new TextCanvas(Console.message("Use-arrow-keys2"), /* 796 */ 400); /* 797 */ tmp.add(text); /* 798 */ add(p, tmp, gbag, c); /* */ /* 800 */ add(p, new Label(""), gbag, c); /* */ /* 802 */ return addButtons(p, gbag, null, null, null, /* 803 */ Console.message("Enter-Worlds")); /* */ } /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ class AwaitCodeword /* */ extends Thread /* */ { /* */ public AwaitCodeword(String cw) /* */ { /* 821 */ if (cw.length() > 6) { /* 822 */ LoginWizard.this.selectScreen(5); /* 823 */ LoginWizard.this.newSerialNumber = cw; /* 824 */ LoginWizard.this.iniFile.setIniString("SNum", LoginWizard.this.newSerialNumber); /* */ } /* */ else { /* 827 */ LoginWizard.this.cf = Cache.getFile(URL.make(LoginWizard.this.getScriptServer() + /* 828 */ "codeword.pl?id=" + LoginWizard.this.newHandshakeID + "&codeword=" + /* 829 */ cw)); /* */ /* 831 */ setDaemon(true); /* 832 */ start(); /* */ } /* */ } /* */ /* */ public void run() { /* 837 */ LoginWizard.this.cf.waitUntilLoaded(); /* */ /* 839 */ if (LoginWizard.this.cf.isActive()) { /* 840 */ if (LoginWizard.this.cf.error()) { /* 841 */ LoginWizard.this.currentScreen = 12; /* 842 */ LoginWizard.this.selectErrorScreen(Console.message("Error-accessing")); /* */ } else { /* 844 */ DataInputStream in = null; /* */ try { /* 846 */ in = new DataInputStream(new FileInputStream( /* 847 */ LoginWizard.this.cf.getLocalName())); /* 848 */ String line = in.readLine(); /* */ /* */ /* 851 */ if ((line.startsWith("1,0,")) || (line.startsWith("1,1,"))) /* */ { /* */ /* 854 */ LoginWizard.this.newSerialNumber = line.substring(4); /* 855 */ LoginWizard.this.iniFile.setIniString("SNum", /* 856 */ LoginWizard.this.newSerialNumber); /* 857 */ LoginWizard.this.newHandshakeID = null; /* 858 */ LoginWizard.this.iniFile.setIniString("handshakeID", ""); /* */ /* 860 */ LoginWizard.this.selectScreen(5); /* 861 */ LoginWizard.this.cf.close(); /* 862 */ return; /* */ } /* */ } /* */ catch (FileNotFoundException localFileNotFoundException) {}catch (IOException localIOException2) {}finally /* */ { /* */ try { /* 868 */ if (in != null) { /* 869 */ in.close(); /* */ } /* */ } /* */ catch (IOException localIOException4) {} /* */ } /* */ try /* */ { /* 868 */ if (in != null) { /* 869 */ in.close(); /* */ } /* */ } /* */ catch (IOException localIOException5) {} /* */ /* 874 */ LoginWizard.this.currentScreen = 12; /* 875 */ LoginWizard.this.selectErrorScreen(Console.message("codeword-no-match")); /* */ } /* */ /* 878 */ LoginWizard.this.cf.close(); /* */ } /* */ } /* */ } /* */ /* */ private Panel buildCodewordWaitScreen(Panel p, GridBagLayout gbag, GridBagConstraints c) /* */ { /* 885 */ TextCanvas text = new TextCanvas(Console.message("Checking-codeword"), /* 886 */ 400); /* 887 */ add(p, text, gbag, c); /* */ /* 889 */ return addButtons(p, gbag, Console.message("Cancel"), null, null, null); /* */ } /* */ /* */ private Panel buildNewUserInfoScreen(Panel p, GridBagLayout gbag, GridBagConstraints c) /* */ { /* 894 */ this.newUserName = new TextField(16); /* 895 */ this.newPassword1 = new TextField(12); /* 896 */ this.newPassword2 = new TextField(12); /* 897 */ Object[] arguments = { new String(Std.getProductName()) }; /* 898 */ TextCanvas text = new TextCanvas(MessageFormat.format( /* 899 */ Console.message("Enter-username"), arguments), 400); /* 900 */ text.setFont(font); /* 901 */ add(p, text, gbag, c); /* */ /* 903 */ Panel tmp = new Panel(); /* 904 */ tmp.setFont(font); /* 905 */ tmp.add(new Label(Console.message("Type-username"))); /* 906 */ tmp.add(this.newUserName); /* 907 */ add(p, tmp, gbag, c); /* */ /* 909 */ text = new TextCanvas(Console.message("Enter-password"), 400); /* 910 */ add(p, text, gbag, c); /* */ /* 912 */ tmp = new Panel(new GridLayout(2, 2)); /* 913 */ tmp.setFont(font); /* 914 */ tmp.add(new Label(Console.message("Type-password"), 1)); /* 915 */ this.newPassword1.setEchoChar('*'); /* 916 */ tmp.add(this.newPassword1); /* 917 */ tmp.add(new Label(Console.message("Re-type-password"), 1)); /* 918 */ this.newPassword2.setEchoChar('*'); /* 919 */ tmp.add(this.newPassword2); /* 920 */ add(p, tmp, gbag, c); /* 921 */ add(p, this.savePassword, gbag, c); /* 922 */ return addButtons(p, gbag, /* */ /* 924 */ "<< " + Console.message("Back"), null, null, /* 925 */ Console.message("Next") + " >>"); /* */ } /* */ /* */ private void validateNewUserInfo() { /* 929 */ if ((!acceptLoginUserName(this.newUserName.getText())) || /* */ /* 931 */ (!acceptLoginPassword(this.newPassword1.getText(), this.newUserName.getText(), 6))) /* 932 */ return; /* 933 */ if (!this.loginPassword.equals(this.newPassword2.getText())) { /* 934 */ selectErrorScreen(passwordMismatchText); /* 935 */ return; /* */ } /* 937 */ this.loginMode = 1; /* 938 */ this.loginSerialNumber = this.newSerialNumber; /* 939 */ this.loginIndex = 0; /* 940 */ doLogin(); /* */ } /* */ /* */ private Panel buildLoggingInScreen(Panel p, GridBagLayout gbag, GridBagConstraints c) /* */ { /* 945 */ Label logging = new Label(Console.message("Logging-in-wait")); /* 946 */ logging.setFont(font); /* 947 */ add(p, logging, gbag, c); /* 948 */ return p; /* */ } /* */ /* */ /* */ /* */ /* */ private Panel buildErrorScreen(Panel p, GridBagLayout gbag, GridBagConstraints c, int which) /* */ { /* 956 */ this.errMsg = this.errMsg.replace('\n', ' ').replace('\t', '\n'); /* 957 */ TextCanvas text = new TextCanvas(this.errMsg, 400); /* 958 */ this.errMsg = null; /* 959 */ add(p, text, gbag, c); /* 960 */ return addButtons(p, gbag, /* 961 */ (which == 9) || (which == 8) ? "<< " + /* 962 */ Console.message("Back") : Console.message("Continue"), /* 963 */ null, null, null); /* */ } /* */ /* */ /* */ /* */ private boolean acceptLoginPassword(String password, String username, int minLength) /* */ { /* */ String text; /* */ /* */ /* 973 */ if ((!FriendsListPart.isValidUserName(password)) || /* 974 */ (password.length() < minLength)) { /* 975 */ Object[] arguments = { new String(minLength) }; /* 976 */ text = Console.message("password-not-valid") + /* 977 */ MessageFormat.format(passwordConstraints1, arguments); /* */ } else { /* 979 */ this.loginPassword = password; /* 980 */ return true; } /* */ String text; /* 982 */ selectErrorScreen(text); /* 983 */ return false; /* */ } /* */ /* */ private boolean acceptLoginUserName(String name) { /* 987 */ if (!FriendsListPart.isValidUserName(name)) { /* 988 */ selectErrorScreen(Console.message("username-not-valid") + /* 989 */ nameConstraints + " - " + name); /* 990 */ return false; /* */ } /* 992 */ this.loginUserName = name; /* 993 */ return true; /* */ } /* */ /* */ private void doLogin() { /* 997 */ this.loginFrom = this.currentScreen; /* 998 */ selectScreen(7); /* 999 */ this.loginState = 1; /* */ } /* */ /* */ private boolean isPasswordSaved(int user) { /* 1003 */ return (user < this.passwords.size()) && (this.passwords.elementAt(user) != null); /* */ } /* */ /* */ private static void add(Container cont, Component comp, GridBagLayout gbag, GridBagConstraints c) /* */ { /* 1008 */ gbag.setConstraints(comp, c); /* 1009 */ cont.add(comp); /* */ } /* */ /* */ private Panel addButtons(Panel p, GridBagLayout gbag, String prev, Button mid1, Button mid2, String next) /* */ { /* 1014 */ Panel buttons = new Panel(); /* 1015 */ buttons.setFont(bfont); /* 1016 */ if (prev != null) /* 1017 */ buttons.add(new BackButton(prev)); /* 1018 */ if (mid1 != null) /* 1019 */ buttons.add(mid1); /* 1020 */ if (mid2 != null) /* 1021 */ buttons.add(mid2); /* 1022 */ if (next != null) /* 1023 */ buttons.add(this.defComponent = new ForwardButton(next)); /* 1024 */ GridBagConstraints c = new GridBagConstraints(); /* 1025 */ c.anchor = 14; /* 1026 */ add(p, buttons, gbag, c); /* 1027 */ return p; /* */ } /* */ /* */ private String getScriptServer() { /* 1031 */ Enumeration e = this.galaxy.getConsoles(); /* 1032 */ assert (e.hasMoreElements()); /* 1033 */ this.queryingServer = true; /* 1034 */ String ret = ((Console)e.nextElement()).getScriptServer(); /* 1035 */ this.queryingServer = false; /* 1036 */ System.out.println("Scriptserver is " + ret); /* 1037 */ return ret; /* */ } /* */ /* */ /* Error */ /* */ private String getRegisterScriptName() /* */ { /* */ // Byte code: /* */ // 0: aload_0 /* */ // 1: getfield 321 NET/worlds/console/LoginWizard:newHandshakeID Ljava/lang/String; /* */ // 4: ifnonnull +69 -> 73 /* */ // 7: new 836 java/util/Random /* */ // 10: dup /* */ // 11: invokestatic 838 NET/worlds/console/Startup:getVolumeInfo ()I /* */ // 14: i2l /* */ // 15: bipush 30 /* */ // 17: lshl /* */ // 18: invokestatic 843 java/lang/Math:random ()D /* */ // 21: ldc2_w 849 /* */ // 24: dmul /* */ // 25: d2i /* */ // 26: i2l /* */ // 27: ladd /* */ // 28: invokespecial 851 java/util/Random: (J)V /* */ // 31: invokevirtual 854 java/util/Random:nextInt ()I /* */ // 34: istore_1 /* */ // 35: iload_1 /* */ // 36: ifge +6 -> 42 /* */ // 39: iload_1 /* */ // 40: ineg /* */ // 41: istore_1 /* */ // 42: aload_0 /* */ // 43: new 150 java/lang/StringBuilder /* */ // 46: dup /* */ // 47: invokespecial 466 java/lang/StringBuilder: ()V /* */ // 50: iload_1 /* */ // 51: invokevirtual 292 java/lang/StringBuilder:append (I)Ljava/lang/StringBuilder; /* */ // 54: invokevirtual 170 java/lang/StringBuilder:toString ()Ljava/lang/String; /* */ // 57: putfield 321 NET/worlds/console/LoginWizard:newHandshakeID Ljava/lang/String; /* */ // 60: aload_0 /* */ // 61: getfield 284 NET/worlds/console/LoginWizard:iniFile LNET/worlds/core/IniFile; /* */ // 64: ldc 70 /* */ // 66: aload_0 /* */ // 67: getfield 321 NET/worlds/console/LoginWizard:newHandshakeID Ljava/lang/String; /* */ // 70: invokevirtual 359 NET/worlds/core/IniFile:setIniString (Ljava/lang/String;Ljava/lang/String;)V /* */ // 73: invokestatic 339 NET/worlds/core/IniFile:override ()LNET/worlds/core/IniFile; /* */ // 76: astore_1 /* */ // 77: aload_1 /* */ // 78: ldc -104 /* */ // 80: ldc -21 /* */ // 82: invokevirtual 295 NET/worlds/core/IniFile:getIniString (Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String; /* */ // 85: astore_2 /* */ // 86: aload_2 /* */ // 87: ldc -21 /* */ // 89: invokevirtual 381 java/lang/String:equals (Ljava/lang/Object;)Z /* */ // 92: ifeq +172 -> 264 /* */ // 95: getstatic 174 NET/worlds/console/LoginWizard:defaultRegisterScriptL Ljava/lang/String; /* */ // 98: astore_2 /* */ // 99: aload_2 /* */ // 100: invokestatic 857 NET/worlds/console/Console:wasHttpNoSuchFile (Ljava/lang/String;)Z /* */ // 103: ifeq +6 -> 109 /* */ // 106: ldc 51 /* */ // 108: astore_2 /* */ // 109: new 296 NET/worlds/core/IniFile /* */ // 112: dup /* */ // 113: ldc_w 860 /* */ // 116: invokespecial 862 NET/worlds/core/IniFile: (Ljava/lang/String;)V /* */ // 119: astore_1 /* */ // 120: aload_1 /* */ // 121: ldc_w 863 /* */ // 124: ldc -21 /* */ // 126: invokevirtual 295 NET/worlds/core/IniFile:getIniString (Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String; /* */ // 129: astore_3 /* */ // 130: aload_3 /* */ // 131: ldc -21 /* */ // 133: invokevirtual 381 java/lang/String:equals (Ljava/lang/Object;)Z /* */ // 136: ifne +128 -> 264 /* */ // 139: new 150 java/lang/StringBuilder /* */ // 142: dup /* */ // 143: ldc_w 865 /* */ // 146: invokespecial 154 java/lang/StringBuilder: (Ljava/lang/String;)V /* */ // 149: aload_3 /* */ // 150: invokevirtual 166 java/lang/StringBuilder:append (Ljava/lang/String;)Ljava/lang/StringBuilder; /* */ // 153: ldc_w 867 /* */ // 156: invokevirtual 166 java/lang/StringBuilder:append (Ljava/lang/String;)Ljava/lang/StringBuilder; /* */ // 159: invokevirtual 170 java/lang/StringBuilder:toString ()Ljava/lang/String; /* */ // 162: invokestatic 869 NET/worlds/network/URL:make (Ljava/lang/String;)LNET/worlds/network/URL; /* */ // 165: invokevirtual 875 NET/worlds/network/URL:unalias ()Ljava/lang/String; /* */ // 168: astore 4 /* */ // 170: aconst_null /* */ // 171: astore 5 /* */ // 173: new 878 java/io/DataInputStream /* */ // 176: dup /* */ // 177: new 880 java/io/FileInputStream /* */ // 180: dup /* */ // 181: aload 4 /* */ // 183: invokespecial 882 java/io/FileInputStream: (Ljava/lang/String;)V /* */ // 186: invokespecial 883 java/io/DataInputStream: (Ljava/io/InputStream;)V /* */ // 189: astore 5 /* */ // 191: aload 5 /* */ // 193: invokevirtual 886 java/io/DataInputStream:readLine ()Ljava/lang/String; /* */ // 196: astore 6 /* */ // 198: aload 6 /* */ // 200: ifnull +49 -> 249 /* */ // 203: aload 6 /* */ // 205: astore_2 /* */ // 206: goto +43 -> 249 /* */ // 209: astore 6 /* */ // 211: aload 5 /* */ // 213: ifnull +51 -> 264 /* */ // 216: aload 5 /* */ // 218: invokevirtual 889 java/io/DataInputStream:close ()V /* */ // 221: goto +43 -> 264 /* */ // 224: astore 8 /* */ // 226: goto +38 -> 264 /* */ // 229: astore 7 /* */ // 231: aload 5 /* */ // 233: ifnull +13 -> 246 /* */ // 236: aload 5 /* */ // 238: invokevirtual 889 java/io/DataInputStream:close ()V /* */ // 241: goto +5 -> 246 /* */ // 244: astore 8 /* */ // 246: aload 7 /* */ // 248: athrow /* */ // 249: aload 5 /* */ // 251: ifnull +13 -> 264 /* */ // 254: aload 5 /* */ // 256: invokevirtual 889 java/io/DataInputStream:close ()V /* */ // 259: goto +5 -> 264 /* */ // 262: astore 8 /* */ // 264: new 302 java/lang/String /* */ // 267: dup /* */ // 268: new 150 java/lang/StringBuilder /* */ // 271: dup /* */ // 272: aload_0 /* */ // 273: invokespecial 892 NET/worlds/console/LoginWizard:getScriptServer ()Ljava/lang/String; /* */ // 276: invokestatic 670 java/lang/String:valueOf (Ljava/lang/Object;)Ljava/lang/String; /* */ // 279: invokespecial 154 java/lang/StringBuilder: (Ljava/lang/String;)V /* */ // 282: aload_2 /* */ // 283: invokevirtual 166 java/lang/StringBuilder:append (Ljava/lang/String;)Ljava/lang/StringBuilder; /* */ // 286: ldc_w 893 /* */ // 289: invokevirtual 166 java/lang/StringBuilder:append (Ljava/lang/String;)Ljava/lang/StringBuilder; /* */ // 292: aload_0 /* */ // 293: getfield 321 NET/worlds/console/LoginWizard:newHandshakeID Ljava/lang/String; /* */ // 296: invokevirtual 166 java/lang/StringBuilder:append (Ljava/lang/String;)Ljava/lang/StringBuilder; /* */ // 299: invokevirtual 170 java/lang/StringBuilder:toString ()Ljava/lang/String; /* */ // 302: invokespecial 695 java/lang/String: (Ljava/lang/String;)V /* */ // 305: areturn /* */ // Line number table: /* */ // Java source line #1041 -> byte code offset #0 /* */ // Java source line #1044 -> byte code offset #7 /* */ // Java source line #1045 -> byte code offset #18 /* */ // Java source line #1044 -> byte code offset #28 /* */ // Java source line #1045 -> byte code offset #31 /* */ // Java source line #1044 -> byte code offset #34 /* */ // Java source line #1047 -> byte code offset #35 /* */ // Java source line #1048 -> byte code offset #39 /* */ // Java source line #1049 -> byte code offset #42 /* */ // Java source line #1051 -> byte code offset #60 /* */ // Java source line #1054 -> byte code offset #73 /* */ // Java source line #1055 -> byte code offset #77 /* */ // Java source line #1056 -> byte code offset #86 /* */ // Java source line #1058 -> byte code offset #95 /* */ // Java source line #1059 -> byte code offset #99 /* */ // Java source line #1060 -> byte code offset #106 /* */ // Java source line #1062 -> byte code offset #109 /* */ // Java source line #1063 -> byte code offset #120 /* */ // Java source line #1064 -> byte code offset #130 /* */ // Java source line #1065 -> byte code offset #139 /* */ // Java source line #1066 -> byte code offset #170 /* */ // Java source line #1068 -> byte code offset #173 /* */ // Java source line #1069 -> byte code offset #191 /* */ // Java source line #1070 -> byte code offset #198 /* */ // Java source line #1071 -> byte code offset #203 /* */ // Java source line #1072 -> byte code offset #206 /* */ // Java source line #1075 -> byte code offset #211 /* */ // Java source line #1076 -> byte code offset #216 /* */ // Java source line #1077 -> byte code offset #221 /* */ // Java source line #1073 -> byte code offset #229 /* */ // Java source line #1075 -> byte code offset #231 /* */ // Java source line #1076 -> byte code offset #236 /* */ // Java source line #1077 -> byte code offset #241 /* */ // Java source line #1079 -> byte code offset #246 /* */ // Java source line #1075 -> byte code offset #249 /* */ // Java source line #1076 -> byte code offset #254 /* */ // Java source line #1077 -> byte code offset #259 /* */ // Java source line #1083 -> byte code offset #264 /* */ // Local variable table: /* */ // start length slot name signature /* */ // 0 306 0 this LoginWizard /* */ // 34 17 1 id int /* */ // 76 45 1 ini IniFile /* */ // 85 198 2 url String /* */ // 129 21 3 w String /* */ // 168 14 4 fn String /* */ // 171 84 5 in DataInputStream /* */ // 196 8 6 line String /* */ // 209 1 6 localIOException IOException /* */ // 229 18 7 localObject Object /* */ // 224 1 8 localIOException1 IOException /* */ // 244 1 8 localIOException2 IOException /* */ // 262 1 8 localIOException3 IOException /* */ // Exception table: /* */ // from to target type /* */ // 173 206 209 java/io/IOException /* */ // 211 221 224 java/io/IOException /* */ // 173 211 229 finally /* */ // 231 241 244 java/io/IOException /* */ // 249 259 262 java/io/IOException /* */ } /* */ /* */ @Deprecated /* */ public boolean action(Event event, Object what) /* */ { /* 1088 */ Object target = event.target; /* 1089 */ if ((target instanceof ForwardButton)) { /* 1090 */ if (this.currentScreen == 0) { /* 1091 */ validateKnownUserInfo(); /* 1092 */ } else if (this.currentScreen == 1) { /* 1093 */ WebBrowser.setDisabled(false); /* 1094 */ selectScreen(2); /* 1095 */ } else if ((this.currentScreen == 2) || (this.currentScreen == 12)) { /* 1096 */ selectScreen(4); /* 1097 */ } else if (this.currentScreen == 5) { /* 1098 */ validateNewUserInfo(); /* 1099 */ } else if (this.currentScreen == 3) { /* 1100 */ done(true); /* 1101 */ } } else if ((target instanceof BackButton)) { /* 1102 */ if (this.currentScreen == 0) { /* 1103 */ if (this.users.size() > 0) { /* 1104 */ done(false); /* */ } else /* 1106 */ selectScreen(1); /* 1107 */ } else if (this.currentScreen == 1) { /* 1108 */ if (this.users.size() == 0) { /* 1109 */ done(false); /* */ } else /* 1111 */ selectScreen(0); /* 1112 */ } else if ((this.currentScreen == 2) || (this.currentScreen == 12)) { /* 1113 */ selectScreen(this.users.size() > 0 ? 0 : 1); /* 1114 */ } else if (this.currentScreen == 5) { /* 1115 */ if ((this.newSerialNumber != null) && (this.newSerialNumber.length() > 6) && /* 1116 */ (this.newHandshakeID != null)) { /* 1117 */ selectScreen(12); /* 1118 */ } else if (this.users.size() > 0) { /* 1119 */ selectScreen(0); /* */ } else /* 1121 */ done(false); /* 1122 */ } else if (this.currentScreen == 4) { /* 1123 */ if (this.cf != null) /* 1124 */ this.cf.close(); /* 1125 */ selectScreen(12); /* 1126 */ } else if (this.currentScreen == 8) { /* 1127 */ selectScreen(this.loginFrom); /* 1128 */ } else if (this.currentScreen == 9) { /* 1129 */ selectScreen(this.errorFrom); /* 1130 */ } else if ((this.currentScreen == 11) || /* 1131 */ (this.currentScreen == 10)) { /* 1132 */ selectScreen(0); /* 1133 */ } } else if (target == this.pwMailbackButtonKnown) /* */ { /* 1135 */ new SendURLAction(getScriptServer() + "emailback.pl", true).startBrowser(); /* 1136 */ } else if (target == this.typedUsername) { /* 1137 */ this.knownPassword.requestFocus(); /* 1138 */ } else if (target == this.knownPassword) { /* 1139 */ validateKnownUserInfo(); /* 1140 */ } else if (target == this.createNewUsernameButton) { /* 1141 */ String redir = IniFile.override().getIniString( /* 1142 */ "CreateUserRedirect", "Fred"); /* 1143 */ if (redir.equals("Fred")) { /* 1144 */ if (this.newHandshakeID != null) { /* 1145 */ selectScreen(12); /* 1146 */ } else if (this.newSerialNumber == null) { /* 1147 */ selectScreen(2); /* */ } else /* 1149 */ selectScreen(5); /* */ } else { /* 1151 */ new SendURLAction(URL.make(redir)).startBrowser(); /* */ } /* 1153 */ } else if (target == this.alternateBrowserButton) { /* 1154 */ WebBrowser.setDisabled(true); /* 1155 */ selectScreen(2); /* 1156 */ } else if (target == this.signInButton) { /* 1157 */ selectScreen(0); /* 1158 */ } else if ((target == this.noEmailButton) || (target == this.showRegButton)) /* */ { /* */ /* 1161 */ selectScreen(2); /* */ } else { /* 1163 */ return false; } /* 1164 */ return true; /* */ } /* */ /* */ @Deprecated /* */ public boolean keyDown(Event event, int key) { /* 1169 */ if (key == 10) { /* 1170 */ action(event, null); /* 1171 */ return true; /* */ } /* */ /* 1174 */ return super.keyDown(event, key); /* */ } /* */ /* */ @Deprecated /* */ public boolean handleEvent(Event event) { /* 1179 */ if (this.isDialogDisabled) /* 1180 */ return false; /* 1181 */ if ((event.id == 201) && /* 1182 */ (this.loginState == 2)) { /* 1183 */ return true; /* */ } /* 1185 */ return super.handleEvent(event); /* */ } /* */ /* */ protected boolean done(boolean confirmed) { /* 1189 */ boolean ret = super.done(confirmed); /* 1190 */ firstTimeDone = true; /* 1191 */ return ret; /* */ } /* */ /* */ public void dialogDone(Object who, boolean confirmed) {} /* */ /* */ public void dialogDisable(boolean disable) /* */ { /* 1198 */ this.isDialogDisabled = disable; /* 1199 */ super.dialogDisable(disable); /* */ } /* */ /* */ public String toString() { /* 1203 */ return "LoginWizard" + this.id; /* */ } /* */ } /* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\console\LoginWizard.class * Java compiler version: 6 (50.0) * JD-Core Version: 0.7.1 */