ASCU_ALL/ShowTrend_tmp3/ShowTrend3/Libs/VDP.cs
2021-11-12 15:00:41 +05:00

86 lines
2.9 KiB
C#
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json.Linq;
namespace ShowTrend3.Libs
{
public class PasportVDP
{
public int NumberVDP;
public bool HaveDate = false;
public DateTime TimeStart;
public DateTime TimeEnd;
public bool HavePasport = false;
public int KodNPlav;
public string NPlav;
public string RM;
public string Splav;
public string _is;
public ushort Notd;
public ushort VesSlit;
public ushort Diam;
public ushort PrPl;
public string Tin;
public string Dzap;
public ushort Dlog;
public ushort Last;
public ushort Dlper;
public string Nazn;
public ushort Kompl;
public ushort Izl;
public Single Robm;
public Single Rizol;
public ushort Dkr;
public string Nkon;
public string Pos;
public string Ukaz;
public string Zakaz;
public string Kat;
public string Pril;
public string Reserved;
public JArray JsonFormat()
{
JArray result = new JArray();
return result;
}
}
public class TechCycle
{
public readonly string[] CycleName =
{
"Конец технологического цикла", "Выгрузка-загрузка", "Вакуумирование на приварку", "Цикл 3",
"Цикл 4", "Приварка", "Охлаждение приварки", "Осмотр приварки", "Вакуумирование на плавку",
"Разведение ванны", "Плавка (основной режим)", "ВУР", "Охлаждение слитка", "Выгрузка комплекта",
"Вакуумирование на оплавление", "Оплавление", "Охлаждение оплавыша", "Слив металла",
"Цикл 18", "Цикл 19", "Цикл 20", "Цикл 21", "Цикл 22", "Цикл 23", "Цикл 24", "Проверка защит"
};
public readonly string[] CycleColorHex =
{
"00ffff", "00ffff", "0000ff", "000000", "000000", "ff0000", "00ff00", "00ffff", "0000ff",
"800080", "ff0000", "ff00ff", "00ff00", "00ffff", "0000ff", "ff0000", "00ff00", "ff00ff",
"000000", "000000", "000000", "000000", "000000", "000000", "000000", "ffff00"
};
public string ConvertColorHexToRGB(string hex)
{
string result = "";
for (int i = 0; i < 3; i++)
{
byte t = Convert.ToByte(hex.Substring(i * 2, 2), 16);
result += t.ToString();
if (i < 2)
result += ",";
}
return result;
}
}
}