public RejisterPage() { this.InitializeComponent(); this.languageInit(); this.UserNametextBox.Focus(); bool flag = !GlobalData.Connectionflag || !Connection.isConnected; if (flag) { Connection.Start(); } bool isConnected = Connection.isConnected; if (isConnected) { GlobalData.Connectionflag = true; } bool rejisterflag = GlobalData.Rejisterflag; if (rejisterflag) { this.UserNametextBox.Text = GlobalData.UserName; this.passwordBox.Password = GlobalData.Password; this.UserNametextBox.IsEnabled = false; this.passwordBox.IsEnabled = false; bool rememberflag = GlobalData.Rememberflag; if (rememberflag) { this.remember_check.IsChecked = new bool?(true); this.remember_check.IsEnabled = false; } bool flag2 = GlobalData.Automaticflag == "1"; if (flag2) { this.automatic_check.IsChecked = new bool?(true); this.automatic_check.IsEnabled = false; } } bool flag3 = !GlobalData.Rejisterflag; if (flag3) { bool flag4 = XMLHelper.UsersGetNum() > 0; if (flag4) { this.UserNametextBox.Text = XMLHelper.UsersReader("UsersFile", 0); this.passwordBox.Password = XMLHelper.UsersReader("UsersFile", 1); this.remember_check.IsChecked = new bool?(true); GlobalData.Rememberflag = true; bool flag5 = XMLHelper.UsersReader("UsersFile", 2) == "1"; if (flag5) { this.Login(); this.automatic_check.IsChecked = new bool?(true); GlobalData.Automaticflag = "1"; } } } Connection.login += new Connection.RegisterW(this.LoginReturn); Connection.dislogin += new Connection.Registerp(this.DisLogin); RejisterPage.loginList = new ObservableCollection <string>(); RejisterPage.loginList.Add(MultiLanguage.UHuser); RejisterPage.loginList.Add(MultiLanguage.BBuser); this.LoginStylecomboBox.DataContext = RejisterPage.loginList; bool flag6 = GlobalData.userStyle == 1; if (flag6) { this.UserName.Visibility = Visibility.Collapsed; this.UserNametextBox.Visibility = Visibility.Collapsed; this.Password.Visibility = Visibility.Collapsed; this.passwordBox.Visibility = Visibility.Collapsed; this.Loginbutton.Visibility = Visibility.Collapsed; this.Exitbutton.Visibility = Visibility.Collapsed; this.Register.Visibility = Visibility.Collapsed; this.Forget.Visibility = Visibility.Collapsed; this.remember_check.Visibility = Visibility.Collapsed; this.automatic_check.Visibility = Visibility.Collapsed; this.PhoneNumbe.Visibility = Visibility.Visible; this.PhoneNumbertextBox.Visibility = Visibility.Visible; this.Verify.Visibility = Visibility.Visible; this.VerifyBox.Visibility = Visibility.Visible; this.Loginbutton2.Visibility = Visibility.Visible; this.Exitbutton2.Visibility = Visibility.Visible; this.Reminder.Visibility = Visibility.Visible; this.SendVerifyButton.Visibility = Visibility.Visible; this.LoginStylecomboBox.SelectedIndex = 1; } else { this.UserName.Visibility = Visibility.Visible; this.UserNametextBox.Visibility = Visibility.Visible; this.Password.Visibility = Visibility.Visible; this.passwordBox.Visibility = Visibility.Visible; this.Loginbutton.Visibility = Visibility.Visible; this.Exitbutton.Visibility = Visibility.Visible; this.Register.Visibility = Visibility.Visible; this.Forget.Visibility = Visibility.Visible; this.remember_check.Visibility = Visibility.Visible; this.automatic_check.Visibility = Visibility.Visible; this.PhoneNumbe.Visibility = Visibility.Collapsed; this.PhoneNumbertextBox.Visibility = Visibility.Collapsed; this.Verify.Visibility = Visibility.Collapsed; this.VerifyBox.Visibility = Visibility.Collapsed; this.Loginbutton2.Visibility = Visibility.Collapsed; this.Exitbutton2.Visibility = Visibility.Collapsed; this.Reminder.Visibility = Visibility.Collapsed; this.SendVerifyButton.Visibility = Visibility.Collapsed; this.LoginStylecomboBox.SelectedIndex = 0; } bool bBRejisterflag = GlobalData.BBRejisterflag; if (bBRejisterflag) { this.PhoneNumbertextBox.Text = GlobalData.phoneNumber; this.VerifyBox.Text = GlobalData.verifycode; this.PhoneNumbertextBox.IsEnabled = false; this.VerifyBox.IsEnabled = false; this.SendVerifyButton.IsEnabled = false; } else { bool flag7 = XMLHelper.BBUsersGetNum() > 0; if (flag7) { GlobalData.BBRejisterflag = true; GlobalData.phoneNumber = XMLHelper.BBUsersReader("BBUsersFile", 0); GlobalData.verifycode = XMLHelper.BBUsersReader("BBUsersFile", 1); GlobalData.weight = XMLHelper.BBUsersReader("BBUsersFile", 2); GlobalData.openId = XMLHelper.BBUsersReader("BBUsersFile", 3); this.PhoneNumbertextBox.Text = GlobalData.phoneNumber; this.VerifyBox.Text = GlobalData.verifycode; this.PhoneNumbertextBox.IsEnabled = false; this.VerifyBox.IsEnabled = false; this.SendVerifyButton.IsEnabled = false; } } bool flag8 = XMLHelper.UsersInforGetNum() > 0; if (flag8) { GlobalData.Size = XMLHelper.UsersInforReader("Information", 7); } }