1.添加马头螺丝扭力角度的上传,后期使用定时器定时上传数据 2.抽真空 plc 触发90 3.螺丝开盖按钮添加 从 keyvalue获取值,对比扫码得到的值更新other4
83 lines
2.3 KiB
C#
83 lines
2.3 KiB
C#
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_plc> t_plcs;
|
||
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; }
|
||
|
||
}
|
||
}
|