Пример #1
0
        public PatronMainMenuForm(FormClose hClose, LogoutButton hLogout, ViewBooksButton hViewBooks, CheckOutButton hCheckOut, RenewBooksButton hRenewBooks)
        {
            handleClose      = hClose;
            handleLogOut     = hLogout;
            handleViewBooks  = hViewBooks;
            handleCheckOut   = hCheckOut;
            handleRenewBooks = hRenewBooks;

            InitializeComponent();
            BackColor = Color.SteelBlue;
            uxWelcomeLabel.BackColor = Color.LightSteelBlue;
            uxButtonPanel.BackColor  = Color.LightSteelBlue;
        }
Пример #2
0
        public Phone NavigateToCheckOut()
        {
            string      currentPriceInCart = CurrentPrice.Text;
            IWebElement element            = driver.FindElement(By.ClassName("wpsc_buy_button"));

            AddToCartButton.Click();
            WebDriverWait wait = new WebDriverWait(driver, controlTimeOut);

            wait.Until((d) => driver.FindElement(notificationPopup).Displayed);
            CheckOutButton.Click();
            DoPageTransition();
            return(this);
        }
        public AdminMainMenuForm(FormClose hClose, LogoutButton hLogout, ViewBooksButton hViewBooks, CheckOutButton hCheckOut, RenewBooksButton hRenewBooks, ReturnBooksButton hReturnBooks, UpdateConditionButton hUpdate, RetireBookButton hRetire, ResetPasswordButton hReset, AddBookButton hAdd, CreateAccountButton hCreate)
        {
            handleClose           = hClose;
            handleLogOut          = hLogout;
            handleViewBooks       = hViewBooks;
            handleCheckOut        = hCheckOut;
            handleRenewBooks      = hRenewBooks;
            handleReturnBooks     = hReturnBooks;
            handleUpdateCondition = hUpdate;
            handleRetireBook      = hRetire;
            handleResetPassword   = hReset;
            handleAddBook         = hAdd;
            handleCreateAccount   = hCreate;

            InitializeComponent();
            BackColor = Color.SteelBlue;
            uxWelcomeLabel.BackColor = Color.LightSteelBlue;
            uxButtonPanel.BackColor  = Color.LightSteelBlue;
        }
Пример #4
0
        private void SetContentViewBindings()
        {
            SetContentView(Resource.Layout.Main);

            //commands setting

            CheckInButton.SetCommand(_mainViewModel.Watcher.CheckInCommand);
            CheckOutButton.SetCommand(_mainViewModel.Watcher.CheckOutCommand);
            BreakInButton.SetCommand(_mainViewModel.Watcher.BreakInCommand);
            BreakOutButton.SetCommand(_mainViewModel.Watcher.BreakOutCommand);
            ResetButton.SetCommand(_mainViewModel.Watcher.ResetCommand);

            //labels setting

            Func <DateTime?, string> displayClock = x => (string)(new ClockConverter().Convert(x));

            this.SetBinding(() => _mainViewModel.Watcher.State.Data.StartedAt, () => StartedAtLabel.Text)
            .ConvertSourceToTarget(displayClock);

            this.SetBinding(() => _mainViewModel.Watcher.State.Data.StoppedAt, () => StoppedAtLabel.Text)
            .ConvertSourceToTarget(displayClock);

            this.SetBinding(() => _mainViewModel.Watcher.State.Data.BreakStartedAt, () => BreakStartedAtLabel.Text)
            .ConvertSourceToTarget(displayClock);

            this.SetBinding(() => _mainViewModel.Watcher.State.Data.BreakStoppedAt, () => BreakStoppedAtLabel.Text)
            .ConvertSourceToTarget(displayClock);

            Func <TimeSpan, string> displaySpan = x => (string)(new TimeSpanConverter().Convert(x));

            this.SetBinding(() => _mainViewModel.Watcher.State.Data.CheckInTime, () => CheckInTimeLabel.Text)
            .ConvertSourceToTarget(displaySpan);

            this.SetBinding(() => _mainViewModel.Watcher.State.Data.BreaksTotal, () => BreakInTimeLabel.Text)
            .ConvertSourceToTarget(displaySpan);

            this.SetBinding(() => _mainViewModel.Watcher.State.Data.WorkingTime, () => WorkingTimeLabel.Text)
            .ConvertSourceToTarget(displaySpan);
        }
Пример #5
0
 public void CompleteTransaction()
 {
     Console.WriteLine("Inside CompleteTransaction");
     Console.WriteLine(CheckOutButton);
     CheckOutButton.Click();
     //for page reload
     //address tab
     System.Threading.Thread.Sleep(5000);
     Console.WriteLine("After First Click and Sleep");
     CheckOutButton = PropertiesCollection.driver.FindElement(By.Name("processAddress"));
     Console.WriteLine(CheckOutButton);
     CheckOutButton.Click();
     //shipping tab
     System.Threading.Thread.Sleep(5000);
     Console.WriteLine("After second click and sleep");
     CheckOutButton = PropertiesCollection.driver.FindElement(By.Name("processCarrier"));
     Console.WriteLine(CheckOutButton);
     //terms of service
     System.Threading.Thread.Sleep(5000);
     Console.WriteLine("Accept terms");
     AcceptBox = PropertiesCollection.driver.FindElement(By.Id("cgv"));
     Console.WriteLine("Clicking check box " + AcceptBox);
     AcceptBox.Click();
     CheckOutButton.Click();
     //Payment
     System.Threading.Thread.Sleep(5000);
     Console.WriteLine("Pay check");
     CheckOutButton = PropertiesCollection.driver.FindElement(By.ClassName("cheque"));
     Console.WriteLine(CheckOutButton);
     CheckOutButton.Click();
     //confirm order
     System.Threading.Thread.Sleep(5000);
     Console.WriteLine("Confirm Order");
     CheckOutButton = PropertiesCollection.driver.FindElement(By.XPath("//*[@id=\"cart_navigation\"]/button"));
     Console.WriteLine("Checkout button " + CheckOutButton);
     CheckOutButton.Click();
 }
Пример #6
0
 //----< test for CheckOut >---------------------------------
 void testCheckOut()
 {
     CheckOuttxtbox.Text = "pkg2.h";
     CheckOutButton.RaiseEvent(new RoutedEventArgs(Button.ClickEvent, CheckOutButton));
 }