private static void OnGoTrainingMode() { ChangeAppModeState(ModeState.Training); var chosePage = new ChoosePage(); ChangeMainWindowContent(chosePage, true); }
public void test_validChoose() { PopulateResource(TestSource.ChoiceRedemption); string url, code, pin, cvv, expiry, firstName, lastName, staffNumber, emailAddress; string updateFirstName, updateLastName, updateStaffNumber, updateEmailAddress; string addressLine1, addressLine2, cityTown, county, postCode; double orderTotal = 0; foreach (DataRow row in _dtResource.Rows) { choosePage = new ChoosePage(GetDriver(), GetTest(), GetWait(), loginPage); confirmOrder = new ConfirmYourOrder(GetDriver(), GetTest(), GetWait()); url = row["URL"].ToString(); code = row["Code"].ToString(); pin = row["Pin"].ToString(); cvv = row["CV2"].ToString(); expiry = row["ExpiryDate"].ToString(); firstName = row["FirstName"].ToString(); lastName = row["LastName"].ToString(); staffNumber = row["StaffNumber"].ToString(); emailAddress = row["EmailAddress"].ToString(); //for updating Delivery Details updateFirstName = row["UpdateFirstName"].ToString(); updateLastName = row["UpdateLastName"].ToString(); updateStaffNumber = row["UpdateStaffNumber"].ToString(); updateEmailAddress = row["UpdateEmailAddress"].ToString(); // Address Details addressLine1 = row["AddressLine1"].ToString(); addressLine2 = row["AddressLine2"].ToString(); cityTown = row["CityTown"].ToString(); county = row["County"].ToString(); postCode = row["PostCode"].ToString(); // getting to the choose page bool valid = choosePage.gotoChoosePage(url, code, pin, cvv, expiry); if (!valid) { continue; } // check if the Gift Type filter available and working choosePage.filterSection_GiftTypeSelection(); // check if the Sort By filter available and working choosePage.filterSection_SortBySelection(); // check if search functionality working choosePage.filterSection_Search(); // viewing and adding codes choosePage.ViewAddCodesTest(); // adding products to the basket choosePage.AddProducttoBasket(ref orderTotal); // checkout process choosePage.CheckoutProcess(orderTotal); // confirm your order page population and confirming order confirmOrder.fillingDetailsandOrderComplete(firstName, lastName, emailAddress, staffNumber, postCode, updateFirstName, updateLastName, updateStaffNumber, updateEmailAddress, addressLine1, addressLine2, cityTown, county); } }
private static void OnGoExamineMode() { if (AppState.LoginState != LoginState.Authorized) { MessageBox.Show(Application.Current.MainWindow, "Для прохождения экзамена необходимо авторизоваться"); return; } ChangeAppModeState(ModeState.Examine); var chosePage = new ChoosePage(); ChangeMainWindowContent(chosePage, true); }
public void GetPageCells(ChoosePage cp) { switch (cp) { case ChoosePage.Add: Debug.Log(GetPageCounts()); if (currentpage < GetPageCounts()) { currentpage++; } break; case ChoosePage.Minus: if (currentpage > 0) { currentpage--; } break; case ChoosePage.Init: break; default: break; } ArrayList arrtemp = new ArrayList(); for (int i = (currentpage) * ProCellCounts; i < (currentpage + 1) * ProCellCounts; i++) { if (arr.Count > i) { object o = arr[i]; arrtemp.Add(o); } } //回调 if (call != null && arrtemp.Count != 0) { call(arrtemp, currentpage, GetPageCounts()); } }
public void Refreshcurrent(ChoosePage cp) { bool isfind = true; switch (cp) { case ChoosePage.Add: if (currentmode < GetAllpages() - 1) { currentmode++; } else { isfind = false; } break; case ChoosePage.Minus: if (currentmode > 0) { currentmode--; } else { isfind = false; } break; case ChoosePage.Init: break; default: break; } if (isfind) { Refreshcurrent(Allmodels[currentmode]); } }