Exemple #1
0
        public virtual string GetDataRow()
        {
            return(String.Join(",", new[]
            {
                FullTimeMode?Time.ToString() : Time.TotalSeconds.ToString(CultureInfo.InvariantCulture),
                    TRT.ToString(),
                    RPM.ToString(),
                    RPM40.ToString(),
                    RPM_GBC_RT.ToString(),
                    UFRXX.ToString(),
                    SSM.ToString(),
                    TWAT.ToString(),
                    TAIR.ToString(),
                    ALF.ToString("0.#", CultureInfo.InvariantCulture),
                    AFR.ToString("0.#", CultureInfo.InvariantCulture),
                    LC1_ALF.ToString("0.###", CultureInfo.InvariantCulture),
                    LC1_AFR.ToString("0.#", CultureInfo.InvariantCulture),
                    COEFF.ToString("0.###", CultureInfo.InvariantCulture),
                    DGTC_RICH.ToString("0.###", CultureInfo.InvariantCulture),
                    DGTC_LEAN.ToString("0.###", CultureInfo.InvariantCulture),
                    UOZ.ToString("0.#", CultureInfo.InvariantCulture),
                    KUOZ1.ToString("0.#", CultureInfo.InvariantCulture),
                    KUOZ2.ToString("0.#", CultureInfo.InvariantCulture),
                    KUOZ3.ToString("0.#", CultureInfo.InvariantCulture),
                    KUOZ4.ToString("0.#", CultureInfo.InvariantCulture),
                    Faza.ToString(),
                    INJ.ToString("0.###", CultureInfo.InvariantCulture),
                    FUSE.ToString("0.#", CultureInfo.InvariantCulture),
                    AIR.ToString("0.#", CultureInfo.InvariantCulture),
                    GBC.ToString("0.##", CultureInfo.InvariantCulture),
                    SPD.ToString(),
                    ADCKNOCK.ToString("0.###", CultureInfo.InvariantCulture),
                    ADCMAF.ToString("0.###", CultureInfo.InvariantCulture),
                    ADCTWAT.ToString("0.###", CultureInfo.InvariantCulture),
                    ADCTAIR.ToString("0.###", CultureInfo.InvariantCulture),
                    ADCTPS.ToString("0.###", CultureInfo.InvariantCulture),
                    ADCUBAT.ToString("0.###", CultureInfo.InvariantCulture),
                    ADCLAM.ToString("0.###", CultureInfo.InvariantCulture),
                    ErrorCount.ToString(),
                    fSTOP ? "1" : "0",
                    fXX ? "1" : "0",
                    fXXPrev ? "1" : "0",
                    fXXFix ? "1" : "0",
                    fPOW ? "1" : "0",
                    fFUELOFF ? "1" : "0",
                    fDETZONE ? "1" : "0",
                    fDET ? "1" : "0",
                    fADS ? "1" : "0",
                    fLAMREG ? "1" : "0",
                    fLAM ? "1" : "0",
                    fLEARN ? "1" : "0",
                    fLAMRDY ? "1" : "0",
                    fLAMHEAT ? "1" : "0"
            }

                               ));
        }
Exemple #2
0
        private void f15_fieldKey_KeyPress(object sender, KeyPressEventArgs e)
        {
            char symb = e.KeyChar;

            if (f15_fieldCiphertext.TextLength > 0 &&
                (alf.IndexOf(symb) == -1 && ALF.IndexOf(symb) == -1 && symb != (char)8))
            {
                e.Handled = true;
            }
        }
Exemple #3
0
        private void f15_fieldKey_TextChanged(object sender, EventArgs e)
        {
            if (f15_fieldKey.TextLength > 0)
            {
                string res = "";
                int    j   = 0;
                for (int i = 0; i < f15_fieldCiphertext.TextLength; i++)
                {
                    int curSymbNum = alf.IndexOf(f15_fieldCiphertext.Text[i]);
                    int rotSymbNum = alf.IndexOf(f15_fieldKey.Text[j]);
                    if (curSymbNum != -1)
                    {//строчная буква
                        res += alf[((curSymbNum - rotSymbNum) + alf.Length) % alf.Length];
                        j++;
                        j = j % f15_fieldKey.TextLength;
                    }
                    else
                    {
                        curSymbNum = ALF.IndexOf(f15_fieldCiphertext.Text[i]);
                        if (curSymbNum != -1)//заглавная буква
                        {
                            res += ALF[((curSymbNum - rotSymbNum) + ALF.Length) % ALF.Length];
                            j++;
                            j = j % f15_fieldKey.TextLength;
                        }
                        else
                        {
                            //Символы, которых нет в алфавите, просто переносятся \
                            //и не меняют позицию в ключе
                            res += f15_fieldCiphertext.Text[i];

                            /*j++;
                             * j = j % f15_fieldKey.TextLength; */
                        }
                    }
                }
                f15_fieldOriginal.Text = res;
            }
            else
            {
                f15_fieldOriginal.Text = null;
            }
        }
Exemple #4
0
        private void f10_ButtonEncrypt_Click(object sender, EventArgs e)
        {
            string Source      = f10_fieldOriginal.Text;
            string entered_key = Regex.Replace(f10_fieldKeyword.Text, "[^a-zA-Zа-яА-ЯёЁ]", "");

            f10_fieldKeyword.Text = entered_key;
            entered_key           = entered_key.Replace("J", "I").Replace("Ё", "Е").Replace("Й", "И").Replace("Ь", "Ъ").Replace("j", "i").Replace("ё", "е").Replace("й", "и").Replace("ь", "ъ").ToLower();

            if (what_language(Source) == -1 || what_language(entered_key) == -1 || (what_language(Source) * what_language(entered_key)) == 2) //Разные языки
            {
                MessageBox.Show("Поля должны быть заполнены только на английском или только на русском языке.", "Ошибка");
                goto metka_exit;
            }
            Source = Source.Replace("J", "I").Replace("Ё", "Е").Replace("Й", "И").Replace("Ь", "Ъ").Replace("j", "i").Replace("ё", "е").Replace("й", "и").Replace("ь", "ъ");

            //Выбор алфавита
            string ALF, alf;
            bool   lenIsRus;
            int    rows, columns;

            if (what_language(Source) == 1) //Русский текст и русский/пустой ключ
            {
                ALF      = ALF_RU;
                alf      = alf_ru;
                lenIsRus = true;
                rows     = 5;
                columns  = 6;
            }
            else
            {
                ALF      = ALF_EN;
                alf      = alf_en;
                lenIsRus = false;
                rows     = 5;
                columns  = 5;
            }

            //Сохраним регистр и будем работать только с нижним
            int[] isUpper = new int[Source.Length];
            for (int i = 0; i < Source.Length; i++)
            {
                if (ALF.IndexOf(Source[i]) >= 0)
                {
                    isUpper[i] = 1;
                }
                else
                {
                    isUpper[i] = 0;
                }
            }
            Source = Source.ToLower();
            char[] message = Source.ToCharArray();

            //Формирование таблицы, на основе которой будет происходить шифрование (будет располагаться в одномерном массиве) 5 строк, 6 столбцов
            int gridSize = alf.Length;

            char[] PlayfairGrid = new char[gridSize];
            int    keyPos       = 0;
            int    gridPos      = 0;

            int[] times = new int[alf.Length];   //иницилизация массива вхождений
            for (int i = 0; i < times.Length; i++)
            {
                times[i] = 0;                                    //обнуление массива вхождений
            }
            while (keyPos < entered_key.Length)
            {
                if (alf.IndexOf(entered_key[keyPos]) >= 0 && times[alf.IndexOf(entered_key[keyPos])] == 0)
                {
                    times[alf.IndexOf(entered_key[keyPos])]++;
                    PlayfairGrid[gridPos] = entered_key[keyPos];
                    gridPos++;
                }
                keyPos++;
            }
            int alfPos = 0;

            while (gridPos < gridSize)
            {
                if (times[alfPos] == 0)
                {
                    times[alfPos]++;
                    PlayfairGrid[gridPos] = alf[alfPos];
                    gridPos++;
                }
                alfPos++;
            }

            //Добавим мусорные буквы в последовательные пары одинаковых буквы
            int similar        = 0;
            int previousLetter = 0;

            while (!char.IsLetter(message[previousLetter]))
            {
                previousLetter++;
            }
            //Считаем количество пар одинаковых букв, идущих подряд.
            for (int i = previousLetter + 1; i < message.Length; i++)
            {
                if (message[previousLetter] == message[i])
                {
                    similar++;
                }
                if (char.IsLetter(message[i]))
                {
                    previousLetter = i;
                }
            }

            char[] tmp      = new char[message.Length + similar];
            int[]  register = new int[message.Length + similar + 1];
            int    rot      = 0;
            char   letter   = '⁣';

            //Добавление букв
            for (int i = 0; i < tmp.Length; i++)
            {
                if (char.IsLetter(message[i - rot]) && message[i - rot] == letter)
                {
                    if (lenIsRus)
                    {
                        tmp[i] = 'х';
                        if (letter == 'х')
                        {
                            tmp[i] = 'ъ';
                        }
                    }
                    else
                    {
                        tmp[i] = 'x';
                        if (letter == 'x')
                        {
                            tmp[i] = 'q';
                        }
                    }
                    register[i] = 0;
                    i++;
                    rot++;
                    tmp[i]      = message[i - rot];
                    register[i] = isUpper[i - rot];
                }
                else
                {
                    tmp[i]      = message[i - rot];
                    register[i] = isUpper[i - rot];
                }
                if (char.IsLetter(message[i - rot]))
                {
                    letter = message[i - rot];
                }
            }

            //Добавим букву в конец, если букв нечетное количество
            int amount_letters = 0;

            for (int i = 0; i < tmp.Length; i++)
            {
                if (char.IsLetter(tmp[i]))
                {
                    amount_letters++;
                }
            }
            if (amount_letters % 2 == 1)
            {
                char[] tmp2 = tmp;
                tmp = new char[tmp.Length + 1];
                for (int i = 0; i < tmp2.Length; i++)
                {
                    tmp[i] = tmp2[i];
                }
                if (lenIsRus)
                {
                    tmp[tmp.Length - 1] = 'х';
                    if (tmp[tmp.Length - 2] == 'х')
                    {
                        tmp[tmp.Length - 1] = 'ъ';
                    }
                }
                else
                {
                    tmp[tmp.Length - 1] = 'x';
                    if (tmp[tmp.Length - 2] == 'x')
                    {
                        tmp[tmp.Length - 1] = 'q';
                    }
                }
                register[tmp.Length - 1] = 0;
            }

            //Парное шифрование
            string playfair = new string(PlayfairGrid);
            int    pair_found = 0;                              //сколько элементов найдено для пары
            int    first_letter_ind = 0, second_letter_ind = 0; //индексы элементов, составляющих пару

            for (int i = 0; i < tmp.Length; i++)
            {
                if (playfair.IndexOf(tmp[i]) >= 0)
                {
                    if (pair_found == 0)
                    {
                        first_letter_ind = i;
                        pair_found++;
                    }
                    else
                    {
                        second_letter_ind = i;
                        char[] pair = new char[2];  //Адреса символов в исходном тексте
                        pair[0] = tmp[first_letter_ind];
                        pair[1] = tmp[second_letter_ind];
                        int[] x_coord = new int[2];
                        x_coord[0] = playfair.IndexOf(pair[0]) % columns;             //столбец
                        x_coord[1] = playfair.IndexOf(pair[1]) % columns;             //столбец
                        int[] y_coord = new int[2];
                        y_coord[0] = playfair.IndexOf(pair[0]) / columns;             //строка
                        y_coord[1] = playfair.IndexOf(pair[1]) / columns;             //строка
                        //Зашифрование пары символов
                        if ((y_coord[0] == y_coord[1]) && (x_coord[0] != x_coord[1])) //символы находятся в одной строке
                        {
                            tmp[first_letter_ind]  = playfair[columns * y_coord[0] + ((x_coord[0] + 1) % columns)];
                            tmp[second_letter_ind] = playfair[columns * y_coord[1] + ((x_coord[1] + 1) % columns)];
                        }
                        if ((y_coord[0] != y_coord[1]) && (x_coord[0] == x_coord[1])) //символы находятся в одном столбце
                        {
                            tmp[first_letter_ind]  = playfair[columns * ((y_coord[0] + 1) % rows) + x_coord[0]];
                            tmp[second_letter_ind] = playfair[columns * ((y_coord[1] + 1) % rows) + x_coord[1]];
                        }
                        if ((y_coord[0] != y_coord[1]) && (x_coord[0] != x_coord[1])) //символы образуют прямоугольник
                        {
                            tmp[first_letter_ind]  = playfair[columns * y_coord[0] + x_coord[1]];
                            tmp[second_letter_ind] = playfair[columns * y_coord[1] + x_coord[0]];
                        }
                        //Конец зашифрования пары символов
                        pair_found = 0;
                    }
                }
            }

            for (int i = 0; i < tmp.Length; i++)
            {
                if (register[i] == 1)
                {
                    tmp[i] = ALF[alf.IndexOf(tmp[i])];
                }
            }

            f10_fieldCiphertext.Text = new string(tmp);
            metka_exit :;
        }
Exemple #5
0
        private void f10_ButtonDecrypt_Click(object sender, EventArgs e)
        {
            string Source      = f10_fieldCiphertext.Text;
            string entered_key = Regex.Replace(f10_fieldKeyword.Text, "[^a-zA-Zа-яА-ЯёЁ]", "");

            f10_fieldKeyword.Text = entered_key;
            entered_key           = entered_key.Replace("J", "I").Replace("Ё", "Е").Replace("Й", "И").Replace("Ь", "Ъ").Replace("j", "i").Replace("ё", "е").Replace("й", "и").Replace("ь", "ъ").ToLower();

            if (what_language(Source) == -1 || what_language(entered_key) == -1 || (what_language(Source) * what_language(entered_key)) == 2) //Разные языки
            {
                MessageBox.Show("Поля должны быть заполнены только на английском или только на русском языке.", "Ошибка");
                goto metka_exit;
            }
            Source = Source.Replace("J", "I").Replace("Ё", "Е").Replace("Й", "И").Replace("Ь", "Ъ").Replace("j", "i").Replace("ё", "е").Replace("й", "и").Replace("ь", "ъ");

            //Выбор алфавита
            string ALF, alf;
            int    rows, columns;

            if (what_language(Source) == 1) //Русский текст и русский/пустой ключ
            {
                ALF     = ALF_RU;
                alf     = alf_ru;
                rows    = 5;
                columns = 6;
            }
            else
            {
                ALF     = ALF_EN;
                alf     = alf_en;
                rows    = 5;
                columns = 5;
            }

            //Сохраним регистр и будем работать только с нижним
            int[] isUpper = new int[Source.Length];
            for (int i = 0; i < Source.Length; i++)
            {
                if (ALF.IndexOf(Source[i]) >= 0)
                {
                    isUpper[i] = 1;
                }
                else
                {
                    isUpper[i] = 0;
                }
            }
            Source = Source.ToLower();
            char[] message = Source.ToCharArray();

            //Формирование таблицы, на основе которой будет происходить шифрование (будет располагаться в одномерном массиве) 5 строк, 6 столбцов
            int gridSize = alf.Length;

            char[] PlayfairGrid = new char[gridSize];
            int    keyPos       = 0;
            int    gridPos      = 0;

            int[] times = new int[alf.Length];   //иницилизация массива вхождений
            for (int i = 0; i < times.Length; i++)
            {
                times[i] = 0;                                    //обнуление массива вхождений
            }
            while (keyPos < entered_key.Length)
            {
                if (alf.IndexOf(entered_key[keyPos]) >= 0 && times[alf.IndexOf(entered_key[keyPos])] == 0)
                {
                    times[alf.IndexOf(entered_key[keyPos])]++;
                    PlayfairGrid[gridPos] = entered_key[keyPos];
                    gridPos++;
                }
                keyPos++;
            }
            int alfPos = 0;

            while (gridPos < gridSize)
            {
                if (times[alfPos] == 0)
                {
                    times[alfPos]++;
                    PlayfairGrid[gridPos] = alf[alfPos];
                    gridPos++;
                }
                alfPos++;
            }

            //Парное шифрование
            string playfair = new string(PlayfairGrid);
            int    pair_found = 0;                              //сколько элементов найдено для пары
            int    first_letter_ind = 0, second_letter_ind = 0; //индексы элементов, составляющих пару

            for (int i = 0; i < message.Length; i++)
            {
                if (playfair.IndexOf(message[i]) >= 0)
                {
                    if (pair_found == 0)
                    {
                        first_letter_ind = i;
                        pair_found++;
                    }
                    else
                    {
                        second_letter_ind = i;
                        char[] pair = new char[2];  //Адреса символов в исходном тексте
                        pair[0] = message[first_letter_ind];
                        pair[1] = message[second_letter_ind];
                        int[] x_coord = new int[2];
                        x_coord[0] = playfair.IndexOf(pair[0]) % columns;             //столбец
                        x_coord[1] = playfair.IndexOf(pair[1]) % columns;             //столбец
                        int[] y_coord = new int[2];
                        y_coord[0] = playfair.IndexOf(pair[0]) / columns;             //строка
                        y_coord[1] = playfair.IndexOf(pair[1]) / columns;             //строка
                        //Зашифрование пары символов
                        if ((y_coord[0] == y_coord[1]) && (x_coord[0] != x_coord[1])) //символы находятся в одной строке
                        {
                            message[first_letter_ind]  = playfair[columns * y_coord[0] + ((x_coord[0] - 1 + columns) % columns)];
                            message[second_letter_ind] = playfair[columns * y_coord[1] + ((x_coord[1] - 1 + columns) % columns)];
                        }
                        if ((y_coord[0] != y_coord[1]) && (x_coord[0] == x_coord[1])) //символы находятся в одном столбце
                        {
                            message[first_letter_ind]  = playfair[columns * ((y_coord[0] - 1 + rows) % rows) + x_coord[0]];
                            message[second_letter_ind] = playfair[columns * ((y_coord[1] - 1 + rows) % rows) + x_coord[1]];
                        }
                        if ((y_coord[0] != y_coord[1]) && (x_coord[0] != x_coord[1])) //символы образуют прямоугольник
                        {
                            message[first_letter_ind]  = playfair[columns * y_coord[0] + x_coord[1]];
                            message[second_letter_ind] = playfair[columns * y_coord[1] + x_coord[0]];
                        }
                        //Конец зашифрования пары символов
                        pair_found = 0;
                    }
                }
            }
            for (int i = 0; i < message.Length; i++)
            {
                if (isUpper[i] == 1)
                {
                    message[i] = ALF[alf.IndexOf(message[i])];
                }
            }
            f10_fieldOriginal.Text = new string(message);

            metka_exit :;
        }
Exemple #6
0
        private void f15_buttonFindKeyLength_Click(object sender, EventArgs e)
        {
            f15_keyLengthUpDown.Value = 0;  //Сброс предыдущего результата
            if (f15_comboBoxMethods.Text == "Метод индекса совпадений" && f15_fieldCiphertext.TextLength > 0)
            {
                int possibleLength = 1;
                while (possibleLength < 50)
                {
                    string Source     = (f15_fieldCiphertext.Text).ToLower();
                    string everyXsymb = ""; // Формируем строку БЕЗ УЧЕТА РАЗДЕЛИТЕЛЕЙ из каждого х-того символа, где х = possibleLength
                    int    j          = 0;
                    for (int i = 0; i < Source.Length; i++)
                    {
                        if (j % possibleLength == 0 && (alf.IndexOf(Source[i]) != -1 || ALF.IndexOf(Source[i]) != -1)) //буква, нужная по номеру
                        {
                            everyXsymb += Source[i];
                            j++;
                        }
                        else if (j % possibleLength != 0 && (alf.IndexOf(Source[i]) != -1 || ALF.IndexOf(Source[i]) != -1)) //буква, не нужная по номеру
                        {
                            j++;
                        }
                    }

                    //Подсчитаем индекс
                    double index = 0;
                    int[]  times = new int[alf.Length];
                    Array.Clear(times, 0, alf.Length);
                    //Вычислим количество вхождений каждой буквы
                    int amount = 0;
                    for (int i = 0; i < everyXsymb.Length; i++)
                    {
                        if (alf.IndexOf(everyXsymb[i]) >= 0)
                        {
                            amount++;
                            times[alf.IndexOf(everyXsymb[i])]++;
                        }
                    }
                    for (int i = 0; i < times.Length; i++)
                    {
                        index += (times[i]) * (times[i] - 1);
                    }
                    index = index / (double)(amount * (amount - 1));
                    if (index > 0.0553)
                    {
                        f15_keyLengthUpDown.Value = possibleLength;
                        goto metka_exit;
                    }

                    possibleLength++;
                }
                metka_exit :;
            }
            if (f15_comboBoxMethods.Text == "Автокорреляционный метод" && f15_fieldCiphertext.TextLength > 0)
            {
                string Source = (f15_fieldCiphertext.Text).ToLower();
                for (int i = 0; i < Source.Length; i++) //Удаляем разделители
                {
                    if (alf.IndexOf(Source[i]) < 0)
                    {
                        string tmpDel = "";
                        tmpDel += Source[i];
                        Source  = Source.Replace(tmpDel, "");
                    }
                }
                for (int possibleLength = 1; possibleLength < 50; possibleLength++)
                {
                    string copySource   = Source.Substring(possibleLength) + Source.Substring(0, possibleLength);
                    int    coincidences = 0;
                    for (int i = 0; i < Source.Length; i++)
                    {
                        if (Source[i] == copySource[i])
                        {
                            coincidences++;
                        }
                    }
                    double index = coincidences / (double)Source.Length;
                    if (index > 0.0553)
                    {
                        f15_keyLengthUpDown.Value = possibleLength;
                        break;
                    }
                }
            }
            if (f15_comboBoxMethods.Text == "Тест Казиски" && f15_fieldCiphertext.TextLength > 0)
            {
                string Source = (f15_fieldCiphertext.Text).ToLower();
                for (int i = 0; i < Source.Length; i++) //Удаляем разделители
                {
                    if (alf.IndexOf(Source[i]) < 0)
                    {
                        string tmpDel = "";
                        tmpDel += Source[i];
                        Source  = Source.Replace(tmpDel, "");
                    }
                }
                if (Source.Length < 10)
                {
                    goto metka_exit;              //Для работы нужен достаточно длинный текст
                }
                string     checked_sublines = ""; //В эту строку через пробел будем записывать проверенные строки
                List <int> possibleLengths  = new List <int>();
                //если индекс в ней -1 то можно проверять, иначе - не надо
                for (int i = 0; i < Source.Length / 3 - 1; i++)
                {
                    string subline = Source.Substring(i, 3);
                    if (checked_sublines.IndexOf(subline) == -1)
                    {
                        //Считаем количество вхождений подстроки
                        int times = 0;
                        int j     = 0;
                        while (Source.IndexOf(subline, j) != -1)
                        {
                            j = Source.IndexOf(subline, j) + 1; //Следующий поиск начнем после текущего вхождения
                            times++;
                        }
                        ;
                        if (times >= 3)
                        {
                            checked_sublines += subline + " ";
                            List <int> positionsDifference = new List <int>();
                            int        prev = Source.IndexOf(subline); //первое вхождение
                            j = prev + 1;                              //начнем поиск со второго
                            while (Source.IndexOf(subline, j) != -1)
                            {
                                int curIndex = Source.IndexOf(subline, j);
                                positionsDifference.Add(curIndex - 1);
                                prev = curIndex;
                                j    = curIndex + 1;
                            }
                            ;
                            int curGCD = positionsDifference[0];
                            for (int k = 1; k < positionsDifference.Count; k++)
                            {
                                curGCD = GCD(curGCD, positionsDifference[k]);
                            }
                            if (curGCD > 1)
                            {
                                possibleLengths.Add(curGCD);
                            }
                        }
                    }
                }
                if (possibleLengths.Count > 0)
                {
                    possibleLengths.Sort();
                    int[] possibility = new int[50];
                    int   i           = 0;
                    while (i < possibleLengths.Count() && possibleLengths[i] < 50)
                    {
                        possibility[possibleLengths[i]]++;
                        i++;
                    }
                    for (i = 0; i < 50; i++)
                    {
                        possibility[i] = possibility[i] * i;    //Уменьшим значимость ложных срабатываний
                    }
                    for (i = 0; i < 50; i++)
                    {
                        if (possibility[i] == possibility.Max())
                        {
                            f15_keyLengthUpDown.Value = i;
                        }
                    }
                }
                metka_exit :;
            }
        }
Exemple #7
0
        public virtual string GetValue(string name)
        {
            //var property = type.GetProperty(name);
            //return property == null ? String.Empty : Convert.ToSingle(property.GetValue(this, null)).ToString("0.##");

            var j7EsDiagData = this as J7esDiagData;

            switch (name)
            {
            case "RPM":
                return(RPM.ToString(CultureInfo.InvariantCulture));

            case "UOZ":
                return(UOZ.ToString("0.#", CultureInfo.InvariantCulture));

            case "DUOZ":
                return(j7EsDiagData != null?j7EsDiagData.DUOZ.ToString("0.#", CultureInfo.InvariantCulture) : "-");

            case "TRT":
                return(TRT.ToString(CultureInfo.InvariantCulture));

            case "TWAT":
                return(TWAT.ToString(CultureInfo.InvariantCulture));

            case "TAIR":
                return(TAIR.ToString(CultureInfo.InvariantCulture));

            case "ALF":
                return(ALF.ToString("0.##", CultureInfo.InvariantCulture));

            case "LC1_ALF":
                return(LC1_ALF.ToString("0.##", CultureInfo.InvariantCulture));

            case "COEFF":
                return(COEFF.ToString("0.###", CultureInfo.InvariantCulture));

            case "INJ":
                return(INJ.ToString("0.###", CultureInfo.InvariantCulture));

            case "FUSE":
                return(FUSE.ToString("0.#", CultureInfo.InvariantCulture));

            case "AIR":
                return(AIR.ToString("0", CultureInfo.InvariantCulture));

            case "GBC":
                return(GBC.ToString("0", CultureInfo.InvariantCulture));

            case "SPD":
                return(SPD.ToString(CultureInfo.InvariantCulture));

            case "Press":
                return(j7EsDiagData != null?j7EsDiagData.Press.ToString("0.##", CultureInfo.InvariantCulture) : "-");

            case "TARGET_BOOST":
                return(j7EsDiagData != null?j7EsDiagData.TARGET_BOOST.ToString("0.##", CultureInfo.InvariantCulture) : "-");

            case "WGDC":
                return(j7EsDiagData != null?j7EsDiagData.WGDC.ToString(CultureInfo.InvariantCulture) : "-");

            case "TURBO_DYNAMICS":
                return(j7EsDiagData != null?j7EsDiagData.TURBO_DYNAMICS.ToString(CultureInfo.InvariantCulture) : "-");

            case "UGB_RXX":
                return(j7EsDiagData != null?j7EsDiagData.UGB_RXX.ToString("0.##", CultureInfo.InvariantCulture) : "-");

            default:
                return(String.Empty);
            }
        }