Ejemplo n.º 1
0
        public LCDDigitPrinter(LCDDigit lcdDigit) : base()
        {
            List <string> lines = LCDTextListFactory.Create(lcdDigit, 1, 1);

            foreach (string line in lines)
            {
                this.IncludeLine(line);
            }
        }
Ejemplo n.º 2
0
        private Dictionary <DigitRepresentation, List <string> > CreateDigitsDictionary(LCDNumber lcdNumber, int width, int height)
        {
            Dictionary <DigitRepresentation, List <string> > digitsDictionary = new Dictionary <DigitRepresentation, List <string> >();

            foreach (LCDDigit lcdDigit in lcdNumber.GetLCDDigits())
            {
                if (!digitsDictionary.ContainsKey(lcdDigit.DigitRepresentation))
                {
                    digitsDictionary.Add(lcdDigit.DigitRepresentation, LCDTextListFactory.Create(lcdDigit, width, height));
                }
            }

            return(digitsDictionary);
        }
Ejemplo n.º 3
0
 private List <string> CreateTextList(int number)
 {
     return(LCDTextListFactory.Create(LCDNumberFactory.Create(number), 1, 1));
 }
Ejemplo n.º 4
0
 private List <string> CreateTextList(int digit)
 {
     return(LCDTextListFactory.Create(LCDDigitFactory.Create(digit), 1, 1));
 }