public new void Setup() { var user = CreateUserViaApi(); _webDriver.Navigate().GoToUrl("https://newbookmodels.com/auth/signin"); _js.ExecuteScript($"localStorage.setItem('access_token','{user.TokenData.Token}');"); _accountInfoPage = new AccountInfoPage(_webDriver); }
public AccountMainInfo(MainWindow mWindow, AccountInfoPage accWindow) { InitializeComponent(); // ссылаемся на главное окно _mWindow = mWindow; // ссылаемся на окно с пользовательской инфой _accWindow = accWindow; // инициализируем приватное поле с информацией о пользователе userInformation = mWindow._userInfo; // изменяем изображения пользователя на странице из главного окна ChangeImageLogo(mWindow.ImageLogo.ImageSource); // подгружаем данные об пользователе в LsitBox ListBoxUserInfo.ItemsSource = userInfoList(mWindow._userInfo); }
public void OnClickTopButton(int num) { switch ((POPUP_STATE)num) { case POPUP_STATE.AccountInfo: { if (UserDataManager.Inst.GetUserInfo() == null) { CSVData.Inst.InitCSVData(); return; } else { if (AccountInfoPage.checkInst()) { DebugLog.Log(false, "running Account Info Page"); } else { SetTextBackButton("Account Info"); GameObject objAccountInfoPage = Instantiate(Resources.Load("UI/Lobby/AccountInfoPage")) as GameObject; objAccountInfoPage.transform.SetParent(upperUI.transform); objAccountInfoPage.GetComponent <RectTransform>().anchoredPosition = Vector2.zero; } } } break; case POPUP_STATE.Mail: { if (MailInfoPage.checkInst()) { DebugLog.Log(false, "running Mail Info Page"); } else { GameObject objMailInfoPage = Instantiate(Resources.Load("UI/Lobby/MailInfoPage")) as GameObject; objMailInfoPage.transform.SetParent(upperUI.transform); objMailInfoPage.GetComponent <RectTransform>().anchoredPosition = new Vector2(0, -45); #if UNITY_EDITOR Cheat.Inst.RequestMailListCheat(); #else PacketManager.Inst.RequestMailList(1); #endif } } break; case POPUP_STATE.Setting: { GameObject objSetting = Instantiate(Resources.Load("UI/Lobby/Setting")) as GameObject; objSetting.transform.SetParent(upperUI.transform); objSetting.GetComponent <RectTransform>().anchoredPosition = Vector2.zero; } break; case POPUP_STATE.PVP: { SetImageIconBackButton((POPUP_STATE)num); SetTextBackButton("PVP"); objSubView = Instantiate(Resources.Load("UI/Lobby/PVPInfoPage")) as GameObject; objSubView.transform.SetParent(this.transform); objSubView.GetComponent <RectTransform>().anchoredPosition = Vector2.zero; BackbuttonUI.SetActive(true); } break; default: return; } }