Пример #1
0
        /// <summary>
        /// Register a Enter key if text box has input string
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void RegisterEnter(object sender, KeyRoutedEventArgs e)
        {
            if (e.Key == Windows.System.VirtualKey.Enter)
            {
                dateTime = false;
                date     = false;
                time     = false;

                if (!string.IsNullOrEmpty(InputStringToDisplay.Text) ||
                    !string.IsNullOrWhiteSpace(InputStringToDisplay.Text))
                {
                    if (!countinious)
                    {
                        if (!WordInput && !MoveLetters.CheckForZero(Arr))
                        {
                            Clear();
                        }
                        else if (WordInput)
                        {
                            counter = 10;
                            Clear();
                        }
                    }

                    if (countinious && str.Count != 0)
                    {
                        var temp = InputStringToDisplay.Text.ToUpper().ToCharArray();
                        stringtoRepeat.Concat(InputStringToDisplay.Text.ToString());
                        foreach (var item in temp)
                        {
                            str.Enqueue(item);
                        }

                        InputStringToDisplay.Text = "";
                    }
                    else if (Repeat.IsChecked == true && !countinious)
                    {
                        stringtoRepeat     = InputStringToDisplay.Text.ToUpper();
                        str                = stringtoRepeat.ToQueue();
                        countToClearScreen = 0;
                    }
                    else if (Repeat.IsChecked == true && countinious)
                    {
                        stringtoRepeat     = String.Concat(stringtoRepeat, InputStringToDisplay.Text.ToUpper());
                        str                = stringtoRepeat.ToQueue();
                        countToClearScreen = 0;
                    }
                    else
                    {
                        str            = InputStringToDisplay.Text.ToUpper().ToQueue();
                        stringtoRepeat = InputStringToDisplay.Text.ToUpper();
                    }



                    InputStringToDisplay.Text = "";
                    WordInput = true;
                }
            }
        }
Пример #2
0
        /// <summary>
        /// sends black color of button to text color
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>



        private void Repeat_Checked(object sender, RoutedEventArgs e)
        {
            str.Clear();
            stringtoRepeat = "";
            if (!MoveLetters.CheckForZero(Arr))
            {
                MoveLetters.SetIntArrToNum(Arr, 1);
            }
            counter = 10;
            /*MoveLetters.SetIntArrToNum(Arr, 0);*/
        }