예제 #1
0
            public static List <TextConvert> CreatReader(Dictionary <int, string> str)
            {
                List <TextConvert> res = new List <TextConvert>();

                foreach (var temp in str)
                {
                    switch (temp.Key)
                    {
                    case 1:
                        TextConvert r1 = new StringConvert();
                        r1.ConvertCharacter(temp.Value);
                        res.Add(r1);
                        break;

                    case 2:
                        TextConvert r2 = new IntConvert();
                        r2.ConvertFontChange(Convert.ToInt32(temp.Value));
                        res.Add(r2);
                        break;

                    case 3:
                        TextConvert r3 = new NothingConvert();
                        r3.ConvertParagraph();
                        res.Add(r3);
                        break;
                    }
                }

                return(res);
            }