Exemplo n.º 1
0
        public static void Run(string[] args)
        {
            if (args.Length == 0)
            {
                UI.ShowMessage(MessageTypes.Help);
                return;
            }

            string stringInput = args[0];
            uint   numinput;

            if (uint.TryParse(stringInput, out numinput))
            {
                try
                {
                    NaturalNumberRow numRow = new NaturalNumberRow(numinput);
                    UI.DisplayNumberRow(numRow);
                }
                catch (InvalidNubmerRowParameterException ex)
                {
                    UI.ShowMessage(MessageTypes.Error, ex.ToString());
                }
            }
            else
            {
                UI.ShowMessage(MessageTypes.Help);
            }
        }
Exemplo n.º 2
0
        public static void Run(string[] args)
        {
            if (args.Length == 0)
            {
                UI.ShowMessage(MessageTypes.Help);
                return;
            }

            string stringInput = args[0];
            uint   numinput;

            if (uint.TryParse(stringInput, out numinput) &&
                numinput >= NaturalNumberRow.MIN_TARGET_VALUE)
            {
                NaturalNumberRow numRow = new NaturalNumberRow(numinput);
                UI.DisplayNumberRow(numRow);
            }
            else
            {
                UI.ShowMessage(MessageTypes.Help);
            }
        }
Exemplo n.º 3
0
 public NaturalNumberRowIterator(NaturalNumberRow numRow)
 {
     _numberRow = numRow;
 }