zhougf 69c851c09e 4.11更新
1.添加是否调用mes接口按钮,并只有admin用户可以点击,2.修改螺丝引导页面
3.端子只有一个,端子扫码借用扫码页面
2025-04-11 15:47:10 +08:00

82 lines
2.3 KiB
C#
Raw 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.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
{
/// <summary>
/// 应用程序的主入口点。
/// </summary>
[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_flow> t_Flows;
public static List<t_lineplc> t_Lineplcs;
public static List<t_interface> t_Interfaces;
public static List<t_plcaddress> t_Plcaddresses;
public static List<t_angleaddress> t_Angleaddresses;
public static List<t_torqueaddress> t_Torqueaddresses;
public static List<t_pressurecurve> t_Pressurecurves;
public static List<t_keyvalue> t_Keyvalues;
public static t_line t_Line;
public static List<ThreadHelp> 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; }
}
}