Inheritance: MonoBehaviour
Ejemplo n.º 1
0
        private void UpdateCurrentPage()
        {
            var index = _walkthroughPageViewController?.CurrentIndex;

            if (index != null)
            {
                switch (index)
                {
                case 0:
                    NextButton.SetTitle(NextButttonBeginningTitle, UIControlState.Normal);
                    SkipButton.Hidden = false;
                    break;

                case 1:
                    NextButton.SetTitle(NextButttonBeginningTitle, UIControlState.Normal);
                    SkipButton.Hidden = false;
                    break;

                case 2:
                    NextButton.SetTitle(NextButtonEndingTitle, UIControlState.Normal);
                    SkipButton.Hidden = true;
                    break;

                default:
                    break;
                }

                PageControl.CurrentPage = (System.nint)index;
            }
        }
Ejemplo n.º 2
0
        void ReleaseDesignerOutlets()
        {
            if (CalendarGridWrapperView != null)
            {
                CalendarGridWrapperView.Dispose();
                CalendarGridWrapperView = null;
            }

            if (CalendarGridWrapperViewHeight != null)
            {
                CalendarGridWrapperViewHeight.Dispose();
                CalendarGridWrapperViewHeight = null;
            }

            if (PrevButton != null)
            {
                PrevButton.Dispose();
                PrevButton = null;
            }

            if (NextButton != null)
            {
                NextButton.Dispose();
                NextButton = null;
            }

            if (MonthName != null)
            {
                MonthName.Dispose();
                MonthName = null;
            }
        }
        internal int SearchListings(string CategoryToSearch, string TitleToSearch, string DescriptionToSearch)
        {
            //Initialize the Record count to 0
            int RecordFound = 0;

            Thread.Sleep(2000);

            //loop through the pages
            for (int i = 0; i < PaginationButtons.Count - 2; i++)
            {
                Thread.Sleep(2000);

                //Check the Category, Title and Description values for each row in a page, if matches increment the record found variable
                foreach (IWebElement listingRecord in TableRows)
                {
                    string Category    = listingRecord.FindElement(By.XPath("td[2]")).Text;
                    string Title       = listingRecord.FindElement(By.XPath("td[3]")).Text;
                    string Description = listingRecord.FindElement(By.XPath("td[4]")).Text;
                    if (Category == CategoryToSearch && Title == TitleToSearch && Description == DescriptionToSearch)
                    {
                        RecordFound++;
                    }
                }

                //If Next button is enable click it to Navigate to next page
                if (NextButton.Enabled == true)
                {
                    NextButton.Click();
                }
            }

            //Returning the records found
            return(RecordFound);
        }
        public override void PageIsBecomingActive()
        {
            bedStartingTemp = printer.Connection.ActualBedTemperature;

            runningInterval = UiThread.SetInterval(ShowTempChangeProgress, 1);

            if (bedTargetTemp > 0)
            {
                // start heating the bed and show our progress
                printer.Connection.TargetBedTemperature = bedTargetTemp;
            }

            if (hotEndTargetTemp > 0)
            {
                // start heating the hot end and show our progress
                printer.Connection.SetTargetHotendTemperature(0, hotEndTargetTemp);
            }

            NextButton.Enabled = false;

            // if we are trying to go to a temp of 0 than just move on to next window
            if (bedTargetTemp == 0 && hotEndTargetTemp == 0)
            {
                // advance to the next page
                UiThread.RunOnIdle(() => NextButton.InvokeClick());
            }

            base.PageIsBecomingActive();
        }
Ejemplo n.º 5
0
 public QuestionPage Answer(int answerOrder, bool requireButtonAwait = true)
 {
     _driver.FindElement(By.XPath("(//span[contains(@class, 'answer-radio')])[" + answerOrder + "]")).Click();
     NextButton.Click();
     AwaitNextQuestionPage(requireButtonAwait);
     return(new QuestionPage(_driver));
 }
Ejemplo n.º 6
0
        private void BuildHeader()
        {
            Alignment toolbar_alignment = new Alignment(0.0f, 0.0f, 1.0f, 1.0f);

            toolbar_alignment.TopPadding    = 3;
            toolbar_alignment.BottomPadding = 3;

            header_toolbar              = (Toolbar)ActionService.UIManager.GetWidget("/MuinsheeHeaderToolbar");
            header_toolbar.ShowArrow    = false;
            header_toolbar.ToolbarStyle = ToolbarStyle.BothHoriz;

            toolbar_alignment.Add(header_toolbar);
            toolbar_alignment.ShowAll();

            main_vbox.PackStart(toolbar_alignment, false, false, 0);

            Widget next_button = new NextButton(ActionService);

            next_button.Show();
            ActionService.PopulateToolbarPlaceholder(header_toolbar, "/MuinsheeHeaderToolbar/NextArrowButton", next_button);

            ConnectedVolumeButton volume_button = new ConnectedVolumeButton();

            volume_button.Show();
            ActionService.PopulateToolbarPlaceholder(header_toolbar, "/MuinsheeHeaderToolbar/VolumeButton", volume_button);
        }
        public override PluginExecutionResult PerformAction()
        {
            WaitForAvailable(ShortTimeout);
            if (HPAccessControlJAServerNameEdit.EnterText(_jaServerName, ShortTimeout) != ResultCode.Passed)
            {
                return(new PluginExecutionResult(PluginResult.Failed, "Failed to Enter JA Server Name"));
            }

            if (HPAccessControlIPMServerNameEdit.EnterText(_ipmServerName, ShortTimeout) != ResultCode.Passed)
            {
                return(new PluginExecutionResult(PluginResult.Failed, "Failed to Enter IPM Server Name"));
            }

            if (HPAccessControlPullPrintServerNameEdit.EnterText(_pullprintServerName, ShortTimeout) != ResultCode.Passed)
            {
                return(new PluginExecutionResult(PluginResult.Failed, "Failed to Enter Pull Print Server Name"));
            }

            Thread.Sleep(HumanTimeSpan);
            if (NextButton.Click(ShortTimeout) != ResultCode.Passed)
            {
                return(new PluginExecutionResult(PluginResult.Failed, string.Format("Failed to proceed beyond {0} Screen", ScreenName)));
            }
            return(new PluginExecutionResult(PluginResult.Passed));
        }
        void ReleaseDesignerOutlets()
        {
            if (NextButton != null)
            {
                NextButton.Dispose();
                NextButton = null;
            }

            if (PreviousButton != null)
            {
                PreviousButton.Dispose();
                PreviousButton = null;
            }

            if (PageControl != null)
            {
                PageControl.Dispose();
                PageControl = null;
            }

            if (StartButton != null)
            {
                StartButton.Dispose();
                StartButton = null;
            }
        }
Ejemplo n.º 9
0
 public QuestionPage Answer(string answerText)
 {
     Driver.FindElement(By.XPath("//label[contains(@class, 'multiple-choice--radio') and text() = \"" + answerText + "\"]")).Click();
     NextButton.Click();
     AwaitNextQuestionPage();
     return(new QuestionPage(Driver));
 }
Ejemplo n.º 10
0
        private void timer1_Tick(object sender, EventArgs e)
        {
            //if (sender != Timp)
            //  return;

            if (TimeLeft > 0)
            {
                TimeLeft--;
                TimeLabel.Text = (TimeLeft / 60).ToString() + ":" + (TimeLeft % 60).ToString();
                return;
            }

            if (quizController.Quiz.Corecte >= 22)
            {
                IntrebareTextBox.Text = "Timpul a expirat! Ai trecut!";
            }
            else
            {
                IntrebareTextBox.Text = "Timpul a expirat! Ai picat!";
            }

            NextButton.Hide();
            DeleteAnswersButton.Hide();
            AddQuestionButton.Show();
            Timp.Stop();
        }
Ejemplo n.º 11
0
 public void DialogNextIndex(int variation)
 {
     _indexText++;
     NextButton.SetActive(true);
     _indexText = variation;
     ActionCommand(_allText[_indexText]);
 }
Ejemplo n.º 12
0
 public Form1()
 {
     InitializeComponent();
     ResetButton.Hide();
     NextButton.Hide();
     DeleteAnswersButton.Hide();
 }
        private void SlideshowPage_KeyDown(object sender, KeyRoutedEventArgs e)
        {
            if (e.Key == Windows.System.VirtualKey.GamepadRightShoulder)
            {
                Next();
                e.Handled = true;
            }
            else if (e.Key == Windows.System.VirtualKey.GamepadLeftShoulder)
            {
                Previous();
                e.Handled = true;
            }
            else if (!_navVisible)
            {
                _navVisible = true;
                e.Handled   = true;
                if (App.IsXbox())
                {
                    NextButton.Focus(FocusState.Keyboard);
                }

                ControlsContainer.IsHitTestVisible = true;
                ControlsContainer.Fade(1, 200).Start();
            }

            _timer.Start();
        }
Ejemplo n.º 14
0
 protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
 {
     // Left Key
     if (keyData == Keys.Left && !userInputTextBox.Focused)
     {
         PreviousButton.PerformClick();
         return(true);
     }
     // Right Key
     else if (keyData == Keys.Right && !userInputTextBox.Focused)
     {
         NextButton.PerformClick();
         return(true);
     }
     // Space Key
     else if (keyData == Keys.Space && !userInputTextBox.Focused)
     {
         cardButton.PerformClick();
         return(true);
     }
     // Enter Key
     else if (keyData == Keys.Enter && userInputTextBox.Focused)
     {
         AddAnotherAnswerButton.PerformClick();
         cardButton.Focus();
         return(true);
     }
     return(base.ProcessCmdKey(ref msg, keyData));
 }
Ejemplo n.º 15
0
        public void NextButtonListensforProfileChanges()
        {
            var first = new NextButton()
            {
                Height = 1
            };
            var second = new NextButton()
            {
                Height = 2
            };

            _appSettings.SetupSequence(m => m.NextButton)
            .Returns(first)
            .Returns(second);

            var  vm     = new NextButtonViewModel(_appSettings.Object, _dialog.Object, _session.Object, _messageBus.Object);
            bool raised = false;

            vm.PropertyChanged += (_, __) => raised = true;

            Assert.AreEqual(first.Height, vm.Height);
            _appSettings.Raise(m => m.ProfileChanged += null, EventArgs.Empty);

            Assert.IsFalse(vm.IsEditing);
            Assert.IsTrue(raised);
            Assert.AreEqual(second.Height, vm.Height);
        }
Ejemplo n.º 16
0
 public QuestionPage Answer(int answerOrder, bool requireButtonAwait = true)
 {
     Driver.FindElement(By.XPath("(//label[contains(@class, 'multiple-choice--radio')])[" + answerOrder + "]")).Click();
     NextButton.Click();
     AwaitNextQuestionPage(requireButtonAwait);
     return(new QuestionPage(Driver));
 }
Ejemplo n.º 17
0
        /// <summary>
        ///     Jukebox controls
        /// </summary>
        private void HandleJukeboxInput()
        {
            if (DialogManager.Dialogs.Count != 0)
            {
                return;
            }

            if (KeyboardManager.IsUniqueKeyPress(Keys.Z))
            {
                PreviousButton.FireButtonClickEvent();
            }

            if (KeyboardManager.IsUniqueKeyPress(Keys.X))
            {
                RestartButton.FireButtonClickEvent();
                NotificationManager.Show(NotificationLevel.Info, "Restarted track");
            }

            if (KeyboardManager.IsUniqueKeyPress(Keys.C))
            {
                var isPaused = AudioEngine.Track.IsPaused;
                PauseResumeButton.FireButtonClickEvent();
                NotificationManager.Show(NotificationLevel.Info, isPaused ? "Resumed track" : "Paused track");
            }

            if (KeyboardManager.IsUniqueKeyPress(Keys.V))
            {
                NextButton.FireButtonClickEvent();
            }
        }
Ejemplo n.º 18
0
        void ReleaseDesignerOutlets()
        {
            if (HeadingLabel != null)
            {
                HeadingLabel.Dispose();
                HeadingLabel = null;
            }

            if (IntoImageView != null)
            {
                IntoImageView.Dispose();
                IntoImageView = null;
            }

            if (ContentLabel != null)
            {
                ContentLabel.Dispose();
                ContentLabel = null;
            }

            if (PageControl != null)
            {
                PageControl.Dispose();
                PageControl = null;
            }

            if (NextButton != null)
            {
                NextButton.Dispose();
                NextButton = null;
            }
        }
Ejemplo n.º 19
0
        public T SelectFactorFlow <T>(params string[] factorFlow) where T : BasePage
        {
            var node = GetLastNode();

            node.Info("Question: " + QuestionLable.Text);
            string currentUrl = WebDriver.Url;

            foreach (var item in factorFlow)
            {
                if (!IsElementDisplayed(_txtFactor))
                {
                    FactorButton(item).Click();
                    node.Info("Select the answer: " + item);
                }
                else
                {
                    FactorTextbox.InputText(item);
                    node.Info("lnput the answer: " + item);
                }
            }
            WaitForElementEnabled(_btnNext);
            NextButton.Click();
            WaitForUrlChanged(currentUrl);
            var page = (T)Activator.CreateInstance(typeof(T));

            page.WaitForPageLoad();
            return(page);
        }
Ejemplo n.º 20
0
        public dynamic SelectNextButton()
        {
            dynamic page;
            string  currentUrl = WebDriver.Url;

            NextButton.ScrollIntoViewBottom();
            WaitForElementClickable(_btnNext);
            NextButton.ClickWithJS();
            if (IsElementDisplayed(_eleWarningBar, 3))
            {
                GetLastNode().Info("Closing warning bar");
                DismissButton.ClickWithJS();
                WaitForElementInvisible(_eleWarningBar);
                NextButton.ClickWithJS();
            }
            WaitForUrlChanged(currentUrl);
            if (WebDriver.Url.Contains("vehicle-suggestions"))
            {
                page = new VehicleSuggestionsPage();
            }
            else
            {
                page = new VehicleEntryPage();
            }
            page.WaitForPageLoad();
            return(page);
        }
Ejemplo n.º 21
0
        private void MainForm_KeyUp(object sender, KeyEventArgs e)
        {
            if (InvokeRequired)
            {
                Invoke(new KeyEventHandler(MainForm_KeyUp), sender, e);
                return;
            }

            if (e.KeyCode == Keys.Back ||
                e.KeyCode == Keys.BrowserBack ||
                (e.Alt && e.KeyCode == Keys.Left))
            {
                BackButton.PerformClick();
                return;
            }

            if (e.KeyCode == Keys.BrowserForward ||
                (e.Alt && e.KeyCode == Keys.Right))
            {
                NextButton.PerformClick();
                return;
            }

            if (e.KeyCode == Keys.F5 ||
                e.KeyCode == Keys.BrowserRefresh)
            {
                RefreshButton.PerformClick();
                return;
            }
        }
Ejemplo n.º 22
0
        ///// <summary>
        ///// JQuery selector example
        ///// </summary>
        //public IWebElement LoginButton => WebDriver.FindElementByJQuery("input[name='btnSubmit']");

        public LoginPage BrittleLoginAsAdmin(string baseUrl, string password)
        {
            // https://crm422752.crm.dynamics.com/
            WebDriver.Navigate().GoToUrl(baseUrl);

            UserIdField.Clear();
            // sending a single quote is not possible with the Chrome Driver, it sends two single quotes!
            UserIdField.SendKeys("*****@*****.**");

            NextButton.Click();

            PasswordField.Clear();
            PasswordField.SendKeys(password);

            var wait = new WebDriverWait(WebDriver, TimeSpan.FromSeconds(5));

            wait.Until(f => f.FindElements(By.XPath("//div[@class='col-xs-24 no-padding-left-right button-container']/div/input")).FirstOrDefault());

            SignInButton = WebDriver.FindElements(By.Id("idSIButton9")).FirstOrDefault();
            SignInButton.Click();

            var staySignedInDialog = WebDriver.FindElement(By.XPath("//div[@role='heading']"));

            if (staySignedInDialog?.Text == "Stay signed in?")
            {
                wait = new WebDriverWait(WebDriver, TimeSpan.FromSeconds(5));
                wait.Until(f => f.FindElements(By.XPath("//div[@class='col-xs-24 no-padding-left-right button-container']/div/input")).FirstOrDefault());

                var noButton = WebDriver.FindElements(By.Id("idBtn_Back")).FirstOrDefault();
                noButton.Click();
            }

            return(this);
        }
Ejemplo n.º 23
0
 public QuestionPage Answer(string answerText)
 {
     _driver.FindElement(By.XPath("//span[contains(@class, 'answer-text') and text() = \"" + answerText + "\"]/preceding-sibling::span[contains(@class, 'answer-radio')]")).Click();
     NextButton.Click();
     AwaitNextQuestionPage();
     return(new QuestionPage(_driver));
 }
Ejemplo n.º 24
0
    void Start()
    {
        page = PlayerPrefs.GetInt("page", 0);
        if (page > 1)
        {
            NextButton.SetActive(true);
            PrevButtn.SetActive(true);
        }
        else
        {
            NextButton.SetActive(true);
            PrevButtn.SetActive(false);
        }

        if (page <= 1)
        {
            page = 1;
        }
        //JSON
        param = PlayerPrefs.GetString("param");

        if (page == null || page == 0)
        {
            page = 1;
        }
        LogoWord.text = "ザナドゥ:" + param;
        full_url      = url + "/" + param + "/" + page.ToString();
        UnityWebRequest www = new UnityWebRequest(full_url);

        StartCoroutine(FetchData(full_url));
    }
Ejemplo n.º 25
0
 // Use this for initialization
 void Start()
 {
     nb = GetComponent <NextButton>();
     GetComponent <TextMesh>().text = choiceText;
     audioSource = GameObject.FindGameObjectsWithTag("ClickSound")[0].GetComponent <AudioSource>();
     audioClip   = audioSource.clip;
 }
Ejemplo n.º 26
0
        public void TopWindowKeyDown(object s, KeyEventArgs keyEvent)
        {
            switch (keyEvent.KeyCode)
            {
            case Keys.Up:
                ZPlusControl_Click(null, null);
                NextButton.Enabled = true;
                break;

            case Keys.Down:
                ZMinusControl_Click(null, null);
                NextButton.Enabled = true;
                break;

            case Keys.Right:
                if (NextButton.Enabled)
                {
                    UiThread.RunOnIdle(() => NextButton.InvokeClick());
                }

                break;
            }

            OnKeyDown(keyEvent);
        }
Ejemplo n.º 27
0
        void ReleaseDesignerOutlets()
        {
            if (CatView != null)
            {
                CatView.Dispose();
                CatView = null;
            }

            if (PageView != null)
            {
                PageView.Dispose();
                PageView = null;
            }

            if (PreviousButton != null)
            {
                PreviousButton.Dispose();
                PreviousButton = null;
            }

            if (NextButton != null)
            {
                NextButton.Dispose();
                NextButton = null;
            }
        }
Ejemplo n.º 28
0
        private async void AnimateButton()
        {
            if (!NextButton.IsEnabled)
            {
                return;
            }

            NextButton.Scale(scaleX: 1.2f, scaleY: 1.2f, centerX: 0, centerY: 0, duration: 500, delay: 0, easingType: EasingType.Default).Start();

            if (!NextButton.IsEnabled)
            {
                return;
            }

            await Task.Delay(500);

            if (!NextButton.IsEnabled)
            {
                return;
            }

            NextButton.Scale(scaleX: 1, scaleY: 1, centerX: 0, centerY: 0, duration: 500, delay: 0, easingType: EasingType.Default).Start();

            if (!NextButton.IsEnabled)
            {
                return;
            }

            await Task.Delay(500);

            AnimateButton();
        }
        void ReleaseDesignerOutlets()
        {
            if (DayText != null)
            {
                DayText.Dispose();
                DayText = null;
            }

            if (NextButton != null)
            {
                NextButton.Dispose();
                NextButton = null;
            }

            if (PreviousButton != null)
            {
                PreviousButton.Dispose();
                PreviousButton = null;
            }

            if (ProgressRing != null)
            {
                ProgressRing.Dispose();
                ProgressRing = null;
            }

            if (TableView != null)
            {
                TableView.Dispose();
                TableView = null;
            }
        }
Ejemplo n.º 30
0
        async void SelectOne(object sender, EventArgs args)
        {
            ImagePreviwer.SetValue(IsVisibleProperty, true);
            PreviuseButton.SetValue(IsVisibleProperty, true);
            NextButton.SetValue(IsVisibleProperty, true);

            SelectGrid.SetValue(IsVisibleProperty, false);
        }
Ejemplo n.º 31
0
        /// <summary>
        /// Loads the content used
        /// </summary>
        public new void LoadContent()
        {
            _startScreen = new StartScreen(Game) { Visible = false };
            DrawableComponents.Add(_startScreen);

            _logoFlash = new LogoFlash(Game) { Visible = false };
            DrawableComponents.Add(_logoFlash);

            _startButton = new StartButton(Game) { Visible = false };
            DrawableComponents.Add(_startButton);

            _infoScreen = new InfoScreen(Game) { Visible = false };
            DrawableComponents.Add(_infoScreen);

            _pikachu = new Pikachu(Game) { Visible = false };
            DrawableComponents.Add(_pikachu);

            _nextButton = new NextButton(Game) { Visible = false };
            DrawableComponents.Add(_nextButton);

            base.LoadContent();
        }