File diff suppressed because one or more lines are too long
@@ -0,0 +1,678 @@
|
||||
using JinYuan.DAL;
|
||||
using JinYuan.CommunicationLib.Library;
|
||||
using JinYuan.DataConvertLib;
|
||||
using JinYuan.Models;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
using System.IO;
|
||||
using System.Threading;
|
||||
using JinYuan.Helper;
|
||||
using JinYuan.MES;
|
||||
using JinYuan.CommunicationLib.Enum;
|
||||
using JinYuan.CommunicationLib;
|
||||
using JinYuan.CommunicationLib.Base;
|
||||
|
||||
namespace JinYuan.VirtualDataLibrary
|
||||
{
|
||||
public class CommonMethods
|
||||
{
|
||||
/// <summary>
|
||||
/// 本地数据库
|
||||
/// </summary>
|
||||
public static ISugarHepler db = new SQLSugarService();
|
||||
/// <summary>
|
||||
/// 远程服务段数据库
|
||||
/// </summary>
|
||||
public static ISugarHepler dbServer = new SQLSugarService();
|
||||
|
||||
/// <summary>
|
||||
/// MES接口
|
||||
/// </summary>
|
||||
public static IMes hbgMes = new MesDataProcess();
|
||||
/// <summary>
|
||||
/// 参数
|
||||
/// </summary>
|
||||
public static ProductModelParam parRange = new ProductModelParam();
|
||||
/// <summary>
|
||||
/// 全局钩子
|
||||
/// </summary>
|
||||
public static ScanerHook listener = new ScanerHook();
|
||||
|
||||
/// <summary>
|
||||
/// 创建个全局焊接功率队列数据存储
|
||||
/// </summary>
|
||||
public static List<Queue<double>> QWeldingPowerData = new List<Queue<double>>();
|
||||
|
||||
/// <summary>
|
||||
/// 创建个全局入壳推力队列数据存储
|
||||
/// </summary>
|
||||
public static List<Queue<double>> QPlanenessData = new List<Queue<double>>();
|
||||
|
||||
/// <summary>
|
||||
/// 创建全局的登录对象
|
||||
/// </summary>
|
||||
public static SysAdmin currentAdmin = null;
|
||||
/// <summary>
|
||||
/// 登录是否成功
|
||||
/// </summary>
|
||||
public static bool IsLoginOk = false;
|
||||
/// <summary>
|
||||
/// 创建一个设备对象
|
||||
/// </summary>
|
||||
public static Device plcDevice;
|
||||
/// <summary>
|
||||
/// ModbusTCP通信对象
|
||||
/// </summary>
|
||||
//public static OmronFinsTCP plc = new OmronFinsTCP();
|
||||
|
||||
//创建一个全局的配置对象
|
||||
public static SysConfig sysConfig = new SysConfig();
|
||||
|
||||
|
||||
|
||||
|
||||
public static int InvadTime;
|
||||
|
||||
/// <summary>
|
||||
/// 智能电表
|
||||
/// </summary>
|
||||
public static List<ElectricEnergy> listElectricEnergy = new List<ElectricEnergy>();
|
||||
|
||||
/// <summary>
|
||||
///是否开启刷新
|
||||
/// </summary>
|
||||
public static bool isRefreshTimerWeeding=false;
|
||||
|
||||
/// <summary>
|
||||
/// SQL语句
|
||||
/// </summary>
|
||||
public static DBSQL dBSQL { get; } = new DBSQL();
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// MES配置文件类
|
||||
/// </summary>
|
||||
public static MesConfig mesConfig = new MesConfig();
|
||||
|
||||
///创建一个全局的连接状态
|
||||
public static bool connectState = false;
|
||||
|
||||
/// <summary>
|
||||
/// 滴答次数
|
||||
/// </summary>
|
||||
public static int tickCount = 0;
|
||||
/// <summary>
|
||||
/// QIEHUAN
|
||||
/// </summary>
|
||||
public static int tickHomeCount = 0;
|
||||
/// <summary>
|
||||
/// 报警信息
|
||||
/// </summary>
|
||||
public static string SlideAlarmText = "当前无报警";
|
||||
/// <summary>
|
||||
/// 退出
|
||||
/// </summary>
|
||||
public static bool IsExit = false;
|
||||
/// <summary>
|
||||
/// 是否登出账户
|
||||
/// </summary>
|
||||
public static bool LoginOut = false;
|
||||
/// <summary>
|
||||
/// 是否上传MES
|
||||
/// </summary>
|
||||
public static bool IsUpMes { get; set; }
|
||||
/// <summary>
|
||||
/// 是否运行
|
||||
/// </summary>
|
||||
public static bool IsRun { get; set; } = false;
|
||||
/// <summary>
|
||||
///第一次读取
|
||||
/// </summary>
|
||||
public static bool IsFirst = false;
|
||||
/// <summary>
|
||||
/// 焊接功率波形图显示条数
|
||||
/// </summary>
|
||||
public static int ChatLineCount = 3;
|
||||
/// <summary>
|
||||
/// 员工号
|
||||
/// </summary>
|
||||
public static string strWorker { get; set; }
|
||||
/// <summary>
|
||||
/// 是否开启智能电表
|
||||
/// </summary>
|
||||
public static bool IsStartZNDB { get; set; } = false;
|
||||
/// <summary>
|
||||
/// 白夜班
|
||||
/// </summary>
|
||||
public static string strClass { get; set; } = "白班";
|
||||
/// <summary>
|
||||
/// 时间变更
|
||||
/// </summary>
|
||||
public static string ChangeClassTime { get; set; } = "20:30:00";
|
||||
|
||||
/// <summary>
|
||||
/// 设备状态
|
||||
/// </summary>
|
||||
public static List<bool> Statues { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 服务器链接状态
|
||||
/// </summary>
|
||||
public static bool EMCStatues { get; set; }
|
||||
|
||||
#region 小时产能
|
||||
/// <summary>
|
||||
/// 上个时间点的总数
|
||||
/// </summary>
|
||||
public static int LastTotalNum { get; set; } = 0;
|
||||
/// <summary>
|
||||
/// 上个时间点良品数
|
||||
/// </summary>
|
||||
public static int LastOkNum { get; set; } = 0;
|
||||
/// <summary>
|
||||
/// 上一次重置计数的时间
|
||||
/// </summary>
|
||||
public static string LastResetTime { get; set; }
|
||||
/// <summary>
|
||||
/// 上一次的小时
|
||||
/// </summary>
|
||||
public static int LastHour { get; set; }
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public static List<Group> ListOmronGroups { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 12小时产能
|
||||
/// </summary>
|
||||
public static List<Chart12HourData> Lst_Prod12HourData = new List<Chart12HourData>();
|
||||
/// <summary>
|
||||
/// 不良选项(检测项不良)
|
||||
/// </summary>
|
||||
public static List<ChartDataType> Lst_DefectTypeQty = new List<ChartDataType>();
|
||||
|
||||
/// <summary>
|
||||
/// PLC报警前10项
|
||||
/// </summary>
|
||||
public static List<ChartDataType> Lst_AlarmTop10_Qty = new List<ChartDataType>();
|
||||
/// <summary>
|
||||
/// 参数项设置
|
||||
/// </summary>
|
||||
public static List<ParamList> paramlists { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 线程控制
|
||||
/// </summary>
|
||||
public static ManualResetEvent ResetEventRecv = new ManualResetEvent(true);
|
||||
|
||||
|
||||
#region 计数项
|
||||
/// <summary>
|
||||
/// 生产总数
|
||||
/// </summary>
|
||||
public static int TotalQty = 0;
|
||||
|
||||
public static int ProOKQty = 0;
|
||||
|
||||
public static int Ppm = 0;
|
||||
|
||||
public static double JiaDL = 0.0;
|
||||
|
||||
public static List<float> AntiDustAirSpeed = new List<float>();
|
||||
/// <summary>
|
||||
/// PLC开机/运行时间
|
||||
/// </summary>
|
||||
public static List<int> PlcOpenAndRunTime = new List<int>();
|
||||
/// <summary>
|
||||
/// PLC开机/运行时间地址
|
||||
/// </summary>
|
||||
public static List<string> PlcOpenAndRunTimeAdress = new List<string> { "D50", "D52" , "D54" , "D56" , "D58" , "D60"};
|
||||
public static int ProdDRFIDNgQty = 0;//低托杯
|
||||
public static int ProdDXNgQty = 0;//卷心码
|
||||
public static int ProdGRFIDNgQty = 0;//高托杯
|
||||
public static int ProdYLZNgQty = 0;//压力
|
||||
#endregion
|
||||
|
||||
private static PlcReadWriteBase _PlcLink;
|
||||
|
||||
/// <summary>
|
||||
/// PLC客户端
|
||||
/// </summary>
|
||||
public static PlcReadWriteBase PlcLink
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_PlcLink == null)
|
||||
{
|
||||
_PlcLink = PlcNewClass.GetPLC(CommonMethods.plcDevice.IPAddress, CommonMethods.plcDevice.Port, (PLCType)Enum.Parse(typeof(PLCType), (string)CommonMethods.plcDevice.PLCType, false));
|
||||
}
|
||||
return _PlcLink;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
#region 首次连接PLC
|
||||
public static bool ConnectPLC()
|
||||
{
|
||||
try
|
||||
{
|
||||
if (CommonMethods.plcDevice != null)
|
||||
{
|
||||
//判断是否为第一次连接
|
||||
if (!CommonMethods.plcDevice.IsFirstConnect)
|
||||
{
|
||||
Thread.Sleep(CommonMethods.plcDevice.ReConnectTime);
|
||||
CommonMethods.PlcLink.Disconnect();
|
||||
}
|
||||
string msg = "";
|
||||
var result = CommonMethods.PlcLink.Connect(ref msg);
|
||||
if (result)
|
||||
{
|
||||
CommonMethods.plcDevice.IsConnected = true;
|
||||
CommonMethods.AddLog(false, CommonMethods.plcDevice.IsFirstConnect ? $"PLC初次连接成功:{msg}" : $"PLC重新连接成功:{msg}");
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
CommonMethods.plcDevice.IsConnected = false;
|
||||
CommonMethods.AddLog(true, CommonMethods.plcDevice.IsFirstConnect ? "PLC初次连接失败" : "PLC重新连接失败");
|
||||
}
|
||||
|
||||
//如果是第一次连接,将标志位复位
|
||||
if (CommonMethods.plcDevice.IsFirstConnect)
|
||||
{
|
||||
CommonMethods.plcDevice.IsFirstConnect = false;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
new MsgshowTip("与PLC链接断开,请检查通讯线路!").ShowDialog();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
#region 写入PLC信息
|
||||
//public static OperateResult CommonWrite(string varName, string varValue)
|
||||
//{
|
||||
// //先通过变量名称找到对象
|
||||
// var variable = plcDevice.VarList.Find(c => c.VarName == varName);
|
||||
|
||||
// if (variable != null)
|
||||
// {
|
||||
// DataConvertLib.DataType dataType = (DataConvertLib.DataType)Enum.Parse(typeof(DataConvertLib.DataType), variable.DataType, true);
|
||||
|
||||
// var result = MigrationLib.SetMigrationValue(varValue, dataType, variable.Scale.ToString(), variable.Offset.ToString());
|
||||
|
||||
// if (result.IsSuccess)
|
||||
// {
|
||||
// try
|
||||
// {
|
||||
// switch (dataType)
|
||||
// {
|
||||
// case DataConvertLib.DataType.Bool:
|
||||
// return plc.WriteBool(variable.VarAddress, result.Content == "1" || result.Content.ToUpper() == "TRUE");
|
||||
// case DataConvertLib.DataType.Byte:
|
||||
// return plc.WriteByte(variable.VarAddress, Convert.ToByte(result.Content));
|
||||
// case DataConvertLib.DataType.Short:
|
||||
// return plc.WriteShort(variable.VarAddress, Convert.ToInt16(result.Content));
|
||||
// case DataConvertLib.DataType.UShort:
|
||||
// return plc.WriteUShort(variable.VarAddress, Convert.ToUInt16(result.Content));
|
||||
// case DataConvertLib.DataType.Int:
|
||||
// return plc.WriteInt(variable.VarAddress, Convert.ToInt32(result.Content));
|
||||
// case DataConvertLib.DataType.UInt:
|
||||
// return plc.WriteUInt(variable.VarAddress, Convert.ToUInt32(result.Content));
|
||||
// case DataConvertLib.DataType.Float:
|
||||
// return plc.WriteFloat(variable.VarAddress, Convert.ToSingle(result.Content));
|
||||
// case DataConvertLib.DataType.Double:
|
||||
// return plc.WriteDouble(variable.VarAddress, Convert.ToDouble(result.Content));
|
||||
// case DataConvertLib.DataType.Long:
|
||||
// return plc.WriteLong(variable.VarAddress, Convert.ToInt64(result.Content));
|
||||
// case DataConvertLib.DataType.ULong:
|
||||
// return plc.WriteULong(variable.VarAddress, Convert.ToUInt64(result.Content));
|
||||
// case DataConvertLib.DataType.String:
|
||||
// return plc.WriteByteArray(variable.VarAddress, ByteArrayLib.GetByteArrayFromString(result.Content, Encoding.ASCII));
|
||||
// default:
|
||||
// return OperateResult.CreateFailResult("暂不支持此数据类型");
|
||||
// }
|
||||
// }
|
||||
// catch (Exception ex)
|
||||
// {
|
||||
// return OperateResult.CreateFailResult("数据转换出错:" + ex.Message);
|
||||
// }
|
||||
|
||||
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// return OperateResult.CreateFailResult(result.Message);
|
||||
// }
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// return OperateResult.CreateFailResult("请检查变量名称是否存在");
|
||||
// }
|
||||
//}
|
||||
#endregion
|
||||
|
||||
#region 配置信息
|
||||
public static string devPath = Application.StartupPath + "\\Config\\Device.ini";
|
||||
public static string groupPath = Application.StartupPath + "\\Config\\Group.xlsx";
|
||||
public static string variablePath = Application.StartupPath + "\\Config\\Variable.xlsx";
|
||||
public static string settingPath = Application.StartupPath + "\\Config\\settings.json";
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 错误日志路径
|
||||
/// </summary>
|
||||
public static string strErrorLogspath = System.Windows.Forms.Application.StartupPath + "\\Logs\\ErrorLogs";
|
||||
|
||||
public static string strSystemLogspath = System.Windows.Forms.Application.StartupPath + "\\Logs\\SystemLogs";
|
||||
public static string strAlarmLogspath = System.Windows.Forms.Application.StartupPath + "\\Logs\\AlarmLogs";
|
||||
|
||||
public static string strsqlLogspath = "";
|
||||
/// <summary>
|
||||
/// 删除路径
|
||||
/// </summary>
|
||||
public static string strDeletepath = "";
|
||||
/// <summary>
|
||||
/// 能耗保存路径
|
||||
/// </summary>
|
||||
public static string strWattrMeterpath = System.Windows.Forms.Application.StartupPath + "\\智能电表数据";
|
||||
|
||||
/// 风速仪保存路径
|
||||
/// </summary>
|
||||
///
|
||||
public static string strAnemographpath = System.Windows.Forms.Application.StartupPath + "\\风速仪数据";
|
||||
|
||||
/// <summary>
|
||||
/// MES路径日志
|
||||
/// </summary>
|
||||
public static string strMesLogspath = System.Windows.Forms.Application.StartupPath + "\\Logs\\MesLogs";
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// PLC读取寄存器配置文件路径
|
||||
/// </summary>
|
||||
public static string ConfigPath = Path.Combine(System.Windows.Forms.Application.StartupPath, "ini\\PlcConfig.ini");
|
||||
/// <summary>
|
||||
/// 系统程序配置文件路径
|
||||
/// </summary>
|
||||
public static string iniFilePath = Path.Combine(System.Windows.Forms.Application.StartupPath, "ini\\Configure.ini");
|
||||
|
||||
|
||||
|
||||
#region 读取配置文件
|
||||
/// <summary>
|
||||
///读取配置文件
|
||||
/// </summary>
|
||||
public static void GetSysConfig()
|
||||
{
|
||||
try
|
||||
{
|
||||
sysConfig.AutoStart = Convert.ToBoolean(IniConfigHelper.ReadIniData("配置信息", "开机自动启动", "false"));
|
||||
sysConfig.AutoLogin = Convert.ToBoolean(IniConfigHelper.ReadIniData("配置信息", "启动自动登录", "false"));
|
||||
sysConfig.AutoLock = Convert.ToBoolean(IniConfigHelper.ReadIniData("配置信息", "无操作自动锁屏", "false"));
|
||||
sysConfig.LockPeriod = Convert.ToInt32(IniConfigHelper.ReadIniData("配置信息", "锁屏间隔时间", "false"));
|
||||
|
||||
sysConfig.AutoQieHuanM = Convert.ToBoolean(IniConfigHelper.ReadIniData("配置信息", "无操作自动切换监控界面", "false"));
|
||||
sysConfig.QieHuanMPeriod = Convert.ToInt32(IniConfigHelper.ReadIniData("配置信息", "切换监控界面间隔时间", "false"));
|
||||
|
||||
sysConfig.ShowSeriesCount = Convert.ToInt32(IniConfigHelper.ReadIniData("配置信息", "曲线显示数量", "false"));
|
||||
sysConfig.SwipeCardMode = Convert.ToBoolean(IniConfigHelper.ReadIniData("配置信息", "开启刷卡模式", "false"));
|
||||
sysConfig.MesModeSwitching = Convert.ToBoolean(IniConfigHelper.ReadIniData("配置信息", "MES/非MES模式切换", "false"));
|
||||
sysConfig.GetMesParam = Convert.ToBoolean(IniConfigHelper.ReadIniData("配置信息", "获取MES参数", "false"));
|
||||
sysConfig.OKSwitching = Convert.ToBoolean(IniConfigHelper.ReadIniData("配置信息", "强制OK/正常NG模式切换", "false"));
|
||||
sysConfig.SaveThreadTime = Convert.ToBoolean(IniConfigHelper.ReadIniData("配置信息", "线程耗时日志保存", "false"));
|
||||
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
sysConfig = null;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 保存配置文件
|
||||
/// <summary>
|
||||
/// 保存启动自动登录
|
||||
/// </summary>
|
||||
/// <param name="value"></param>
|
||||
/// <returns></returns>
|
||||
public static bool SaveAutoStart(bool value)
|
||||
{
|
||||
return IniConfigHelper.WriteIniData("配置信息", "开机自动启动", value.ToString());
|
||||
}
|
||||
/// <summary>
|
||||
/// 保存开机自动启动
|
||||
/// </summary>
|
||||
/// <param name="value"></param>
|
||||
/// <returns></returns>
|
||||
public static bool SaveAutoLogin(bool value)
|
||||
{
|
||||
return IniConfigHelper.WriteIniData("配置信息", "启动自动登录", value.ToString());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 保存无操作自动锁屏
|
||||
/// </summary>
|
||||
/// <param name="value"></param>
|
||||
/// <returns></returns>
|
||||
public static bool SaveAutoLock(bool value)
|
||||
{
|
||||
return IniConfigHelper.WriteIniData("配置信息", "无操作自动锁屏", value.ToString());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 保存锁屏间隔时间
|
||||
/// </summary>
|
||||
/// <param name="value"></param>
|
||||
/// <returns></returns>
|
||||
public static bool SaveLockPeriod(int value)
|
||||
{
|
||||
return IniConfigHelper.WriteIniData("配置信息", "锁屏间隔时间", value.ToString());
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 保存无操作自动切换监控界面
|
||||
/// </summary>
|
||||
/// <param name="value"></param>
|
||||
/// <returns></returns>
|
||||
public static bool SaveAutoQieHuanM(bool value)
|
||||
{
|
||||
return IniConfigHelper.WriteIniData("配置信息", "无操作自动切换监控界面", value.ToString());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 保存切换监控界面间隔时间
|
||||
/// </summary>
|
||||
/// <param name="value"></param>
|
||||
/// <returns></returns>
|
||||
public static bool SaveQieHuanMPeriod(int value)
|
||||
{
|
||||
return IniConfigHelper.WriteIniData("配置信息", "切换监控界面间隔时间", value.ToString());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 保存曲线显示数量
|
||||
/// </summary>
|
||||
/// <param name="value"></param>
|
||||
/// <returns></returns>
|
||||
public static bool SaveShowSeriesCount(int value)
|
||||
{
|
||||
return IniConfigHelper.WriteIniData("配置信息", "曲线显示数量", value.ToString());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 开启刷卡模式
|
||||
/// </summary>
|
||||
/// <param name="value"></param>
|
||||
/// <returns></returns>
|
||||
public static bool SaveSwipeCardMode(bool value)
|
||||
{
|
||||
return IniConfigHelper.WriteIniData("配置信息", "开启刷卡模式", value.ToString());
|
||||
}
|
||||
/// <summary>
|
||||
/// MES/非MES模式
|
||||
/// </summary>
|
||||
/// <param name="value"></param>
|
||||
/// <returns></returns>
|
||||
public static bool SaveOpenMesModel(bool value)
|
||||
{
|
||||
return IniConfigHelper.WriteIniData("配置信息", "MES/非MES模式切换", value.ToString());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 强制OK/正常NG模式切换
|
||||
/// </summary>
|
||||
/// <param name="value"></param>
|
||||
/// <returns></returns>
|
||||
public static bool SaveOpenOKModel(bool value)
|
||||
{
|
||||
return IniConfigHelper.WriteIniData("配置信息", "强制OK/正常NG模式切换", value.ToString());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取MES参数
|
||||
/// </summary>
|
||||
/// <param name="value"></param>
|
||||
/// <returns></returns>
|
||||
public static bool SaveGetMesParam(bool value)
|
||||
{
|
||||
return IniConfigHelper.WriteIniData("配置信息", "获取MES参数", value.ToString());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 保存线程耗时操作
|
||||
/// </summary>
|
||||
/// <param name="value"></param>
|
||||
/// <returns></returns>
|
||||
public static bool SaveSaveThreadTime(bool value)
|
||||
{
|
||||
return IniConfigHelper.WriteIniData("配置信息", "线程耗时日志保存", value.ToString());
|
||||
}
|
||||
#endregion
|
||||
|
||||
#endregion
|
||||
|
||||
#region 委托信息
|
||||
//创建委托
|
||||
// 数据监视委托
|
||||
public static Action<int, string> AddDataMonitorDelegate;
|
||||
/// <summary>
|
||||
/// 系统日志
|
||||
/// </summary>
|
||||
public static Action<bool, string> AddLogDelegate;
|
||||
/// <summary>
|
||||
/// 操作日志
|
||||
/// </summary>
|
||||
public static Action<bool, string> AddOPLogDelegate;
|
||||
/// <summary>
|
||||
/// 报警日志
|
||||
/// </summary>
|
||||
public static Action<SysLog> AddAlarmDelegate;
|
||||
/// <summary>
|
||||
/// 显示报警信息
|
||||
/// </summary>
|
||||
public static Action<string> ShowAlarmDelegate;
|
||||
/// <summary>
|
||||
/// 参数更新
|
||||
/// </summary>
|
||||
public static Action ChangeParamDelegate;
|
||||
|
||||
/// <summary>
|
||||
/// 显示上料信息
|
||||
/// </summary>
|
||||
public static Action<List<AGearEntity>> ShowFeedingDelegate;
|
||||
/// <summary>
|
||||
/// 显示下料数据
|
||||
/// </summary>
|
||||
public static Action<List<BGearEntity>> ShowBlankingDelegate;
|
||||
|
||||
/// <summary>
|
||||
/// 数据监视委托
|
||||
/// </summary>
|
||||
/// <param name="type"></param>
|
||||
/// <param name="info"></param>
|
||||
public static void AddDataMonitorLog(int type, string info)
|
||||
{
|
||||
//调用委托
|
||||
if (AddDataMonitorDelegate != null)
|
||||
{
|
||||
AddDataMonitorDelegate(type, info);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 写入系统日志
|
||||
/// </summary>
|
||||
/// <param name="isError">是否为错误信息</param>
|
||||
/// <param name="info">日志信息</param>
|
||||
public static void AddLog(bool isError, string info)
|
||||
{
|
||||
//调用委托
|
||||
if (AddLogDelegate != null)
|
||||
{
|
||||
AddLogDelegate(isError, info);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// 写入操作日志
|
||||
/// </summary>
|
||||
/// <param name="isError"></param>
|
||||
/// <param name="info"></param>
|
||||
public static void AddOPLog(bool isError, string info)
|
||||
{
|
||||
//调用委托
|
||||
if (AddLogDelegate != null)
|
||||
{
|
||||
AddOPLogDelegate(isError, info);
|
||||
}
|
||||
}
|
||||
|
||||
public static void AddAlarmLog(SysLog sysLog)
|
||||
{
|
||||
//调用委托
|
||||
if (AddAlarmDelegate != null)
|
||||
{
|
||||
AddAlarmDelegate(sysLog);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 显示报警日志
|
||||
/// </summary>
|
||||
/// <param name="info"></param>
|
||||
public static void ShowAlarmLog(string info)
|
||||
{
|
||||
//调用委托
|
||||
if (ShowAlarmDelegate != null)
|
||||
{
|
||||
ShowAlarmDelegate(info);
|
||||
}
|
||||
}
|
||||
|
||||
public static void ChangeParamData()
|
||||
{
|
||||
//调用委托
|
||||
if (ChangeParamDelegate != null)
|
||||
{
|
||||
ChangeParamDelegate();
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,456 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace JinYuan.VirtualDataLibrary
|
||||
{
|
||||
public class DBSQL
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// 获取PLC换型参数绑定值
|
||||
/// </summary>
|
||||
/// <param name="modelName"></param>
|
||||
/// <returns></returns>
|
||||
public string GetPlcParamSql(string modelName)
|
||||
{
|
||||
string strSql = $@"SELECT '{modelName}' ModelName,pb.PLCAddress,pc.PLCValue,pc.UpdateTime,pb.PLCRemark,pb.OrderNum FROM Plcconfigbase pb
|
||||
left join (select * from Plcconfig where ModelName='{modelName}') pc on pb.PLCAddress = pc.PLCAddress order by pb.OrderNum";
|
||||
return strSql;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取产品型号参数
|
||||
/// </summary>
|
||||
/// <param name="strModelType"></param>
|
||||
/// <returns></returns>
|
||||
public string GetParamSql(string strModelType)
|
||||
{
|
||||
string strSql = $@"SELECT pb.ParaName, '{strModelType}' ModelName,pl.ParaValueMin,pl.ParaValueMax,pl.Uint,pb.Remark,pl.UpdateTime
|
||||
FROM Parambase pb
|
||||
left join (select * from ParamList where ModelName = '{strModelType}' ) as pl
|
||||
on pb.ParaName = pl.ParaName order by pb.fNo asc";
|
||||
return strSql;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 获取产品型号列表
|
||||
/// </summary>
|
||||
/// <param name="strProdType"></param>
|
||||
/// <returns></returns>
|
||||
public string GetProdTypeSql(string strProdType = "")
|
||||
{
|
||||
string strSql = @"SELECT * FROM ProductModel ";
|
||||
if (strProdType != "")
|
||||
{
|
||||
strSql += string.Format(" where ModelName='{0}'", strProdType);
|
||||
}
|
||||
strSql += " order by ModelName";
|
||||
return strSql;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 获取产品型号
|
||||
/// </summary>
|
||||
/// <param name="strModelType"></param>
|
||||
/// <returns></returns>
|
||||
public string GetProductParaByProdModel(string strModelType)
|
||||
{
|
||||
string strSql = $@"SELECT pb.ParaName, '{strModelType}' ModelName,pl.ParaValueMin,pl.ParaValueMax,pl.Uint,pb.Remark,pl.UpdateTime
|
||||
FROM Parambase pb
|
||||
left join (select * from Paramlist where ModelName = '{strModelType}' ) as pl
|
||||
on pb.ParaName = pl.ParaName order by pb.fNo asc";
|
||||
return strSql;
|
||||
}
|
||||
|
||||
|
||||
public string GetPLCConfigBases()
|
||||
{
|
||||
string strSql = string.Format(@"SELECT * FROM Plcconfigbase ORDER BY OrderNum");
|
||||
return strSql;
|
||||
}
|
||||
|
||||
|
||||
public string GetSysAdminSql()
|
||||
{
|
||||
string strSql = string.Format(@"SELECT [LoginId]
|
||||
,[LoginName]
|
||||
,[LoginPwd]
|
||||
,[LoginUid]
|
||||
,[LoginLevel]
|
||||
,[SystemLog]
|
||||
,[CpkData]
|
||||
,[HistoryData]
|
||||
,[ParamSet]
|
||||
,[SystemSet]
|
||||
,[UserManage]
|
||||
FROM [dbo].[SysAdmin]");
|
||||
return strSql;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查询历史数据
|
||||
/// </summary>
|
||||
/// <param name="strBarCode"></param>
|
||||
/// <param name="strDate1"></param>
|
||||
/// <param name="strDate2"></param>
|
||||
/// <returns></returns>
|
||||
public string SelectHostData(int type, string strBarCode, string strDate1, string strDate2)
|
||||
{
|
||||
string strSql = "";
|
||||
try
|
||||
{
|
||||
if (type == 0)
|
||||
{
|
||||
strSql = @"SELECT CONVERT(varchar,[TestTime], 120) 时间
|
||||
,[BarCode] 卷芯码
|
||||
,[Result] 结果
|
||||
,[Remark] 备注
|
||||
,case when [Flag]=1 then '已上传' else '未上传' end 上传状态
|
||||
FROM [dbo].[AGearEntity] where TestTime >= '" + strDate1 + "' and TestTime <= '" + strDate2 + "' ";
|
||||
if (strBarCode != "")
|
||||
{
|
||||
strSql += " and BarCode like '%" + strBarCode + "' ";
|
||||
}
|
||||
}
|
||||
else if (type == 1)
|
||||
{
|
||||
strSql = @"SELECT CONVERT(varchar,[CSBYHASCANNINGTIME], 120) 时间
|
||||
,[CSBYHPROCESSNAME] 工序名
|
||||
,[CSBYHSCHEDULE] 班次
|
||||
,[A_B] 芯包
|
||||
,[CSBYHCODEA] 卷芯码
|
||||
,[CSBYHOUTSTATIONJUDGMENTRESULT] 出站判定结果
|
||||
,[Remark] 备注
|
||||
,[RethrowNum] 复投次数
|
||||
,[CSBYHWEIGHTRESULTA1] 芯包重量判定结果
|
||||
,[CSBYHTHICKNESSTESTJUDGERESULTA] 芯包测厚位移判定结果
|
||||
,[ThicknessPressureResult] 芯包测厚压力判定结果
|
||||
,[PreweldResult] 焊前CCD检测结果
|
||||
,[CSBYHPOLARITYRESULTA] 芯包极性检测结果
|
||||
,[CSBYHCUTADHESIONJUDGERESULTA] 电芯裁切粘连判定结果
|
||||
,[CSBYHCUTBURRJUDGERESULTA] 电芯裁切毛刺判定结果
|
||||
,[CSBYHSOLDERJUDGERESULTA] 芯包铜焊印位置判定结果
|
||||
,[AluminiumWeldPositionResult1] 芯包铝焊印位置判定结果
|
||||
,[PreweldResult] 焊前CCD检测结果
|
||||
,[CSBYHFRONTEARCRACKLEJUDGERESULTA] 芯包正面极耳撕裂判定结果
|
||||
,[CSBYHBACKEARCRACKLEJUDGERESULTA] 芯包背面极耳撕裂判定结果
|
||||
,[CSBYHFRONTEARFLODINGRESULTA] 芯包正面极耳翻折检测结果
|
||||
,[CSBYHBACKEARFLODINGRESULTA] 芯包背面极耳翻折检测结果
|
||||
,[CSBYHCUTADHESIONRESULTA] 电芯裁切粘连结果
|
||||
,[CSBYHCUTBURRRESULTA] 电芯裁切毛刺结果
|
||||
,[CSBYHFRONTEARCRACKLERESULTA] 芯包正面极耳撕裂裂纹检测结果
|
||||
,[CSBYHBACKEARCRACKLERESULTA] 芯包背面极耳撕裂裂纹检测结果
|
||||
,[CSBYHWEIGHTNOA1] 芯包称重工位号
|
||||
,[CSBYHTHICKNESSTESTSTATIONNOA] 芯包测厚工位号
|
||||
,[CSBYHTOOLNOA] 芯包治具号
|
||||
,[CSBYHCUWELDINGSTATIONNOA1] 芯包铜焊1工位号
|
||||
,[CSBYHCUWELDINGSTATIONNOA2] 芯包铜焊2工位号
|
||||
,[CSBYHCUWELDINGSTATIONNOA3] 芯包铜焊3工位号
|
||||
,[CSBYHCUWELDHEADCOUNTA1] 芯包铜焊1焊头次数
|
||||
,[CSBYHCUWELDHEADCOUNTA2] 芯包铜焊2焊头次数
|
||||
,[CSBYHCUWELDHEADCOUNTA3] 芯包铜焊3焊头次数
|
||||
,[CSBYHCUWELDBASECOUNTA1] 芯包铜焊1焊座次数
|
||||
,[CSBYHCUWELDBASECOUNTA2] 芯包铜焊2焊座次数
|
||||
,[CSBYHCUWELDBASECOUNTA3] 芯包铜焊3焊座次数
|
||||
,[CSBYHALWELDINGSTATIONNOA1] 芯包铝焊1工位号
|
||||
,[CSBYHALWELDINGSTATIONNOA2] 芯包铝焊2工位号
|
||||
,[CSBYHALWELDINGSTATIONNOA3] 芯包铝焊3工位号
|
||||
,[CSBYHALWELDHEADCOUNTA1] 芯包铝焊1焊头次数
|
||||
,[CSBYHALWELDHEADCOUNTA2] 芯包铝焊2焊头次数
|
||||
,[CSBYHALWELDHEADCOUNTA3] 芯包铝焊3焊头次数
|
||||
,[CSBYHALWELDBASECOUNTA1] 芯包铝焊1焊座次数
|
||||
,[CSBYHALWELDBASECOUNTA2] 芯包铝焊2焊座次数
|
||||
,[CSBYHALWELDBASECOUNTA3] 芯包铝焊3焊座次数
|
||||
,[CopperWeldHeadLife] 铜焊头预警寿命
|
||||
,[CopperWeldSeatLife] 铜焊座预警寿命
|
||||
,[AluminiumWeldHeadLife] 铝焊头预警寿命
|
||||
,[AluminiumWeldSeatLife] 铝焊座预警寿命
|
||||
,[CuttingKnifeLife] 裁切刀使用寿命
|
||||
,[CSBYHCUTABCUTTERCOUNTA] 电芯铜极耳切刀使用次数
|
||||
,[CSBYHALTABCUTTERCOUNTA] 电芯铝极耳切刀使用次数
|
||||
,[CSBYHCUTABCUTTERNOA] 电芯铜极耳切刀编号
|
||||
,[CSBYHALTABCUTTERNOA] 电芯铝极耳切刀编号
|
||||
,[CSBYHINSTATIONTIME] 进站时间
|
||||
,[CSBYHOUTSTATIONTIME] 出站时间
|
||||
,[CSBYHWEIGHTA1] 芯包重量
|
||||
,[CSBYHTHICKNESSTESTPRESSUREA] 芯包测厚压力实际值
|
||||
,[CSBYHTHICKNESSTESTPRESSURESIZEA] 芯包测厚尺寸1
|
||||
,[ThicknessMeasureDisplacement] 芯包测厚尺寸2
|
||||
,[CSBYHCUTABLENGTHA] 电芯铜极极耳长度
|
||||
,[CSBYHCUTABWIDTHA] 电芯铜极极耳宽度
|
||||
,[CSBYHALTABLENGTHA] 电芯铝极极耳长度
|
||||
,[CSBYHALTABWIDTHA] 电芯铝极极耳宽度
|
||||
,[CSBYHTOPTOSOLDERDISTANCEA] 芯包铜顶部到焊印间距1
|
||||
,[CSBYHTOPTOSOLDERDISTANCEA2] 芯包铜顶部到焊印间距2
|
||||
,[AluminumToWeld1] 芯包铝顶部到焊印间距1
|
||||
,[AluminumToWeld2] 芯包铝顶部到焊印间距2
|
||||
,[CSBYHSOLDERTOEARDISTANCEA] 芯包焊印边缘到极耳边缘间距
|
||||
,[CSBYHCUPRESSUREA1] 芯包铜焊1接压力实际值
|
||||
,[CSBYHCUPOWERA1] 芯包铜焊1功率实际值
|
||||
,[CSBYHCUENERGYA1] 芯包铜焊1能量实际值
|
||||
,[CSBYHCUAMPLITUDEA1] 芯包铜焊1振幅实际值
|
||||
,[CSBYHCUTIMEA1] 芯包铜焊1时间实际值
|
||||
,[CSBYHCUPRESSUREA2] 芯包铜焊2压力实际值2
|
||||
,[CSBYHCUPOWERA2] 芯包铜焊2功率A实际值
|
||||
,[CSBYHCUENERGYA2] 芯包铜焊2接能量实际值
|
||||
,[CSBYHCUAMPLITUDEA2] 芯包铜焊2振幅实际值
|
||||
,[CSBYHCUTIMEA2] 芯包铜焊2时间实际值
|
||||
,[CSBYHCUPRESSUREA3] 芯包铜焊3压力实际值
|
||||
,[CSBYHCUPOWERA3] 芯包铜焊3功率A实际值
|
||||
,[CSBYHCUENERGYA3] 芯包铜焊3能量实际值
|
||||
,[CSBYHCUAMPLITUDEA3] 芯包铜焊3振幅实际值
|
||||
,[CSBYHCUTIMEA3] 芯包铜焊3时间实际值
|
||||
,[CSBYHALPRESSUREA1] 芯包铝焊1压力实际值
|
||||
,[CSBYHALPOWERA1] 芯包铝焊1功率实际值
|
||||
,[CSBYHALENERGYA1] 芯包铝焊1能量实际值
|
||||
,[CSBYHALAMPLITUDEA1] 芯包铝焊1振幅实际值
|
||||
,[CSBYHALTIMEA1] 芯包铝焊1时间实际值
|
||||
,[CSBYHALPRESSUREA2] 芯包铝焊2压力实际值
|
||||
,[CSBYHALPOWERA2] 芯包铝焊2功率实际值
|
||||
,[CSBYHALENERGYA2] 芯包铝焊2能量实际值
|
||||
,[CSBYHALAMPLITUDEA2] 芯包铝焊2振幅实际值
|
||||
,[CSBYHALTIMEA2] 芯包铝焊2时间实际值
|
||||
,[CSBYHALPRESSUREA3] 芯包铝焊3压力实际值
|
||||
,[CSBYHALPOWERA3] 芯包铝焊3功率实际值
|
||||
,[CSBYHALENERGYA3] 芯包铝焊3能量实际值
|
||||
,[CSBYHALAMPLITUDEA3] 芯包铝焊3振幅实际值
|
||||
,[CSBYHALTIMEA3] 芯包铝焊3时间实际值
|
||||
,[CSBYHWEIGHTA1MAXSETTING] 芯包重量设定值最大值
|
||||
,[CSBYHWEIGHTA1MINSETTING] 芯包重量设定值最小值
|
||||
,[CSBYHTHICKNESSTESTPRESSUREMAXSETTINGA] 芯包侧厚压力设定最大值
|
||||
,[CSBYHTHICKNESSTESTPRESSUREMINSETTINGA] 芯包侧厚压力设定最小值
|
||||
,[CSBYHTHICKNESSTESTPRESSUREMAXSIZEA] 芯包侧厚最大尺寸
|
||||
,[CSBYHTHICKNESSTESTPRESSUREMINSIZEA] 芯包侧厚最小尺寸
|
||||
,[CSBYHCUWELDINGPRESSUREMAXSETTING1] 铜焊1压力设定最大值
|
||||
,[CSBYHCUWELDINGPRESSUREMINSETTING] 铜焊1压力设定最小值
|
||||
,[CSBYHCUWELDINGPOWERMAXSETTING1] 铜焊1功率设定值最大值
|
||||
,[CSBYHCUWELDINGPOWERMINSETTING1] 铜焊1功率设定值最小值
|
||||
,[CSBYHCUWELDINGENERGYMAXSETTING1] 铜焊1能量设定值最大值
|
||||
,[CSBYHCUWELDINGENERGYMINSETTING1] 铜焊1能量设定值最小值
|
||||
,[CSBYHCUWELDINGAMPLITUDEMAXSETTING1] 铜焊1振幅设定值最大值
|
||||
,[CSBYHCUWELDINGAMPLITUDEMINSETTING1] 铜焊1振幅设定值最小值
|
||||
,[CSBYHALWELDINGPRESSUREMAXSETTING1] 铝焊1压力设定值最大值
|
||||
,[CSBYHALWELDINGPRESSUREMINSETTING] 铝焊1压力设定值最小值
|
||||
,[CSBYHALWELDINGPOWERMAXSETTING1] 铝焊1功率设定值最大值
|
||||
,[CSBYHALWELDINGPOWERMINSETTING1] 铝焊1功率设定值最小值
|
||||
,[CSBYHALWELDINGENERGYMAXSETTING1] 铝焊1能量设定值最大值
|
||||
,[CSBYHALWELDINGENERGYMINSETTING1] 铝焊1能量设定值最小值
|
||||
,[CSBYHALWELDINGAMPLITUDEMAXSETTING1] 铝焊1振幅设定值最大值
|
||||
,[CSBYHALWELDINGAMPLITUDEMINSETTING1] 铝焊1振幅设定值最小值
|
||||
,[Result] 结果
|
||||
,case when [Flag]=1 then '已上传' else '未上传' end 上传状态
|
||||
FROM [dbo].[BGearEntity] where CSBYHASCANNINGTIME >= '" + strDate1 + "' and CSBYHASCANNINGTIME <= '" + strDate2 + "' ";
|
||||
if (strBarCode != "")
|
||||
{
|
||||
strSql += " and CSBYHCODEA like '%" + strBarCode + "' ";
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
CommonMethods.AddLog(true, ex.Message);
|
||||
}
|
||||
|
||||
return strSql;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查询报警历史数据
|
||||
/// </summary>
|
||||
/// <param name="start"></param>
|
||||
/// <param name="end"></param>
|
||||
/// <param name="alarmType"></param>
|
||||
/// <returns></returns>
|
||||
public string SelectHostAlarmData(string start, string end, string alarmType)
|
||||
{
|
||||
string strSql = "";
|
||||
if (alarmType == "全天")
|
||||
{
|
||||
strSql = @"SELECT
|
||||
CONVERT(varchar,[AlarmTime], 120) 时间
|
||||
,[PLCAdress] 报警地址
|
||||
,[AlarmContent] 报警信息
|
||||
,[AlarmCount] 报警次数
|
||||
,[Class] 班次
|
||||
FROM [dbo].[AlarmCountEntry] where AlarmTime >= '" + start + "' and AlarmTime <= '" + end + "' ";
|
||||
|
||||
}
|
||||
else if (alarmType == "白班")
|
||||
{
|
||||
strSql = @"SELECT
|
||||
CONVERT(varchar,[AlarmTime], 120) 时间
|
||||
,[PLCAdress] 报警地址
|
||||
,[AlarmContent] 报警信息
|
||||
,[AlarmCount] 报警次数
|
||||
,[Class] 班次
|
||||
FROM [dbo].[AlarmCountEntry] where AlarmTime >= '" + start + "' and AlarmTime <= '" + end + "' and Class='白班'";
|
||||
}
|
||||
else
|
||||
{
|
||||
strSql = @"SELECT
|
||||
CONVERT(varchar,[AlarmTime], 120) 时间
|
||||
,[PLCAdress] 报警地址
|
||||
,[AlarmContent] 报警信息
|
||||
,[AlarmCount] 报警次数
|
||||
,[Class] 班次
|
||||
FROM [dbo].[AlarmCountEntry] where AlarmTime >= '" + start + "' and AlarmTime <= '" + end + "' and Class='夜班'";
|
||||
}
|
||||
return strSql;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 按日统计
|
||||
/// </summary>
|
||||
/// <param name="startDateTime"></param>
|
||||
/// <param name="endDateTime"></param>
|
||||
/// <returns></returns>
|
||||
public string GetStaticByDay(string startDateTime, string endDateTime)
|
||||
{
|
||||
string strSql = $@" SELECT CONVERT(varchar(13),TestTime,120) 时间, ProdIn 总数, ProdOut OK总数,Ppm PPM均值,
|
||||
cast(ROUND(JiaDL*100,1)as nvarchar(10))+'%' 稼动率均值,
|
||||
cast(case when ProdIn>0 then (ROUND(cast(isnull(ProdOut,0) as float)/cast(isnull(ProdIn,0) as float)*100,2)) else 0 end as nvarchar(10) )+'%' 优率
|
||||
FROM Hourprod WHERE TestTime BETWEEN '{startDateTime}' AND '{endDateTime}' GROUP BY TestTime,ProdOut,ProdIn,Ppm,JiaDL
|
||||
UNION ALL
|
||||
SELECT '合计' as '时间', ProdIn '总数', ProdOut 'OK总数',Ppm 'PPM均值' ,JiaDL '稼动率均值',优率 as '优率' FROM (SELECT FDate,sum(ProdIn) ProdIn, SUM(ProdOut) ProdOut,AVG(PPM) Ppm,
|
||||
cast(ROUND(AVG(JiaDL)*100,1) as nvarchar(10))+'%' JiaDL,
|
||||
cast(case when (sum(ProdIn))>0 then (ROUND(cast(isnull(sum(ProdOut),0) as float)/cast(isnull(sum(ProdIn),0) as float)*100,2)) else 0 end as nvarchar(10) )+'%' 优率 FROM Hourprod
|
||||
WHERE TestTime BETWEEN '{startDateTime}' AND '{endDateTime}' GROUP BY FDate) as t ";
|
||||
|
||||
return strSql;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 按周查询
|
||||
/// </summary>
|
||||
/// <param name="startDateTime"></param>
|
||||
/// <param name="endDateTime"></param>
|
||||
/// <returns></returns>
|
||||
public string GetStaticByWeek(string startDateTime, string endDateTime)
|
||||
{
|
||||
string strSql = $@" SELECT convert(char(10), TestTime, 120) 月份, sum(ProdIn) 总数, sum(ProdOut) OK总数,AVG(Ppm) PPM均值,
|
||||
cast(ROUND(JiaDL*100,1)as nvarchar(10))+'%' 稼动率均值,
|
||||
cast(case when sum(ProdIn)>0 then (ROUND(cast(isnull(SUM(ProdOut),0) as float)/cast(isnull(sum(ProdIn),0) as float)*100,2)) else 0 end as nvarchar(10) )+'%' 优率
|
||||
FROM Hourprod WHERE TestTime BETWEEN '{startDateTime}' AND '{endDateTime}' GROUP BY convert(char(10), TestTime, 120),JiaDL
|
||||
UNION ALL
|
||||
SELECT '合计' as '月份', ProdIn '总数', ProdOut 'OK总数',Ppm 'PPM均值' ,JiaDL '稼动率均值',优率 as '优率' FROM (SELECT sum(ProdIn) ProdIn, SUM(ProdOut) ProdOut,AVG(Ppm) Ppm,
|
||||
cast(ROUND(AVG(JiaDL)*100,1) as nvarchar(10))+'%' JiaDL,
|
||||
cast(case when (sum(ProdIn))>0 then (ROUND(cast(isnull(sum(ProdOut),0) as float)/cast(isnull(sum(ProdIn),0) as float)*100,2)) else 0 end as nvarchar(10))+'%' 优率 FROM Hourprod
|
||||
WHERE TestTime BETWEEN '{startDateTime}' AND '{endDateTime}') as t ";
|
||||
return strSql;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 按月查询
|
||||
/// </summary>
|
||||
/// <param name="startDateTime"></param>
|
||||
/// <param name="endDateTime"></param>
|
||||
/// <returns></returns>
|
||||
public string GetStaticByMonth(string startDateTime, string endDateTime)
|
||||
{
|
||||
string strSql = $@" SELECT convert(char(7), TestTime, 120) 月份, sum(ProdIn) 总数, sum(ProdOut) OK总数,AVG(Ppm) PPM均值,
|
||||
cast(ROUND(JiaDL*100,1)as nvarchar(10))+'%' 稼动率均值,
|
||||
cast(case when sum(ProdIn)>0 then (ROUND(cast(isnull(SUM(ProdOut),0) as float)/cast(isnull(sum(ProdIn),0) as float)*100,2)) else 0 end as nvarchar(10) )+'%' 优率
|
||||
FROM Hourprod WHERE TestTime BETWEEN '{startDateTime}' AND '{endDateTime}' GROUP BY convert(char(7), TestTime, 120),JiaDL
|
||||
UNION ALL
|
||||
SELECT '合计' as '月份', ProdIn '总数', ProdOut 'OK总数',Ppm 'PPM均值' ,JiaDL '稼动率均值',优率 as '优率' FROM (SELECT sum(ProdIn) ProdIn, SUM(ProdOut) ProdOut,AVG(Ppm) Ppm,
|
||||
cast(ROUND(AVG(JiaDL)*100,1) as nvarchar(10))+'%' JiaDL,
|
||||
cast(case when (sum(ProdIn))>0 then (ROUND(cast(isnull(sum(ProdOut),0) as float)/cast(isnull(sum(ProdIn),0) as float)*100,2)) else 0 end as nvarchar(10))+'%' 优率 FROM Hourprod
|
||||
WHERE TestTime BETWEEN '{startDateTime}' AND '{endDateTime}') as t ";
|
||||
return strSql;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 按班次统计
|
||||
/// </summary>
|
||||
/// <param name="dateTime"></param>
|
||||
/// <param name="shift"></param>
|
||||
/// <param name="changeShiftTime"></param>
|
||||
/// <returns></returns>
|
||||
public string GetStaticByShift(DateTime dateTime, string shift, string changeShiftTime)
|
||||
{
|
||||
string sDateTime1 = string.Empty;
|
||||
string sDateTime2 = string.Empty;
|
||||
if (shift == "白班")
|
||||
{
|
||||
DateTime sTempDateTime = Convert.ToDateTime($"{dateTime.ToString("yyyy-MM-dd")} {changeShiftTime}");
|
||||
|
||||
sDateTime1 = sTempDateTime.AddHours(-12).ToString("yyyy-MM-dd HH:mm:ss");
|
||||
sDateTime2 = sTempDateTime.ToString("yyyy-MM-dd HH:mm:ss");
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
sDateTime1 = $"{dateTime.ToString("yyyy-MM-dd")} {changeShiftTime}";
|
||||
sDateTime2 = Convert.ToDateTime(sDateTime1).AddHours(12).ToString("yyyy-MM-dd HH:mm:ss");
|
||||
}
|
||||
|
||||
string strsql = $@" SELECT CONVERT(varchar(13),TestTime,120) 时间, ProdIn 总数, ProdOut OK总数,Ppm PPM均值,
|
||||
cast(ROUND(JiaDL*100,1)as nvarchar(10))+'%' 稼动率均值,
|
||||
cast(case when ProdIn>0 then (ROUND(cast(isnull(ProdOut,0) as float)/cast(isnull(ProdIn,0) as float)*100,2)) else 0 end as nvarchar(10) )+'%' 优率
|
||||
FROM Hourprod WHERE TestTime BETWEEN '{sDateTime1}' AND '{sDateTime2}' GROUP BY TestTime,ProdOut,ProdIn,Ppm,JiaDL
|
||||
UNION ALL
|
||||
SELECT '合计' as '时间', ProdIn '总数', ProdOut 'OK总数',Ppm 'PPM均值' ,JiaDL '稼动率均值',优率 as '优率' FROM (SELECT FDate,sum(ProdIn) ProdIn, SUM(ProdOut) ProdOut,AVG(Ppm) Ppm,
|
||||
cast(ROUND(AVG(JiaDL)*100,1) as nvarchar(10))+'%' JiaDL,
|
||||
cast(case when (sum(ProdIn))>0 then (ROUND(cast(isnull(sum(ProdOut),0) as float)/cast(isnull(sum(ProdIn),0) as float)*100,2)) else 0 end as nvarchar(10) )+'%' 优率 FROM Hourprod
|
||||
WHERE TestTime BETWEEN '{sDateTime1}' AND '{sDateTime2}' GROUP BY FDate) as t ";
|
||||
return strsql;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 获取最新的数据
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public string GetStatic(string strDateTime)
|
||||
{
|
||||
|
||||
string strsql = $@" SELECT [FDate]
|
||||
,[FHour]
|
||||
,[ProdIn]
|
||||
,[ProdOut]
|
||||
,[TestTime]
|
||||
FROM [dbo].[Hourprod] where FDate='{strDateTime}' order by TestTime desc";
|
||||
return strsql;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取进站信息
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public string GetInTime(string strBarCode)
|
||||
{
|
||||
string strSql = $@"SELECT [TestTime]
|
||||
,[BarCode]
|
||||
,[Result]
|
||||
,[Remark]
|
||||
FROM [dbo].[AGearEntity]
|
||||
WHERE BarCode = '{strBarCode}'
|
||||
ORDER BY TestTime ASC";
|
||||
|
||||
return strSql;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取挑战件条码列表
|
||||
/// </summary>
|
||||
/// <param name="strProdType"></param>
|
||||
/// <returns></returns>
|
||||
public string GetChallengeCode(string strProdType = "")
|
||||
{
|
||||
string strSql = @"SELECT * FROM Challenge ";
|
||||
if (strProdType != "")
|
||||
{
|
||||
strSql += string.Format(" where ChallengeBarCode='{0}'", strProdType);
|
||||
}
|
||||
strSql += " order by ChallengeBarCode";
|
||||
return strSql;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
using JinYuan.DataConvertLib;
|
||||
using JinYuan.Models;
|
||||
using PLCCommunication;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace JinYuan.VirtualDataLibrary
|
||||
{
|
||||
|
||||
public delegate void dgStationFunction(JYResult<byte[]> bArrays, object plcModel);
|
||||
|
||||
/// <summary>
|
||||
/// 显示上料信息
|
||||
/// </summary>
|
||||
/// <param name="Msg"></param>
|
||||
/// <param name="state"></param>
|
||||
//public delegate void dgShowFeeding(List<AGearEntity> list);
|
||||
/// <summary>
|
||||
/// 显示下料信息
|
||||
/// </summary>
|
||||
/// <param name="Msg"></param>
|
||||
/// <param name="state"></param>
|
||||
//public delegate void dgShowBlanking(List<BlankingEntry> list);
|
||||
/// <summary>
|
||||
/// 设备综合效率
|
||||
/// </summary>
|
||||
/// <param name="battery"></param>
|
||||
public delegate void DGShow12HourData(DeviceOEE device12Hour);
|
||||
|
||||
/// <summary>
|
||||
/// 设备综合效率
|
||||
/// </summary>
|
||||
/// <param name="battery"></param>
|
||||
public delegate void DGShowAlarmData(DeviceOEE deviceAlarm);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 焊机功率
|
||||
/// </summary> Welding machine power
|
||||
/// <param name="DataList"></param>
|
||||
public delegate void DGShowWeldingPowerData(List<double> DataList);
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,110 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{2AB7E380-7795-448A-933C-0F6A081B5E7E}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>JinYuan.VirtualDataLibrary</RootNamespace>
|
||||
<AssemblyName>JinYuan.VirtualDataLibrary</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<Deterministic>true</Deterministic>
|
||||
<TargetFrameworkProfile />
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="DataConvertLib, Version=6.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\LargeSquareOne\Lib\DataConvertLib.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="JinYuan.CommunicationLib, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\LargeSquareOne\Lib\JinYuan.CommunicationLib.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="PLCCommunication, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\HBG_NegativeElectrodeWeld\Lib\PLCCommunication.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Net.Http" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="CommonMethods.cs" />
|
||||
<Compile Include="DBSQL.cs" />
|
||||
<Compile Include="DelegateLib.cs" />
|
||||
<Compile Include="MesConfig.cs" />
|
||||
<Compile Include="MsgshowTip.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="MsgshowTip.Designer.cs">
|
||||
<DependentUpon>MsgshowTip.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="Properties\Resources.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
<DependentUpon>Resources.resx</DependentUpon>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\JinYuan.DAL\JinYuan.DAL.csproj">
|
||||
<Project>{114aa012-29c9-418c-a2d6-3173c5341f51}</Project>
|
||||
<Name>JinYuan.DAL</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\JinYuan.Helper\JinYuan.Helper.csproj">
|
||||
<Project>{258d0ab7-2b4f-4d8f-a3cd-7a8cb4a85360}</Project>
|
||||
<Name>JinYuan.Helper</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\JinYuan.MES\JinYuan.MES.csproj">
|
||||
<Project>{530b6426-08e7-461c-91dc-787f876620fc}</Project>
|
||||
<Name>JinYuan.MES</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\JinYuan.Models\JinYuan.Models.csproj">
|
||||
<Project>{4c0bcb84-5cd7-4846-8363-c4c10d46e391}</Project>
|
||||
<Name>JinYuan.Models</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="app.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="MsgshowTip.resx">
|
||||
<DependentUpon>MsgshowTip.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Properties\Resources.resx">
|
||||
<Generator>ResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\感叹号提示-块红色.png" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
</Project>
|
||||
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<ProjectView>ProjectFiles</ProjectView>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
@@ -0,0 +1,193 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace JinYuan.VirtualDataLibrary
|
||||
{
|
||||
public class MesConfig
|
||||
{
|
||||
/// <summary>
|
||||
/// 工厂代码
|
||||
/// </summary>
|
||||
public string siteCode = "";
|
||||
/// <summary>
|
||||
/// 产线编号
|
||||
/// </summary>
|
||||
public string lineCode = "";
|
||||
/// <summary>
|
||||
/// 设备编号
|
||||
/// </summary>
|
||||
public string equipNum = "";
|
||||
/// <summary>
|
||||
/// MES密码
|
||||
/// </summary>
|
||||
public string mesPwd = "";
|
||||
/// <summary>
|
||||
/// MES账户
|
||||
/// </summary>
|
||||
public string mesUserName = "";
|
||||
|
||||
/// <summary>
|
||||
/// 电表编号
|
||||
/// </summary>
|
||||
public List<string> electricMeterNum = new List<string>();
|
||||
|
||||
/// <summary>
|
||||
/// 风速仪个数
|
||||
/// </summary>
|
||||
public int AntiDustAirSpeedCount = 0;
|
||||
/// <summary>
|
||||
/// 风速仪编号
|
||||
/// </summary>
|
||||
public List<string> listAntiDustAirSpeedNum = new List<string>();
|
||||
|
||||
/// <summary>
|
||||
/// 权限
|
||||
/// </summary>
|
||||
public string userLevel = "";
|
||||
/// <summary>
|
||||
/// 物料编码
|
||||
/// </summary>
|
||||
public string MaterialCode = "";
|
||||
/// <summary>
|
||||
/// 生产型号
|
||||
/// </summary>
|
||||
public string ModelName = "";
|
||||
/// <summary>
|
||||
/// 是否上传MES
|
||||
/// </summary>
|
||||
public bool isUpMes = false;
|
||||
/// <summary>
|
||||
/// 是否刷卡?
|
||||
/// </summary>
|
||||
public bool Isshuaka = false;
|
||||
/// <summary>
|
||||
/// 是否登录成功?
|
||||
/// </summary>
|
||||
public bool IsLoginOK = false;
|
||||
/// <summary>
|
||||
/// 是否登录MES成功?
|
||||
/// </summary>
|
||||
public bool IsLoginMesOK = false;
|
||||
/// <summary>
|
||||
/// 获取MES参数
|
||||
/// </summary>
|
||||
public bool IsMesParam = false;
|
||||
/// <summary>
|
||||
/// MES超时
|
||||
/// </summary>
|
||||
public long MesOutTime = 0;
|
||||
/// <summary>
|
||||
/// 焊接点个数
|
||||
/// </summary>
|
||||
public int weldNum = 0;
|
||||
/// <summary>
|
||||
/// 是否2个电表(此功能仅适用于908-6负极焊接两台设备共用一台敢接机只有一个电表)
|
||||
/// </summary>
|
||||
public bool IsTwoDianBiao = false;
|
||||
/// <summary>
|
||||
/// 电表编号
|
||||
/// </summary>
|
||||
public string ElectricMeterNum = "";
|
||||
/// <summary>
|
||||
/// 除尘风速
|
||||
/// </summary>
|
||||
public decimal antiDustAirSpeed = 0;
|
||||
|
||||
/// <summary>
|
||||
/// 电机旋转速度
|
||||
/// </summary>
|
||||
public decimal dianjiXzSpeed = 0;
|
||||
/// <summary>
|
||||
/// 设备状态上传时间
|
||||
/// </summary>
|
||||
public int EquStatuasTime = 0;
|
||||
/// <summary>
|
||||
/// 获取服务器数据
|
||||
/// </summary>
|
||||
public bool IsGet_Server = true;
|
||||
/// <summary>
|
||||
/// -3A出站数据存储到-3C
|
||||
/// </summary>
|
||||
public bool IsGet_3C = true;
|
||||
public int _卷芯条码计数 = 0;
|
||||
|
||||
/// <summary>
|
||||
/// Guid
|
||||
/// </summary>
|
||||
public string guidStr = "";
|
||||
|
||||
/// <summary>
|
||||
/// 设备状态
|
||||
/// </summary>
|
||||
public int DeviceState = 0;
|
||||
|
||||
public bool m_run_AlarmMark = false;
|
||||
|
||||
public bool m_run_IdelMark = false;
|
||||
|
||||
/// <summary>
|
||||
/// 存储服务器IP地址
|
||||
/// </summary>
|
||||
public string RotueServerIP = "192.168.2.108";
|
||||
/// <summary>
|
||||
/// 员工权限校验接口
|
||||
/// </summary>
|
||||
public string LoginMesUrl = "http://10.6.1.152/core/api/public/equipment/base/user/login/verify";
|
||||
|
||||
/// <summary>
|
||||
/// 设备参数设定值变更
|
||||
/// </summary>
|
||||
public string ChangeParamSetValueMesUrl = "http://10.6.1.152/core/api/public/param/setting/change";
|
||||
|
||||
/// <summary>
|
||||
/// 设备参数设定值请求
|
||||
/// </summary>
|
||||
public string ParamSetpointRequestMesUrl = "http://10.6.1.152/core/api/public/param/setting/request";
|
||||
|
||||
/// <summary>
|
||||
/// 原材料投入信息
|
||||
/// </summary>
|
||||
public string MaterialInputInfoMesUrl = "http://10.6.1.152/core/api/public/raw/material/input/un/first/process";
|
||||
|
||||
/// <summary>
|
||||
/// 产品进站信息(组装)
|
||||
/// </summary>
|
||||
public string InPutStationMesUrl = "http://10.17.96.41/core/api/public/in/station/process/currency";
|
||||
|
||||
/// <summary>
|
||||
/// 产品出站信息(组装)
|
||||
/// </summary>
|
||||
public string OutStationMesUrl = "http://10.17.96.41/core/api/public/out/station/process/turn/equip";
|
||||
|
||||
/// <summary>
|
||||
/// 设备过程加工参数接口
|
||||
/// </summary>
|
||||
public string EquProcessProcessParamMesUrl = "http://10.6.1.152/core/api/public/product/process/param/process";
|
||||
|
||||
/// <summary>
|
||||
/// 产品结果加工参数
|
||||
/// </summary>
|
||||
public string ResultProcessParamMesUrl = "http://10.6.1.152/core/api/public/product/process/param/result";
|
||||
/// <summary>
|
||||
/// 设备报警信息
|
||||
/// </summary>
|
||||
public string AlarmCurrencyMesUrl = "http://10.6.1.152/core/api/public/equipment/alarm/currency";
|
||||
/// <summary>
|
||||
/// 设备运行状态
|
||||
/// </summary>
|
||||
public string StatusMesUrl = "http://10.6.1.152/core/api/public/eve/pm/eqm/run/status/operation";
|
||||
/// <summary>
|
||||
/// 能耗数据
|
||||
/// </summary>
|
||||
public string WattrMeterUrl = "http://10.6.1.157/core/api/public/eve/pm/energy/consumption/collection/submit";
|
||||
|
||||
/// <summary>
|
||||
/// 设备风速接口
|
||||
/// </summary>
|
||||
public string CollectData = "http://10.1.3.66:3000/mock/15/eve_api/ems/iot/upload_device_collect_data";
|
||||
|
||||
}
|
||||
}
|
||||
+89
@@ -0,0 +1,89 @@
|
||||
namespace JinYuan.VirtualDataLibrary
|
||||
{
|
||||
partial class MsgshowTip
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.components = new System.ComponentModel.Container();
|
||||
this.pictureBox1 = new System.Windows.Forms.PictureBox();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.timer1 = new System.Windows.Forms.Timer(this.components);
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// pictureBox1
|
||||
//
|
||||
this.pictureBox1.Image = global::JinYuan.VirtualDataLibrary.Properties.Resources.感叹号提示_块红色;
|
||||
this.pictureBox1.Location = new System.Drawing.Point(6, 3);
|
||||
this.pictureBox1.Name = "pictureBox1";
|
||||
this.pictureBox1.Size = new System.Drawing.Size(87, 80);
|
||||
this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
|
||||
this.pictureBox1.TabIndex = 0;
|
||||
this.pictureBox1.TabStop = false;
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.Font = new System.Drawing.Font("微软雅黑", 15.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.label1.ForeColor = System.Drawing.Color.Red;
|
||||
this.label1.Location = new System.Drawing.Point(95, 29);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(345, 28);
|
||||
this.label1.TabIndex = 1;
|
||||
this.label1.Text = "与PLC链接断开,请检查通讯线路!";
|
||||
//
|
||||
// timer1
|
||||
//
|
||||
this.timer1.Interval = 500;
|
||||
this.timer1.Tick += new System.EventHandler(this.timer1_Tick);
|
||||
//
|
||||
// MsgshowTip
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.BackColor = System.Drawing.Color.Yellow;
|
||||
this.ClientSize = new System.Drawing.Size(434, 84);
|
||||
this.Controls.Add(this.pictureBox1);
|
||||
this.Controls.Add(this.label1);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
|
||||
this.Name = "MsgshowTip";
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
||||
this.Text = "MsgshowTip";
|
||||
this.Load += new System.EventHandler(this.MsgshowTip_Load);
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.PictureBox pictureBox1;
|
||||
private System.Windows.Forms.Label label1;
|
||||
private System.Windows.Forms.Timer timer1;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,115 @@
|
||||
using System;
|
||||
using System.Drawing;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace JinYuan.VirtualDataLibrary
|
||||
{
|
||||
public partial class MsgshowTip : Form
|
||||
{
|
||||
/// <summary>
|
||||
/// 图标和文本之间的间距(像素)
|
||||
/// </summary>
|
||||
const int IconTextSpacing = 3;
|
||||
/// <summary>
|
||||
/// 显示文字
|
||||
/// </summary>
|
||||
string _tipText;
|
||||
/// <summary>
|
||||
/// 提示图标
|
||||
/// </summary>
|
||||
public Image TipIcon { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 提示文本
|
||||
/// </summary>
|
||||
public string TipText
|
||||
{
|
||||
get { return _tipText ?? string.Empty; }
|
||||
set { _tipText = value; }
|
||||
}
|
||||
|
||||
public MsgshowTip(string Msg)
|
||||
{
|
||||
//双缓冲。有必要
|
||||
SetStyle(ControlStyles.UserPaint, true);
|
||||
DoubleBuffered = true;
|
||||
InitializeComponent();
|
||||
this._tipText = Msg;
|
||||
}
|
||||
|
||||
private void MsgshowTip_Load(object sender, EventArgs e)
|
||||
{
|
||||
//ProcessClientSize();
|
||||
ProcessLocation();
|
||||
label1.Text = _tipText;
|
||||
timer1.Enabled = true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据图标和文字处理窗体尺寸
|
||||
/// </summary>
|
||||
private void ProcessClientSize()
|
||||
{
|
||||
Size size = Size.Empty;
|
||||
if (TipIcon != null)
|
||||
{
|
||||
size += TipIcon.Size;
|
||||
}
|
||||
if (TipText.Length != 0)
|
||||
{
|
||||
if (TipIcon != null)
|
||||
{
|
||||
size.Width += IconTextSpacing;//图标与文字的间距
|
||||
}
|
||||
var textSize = TextRenderer.MeasureText(TipText, this.Font);
|
||||
size.Width += textSize.Width;
|
||||
if (size.Height < textSize.Height) { size.Height = textSize.Height; }
|
||||
}
|
||||
this.ClientSize = size + Padding.Size;
|
||||
}
|
||||
private int x, y; //显示的坐标变量
|
||||
|
||||
private void timer1_Tick(object sender, EventArgs e)
|
||||
{
|
||||
this.Close();
|
||||
}
|
||||
|
||||
private void ProcessLocation()
|
||||
{
|
||||
|
||||
#region 弹窗显示在屏幕中间
|
||||
this.y = (Screen.PrimaryScreen.Bounds.Height - 30 - this.Height) / 2;
|
||||
this.x = (Screen.PrimaryScreen.Bounds.Width - 10 - this.Width) / 2;
|
||||
this.Location = new Point(this.x, this.y);
|
||||
#endregion
|
||||
|
||||
#region 弹窗显示在屏幕右下角
|
||||
//this.x = Screen.PrimaryScreen.WorkingArea.Width - this.Width + 15;
|
||||
//this.y = Screen.PrimaryScreen.WorkingArea.Height - this.Height * i - 5 * i;
|
||||
//this.Location = new Point(this.x, this.y);
|
||||
#endregion
|
||||
|
||||
#region 弹窗跟随鼠标位置
|
||||
//var p = BasePoint;
|
||||
//p.X -= Screen.PrimaryScreen.WorkingArea.Width - this.Width - 1000;//Screen.PrimaryScreen.WorkingArea.Width-this.Width / 2;
|
||||
|
||||
////横向处理。距离屏幕左右两边太近时的处理
|
||||
//int screenWidth;
|
||||
//if (p.X < 10)
|
||||
//{
|
||||
// p.X = 10;
|
||||
//}
|
||||
//else if (p.X + this.Width > (screenWidth = Screen.PrimaryScreen.Bounds.Width) - 10)
|
||||
//{
|
||||
// p.X = screenWidth - 10 - this.Width;
|
||||
//}
|
||||
|
||||
////纵向处理。在鼠标上方显示
|
||||
//p.Y -= this.Height + 20;
|
||||
|
||||
//this.Location = p;
|
||||
#endregion
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,123 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="timer1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
</root>
|
||||
@@ -0,0 +1,36 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// 有关程序集的一般信息由以下
|
||||
// 控制。更改这些特性值可修改
|
||||
// 与程序集关联的信息。
|
||||
[assembly: AssemblyTitle("JinYuan.VirtualDataLibrary")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("JinYuan.VirtualDataLibrary")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2023")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// 将 ComVisible 设置为 false 会使此程序集中的类型
|
||||
//对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型
|
||||
//请将此类型的 ComVisible 特性设置为 true。
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
|
||||
[assembly: Guid("2ab7e380-7795-448a-933c-0f6a081b5e7e")]
|
||||
|
||||
// 程序集的版本信息由下列四个值组成:
|
||||
//
|
||||
// 主版本
|
||||
// 次版本
|
||||
// 生成号
|
||||
// 修订号
|
||||
//
|
||||
//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
|
||||
//通过使用 "*",如下所示:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
@@ -0,0 +1,73 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// 此代码由工具生成。
|
||||
// 运行时版本:4.0.30319.42000
|
||||
//
|
||||
// 对此文件的更改可能会导致不正确的行为,并且如果
|
||||
// 重新生成代码,这些更改将会丢失。
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace JinYuan.VirtualDataLibrary.Properties {
|
||||
using System;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 一个强类型的资源类,用于查找本地化的字符串等。
|
||||
/// </summary>
|
||||
// 此类是由 StronglyTypedResourceBuilder
|
||||
// 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
|
||||
// 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen
|
||||
// (以 /str 作为命令选项),或重新生成 VS 项目。
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
internal class Resources {
|
||||
|
||||
private static global::System.Resources.ResourceManager resourceMan;
|
||||
|
||||
private static global::System.Globalization.CultureInfo resourceCulture;
|
||||
|
||||
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||
internal Resources() {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 返回此类使用的缓存的 ResourceManager 实例。
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Resources.ResourceManager ResourceManager {
|
||||
get {
|
||||
if (object.ReferenceEquals(resourceMan, null)) {
|
||||
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("JinYuan.VirtualDataLibrary.Properties.Resources", typeof(Resources).Assembly);
|
||||
resourceMan = temp;
|
||||
}
|
||||
return resourceMan;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 重写当前线程的 CurrentUICulture 属性,对
|
||||
/// 使用此强类型资源类的所有资源查找执行重写。
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Globalization.CultureInfo Culture {
|
||||
get {
|
||||
return resourceCulture;
|
||||
}
|
||||
set {
|
||||
resourceCulture = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap 感叹号提示_块红色 {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("感叹号提示-块红色", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,124 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<data name="感叹号提示-块红色" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\感叹号提示-块红色.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
</root>
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 2.9 KiB |
@@ -0,0 +1,55 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<runtime>
|
||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Memory" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.0.1.2" newVersion="4.0.1.2" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Numerics.Vectors" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.1.4.0" newVersion="4.1.4.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Buffers" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.0.3.0" newVersion="4.0.3.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Text.Encoding.CodePages" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Security.Cryptography.Xml" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-6.0.0.1" newVersion="6.0.0.1" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="MySql.Data" publicKeyToken="c5687fc88969c44d" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-8.1.0.0" newVersion="8.1.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.IO.Pipelines" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-7.0.0.0" newVersion="7.0.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Threading.Tasks.Extensions" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.2.0.0" newVersion="4.2.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Google.Protobuf" publicKeyToken="a7d26565bac4d604" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-3.23.4.0" newVersion="3.23.4.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="ZstdSharp" publicKeyToken="8d151af33a4ad5cf" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-0.7.2.0" newVersion="0.7.2.0" />
|
||||
</dependentAssembly>
|
||||
</assemblyBinding>
|
||||
</runtime>
|
||||
</configuration>
|
||||
Reference in New Issue
Block a user