Пример #1
0
        /// <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();
        }
Пример #2
0
        /// <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();
        }