Inheritance: MonoBehaviour
Exemple #1
0
        void ReleaseDesignerOutlets()
        {
            if (BackButton != null)
            {
                BackButton.Dispose();
                BackButton = null;
            }

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

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

            if (Outline != null)
            {
                Outline.Dispose();
                Outline = null;
            }
        }
        void ReleaseDesignerOutlets()
        {
            if (ContinueButton != null)
            {
                ContinueButton.Dispose();
                ContinueButton = null;
            }

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

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

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

            if (TimeLabel != null)
            {
                TimeLabel.Dispose();
                TimeLabel = null;
            }
        }
 private void Runner_PropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e)
 {
     if (e.PropertyName == nameof(runner.resumeGameAction))
     {
         ContinueButton.SetEnabled(resumeCallback != null);
     }
 }
Exemple #4
0
    IEnumerator TypeText(string text)
    {
        TextBox.text = "";
        yield return(new WaitForSeconds(.5f));

        Show();

        bool clicked = false;

        foreach (char c in text)
        {
            TextBox.text += c;
            if (char.IsLetterOrDigit(c))
            {
                AudioManager.PlaySFX(AudioManager.GlobalSounds.typingBlip, .2f);
            }
            if (Input.GetMouseButton(0))
            {
                TextBox.text = text;
                break;
            }
            yield return(new WaitForSeconds(typeDelay));
        }
        if (clicked)
        {
            yield return(new WaitForSeconds(1f));
        }
        ContinueButton.interactable = true;
        ContinueButton.Select();
    }
Exemple #5
0
 // кнопка яка очищає (заммальовує) клітинки білим кольором і робить всі кнопки придатними для натискання
 private void ClearButton_Click(object sender, EventArgs e)
 {
     // очищає (заммальовує) клітинки білим кольором
     ClearAllCells();
     // обнуляємо індекси
     indexI = 0;
     indexJ = 0;
     // змінна nextNumber стає рівна двом
     nextNumber = 2;
     SetDoubleBuffer(dataGridView1, false);
     // кнопки стають активними
     StepsButton.Enabled    = true;
     AutoButton.Enabled     = true;
     StopButton.Enabled     = true;
     ContinueButton.Enabled = true;
     AutoButton.BringToFront();
     ContinueButton.SendToBack();
     // зупиняємо таймер
     timer1.Stop();
     // змінюємо тік таймера
     timer1.Interval = 1400;
     // очищяємо textBox-си
     textBox1.Clear();
     textBox2.Clear();
     // кнопка ClearButton стає не активною
     ClearButton.Enabled = false;
 }
 public void GameEnd()
 {
     InGameButtons.SetActive(false);
     WaveNumber.gameObject.SetActive(true);
     ContinueButton.SetActive(false);
     PauseMenuShow();
 }
Exemple #7
0
        public CrashDialog(Exception ex)
        {
            InitializeComponent();

            ContinueButton.Focus(FocusState.Programmatic);
            MoreInfo.Text = ex.Message;
        }
Exemple #8
0
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);

            SetContentView(Resource.Layout.Main);

            // binding views and default mode is TwoWay
            mPhoneBinding = this.SetBinding(
                () => MainView.PhoneNumber,
                () => PhoneNumberText.Text
                , BindingMode.TwoWay);
            // set value for Gender in MainViewMode
            MainView.Gender = newGender;
            // when next button clicked call SaveDataCommand  methode in MainViewMode.cs and send data to other activity nd navigates to it.
            ContinueButton.SetCommand(
                "Click",
                MainView.SaveDataCommand);
            // get spinner content that user seleced and assign it to MainViewModel.Gender property
            GenderSpinner.ItemSelected += new EventHandler <AdapterView.ItemSelectedEventArgs>(spinner_ItemSelected);
            // set spinner items from Resource
            var adapter = ArrayAdapter.CreateFromResource(
                this, Resource.Array.genders_array, Android.Resource.Layout.SimpleExpandableListItem1);

            adapter.SetDropDownViewResource(Android.Resource.Layout.SimpleSpinnerDropDownItem);
            GenderSpinner.Adapter = adapter;
        }
        public void InputAdrressInformationValidFields(String firstName, String lastName, String address, String zip, String city, String state, String county, String phoneNumber, String mobileNumber, String emailAddress, String dob)
        {
            SendKeysSlowly(FirstNameShippingAddressField, firstName);
            SendKeysSlowly(LastNameShippingAddressField, lastName);
            SendKeysSlowly(AddressShippingAddressField, address);
            SendKeysSlowly(PhoneNumberShippingAddressField, phoneNumber);
            SendKeysSlowly(MobileNumberShippingAddressField, mobileNumber);
            SendKeysSlowly(EmailAddressShippingAddressField, emailAddress);

            if (IsElementDisplayed(ZipLookupButton))
            {
                ZipLookup(zip, city);
            }
            else
            {
                SendKeysSlowly(ZipShippingAddressField, zip);
                SendKeysSlowly(CityShippingAddressField, city);
                if (!state.Equals("N/A") && IsElementDisplayed(StateShippingAddressField))
                {
                    SendKeysSlowly(StateShippingAddressField, state);
                }
                if (!county.Equals("N/A") && IsElementDisplayed(CountyShippingAddressField))
                {
                    SendKeysSlowly(CountyShippingAddressField, county);
                }
            }
            if (!dob.Equals("N/A") && IsElementDisplayed(DateOfBirthShippingAddressField))
            {
                SendKeysSlowly(DateOfBirthShippingAddressField, dob);
            }
            ContinueButton.Click();
        }
Exemple #10
0
        void ReleaseDesignerOutlets()
        {
            if (TutorialText != null)
            {
                TutorialText.Dispose();
                TutorialText = null;
            }

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

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

            if (ContinueButton != null)
            {
                ContinueButton.Dispose();
                ContinueButton = null;
            }
        }
Exemple #11
0
 private void SetRunFinished()
 {
     TaskbarInformation.ProgressState = WasCanceled ? TaskbarItemProgressState.Error : TaskbarItemProgressState.Indeterminate;
     Task.Run(async() =>
     {
         await Task.Delay(3000);
         await Dispatcher.BeginInvoke(new Action(() =>
         {
             TaskbarInformation.ProgressState = TaskbarItemProgressState.None;
         }));
     });
     IsFinished = true;
     ContinueButton.IsEnabled = true;
     CancelButton.IsEnabled   = false;
     if (WasCanceled)
     {
         StatusLabel.Text = "Run Canceled";
     }
     else
     {
         StatusLabel.Text = "Run Complete";
     }
     ProgressBar.Finished = true;
     ContinueButton.FlashAnimation(5);
     OpenDirectoryButton.FlashAnimation(5);
 }
        public DateCorrectForm(ref Form tTopForm, int DayEventType)
        {
            InitializeComponent();

            TopForm = tTopForm;

            if (DayEventType == dBreakDay)
            {
                label2.Text = "Пойти на перерыв";
                BreakButton.BringToFront();
                BreakButtonChanged.BringToFront();

                if (LightWorkDay.IsDayOverdued(Security.CurrentUserID, ref OverduedDateTime))
                {
                    xtraTabPage1.PageEnabled  = false;
                    OverduedDateLabel.Visible = true;
                    OverduedDateLabel.Text    = OverduedDateTime.ToString("dd.MM.yyyy");
                    IsOverdued = true;
                }
            }
            if (DayEventType == dContinueDay)
            {
                label2.Text = "Продолжить рабочий день";
                ContinueButton.BringToFront();
                ContinueButtonChanged.BringToFront();

                if (LightWorkDay.IsDayOverdued(Security.CurrentUserID, ref OverduedDateTime))
                {
                    xtraTabPage1.PageEnabled  = false;
                    OverduedDateLabel.Visible = true;
                    OverduedDateLabel.Text    = OverduedDateTime.ToString("dd.MM.yyyy");
                    IsOverdued = true;
                }
            }
            if (DayEventType == dStartDay)
            {
                label2.Text = "Начать рабочий день";
                StartButton.BringToFront();
                StartButtonChanged.BringToFront();
            }
            if (DayEventType == dEndDay)
            {
                label2.Text = "Завершить рабочий день";
                StopButton.BringToFront();
                StopButtonChanged.BringToFront();

                if (LightWorkDay.IsDayOverdued(Security.CurrentUserID, ref OverduedDateTime))
                {
                    xtraTabPage1.PageEnabled  = false;
                    OverduedDateLabel.Visible = true;
                    OverduedDateLabel.Text    = OverduedDateTime.ToString("dd.MM.yyyy");
                    IsOverdued = true;
                }
            }

            label1.Text         = Security.GetCurrentDate().ToString("HH:mm");
            timeEdit1.EditValue = Security.GetCurrentDate();
        }
 private void applyTraslations()
 {
     TitleLabel.Text       = AppDelegate.LanguageBundle.GetLocalizedString("medical_data_title");
     DescriptionLabel.Text = AppDelegate.LanguageBundle.GetLocalizedString("medical_data_description");
     RiskLabel.Text        = AppDelegate.LanguageBundle.GetLocalizedString("medical_step4_risk");
     CovidLabel.Text       = AppDelegate.LanguageBundle.GetLocalizedString("medical_step4_covid");
     MedicalLabel.Text     = AppDelegate.LanguageBundle.GetLocalizedString("medical_step4_medical");
     ContinueButton.SetTitle(AppDelegate.LanguageBundle.GetLocalizedString("medical_data_button"), UIControlState.Normal);
 }
        public CrashDialog(Exception ex)
        {
            InitializeComponent();

            ContinueButton.Focus(FocusState.Programmatic);
            MoreInfo.Text = ex.Message;

            LightsSourceHelper.SetIsLightsContainer(RootGrid, true);
        }
 private void EndBlock()
 {
     //Debug.Log("EndBlock: " + CurrentBlock.Config);
     CurrentBlock.Close();
     //LoadScene("debriefing");
     LoadScene(null);
     menue.enabled = true;
     ContinueButton.Deactivate();
 }
Exemple #16
0
 protected override void Awake()
 {
     _continueButton     = CreateGameObject.CreateChildGameObject <ContinueButton>(transform).GetComponent <ContinueButton>();
     _restartLevelButton = CreateGameObject.CreateChildGameObject <RestartLevelButton>(transform).GetComponent <RestartLevelButton>();
     _optionsButton      = CreateGameObject.CreateChildGameObject <OptionsButton>(transform).GetComponent <OptionsButton>();
     _exitButton         = CreateGameObject.CreateChildGameObject <ExitButton>(transform).GetComponent <ExitButton>();
     _exitButton.onClick.AddListener(_exitButton.OnClickInGame);
     base.Awake();
 }
Exemple #17
0
 void Start()
 {
     Choice1.SetActive(false);
     Choice2.SetActive(false);
     ContinueButton.SetActive(false);
     Button1.onClick.AddListener(ChooseOption1);
     Button2.onClick.AddListener(ChooseOption2);
     ContButton.onClick.AddListener(Continue);
 }
Exemple #18
0
 private void SetContinueMenuVisible(bool IsVisible)
 {
     ContinueButton.Visible = IsVisible;
     ExitButton.Visible     = IsVisible;
     if (IsVisible)
     {
         ContinueButton.Focus();
     }
     _ContinueMenuVisible = IsVisible;
 }
Exemple #19
0
 IEnumerator TypeSentence(string sentence)
 {
     dialogueText.text = "";
     foreach (char letter in sentence.ToCharArray())
     {
         dialogueText.text += letter;
         yield return(null);
     }
     ContinueButton.SetActive(true);
 }
 public CheckOut VerifyProductQuantityAndTotalInCheckout(string expectedProductName, string expectedQuantity, string expectedSubTotal, string expectedTotal)
 {
     Assert.AreEqual(expectedProductName, IphoneName.Text, "Iphone 4s black product name is did not matched.");
     Assert.AreEqual(expectedQuantity, Quantity.GetAttribute("value"), "Quantity for the product at the checkout did not matched.");
     Assert.AreEqual(expectedSubTotal, CheckOutSubTotal.Text, "SubTotal at the checkout did not matched.");
     Assert.AreEqual(expectedTotal, Total.Text, "Total at the checkout did not matched.");
     ContinueButton.Click();
     DoPageTransition();
     return(this);
 }
 void Start()
 {
     Globals.HadTomBreadConversation = true;
     Choice1.SetActive(false);
     Choice2.SetActive(false);
     ContinueButton.SetActive(false);
     Button1.onClick.AddListener(ChooseOption1);
     Button2.onClick.AddListener(ChooseOption2);
     ContButton.onClick.AddListener(Continue);
 }
Exemple #22
0
        private void FirstChance(object sender, EventArgs e)
        {
            if (HasShown)
            {
                return;
            }

            HasShown = true;

            ContinueButton.Focus();
        }
Exemple #23
0
        internal void LoginWithUnknownEmail(Table table)
        {
            SignIn.Click();
            dynamic values = table.CreateDynamicInstance();
            string  email  = values.userName.ToString();

            //string password = values.password.ToString();
            Email.Click();
            Email.SendKeys(email);
            ContinueButton.Click();
        }
 public void InputAdrressInformation(String firstName, String lastName, String address, String zip, String city, String phoneNumber, String mobileNumber, String emailAddress)
 {
     SendKeysSlowly(FirstNameShippingAddressField, firstName);
     SendKeysSlowly(LastNameShippingAddressField, lastName);
     SendKeysSlowly(AddressShippingAddressField, address);
     SendKeysSlowly(PhoneNumberShippingAddressField, phoneNumber);
     SendKeysSlowly(MobileNumberShippingAddressField, mobileNumber);
     SendKeysSlowly(EmailAddressShippingAddressField, emailAddress);
     ZipLookup(zip, city);
     ContinueButton.Click();
 }
Exemple #25
0
 void Awake()
 {
     if (Instance == null)
     {
         Instance = this;
     }
     else
     {
         Debug.LogError("Uhhh why are there two ContinueButtons in the scene?", gameObject);
     }
 }
 public void ClickOnContinueButton()
 {
     if (ContinueButton.Displayed)
     {
         ContinueButton.Click();
         Thread.Sleep(3000);
     }
     else
     {
         throw new Exception("Element is not found or not clickable");
     }
 }
Exemple #27
0
    //https://stackoverflow.com/questions/27547122/c-sharp-override-with-different-parameters
    //https://stackoverflow.com/questions/5414515/c-sharp-passing-a-method-as-a-parameter-to-another-method
    public void StartDialogue(string dialoguename, Action _callback)
    {
        _instance.transform.gameObject.SetActive(true);
        _Dialogue.Clear();
        string fileFullPath = Path.Combine(SavePath, dialoguename);

        //fileFullPath = Path.Combine(fileFullPath, dialoguename + fileExtension);
        fileFullPath = Path.Combine(SavePath, dialoguename);
        if ((Directory.Exists(fileFullPath)))
        {
            Debug.Log("無此對話");
            return;
        }
        //IT TAKE ME A WHOLE NIGHT. MOTHER FXCKER
        //https://answers.unity.com/questions/1411034/textasset-return-null.html
        TextAsset DialogueText = (TextAsset)Resources.Load(fileFullPath, typeof(TextAsset));

        Debug.Log(dialoguename + "," + DialogueText);
        int count = 0;

        foreach (string s in DialogueText.text.Split('\n'))
        {
            try {
                _Dialogue.Enqueue(JsonUtility.FromJson <Dialogue>(s));
                count += 1;
            }
            catch (Exception e) {
                Debug.Log(e.Message + ',' + fileFullPath + ',' + count.ToString());
                return;
            }
        }

        /*
         * System.IO.StreamReader file = new System.IO.StreamReader(fileFullPath);
         * while ((line = file.ReadLine()) != null) {
         *      if (line[0] == '#') {
         *              continue;
         *      }
         *      try {
         *              _Dialogue.Enqueue(JsonUtility.FromJson<Dialogue>(line));
         *      }
         *      catch (Exception e) {
         *              Debug.Log(e.Message);
         *              return;
         *      }
         * }
         * file.Close();
         */
        Callback = _callback;
        ContinueButton.GetComponentInChildren <Text>().text = "Continue>>";
        DisplayNextSentence();
    }
        public void InputBasicInformation(String distributorNumber, String aroType)
        {
            String[] newStringArray  = { "FR", "GER", "SUI" };
            String   selectedCountry = new SelectElement(CountrySelect).SelectedOption.Text;

            if (newStringArray.Contains(selectedCountry))
            {
                AroNumberField.SendKeys("" + new Random().Next(100000, 1000000));
            }
            DistributorNumberField.SendKeys(distributorNumber);
            AroTypeDropdown.SendKeys(aroType);
            ContinueButton.Click();
        }
        public void InputProductInformation(String sku, int quantity)
        {
            ClearAllProducts();
            if (ExpectedConditions.ElementExists(By.Id("qt" + sku)) != null)
            {
                SkuInputField.SendKeys(sku);
                UpdateButton.Click();
            }

            Driver.WebDriver.FindElement(By.Id("qt" + sku)).Clear();
            Driver.WebDriver.FindElement(By.Id("qt" + sku)).SendKeys("" + quantity);

            /*if (sku.Equals("2000"))
             * {
             *  if (!IsElementDisplayed(JuicePlusCapsulesQuantityField))
             *  {
             *      SkuInputField.SendKeys(sku);
             *      UpdateButton.Click();
             *  }
             *
             *  JuicePlusCapsulesQuantityField.Clear();
             *  JuicePlusCapsulesQuantityField.SendKeys("" + quantity);
             * } else if (sku.Equals("2000CA"))
             * {
             *  if (!IsElementDisplayed(JuicePlusCapsulesCAQuantityField))
             *  {
             *      SkuInputField.SendKeys(sku);
             *      UpdateButton.Click();
             *  }
             *
             *  JuicePlusCapsulesCAQuantityField.Clear();
             *  JuicePlusCapsulesCAQuantityField.SendKeys("" + quantity);
             * } else if (sku.Equals("2000AS"))
             * {
             *  if (!IsElementDisplayed(JuicePlusCapsulesASQuantityField))
             *  {
             *      SkuInputField.SendKeys(sku);
             *      UpdateButton.Click();
             *  }
             *
             *  JuicePlusCapsulesASQuantityField.Clear();
             *  JuicePlusCapsulesASQuantityField.SendKeys("" + quantity);
             * }
             * else
             * {
             *  throw new Exception("Invalid Product Code.");
             * }*/

            UpdateButton.Click();
            ContinueButton.Click();
        }
        public void SelectFlights()
        {
            Thread.Sleep(4000);
            SelectFirstFlightButton.Click();

            Helper.ScrollToSeeTheFlights(_driver, SelectPriceOfFirstFlightButton);
            SelectPriceOfFirstFlightButton.Click();

            SelectReturnFlightButton.Click();
            Helper.ScrollToSeeTheFlights(_driver, SelectPriceOfReturnFlightButton);
            SelectPriceOfReturnFlightButton.Click();

            ContinueButton.Click();
        }