コード例 #1
0
 public Number_converter_to_Ukr(Parse_Xml obj)
 {
     Pars = obj;
     first_ten_numbers = new Dictionary <int, string>();
     ten_numbers       = new Dictionary <int, string>();
     tens        = new Dictionary <int, string>();
     discharge   = new Dictionary <int, string>();
     ordinal_ten = new Dictionary <int, string>();
     hundreds    = new Dictionary <int, string>();
     ending      = new Dictionary <int, string>();
     // заполняем массив методами
     Arr_Dischar     = new ConvertDelegate[16];
     Arr_Dischar[1]  = First_discharge_Func;
     Arr_Dischar[2]  = Second_discharge_Func;
     Arr_Dischar[3]  = Third_discharge_Func;
     Arr_Dischar[4]  = Fourth_discharge_Func;
     Arr_Dischar[5]  = Fifth_discharge_Func;
     Arr_Dischar[6]  = Sixth_discharge_Func;
     Arr_Dischar[7]  = Seventh_discharge_Func;
     Arr_Dischar[8]  = Fifth_discharge_Func;
     Arr_Dischar[9]  = Sixth_discharge_Func;
     Arr_Dischar[10] = Seventh_discharge_Func;
     Arr_Dischar[11] = Fifth_discharge_Func;
     Arr_Dischar[12] = Sixth_discharge_Func;
     Arr_Dischar[13] = Seventh_discharge_Func;
     Arr_Dischar[14] = Fifth_discharge_Func;
     Arr_Dischar[15] = Sixth_discharge_Func;
 }
コード例 #2
0
        public Form1()
        {
            InitializeComponent();
            TextChenged = textBox1_TextChanged;
            Ukr.Checked = true; // при запуске программы устанавливаем язык
            textBox1.Select();  // установка курсора

            obj = new Parse_Xml();

            ConvertUkr = new Number_converter_to_Ukr(obj);
            ConvertEng = new Number_converter_to_Eng(obj);
            ConvertGer = new Number_converter_to_Ger(obj);

            ConvertUkr.Parse_from_Xml("Ukr.xml");
            ConvertEng.Parse_from_Xml("Eng.xml");
            ConvertGer.Parse_from_Xml("Ger.xml");
        }