using System;
using System.Collections.Generic;
using System.IO.Ports;
using System.Linq;
using System.Security.Cryptography.X509Certificates;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;
using WindowsFormsApp1.mod;
using WindowsFormsApp1.mod.server;
using WindowsFormsApp1.server;
namespace WindowsFormsApp1
{
internal static class Program
{
///
/// 应用程序的主入口点。
///
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
//Application.Run(new MainForm());
//创建窗体
LoginForm frm = new LoginForm();
//验证成功显示主窗体
if (frm.ShowDialog() == DialogResult.OK)
{
Application.Run(new MainForm());
}
}
}
public static class Init
{
public static t_user t_User;
public static List t_Flows;
public static List t_Lineplcs;
public static List t_plcs;
public static List t_Interfaces;
public static List t_Plcaddresses;
public static List t_Angleaddresses;
public static List t_Torqueaddresses;
public static List t_Pressurecurves;
public static List t_Keyvalues;
public static t_line t_Line;
public static List threadHelps;
public static string ScanString;
public static string DZString;
//PLC状态存储
public static short Plcstatus = -1;
//PLC最后状态事件(用于计时15秒状态不变回传)
public static DateTime Plcstatus_LastTime = DateTime.Now;
//扫码Com
public static SerialPort ScanPort;
//气密Com
public static SerialPort AirtightPort;
//其他线程获取的气密参数
public static Airtight airtight = new Airtight();
public static string SN { get; set; }
public static string ImageName { get; set; }
public static int ImageLocation { get; set; }
public static int PlcTrigger { get; set; }
}
}