/// <summary> /// Статический конструктор /// </summary> static SerialPortUtils() { // инициализция фраз if (Localization.UseRussian) { WriteDataImpossible = "Отправка данных невозможна, т.к. порт не инициализирован"; WriteLineImpossible = "Отправка строки невозможна, т.к. порт не инициализирован"; ReadDataImpossible = "Приём данных невозможен, т.к. порт не инициализирован"; ReadLinesImpossible = "Приём строки невозможен, т.к. порт не инициализирован"; } else { WriteDataImpossible = "Sending data is impossible because the port is not initialized"; WriteLineImpossible = "Sending string is impossible because the port is not initialized"; ReadDataImpossible = "Receiving data is impossible because the port is not initialized"; ReadLinesImpossible = "Receiving string is impossible because the port is not initialized"; } // создание объекта соединения serialConn = new AuxSerialConnection(); }