コード例 #1
0
        private void StartStopPlaying()
        {
            try
            {
                if (string.IsNullOrEmpty(Number))
                {
                    Word = string.Empty;
                    return;
                }

                var number = Convert.ToDouble(Number);

                if (number >= MaxInputLimit)
                {
                    Number = Number.Remove(Number.Length - 1);
                    number = Convert.ToDouble(Number);
                }

                Word = numberReader.Read(number);
            }
            catch (Exception ex)
            {
                ErrorMessage = ex.ToString();
            }
        }
コード例 #2
0
        public void Run()
        {
            NumberReader reader = new NumberReader(_input);

            if (reader.Read())
            {
                reader.OutputNumberToConsole();
            }
        }