添加项目文件。
This commit is contained in:
@@ -0,0 +1,50 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8" />
|
||||
</startup>
|
||||
<connectionStrings>
|
||||
<add name="MysqlConn" connectionString="Data Source='localhost';Database='data_run';User Id='root';Password='123456';charset='utf8';pooling=false;port=3306;" />
|
||||
<add name="CurDB" connectionString="Server=localhost;Database=S1270;Uid=sa;Pwd=123456" />
|
||||
</connectionStrings>
|
||||
<runtime>
|
||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-13.0.0.0" newVersion="13.0.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-6.0.3.0" newVersion="6.0.3.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="ICSharpCode.SharpZipLib" publicKeyToken="1b03e6acf1164f73" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-1.4.2.13" newVersion="1.4.2.13" />
|
||||
</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.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.Text.Encoding.CodePages" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-9.0.0.7" newVersion="9.0.0.7" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="MySql.Data" publicKeyToken="c5687fc88969c44d" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-6.10.9.0" newVersion="6.10.9.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Threading.Tasks.Extensions" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.2.4.0" newVersion="4.2.4.0" />
|
||||
</dependentAssembly>
|
||||
</assemblyBinding>
|
||||
</runtime>
|
||||
</configuration>
|
||||
@@ -0,0 +1,31 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using CsvHelper.Configuration.Attributes;
|
||||
|
||||
namespace JY.Inspection.Common
|
||||
{
|
||||
/// <summary>
|
||||
/// 报警表单数据
|
||||
/// </summary>
|
||||
public class AlarmForm
|
||||
{
|
||||
/// <summary>
|
||||
/// 报警地址
|
||||
/// </summary>
|
||||
[Name("寄存器地址")]
|
||||
public string PLCAdress { get; set; }
|
||||
/// <summary>
|
||||
/// 报警内容
|
||||
/// </summary>
|
||||
[Name("报警信息")]
|
||||
public string AlarmContent { get; set; }
|
||||
/// <summary>
|
||||
/// 报警代码
|
||||
/// </summary>
|
||||
[Name("故障代码")]
|
||||
public string AlarmCode { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace JY.Inspection.Common
|
||||
{
|
||||
public static class ByteUtil
|
||||
{
|
||||
public static byte[] ByteReverse(this byte[] Arrbyte)
|
||||
{
|
||||
byte[] ArrByte = Arrbyte.Select((x, i) => new { x, i }).GroupBy(x => x.i / 2).SelectMany(x => new byte[] { x.Last().x, x.First().x }).ToArray();
|
||||
return ArrByte;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,100 @@
|
||||
using CsvHelper;
|
||||
using JY.Utility;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace JY.Inspection
|
||||
{
|
||||
public class CSVHelper<T>
|
||||
{
|
||||
/// <summary>
|
||||
/// 读取CSV文件
|
||||
/// </summary>
|
||||
/// <param name="fileName">csv文件名</param>
|
||||
/// <returns></returns>
|
||||
public static List<T> ReadCSV(string fileName, string strSeparator = "\t")
|
||||
{
|
||||
if (!File.Exists(fileName)) return null;
|
||||
//Nuget获取CsvHelper
|
||||
using (var reader = new StreamReader(fileName))
|
||||
{
|
||||
var cfg = new CsvHelper.Configuration.CsvConfiguration(CultureInfo.InvariantCulture)
|
||||
{
|
||||
Mode = CsvMode.Escape,
|
||||
Escape = '\\',
|
||||
Delimiter = strSeparator//设置分隔符号
|
||||
};
|
||||
using (var csv = new CsvReader(reader, cfg))
|
||||
{
|
||||
var list = csv.GetRecords<T>().ToList();
|
||||
return list;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 写入数据到csv文件
|
||||
/// </summary>
|
||||
/// <param name="filePath">所需存储文件夹路径(取系统所设定值,不带日期文件夹)</param>
|
||||
/// <param name="data">数据源</param>
|
||||
/// <param name="flag">1进站,2出站,3智能电表.csv,4预警</param>
|
||||
/// <returns></returns>
|
||||
public static bool WriteCSV(string filePath, List<T> data, int flag)
|
||||
{
|
||||
if (string.IsNullOrEmpty(filePath))
|
||||
{
|
||||
filePath = Application.StartupPath + "\\localData\\" + DateTime.Now.ToString("yyyyMMdd");
|
||||
}
|
||||
else
|
||||
{
|
||||
filePath = filePath + "\\" + DateTime.Now.ToString("yyyyMMdd");
|
||||
}
|
||||
if (!Directory.Exists(filePath))
|
||||
{
|
||||
Directory.CreateDirectory(filePath);
|
||||
}
|
||||
switch (flag)
|
||||
{
|
||||
case 1:
|
||||
filePath = filePath + "\\" + DateTime.Now.ToString("yyyyMMdd") + "进站.csv";
|
||||
break;
|
||||
case 2:
|
||||
filePath = filePath + "\\" + DateTime.Now.ToString("yyyyMMdd") + "出站.csv";
|
||||
break;
|
||||
case 3:
|
||||
filePath = filePath + "\\" + DateTime.Now.ToString("yyyyMMdd") + "智能电表.csv";
|
||||
break;
|
||||
default:
|
||||
filePath = filePath + "\\" + DateTime.Now.ToString("yyyyMMdd") + "报警.csv";
|
||||
break;
|
||||
}
|
||||
try
|
||||
{
|
||||
var cfg = new CsvHelper.Configuration.CsvConfiguration(CultureInfo.InvariantCulture);
|
||||
if (File.Exists(filePath))
|
||||
{
|
||||
cfg.HasHeaderRecord = false;//是否将第一行作为标题
|
||||
}
|
||||
using (var writer = new StreamWriter(filePath, true, Encoding.GetEncoding("GB2312")))
|
||||
{
|
||||
using (var csv = new CsvWriter(writer, cfg))
|
||||
{
|
||||
csv.WriteRecords(data);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
LogHelper.Error(ex.ToString());
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace JY.Inspection.Common
|
||||
{
|
||||
public class CollectionUtil
|
||||
{
|
||||
/// <summary>
|
||||
/// 生成ushort List集合
|
||||
/// </summary>
|
||||
/// <param name="Num"></param>
|
||||
/// <returns></returns>
|
||||
public static List<short> GetListUShort(int Num)
|
||||
{
|
||||
List<short> list = new List<short>();
|
||||
for (int i = 0; i < Num; i++)
|
||||
{
|
||||
list.Add(1);
|
||||
}
|
||||
return list;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,131 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Net.Sockets;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace JY.Inspection
|
||||
{
|
||||
/// <summary>
|
||||
/// 与客户端的 连接通信类(包含了一个 与客户端 通信的 套接字,和线程)
|
||||
/// </summary>
|
||||
public class ConnectionClient
|
||||
{
|
||||
Socket sokMsg;
|
||||
DGShowMsg dgShowMsg;//负责 向主窗体文本框显示消息的方法委托
|
||||
DGShowMsg dgRemoveConnection;// 负责 从主窗体 中移除 当前连接
|
||||
Thread threadMsg;
|
||||
|
||||
#region 构造函数
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="sokMsg">通信套接字</param>
|
||||
/// <param name="dgShowMsg">向主窗体文本框显示消息的方法委托</param>
|
||||
public ConnectionClient(Socket sokMsg, DGShowMsg dgShowMsg, DGShowMsg dgRemoveConnection)
|
||||
{
|
||||
this.sokMsg = sokMsg;
|
||||
this.dgShowMsg = dgShowMsg;
|
||||
this.dgRemoveConnection = dgRemoveConnection;
|
||||
|
||||
this.threadMsg = new Thread(RecMsg);
|
||||
this.threadMsg.IsBackground = true;
|
||||
this.threadMsg.Start();
|
||||
}
|
||||
#endregion
|
||||
|
||||
bool isRec = true;
|
||||
#region 02负责监听客户端发送来的消息
|
||||
void RecMsg()
|
||||
{
|
||||
while (isRec)
|
||||
{
|
||||
try
|
||||
{
|
||||
byte[] arrMsg = new byte[1024 * 1024 * 2];
|
||||
//接收 对应 客户端发来的消息
|
||||
int length = sokMsg.Receive(arrMsg);
|
||||
//将接收到的消息数组里真实消息转成字符串
|
||||
string strMsg = System.Text.Encoding.UTF8.GetString(arrMsg, 0, length);
|
||||
//通过委托 显示消息到 窗体的文本框
|
||||
dgShowMsg(strMsg);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
isRec = false;
|
||||
//从主窗体中 移除 下拉框中对应的客户端选择项,同时 移除 集合中对应的 ConnectionClient对象
|
||||
dgRemoveConnection(sokMsg.RemoteEndPoint.ToString());
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 03向客户端发送消息
|
||||
/// <summary>
|
||||
/// 向客户端发送消息
|
||||
/// </summary>
|
||||
/// <param name="strMsg"></param>
|
||||
public void Send(string strMsg)
|
||||
{
|
||||
byte[] arrMsg = System.Text.Encoding.UTF8.GetBytes(strMsg);
|
||||
byte[] arrMsgFinal = new byte[arrMsg.Length + 1];
|
||||
|
||||
arrMsgFinal[0] = 0;//设置 数据标识位等于0,代表 发送的是 文字
|
||||
arrMsg.CopyTo(arrMsgFinal, 0);
|
||||
|
||||
sokMsg.Send(arrMsgFinal);
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 04向客户端发送文件数据 +void SendFile(string strPath)
|
||||
/// <summary>
|
||||
/// 04向客户端发送文件数据
|
||||
/// </summary>
|
||||
/// <param name="strPath">文件路径</param>
|
||||
public void SendFile(string strPath)
|
||||
{
|
||||
//通过文件流 读取文件内容
|
||||
using (FileStream fs = new FileStream(strPath, FileMode.OpenOrCreate))
|
||||
{
|
||||
byte[] arrFile = new byte[1024 * 1024 * 2];
|
||||
//读取文件内容到字节数组,并 获得 实际文件大小
|
||||
int length = fs.Read(arrFile, 0, arrFile.Length);
|
||||
//定义一个 新数组,长度为文件实际长度 +1
|
||||
byte[] arrFileFina = new byte[length + 1];
|
||||
arrFileFina[0] = 1;//设置 数据标识位等于1,代表 发送的是文件
|
||||
//将 文件数据数组 复制到 新数组中,下标从1开始
|
||||
//arrFile.CopyTo(arrFileFina, 1);
|
||||
Buffer.BlockCopy(arrFile, 0, arrFileFina, 1, length);
|
||||
//发送文件数据
|
||||
sokMsg.Send(arrFileFina);//, 0, length + 1, SocketFlags.None);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 05向客户端发送闪屏
|
||||
/// <summary>
|
||||
/// 向客户端发送闪屏
|
||||
/// </summary>
|
||||
/// <param name="strMsg"></param>
|
||||
public void SendShake()
|
||||
{
|
||||
byte[] arrMsgFinal = new byte[1];
|
||||
arrMsgFinal[0] = 2;
|
||||
sokMsg.Send(arrMsgFinal);
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 06关闭与客户端连接
|
||||
/// <summary>
|
||||
/// 关闭与客户端连接
|
||||
/// </summary>
|
||||
public void CloseConnection()
|
||||
{
|
||||
isRec = false;
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace JY.Inspection
|
||||
{
|
||||
public delegate void DGShowMsg(string strMsg);
|
||||
}
|
||||
@@ -0,0 +1,127 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Net.Sockets;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace JY.Inspection
|
||||
{
|
||||
/// <summary>
|
||||
/// 设置电脑时间
|
||||
/// </summary>
|
||||
public class DateTimeSynchronization
|
||||
{
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
private struct Systemtime
|
||||
{
|
||||
public short year;
|
||||
public short month;
|
||||
public short dayOfWeek;
|
||||
public short day;
|
||||
public short hour;
|
||||
public short minute;
|
||||
public short second;
|
||||
public short milliseconds;
|
||||
}
|
||||
|
||||
[DllImport("kernel32.dll")]
|
||||
private static extern bool SetLocalTime(ref Systemtime time);
|
||||
|
||||
private static uint swapEndian(ulong x)
|
||||
{
|
||||
return (uint)(((x & 0x000000ff) << 24) +
|
||||
((x & 0x0000ff00) << 8) +
|
||||
((x & 0x00ff0000) >> 8) +
|
||||
((x & 0xff000000) >> 24));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 手动设置系统时间
|
||||
/// </summary>
|
||||
/// <param name="dt">需要设置的时间</param>
|
||||
/// <returns>返回系统时间设置状态,true为成功,false为失败</returns>
|
||||
public static bool SetLocalDateTime(DateTime dt)
|
||||
{
|
||||
Systemtime st;
|
||||
st.year = (short)dt.Year;
|
||||
st.month = (short)dt.Month;
|
||||
st.dayOfWeek = (short)dt.DayOfWeek;
|
||||
st.day = (short)dt.Day;
|
||||
st.hour = (short)dt.Hour;
|
||||
st.minute = (short)dt.Minute;
|
||||
st.second = (short)dt.Second;
|
||||
st.milliseconds = (short)dt.Millisecond;
|
||||
bool rt = SetLocalTime(ref st);
|
||||
return rt;
|
||||
}
|
||||
|
||||
|
||||
private static IPAddress iPAddress = null;
|
||||
/// <summary>
|
||||
/// 从NTP获取时间更新本地时间
|
||||
/// </summary>
|
||||
/// <param name="host"></param>
|
||||
/// <param name="syncDateTime"></param>
|
||||
/// <param name="message"></param>
|
||||
/// <returns></returns>
|
||||
public static bool Synchronization(string host, out DateTime syncDateTime, out string message)
|
||||
{
|
||||
syncDateTime = DateTime.Now;
|
||||
try
|
||||
{
|
||||
message = "";
|
||||
if (iPAddress == null)
|
||||
{
|
||||
var iphostinfo = Dns.GetHostEntry(host);
|
||||
var ntpServer = iphostinfo.AddressList[0];
|
||||
iPAddress = ntpServer;
|
||||
}
|
||||
DateTime dtStart = DateTime.Now;
|
||||
//NTP消息大小摘要是16字节 (RFC 2030)
|
||||
byte[] ntpData = new byte[48];
|
||||
//设置跳跃指示器、版本号和模式值
|
||||
// LI = 0 (no warning), VN = 3 (IPv4 only), Mode = 3 (Client Mode)
|
||||
ntpData[0] = 0x1B;
|
||||
IPAddress ip = iPAddress;
|
||||
// NTP服务给UDP分配的端口号是123
|
||||
IPEndPoint ipEndPoint = new IPEndPoint(ip, 123);
|
||||
// 使用UTP进行通讯
|
||||
Socket socket = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp);
|
||||
socket.Connect(ipEndPoint);
|
||||
socket.ReceiveTimeout = 3000;
|
||||
socket.Send(ntpData);
|
||||
socket.Receive(ntpData);
|
||||
socket?.Close();
|
||||
socket?.Dispose();
|
||||
DateTime dtEnd = DateTime.Now;
|
||||
//传输时间戳字段偏移量,以64位时间戳格式,应答离开客户端服务器的时间
|
||||
const byte serverReplyTime = 40;
|
||||
// 获得秒的部分
|
||||
ulong intPart = BitConverter.ToUInt32(ntpData, serverReplyTime);
|
||||
//获取秒的部分
|
||||
ulong fractPart = BitConverter.ToUInt32(ntpData, serverReplyTime + 4);
|
||||
//由big-endian 到 little-endian的转换
|
||||
intPart = swapEndian(intPart);
|
||||
fractPart = swapEndian(fractPart);
|
||||
ulong milliseconds = (intPart * 1000) + ((fractPart * 1000) / 0x100000000UL);
|
||||
// UTC时间
|
||||
DateTime webTime = (new DateTime(1900, 1, 1, 0, 0, 0, DateTimeKind.Utc)).AddMilliseconds(milliseconds);
|
||||
//本地时间
|
||||
DateTime dt = webTime.ToLocalTime();
|
||||
bool isSuccess = SetLocalDateTime(dt);
|
||||
syncDateTime = dt;
|
||||
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
message = ex.Message;
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,120 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace JY.Inspection
|
||||
{
|
||||
public class ServiceLog
|
||||
{
|
||||
public void Start()
|
||||
{
|
||||
Thread thread = new Thread(Init);
|
||||
thread.IsBackground = true;
|
||||
thread.Start();
|
||||
}
|
||||
|
||||
private void Init()
|
||||
{
|
||||
while (true)
|
||||
{
|
||||
try
|
||||
{
|
||||
DeleteFile(System.Environment.CurrentDirectory + @"\Logs\", 30); //删除该目录下 超过 30天的文件
|
||||
}
|
||||
catch (Exception err)
|
||||
{
|
||||
Console.WriteLine(err.Message, err.StackTrace);
|
||||
}
|
||||
finally
|
||||
{
|
||||
Thread.Sleep(100000);
|
||||
}
|
||||
}
|
||||
}
|
||||
private void DeleteFile(string fileDirect, int saveDay)
|
||||
{
|
||||
try
|
||||
{
|
||||
DateTime nowTime = DateTime.Now;
|
||||
string[] files = Directory.GetFiles(fileDirect, "*.txt", SearchOption.AllDirectories); //获取该目录下所有 .txt文件
|
||||
foreach (string file in files)
|
||||
{
|
||||
FileInfo fileInfo = new FileInfo(file);
|
||||
TimeSpan t = DateTime.Now - fileInfo.CreationTime; //当前时间 减去 文件创建时间
|
||||
int day = t.Days;
|
||||
if (day > saveDay) //保存的时间,单位:天
|
||||
{
|
||||
if (IsOccupy(fileInfo.FullName)) //判断文件是否被占用
|
||||
{
|
||||
System.IO.File.Delete(fileInfo.FullName); //删除文件
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Log4Helper.WriteLog("文件被占用,无法操作!","错误提示");
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception err)
|
||||
{
|
||||
Log4Helper.WriteLog("文件被占用,无法操作!",err);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
[DllImport("kernel32.dll")]
|
||||
public static extern IntPtr _lopen(string lpPathName, int iReadWrite);
|
||||
|
||||
[DllImport("kernel32.dll")]
|
||||
public static extern bool CloseHandle(IntPtr hObject);
|
||||
|
||||
public const int OF_READWRITE = 2;
|
||||
public const int OF_SHARE_DENY_NONE = 0x40;
|
||||
public readonly IntPtr HFILE_ERROR = new IntPtr(-1);
|
||||
|
||||
/// <summary>
|
||||
/// 判断文件是否被占用
|
||||
/// </summary>
|
||||
/// <param name="file"></param>
|
||||
/// <returns></returns>
|
||||
private bool IsOccupy(string file)
|
||||
{
|
||||
bool result = true; //默认状态此文件未被占用
|
||||
try
|
||||
{
|
||||
//string vFileName = @"c:\temp\temp.bmp";
|
||||
string vFileName = file;
|
||||
if (!System.IO.File.Exists(vFileName))
|
||||
{
|
||||
//Logger.Info("文件都不存在!");
|
||||
result = false;
|
||||
}
|
||||
IntPtr vHandle = _lopen(vFileName, OF_READWRITE | OF_SHARE_DENY_NONE);
|
||||
if (vHandle == HFILE_ERROR)
|
||||
{
|
||||
|
||||
Log4Helper.WriteLog("文件被占用!", "错误提示");
|
||||
result = false;
|
||||
}
|
||||
CloseHandle(vHandle);
|
||||
Log4Helper.WriteLog("没有被占用!", "错误提示");
|
||||
|
||||
|
||||
}
|
||||
catch (Exception err)
|
||||
{
|
||||
result = false;
|
||||
Log4Helper.WriteLog("判断文件是否被占用", err);
|
||||
|
||||
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,157 @@
|
||||
using System;
|
||||
using System.Data;
|
||||
using System.Data.OleDb;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace JY.Infrastructure.Common
|
||||
{
|
||||
public class ExcelToSQL
|
||||
{
|
||||
//DBUnti _db = new DBUnti();
|
||||
|
||||
|
||||
public bool ExcelToSql(ref string strErr)
|
||||
{
|
||||
try
|
||||
{
|
||||
OpenFileDialog fd = new OpenFileDialog();
|
||||
fd.Filter = "导入SQL数据库|*.xlsx;*.xls";//打开文件对话框筛选器
|
||||
if (fd.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
bool b= TransferData(fd.FileName, "tb_hxconfigbase", ref strErr); //数据库表中名称
|
||||
if (b)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
strErr = ex.Message;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Excel导入到Mysql
|
||||
/// </summary>
|
||||
/// <param name="strErr"></param>
|
||||
/// <returns></returns>
|
||||
public bool ExcelToStandardSQL(ref string strErr)
|
||||
{
|
||||
try
|
||||
{
|
||||
strErr = "";
|
||||
OpenFileDialog fd = new OpenFileDialog();
|
||||
fd.Filter = "导入SQL数据库|*.xlsx;*.xls";//打开文件对话框筛选器
|
||||
if (fd.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
DataTable dt = GetExcelDatatable(fd.FileName, "mapTable");
|
||||
bool b = OpDataBase.InsetMySqlData(dt,ref strErr);
|
||||
if (strErr=="")
|
||||
{
|
||||
return true;
|
||||
}
|
||||
//TransferData(fd.FileName, "tb_hxconfigbase", _db.connstr,ref strErr); //数据库表中名称
|
||||
}
|
||||
strErr = "取消导入";
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
strErr = ex.Message;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Excel导入到SQLSERVER
|
||||
/// </summary>
|
||||
/// <param name="excelFile"></param>
|
||||
/// <param name="sheetName"></param>
|
||||
/// <param name="strErr"></param>
|
||||
/// <returns></returns>
|
||||
public bool TransferData(string excelFile, string sheetName, ref string strErr)
|
||||
{
|
||||
strErr = "";
|
||||
DataSet ds = new DataSet();
|
||||
try
|
||||
{
|
||||
string strConn = "";
|
||||
strConn = "Provider = Microsoft.Jet.OLEDB.4.0; Data Source=" + excelFile + ";Extended Properties='Excel 8.0;HDR=Yes;IMEX=1'";
|
||||
strConn = "Provider = Microsoft.ACE.OLEDB.12.0;Data Source=" + excelFile + ";Extended Properties='Excel 12.0;HDR=Yes;IMEX=1'";
|
||||
OleDbConnection conn = new OleDbConnection(strConn);
|
||||
conn.Open();
|
||||
string strExcel = "";
|
||||
OleDbDataAdapter myCommand;
|
||||
strExcel = string.Format("select * from [{0}$]", sheetName);
|
||||
myCommand = new OleDbDataAdapter(strExcel, strConn);
|
||||
myCommand.Fill(ds, sheetName);
|
||||
bool b= OpDataBase.InsetSqlData(ds, sheetName,ref strErr);
|
||||
if (strErr=="")
|
||||
{
|
||||
return true;
|
||||
}
|
||||
#region 屏蔽
|
||||
////列出ds内存表内所有数据,通过For循环把ModelType项数据添加到List集合
|
||||
//List<string> Mlist = new List<string>();
|
||||
//for (int i=0;i<ds.Tables[0].Rows.Count;i++)
|
||||
//{
|
||||
// Mlist.Add(ds.Tables[0].Rows[i][0].ToString());
|
||||
//}
|
||||
//HashSet<string> typeSet = new HashSet<string>(Mlist);//去除List集合重复项
|
||||
//foreach(var item in typeSet)
|
||||
//{
|
||||
// _sqldb.AddModelType(item, ref strErr);
|
||||
//}
|
||||
#endregion
|
||||
|
||||
//如果目标表不存在则创建,excel文件的第一行为列标题,从第二行开始全部都是数据记录
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
strErr = ex.Message;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public DataTable GetExcelDatatable(string fileUrl, string table)
|
||||
{
|
||||
//office2007之前 仅支持.xls
|
||||
//const string cmdText = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source={0};Extended Properties='Excel 8.0;IMEX=1';";
|
||||
//支持.xls和.xlsx,即包括office2010等版本的 HDR=Yes代表第一行是标题,不是数据;
|
||||
const string cmdText = "Provider=Microsoft.Ace.OleDb.12.0;Data Source={0};Extended Properties='Excel 12.0; HDR=Yes; IMEX=1'";
|
||||
DataTable dt = null;
|
||||
//建立连接
|
||||
OleDbConnection conn = new OleDbConnection(string.Format(cmdText, fileUrl));
|
||||
try
|
||||
{
|
||||
//打开连接
|
||||
if (conn.State == ConnectionState.Broken || conn.State == ConnectionState.Closed)
|
||||
{
|
||||
conn.Open();
|
||||
}
|
||||
System.Data.DataTable schemaTable = conn.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, null);
|
||||
//获取Excel的第一个Sheet名称
|
||||
string sheetName = schemaTable.Rows[0]["TABLE_NAME"].ToString().Trim();
|
||||
//查询sheet中的数据
|
||||
string strSql = "select * from [" + sheetName + "]";
|
||||
OleDbDataAdapter da = new OleDbDataAdapter(strSql, conn);
|
||||
DataSet ds = new DataSet();
|
||||
da.Fill(ds, table);
|
||||
dt = ds.Tables[0];
|
||||
return dt;
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
throw exc;
|
||||
}
|
||||
finally
|
||||
{
|
||||
conn.Close();
|
||||
conn.Dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using NPOI;
|
||||
using NPOI.HPSF;
|
||||
using NPOI.HSSF;
|
||||
using NPOI.HSSF.UserModel;
|
||||
using NPOI.SS.UserModel;
|
||||
using NPOI.POIFS;
|
||||
using NPOI.Util;
|
||||
using System.IO;
|
||||
using System.Data;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace JY.Infrastructure.Common
|
||||
{
|
||||
class ExportXls
|
||||
{
|
||||
/// <summary>
|
||||
/// 由DataTable导出Excel
|
||||
/// </summary>
|
||||
/// <param name="sourceTable">要导出数据的DataTable</param>
|
||||
/// <returns>Excel工作表</returns>
|
||||
public void ExportDataTableToExcel(DataTable sourceTable, string sheetName, string filepath)
|
||||
{
|
||||
|
||||
FileStream file = new FileStream(filepath, FileMode.Create);
|
||||
HSSFWorkbook workbook = new HSSFWorkbook();
|
||||
// MemoryStream ms = new MemoryStream();
|
||||
ISheet sheet = workbook.CreateSheet(sheetName);
|
||||
IRow headerRow = sheet.CreateRow(0);
|
||||
// handling header.
|
||||
foreach (DataColumn column in sourceTable.Columns)
|
||||
|
||||
headerRow.CreateCell(column.Ordinal).SetCellValue(column.ColumnName);
|
||||
// handling value.
|
||||
int rowIndex = 1;
|
||||
|
||||
foreach (DataRow row in sourceTable.Rows)
|
||||
{
|
||||
IRow dataRow = sheet.CreateRow(rowIndex);
|
||||
foreach (DataColumn column in sourceTable.Columns)
|
||||
{
|
||||
dataRow.CreateCell(column.Ordinal).SetCellValue(row[column].ToString());
|
||||
}
|
||||
rowIndex++;
|
||||
}
|
||||
|
||||
workbook.Write(file);
|
||||
file.Close();
|
||||
sheet = null;
|
||||
headerRow = null;
|
||||
workbook = null;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
using JY.Model;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
|
||||
namespace JY.Inspection
|
||||
{
|
||||
public class Global
|
||||
{
|
||||
/// <summary>
|
||||
/// 错误日志路径
|
||||
/// </summary>
|
||||
public static string strErrorLogspath = System.Windows.Forms.Application.StartupPath + "\\Logs\\ErrorLogs";
|
||||
|
||||
public static string strSystemLogspath = System.Windows.Forms.Application.StartupPath + "\\Logs\\SystemLogs";
|
||||
/// <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");
|
||||
|
||||
public static string CollectItemCfgPath = Path.Combine(System.Windows.Forms.Application.StartupPath, @"Config/采集项参照表.xlsx");
|
||||
|
||||
|
||||
public static SystemConfig systemConfig = new SystemConfig();
|
||||
|
||||
|
||||
public static List<string> Instructions = new List<string>();
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
using log4net;
|
||||
using System;
|
||||
|
||||
namespace JY.Inspection
|
||||
{
|
||||
internal class Log4Helper
|
||||
{
|
||||
public static void WriteLog(Type t, Exception ex)
|
||||
{
|
||||
ILog log = LogManager.GetLogger(t);
|
||||
log.Error(ex);
|
||||
}
|
||||
|
||||
public static void WriteLog(Type t, string msg)
|
||||
{
|
||||
ILog log = LogManager.GetLogger(t);
|
||||
log.Info(msg);
|
||||
}
|
||||
|
||||
public static void WriteLog(string className, Exception ex)
|
||||
{
|
||||
ILog log = LogManager.GetLogger(className);
|
||||
log.Error(ex);
|
||||
}
|
||||
|
||||
public static void WriteLog(string className, string msg)
|
||||
{
|
||||
ILog log = LogManager.GetLogger(className);
|
||||
log.Info(msg);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,56 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace JY.Inspection
|
||||
{
|
||||
public class MessageBoxTimeOut
|
||||
{
|
||||
private string _caption;
|
||||
//public void Alert(string msg, FrmAlert.enmType type)
|
||||
//{
|
||||
// FrmAlert frm = new FrmAlert();
|
||||
// frm.ShowAlert(msg, type);
|
||||
//}
|
||||
public void Show(string text, FrmAlert.enmType type)
|
||||
{
|
||||
this._caption = "信息提示";
|
||||
StartTimer(3000);
|
||||
//Alert(text, type);
|
||||
|
||||
MessageBox.Show(text,"信息提示");
|
||||
}
|
||||
private void StartTimer(int interval)
|
||||
{
|
||||
Timer timer = new Timer();
|
||||
timer.Interval = interval;
|
||||
timer.Tick += new EventHandler(Timer_Tick);
|
||||
timer.Enabled = true;
|
||||
}
|
||||
private void Timer_Tick(object sender, EventArgs e)
|
||||
{
|
||||
KillMessageBox();
|
||||
//停止计时器
|
||||
((Timer)sender).Enabled = false;
|
||||
}
|
||||
[DllImport("User32.dll", EntryPoint = "FindWindow", CharSet = CharSet.Auto)]
|
||||
private extern static IntPtr FindWindow(string lpClassName, string lpWindowName);
|
||||
[DllImport("User32.dll", CharSet = CharSet.Auto)]
|
||||
public static extern int PostMessage(IntPtr hWnd, int msg, IntPtr wParam, IntPtr lParam);
|
||||
public const int WM_CLOSE = 0x10;
|
||||
private void KillMessageBox()
|
||||
{
|
||||
//查找MessageBox的弹出窗口,注意对应标题
|
||||
IntPtr ptr = FindWindow(null, this._caption);
|
||||
if (ptr != IntPtr.Zero)
|
||||
{
|
||||
//查找到窗口则关闭
|
||||
PostMessage(ptr, WM_CLOSE, IntPtr.Zero, IntPtr.Zero);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,443 @@
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.Drawing;
|
||||
using System.IO;
|
||||
using System.Threading;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace JY.Inspection
|
||||
{
|
||||
|
||||
public enum Logstype//枚举类型
|
||||
{
|
||||
Message,
|
||||
Warning,
|
||||
Error
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 轻快型消息提示类
|
||||
/// </summary>
|
||||
public static class MessageTip
|
||||
{
|
||||
static readonly Image _iconOk;
|
||||
static readonly Image _iconWarning;
|
||||
static readonly Image _iconError;
|
||||
|
||||
/// <summary>
|
||||
/// 全局停留时长(毫秒),影响后续弹出的tip。默认500
|
||||
/// </summary>
|
||||
public static int DefaultDelay { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否允许上浮动画。默认true
|
||||
/// </summary>
|
||||
public static bool AllowFloating { get; set; }
|
||||
|
||||
static MessageTip()
|
||||
{
|
||||
DefaultDelay = 500;
|
||||
AllowFloating = true;
|
||||
|
||||
Bitmap spriteImage;
|
||||
using (var ms = new MemoryStream(Convert.FromBase64String(DefaultIconData)))
|
||||
{
|
||||
//不能直接用Img.FromMs得到的对象,怀疑因该方法得到的对象与源ms有瓜葛
|
||||
//ms释放后会导致莫名问题,比如下面的Clone会引发内存不足异常
|
||||
//而new Bitmap(Image)相当于基于Image重造了一个全新的bmp
|
||||
spriteImage = new Bitmap(Image.FromStream(ms));
|
||||
}
|
||||
|
||||
_iconOk = spriteImage.Clone(new Rectangle(0, 0, 32, 32), spriteImage.PixelFormat);
|
||||
_iconWarning = spriteImage.Clone(new RectangleF(32, 0, 32, 32), spriteImage.PixelFormat);
|
||||
_iconError = spriteImage.Clone(new RectangleF(64, 0, 32, 32), spriteImage.PixelFormat);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 显示良好消息,图标为绿勾 √
|
||||
/// </summary>
|
||||
/// <param name="text">消息文本</param>
|
||||
/// <param name="delay">消息停留时长(毫秒)。指定负数则使用 DefaultDelay</param>
|
||||
public static void ShowOk(string text = null, int delay = -1)
|
||||
{
|
||||
Show(text, _iconOk, Color.SeaGreen, Color.White, delay);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 显示警告消息,图标为黄色感叹号 !
|
||||
/// </summary>
|
||||
/// <param name="text">消息文本</param>
|
||||
/// <param name="delay">消息停留时长(毫秒)。指定负数则使用 DefaultDelay</param>
|
||||
public static void ShowWarning(string text = null, int delay = -1)
|
||||
{
|
||||
Show(text, _iconWarning, Color.DarkOrange, Color.Black, delay);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 显示出错消息,图标为红叉 X
|
||||
/// </summary>
|
||||
/// <param name="text">消息文本</param>
|
||||
/// <param name="delay">消息停留时长(毫秒)。指定负数则使用 DefaultDelay</param>
|
||||
public static void ShowError(string text = null, int delay = -1)
|
||||
{
|
||||
Show(text, _iconError, Color.Red, Color.White, delay);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 显示消息
|
||||
/// </summary>
|
||||
/// <param name="text">消息文本</param>
|
||||
/// <param name="icon">图标。不会进行缩放</param>
|
||||
/// <param name="delay">消息停留时长(毫秒)。指定负数则使用 DefaultDelay</param>
|
||||
public static void Show(string text, Image icon, Color bkColor, Color textColor, int delay = -1)
|
||||
{
|
||||
ThreadPool.QueueUserWorkItem(obj => new TipForm
|
||||
{
|
||||
TipText = text,
|
||||
TipIcon = icon,
|
||||
Delay = delay < 0 ? DefaultDelay : delay,
|
||||
Floating = AllowFloating,
|
||||
BkColor = bkColor,
|
||||
TextColor= textColor,
|
||||
BasePoint = Control.MousePosition //在鼠标点击的附近弹出
|
||||
}.ShowDialog()); ;//要让创建浮动窗体的线程具有消息循环,所以要用ShowDialog
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 内置图标数据:√ ! X
|
||||
/// </summary>
|
||||
const string DefaultIconData = @"R0lGODlhYAAgANUAAOrcJ9LORebm5tJKShPLJLczM/z3s/XrkNfSOhS2JKaYMezeaMoREfhwcNS3
|
||||
t7IREVSkWpWQZjCpPfz8+zS4RN3PZdTU1EjLWG9uaO/w7/Dke1HVYfHsx5UzM8Q8PLjYuqmmn8bl
|
||||
yeO3txsbD+fck9DAUeDaVV1cHuHXMDGTOO3iSeHy4+BYWDvGTPn25O/hN5PIl8K1Pbfhu/z78nW/
|
||||
fPb39lbeZ5/WpIAzM2HpcqITExGiIjV/N8S9luLbqf///yH5BAAAAAAALAAAAABgACAAAAb/wJ9w
|
||||
SCwaj8ikcslsOp/QKFNUEEGpVqm2OQtUZlJqo+oUk7fHFUWmJWk0pKi4Mc4qxaw6uli7bNZRMxUG
|
||||
BhUuT3gseWdIc4p6e0I0Fzk5EmxPboQHcU2Jiot2RZ+PjFs3LTk2G5aYTC6DBweFh0wFDaC5kERi
|
||||
Ayy+v4oFeyEUNqsbrJdNmm8GcJ63A9PUA7s/VL/V0yymUWobNhfj4xsSTByxb7MVHNEN29xn2fG+
|
||||
3lB9F+LkfstLFbMWaBAoq0KZWx4SJhzgoZuIbB4YLox4DwqNFuJaaGxxgQIMdIM0RMCAIYKGQu6a
|
||||
OCjAQqHLAQUKSHSZsOKTG8YubNRIgUYT/4AHFpAkqaHghIMtPRRQuhAm06VQHSiRAQhJCAl/JCSQ
|
||||
wJUChBogDQgcimHBggPtnqyEGbOt27c2hciQYMNfkRUSOu7Yu1fCVyYTAA5cMJKk2aJfEHVgC9et
|
||||
UqlJqNowZlfIBAgULvDtK2FFEx+DzArFcCKCaLQ+rixVCpd1B1FG5k6mQNnVDxoUNmzewTUElxIH
|
||||
BhMeMeJEiQBeFpQAo7YDa9YPdEiP+0M27evmMN2QQCNBgs0SbjgBHXSBCQQniJ9AjnxBhU4H2Uqf
|
||||
L/21ErrXrydoIeHD1Q3e7eDdVh814QJwGpjAngLEKcBeeyWA5cli9FVYH2xEzPUHBS0MuP+fBClc
|
||||
4KGA3B3FTAUaBICAigEocMIJCqy4ohcBwHeHczpEZyF99iGhIQUeetfCH0H6lYETByaIwJJLxvBi
|
||||
DEwyaUIJtSThQAcFPBCdljl2uWV0PR7xQV4EDFhmAmWe6R0EnjlRQQULRLmkCW+cJ6eCBiUhApZa
|
||||
9unnn312AJmYErRAwKFopplmAin45gQHJWgg56SUTpmSEVcyAKiWHXSwKaeDGjGmooeWemgKHzwR
|
||||
mAkmoODqqygwOIICsL66Yp6j4KDpA7vuKuiVWu7KK6hJfJCCqcimUOCjJSxQ66vEEffsqyVcKoQD
|
||||
umqqrbY4QJYprwxs+4CgxR6LLAEp+KT/agkmqAArANBG+yy8KARQgok/YBvuvvx2S4S+4PLLgL9I
|
||||
GIvsDhDg+1kM7gLgMLwPR0BcBA8/jMLDMaQmRLYCh0vwvxx3jIMSBiMKwZGqxmDCCxW3rIIsKrTc
|
||||
MgIxmKivyKGC3PHAOf8wQQ0ZZCAACObyYIEAQWdQw9ITNH2EDwzLLPXUFWc8xM37fnwE1h73/APQ
|
||||
AlggNgg88NCD2EcLgLTSThtB6wsqvCD33HIDwDLLVDsc678dZO11EZl2jcTPQattuNpJK11D020T
|
||||
MUEPCkQu+eSUV255DwrrS65Kum4eyRJNAy304aSXXrriTk8wOgg4gIB22okbjjbrICC9E/jnuEcR
|
||||
+uiHB73076KT7rvTQQAAOw==";
|
||||
|
||||
/// <summary>
|
||||
/// 浮动消息层
|
||||
/// </summary>
|
||||
private class TipForm : Form
|
||||
{
|
||||
/// <summary>
|
||||
/// 图标和文本之间的间距(像素)
|
||||
/// </summary>
|
||||
const int IconTextSpacing = 3;
|
||||
|
||||
/// <summary>
|
||||
/// 基准点。用于指导本窗体显示位置
|
||||
/// </summary>
|
||||
public Point BasePoint { get; set; }
|
||||
/// <summary>
|
||||
/// 显示文字
|
||||
/// </summary>
|
||||
string _tipText;
|
||||
/// <summary>
|
||||
/// 背景色
|
||||
/// </summary>
|
||||
Color _bkColor = Color.SeaGreen;
|
||||
/// <summary>
|
||||
/// 文字颜色
|
||||
/// </summary>
|
||||
Color _textColor=Color.Black;
|
||||
/// <summary>
|
||||
/// 提示图标
|
||||
/// </summary>
|
||||
public Image TipIcon { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 提示文本
|
||||
/// </summary>
|
||||
public string TipText
|
||||
{
|
||||
get { return _tipText ?? string.Empty; }
|
||||
set { _tipText = value; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 文字显示颜色
|
||||
/// </summary>
|
||||
//[DefaultValue(500)]
|
||||
public Color TextColor
|
||||
{
|
||||
get { return _textColor; }
|
||||
set
|
||||
{
|
||||
_textColor = value;
|
||||
this.ForeColor = _textColor;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 停留时长(毫秒)
|
||||
/// </summary>
|
||||
[DefaultValue(500)]
|
||||
public int Delay { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 停留时长(毫秒)
|
||||
/// </summary>
|
||||
//[DefaultValue(Color.White)]
|
||||
public Color BkColor
|
||||
{
|
||||
get { return _bkColor; }
|
||||
set
|
||||
{
|
||||
_bkColor = value;
|
||||
this.BackColor = _bkColor;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// 是否允许浮动
|
||||
/// </summary>
|
||||
[DefaultValue(true)]
|
||||
public bool Floating { get; set; }
|
||||
|
||||
//显示后不激活,即不抢焦点
|
||||
protected override bool ShowWithoutActivation
|
||||
{
|
||||
get { return true; }
|
||||
}
|
||||
|
||||
public TipForm()
|
||||
{
|
||||
//双缓冲。有必要
|
||||
SetStyle(ControlStyles.UserPaint, true);
|
||||
DoubleBuffered = true;
|
||||
|
||||
InitializeComponent();
|
||||
|
||||
Delay = 500;
|
||||
Floating = true;
|
||||
BkColor = Color.White;
|
||||
this._timer.Tick += timer_Tick;
|
||||
this.Load += TipForm_Load;
|
||||
this.Shown += TipForm_Shown;
|
||||
this.FormClosing += TipForm_FormClosing;
|
||||
}
|
||||
|
||||
/// <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; //显示的坐标变量
|
||||
/// <summary>
|
||||
/// 根据基准点处理窗体显示位置
|
||||
/// </summary>
|
||||
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
|
||||
}
|
||||
|
||||
void TipForm_Load(object sender, EventArgs e)
|
||||
{
|
||||
ProcessClientSize();
|
||||
ProcessLocation();
|
||||
|
||||
//上浮窗体动画。采用异步,以不阻塞透明渐变动画的进行
|
||||
if (Floating)
|
||||
{
|
||||
ThreadPool.QueueUserWorkItem(obj =>
|
||||
{
|
||||
while (this.IsHandleCreated)
|
||||
{
|
||||
this.BeginInvoke(new Action<object>(arg =>
|
||||
{
|
||||
this.Top--;
|
||||
Application.DoEvents();
|
||||
}), (object)null);
|
||||
|
||||
Thread.Sleep(30);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//透明渐入动画。之所以不用异步是为了在完全显示后再开始Delay的计时
|
||||
//不然如果Delay设置过低,还没等看清就渐隐了
|
||||
this.Opacity = 0;
|
||||
while (this.Opacity < 1)
|
||||
{
|
||||
this.Opacity += 0.1;
|
||||
Application.DoEvents();
|
||||
Thread.Sleep(10);
|
||||
}
|
||||
}
|
||||
|
||||
void TipForm_Shown(object sender, EventArgs e)
|
||||
{
|
||||
//因为timer.Interval不能为0
|
||||
if (Delay > 0)
|
||||
{
|
||||
_timer.Interval = Delay;
|
||||
_timer.Start();
|
||||
}
|
||||
else
|
||||
{
|
||||
this.Close();
|
||||
}
|
||||
}
|
||||
|
||||
void timer_Tick(object sender, EventArgs e)
|
||||
{
|
||||
_timer.Stop();
|
||||
this.Close();
|
||||
}
|
||||
|
||||
void TipForm_FormClosing(object sender, FormClosingEventArgs e)
|
||||
{
|
||||
//透明渐隐动画
|
||||
while (this.Opacity > 0)
|
||||
{
|
||||
this.Opacity -= 0.1;
|
||||
Application.DoEvents();
|
||||
Thread.Sleep(20);
|
||||
}
|
||||
}
|
||||
|
||||
protected override void OnPaint(PaintEventArgs e)
|
||||
{
|
||||
base.OnPaint(e);
|
||||
|
||||
var clip = GetPaddedRectangle();//得到作图区域
|
||||
var g = e.Graphics;
|
||||
//g.DrawRectangle(Pens.Red, clip);//debug
|
||||
|
||||
//画图标
|
||||
if (TipIcon != null)
|
||||
{
|
||||
g.DrawImageUnscaled(TipIcon, clip.Location);
|
||||
}
|
||||
//画文本
|
||||
if (TipText.Length != 0)
|
||||
{
|
||||
if (TipIcon != null)
|
||||
{
|
||||
clip.X += TipIcon.Width + IconTextSpacing;
|
||||
}
|
||||
TextRenderer.DrawText(g, TipText, this.Font, clip, this.ForeColor, TextFormatFlags.VerticalCenter);
|
||||
}
|
||||
}
|
||||
|
||||
protected override void OnPaintBackground(PaintEventArgs e)
|
||||
{
|
||||
base.OnPaintBackground(e);
|
||||
|
||||
//画边框
|
||||
ControlPaint.DrawBorder(e.Graphics, this.ClientRectangle, SystemColors.ControlDark, ButtonBorderStyle.Solid);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取刨去Padding的内容区
|
||||
/// </summary>
|
||||
private Rectangle GetPaddedRectangle()
|
||||
{
|
||||
Rectangle r = this.ClientRectangle;
|
||||
r.X += this.Padding.Left;
|
||||
r.Y += this.Padding.Top;
|
||||
r.Width -= this.Padding.Horizontal;
|
||||
r.Height -= this.Padding.Vertical;
|
||||
return r;
|
||||
}
|
||||
|
||||
#region 设计器内容
|
||||
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing)
|
||||
{
|
||||
_timer.Dispose();//这货必须显示释放
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this._timer = new System.Windows.Forms.Timer();
|
||||
this.SuspendLayout();
|
||||
|
||||
this.AutoScaleMode = AutoScaleMode.None;
|
||||
//this.ClientSize = new System.Drawing.Size(100, 100);
|
||||
this.BackColor = Color.White;
|
||||
this.Font = new Font(SystemFonts.MessageBoxFont.FontFamily, 12);
|
||||
this.FormBorderStyle = FormBorderStyle.None;
|
||||
this.Padding = new Padding(20, 10, 20, 10);
|
||||
this.Name = "TipForm";
|
||||
this.ShowInTaskbar = false;
|
||||
|
||||
this.ResumeLayout(false);
|
||||
}
|
||||
|
||||
private System.Windows.Forms.Timer _timer;
|
||||
|
||||
#endregion
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,193 @@
|
||||
using JY.Inspection.Entity;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace JY.Inspection.Common
|
||||
{
|
||||
public static class PLCAlarmParse
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// 三菱将报警地址值转成报警List
|
||||
/// </summary>
|
||||
/// <param name="plcAddrSuffix">PLC地址值,如100</param>
|
||||
/// <param name="byteData">PLC读取出来的值</param>
|
||||
/// <param name="plcAddrPrefix">PLC地址类型,默认值R</param>
|
||||
/// <returns></returns>
|
||||
public static List<AlarmStatus> MelsecByte2Status(int plcAddrSuffix, byte[] byteData, char plcAddrPrefix = 'R')
|
||||
{
|
||||
var listAlarmStatus = new List<AlarmStatus>();
|
||||
// byte[]转为二进制字符串表示
|
||||
string strResult = "";
|
||||
for (int i = 0; i < byteData.Length; i++)
|
||||
{
|
||||
string strTemp = System.Convert.ToString(byteData[i], 2);
|
||||
strTemp = strTemp.PadLeft(8, '0').StrReverse();
|
||||
strResult += strTemp;
|
||||
}
|
||||
|
||||
for (int i = 0; i < strResult.Length; i++)
|
||||
{
|
||||
var plcByte = i % 16;
|
||||
//如果是16的倍数地址+1
|
||||
if (plcByte % 16 == 0 && i != 0)
|
||||
{
|
||||
plcAddrSuffix++;
|
||||
}
|
||||
//将地址和状态添加到结果集
|
||||
listAlarmStatus.Add(new AlarmStatus()
|
||||
{
|
||||
PLCAdress = $"{plcAddrPrefix}{plcAddrSuffix}.{plcByte.ToString("X")}",
|
||||
Status = strResult[i] == '1'
|
||||
});
|
||||
//if (strResult[i] == '1')
|
||||
// Console.WriteLine($"{plcAddrPrefix}{plcAddrSuffix}.{plcByte.ToString("X")}:{strResult[i]}");
|
||||
}
|
||||
|
||||
return listAlarmStatus;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 欧姆龙NX系列Ethernet/IP通讯时将报警地址值转成报警List {直接读取标签地址/无需高低位互换}
|
||||
/// </summary>
|
||||
/// <param name="plcAddrSuffix">PLC地址值,如100</param>
|
||||
/// <param name="byteData">PLC读取出来的值</param>
|
||||
/// <param name="plcAddrPrefix">PLC地址类型,默认值R</param>
|
||||
/// <returns></returns>
|
||||
public static List<AlarmStatus> OmronEIPByte2Status(int plcAddrSuffix, List<byte> byteData, char plcAddrPrefix = 'W')
|
||||
{
|
||||
var listAlarmStatus = new List<AlarmStatus>();
|
||||
// byte[]转为二进制字符串表示
|
||||
string strResult = "";
|
||||
for (int i = 0; i < byteData.Count; i++)
|
||||
{
|
||||
string strTemp = System.Convert.ToString(byteData[i], 2);
|
||||
strTemp = strTemp.PadLeft(8, '0').StrReverse();
|
||||
strResult += strTemp;
|
||||
}
|
||||
|
||||
for (int i = 0; i < strResult.Length; i++)
|
||||
{
|
||||
var plcByte = i % 16;
|
||||
//如果是16的倍数地址+1
|
||||
if (plcByte % 16 == 0 && i != 0)
|
||||
{
|
||||
plcAddrSuffix++;
|
||||
}
|
||||
//将地址和状态添加到结果集
|
||||
listAlarmStatus.Add(new AlarmStatus()
|
||||
{
|
||||
PLCAdress = $"{plcAddrPrefix}6100[{plcAddrSuffix}].B[{plcByte.ToString()}]",
|
||||
Status = strResult[i] == '1'
|
||||
});
|
||||
|
||||
//if (strResult[i] == '1')
|
||||
// Console.WriteLine($"{plcAddrPrefix}{plcAddrSuffix}.{plcByte.ToString("X")}:{strResult[i]}");
|
||||
}
|
||||
|
||||
return listAlarmStatus;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 欧姆龙FINS通讯读取EM数据寄存器是时将报警地址值转成报警List
|
||||
/// </summary>
|
||||
/// <param name="plcAddrSuffix">PLC地址值,如100</param>
|
||||
/// <param name="byteData">PLC读取出来的值</param>
|
||||
/// <param name="plcAddrPrefix">PLC地址类型,默认值W</param>
|
||||
/// <returns></returns>
|
||||
public static List<AlarmStatus> OmronFinsByte2Status(int plcAddrSuffix, byte[] byteData, char plcAddrPrefix = 'E')
|
||||
{
|
||||
var listAlarmStatus = new List<AlarmStatus>();
|
||||
// byte[]转为二进制字符串表示
|
||||
byte[] revBytes = SWAPbyte(byteData); //字节高低位互换
|
||||
string strResult = "";
|
||||
for (int i = 0; i < revBytes.Length; i++)
|
||||
{
|
||||
string strTemp = System.Convert.ToString(revBytes[i], 2);
|
||||
strTemp = strTemp.PadLeft(8, '0').StrReverse();
|
||||
strResult += strTemp;
|
||||
}
|
||||
|
||||
for (int i = 0; i < strResult.Length; i++)
|
||||
{
|
||||
var plcByte = i % 16;
|
||||
//如果是16的倍数地址+1
|
||||
if (plcByte % 16 == 0 && i != 0)
|
||||
{
|
||||
plcAddrSuffix++;
|
||||
}
|
||||
//将地址和状态添加到结果集
|
||||
listAlarmStatus.Add(new AlarmStatus()
|
||||
{
|
||||
PLCAdress = $"{plcAddrPrefix}{plcAddrSuffix}.{plcByte.ToString("X")}",
|
||||
Status = strResult[i] == '1'
|
||||
});
|
||||
//if (strResult[i] == '1')
|
||||
// Console.WriteLine($"{plcAddrPrefix}{plcAddrSuffix}.{plcByte.ToString("X")}:{strResult[i]}");
|
||||
}
|
||||
|
||||
return listAlarmStatus;
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
/// 欧姆龙FINS通讯读取W数据寄存器是时将报警地址值转成报警List
|
||||
/// </summary>
|
||||
/// <param name="plcAddrSuffix">PLC地址值,如100</param>
|
||||
/// <param name="byteData">PLC读取出来的值</param>
|
||||
/// <param name="plcAddrPrefix">PLC地址类型,默认值W</param>
|
||||
/// <returns></returns>
|
||||
//public static List<AlarmStatus> OmronByte2Status(int plcAddrSuffix, byte[] byteData, char plcAddrPrefix = 'W')
|
||||
//{
|
||||
// var listAlarmStatus = new List<AlarmStatus>();
|
||||
|
||||
// var addrCount = byteData.Length / 2;
|
||||
// // byte[]每个地址保存的都是bool值,只取双数index位
|
||||
// for (int i = 0; i < addrCount; i++)
|
||||
// {
|
||||
// //将地址和状态添加到结果集
|
||||
// listAlarmStatus.Add(new AlarmStatus()
|
||||
// {
|
||||
// PLCAdress = $"{plcAddrPrefix}{plcAddrSuffix + i}",
|
||||
// Status = byteData[i * 2 + 1] == 1
|
||||
|
||||
// });
|
||||
// //if (byteData[i * 2 + 1] == 1)
|
||||
// // Console.WriteLine($"原始数据 PLC地址:{plcAddrPrefix}{plcAddrSuffix + i} 报警值:{byteData[i * 2 + 1]}");
|
||||
// }
|
||||
|
||||
// return listAlarmStatus;
|
||||
//}
|
||||
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 字符串反转
|
||||
/// </summary>
|
||||
/// <param name="str">需要反转字符串.Reverse()</param>
|
||||
/// <returns></returns>
|
||||
public static string StrReverse(this string str)
|
||||
{
|
||||
return new string(str.Reverse().ToArray());
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
///byte字节高低位互换
|
||||
/// </summary>
|
||||
/// <param name="data"></param>
|
||||
/// <returns></returns>
|
||||
public static byte[] SWAPbyte(byte[] data)
|
||||
{
|
||||
byte[] data2 = new byte[data.Length];
|
||||
for (int i = 0; i < data.Length; i += 2)
|
||||
{
|
||||
data2[i] = data[i + 1];
|
||||
data2[i + 1] = data[i];
|
||||
}
|
||||
return data2;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace JY.Inspection.Common
|
||||
{
|
||||
public class StrUtil
|
||||
{
|
||||
/// <summary>
|
||||
/// 前端字节补0
|
||||
/// </summary>
|
||||
/// <param name="str"></param>
|
||||
/// <param name="count"></param>
|
||||
/// <returns></returns>
|
||||
public static string GetStartString(string str, int count)
|
||||
{
|
||||
string strRes = str;
|
||||
int strCount = str.Length;
|
||||
|
||||
if (strCount != count)
|
||||
{
|
||||
strRes = str.PadLeft(count, '0');
|
||||
|
||||
}
|
||||
return strRes;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 增加结尾字节长度
|
||||
/// </summary>
|
||||
/// <param name="str"></param>
|
||||
/// <param name="count"></param>
|
||||
/// <returns></returns>
|
||||
public static string GetEndString(string str, int count)
|
||||
{
|
||||
string strRes = str;
|
||||
int strCount = str.Length;
|
||||
|
||||
if (strCount != count)
|
||||
{
|
||||
|
||||
strRes = str.PadRight(count, ' ');
|
||||
|
||||
}
|
||||
return strRes;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 生成字符串List集合
|
||||
/// </summary>
|
||||
/// <param name="Num"></param>
|
||||
/// <returns></returns>
|
||||
public static List<string> GetListString(int Num, string str)
|
||||
{
|
||||
List<string> list = new List<string>();
|
||||
for (int i = 0; i < Num; i++)
|
||||
{
|
||||
list.Add(str);
|
||||
}
|
||||
return list;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,68 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace JY.Common.Helper
|
||||
{
|
||||
public class TxtHelper
|
||||
{
|
||||
static ReaderWriterLockSlim sucessLogWriteLockSlim = new ReaderWriterLockSlim();
|
||||
|
||||
/// <summary>
|
||||
/// 写入TEXT文本
|
||||
/// </summary>
|
||||
/// <param name="fullName">文件名</param>
|
||||
/// <param name="content">内容</param>
|
||||
/// <returns>保存结果</returns>
|
||||
public static bool WriteTxt(string fullName, string content)
|
||||
{
|
||||
FileStream fs = null;
|
||||
StreamWriter sw = null;
|
||||
|
||||
try
|
||||
{
|
||||
string directory = fullName.Substring(0, fullName.LastIndexOf('\\'));
|
||||
if (!Directory.Exists(directory))
|
||||
{
|
||||
Directory.CreateDirectory(directory);
|
||||
}
|
||||
|
||||
sucessLogWriteLockSlim.EnterWriteLock();//加锁防止抢占
|
||||
if (!File.Exists(fullName))
|
||||
{
|
||||
fs = new FileStream(fullName, FileMode.Create, FileAccess.Write);
|
||||
sw = new StreamWriter(fs, Encoding.UTF8);
|
||||
}
|
||||
else
|
||||
{
|
||||
fs = new FileStream(fullName, FileMode.Append, FileAccess.Write);
|
||||
sw = new StreamWriter(fs, Encoding.UTF8);
|
||||
}
|
||||
|
||||
sw.WriteLine(content);
|
||||
|
||||
sw.Close();
|
||||
fs.Close();
|
||||
|
||||
return true;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
sw?.Close();
|
||||
fs?.Close();
|
||||
|
||||
}
|
||||
finally
|
||||
{
|
||||
sucessLogWriteLockSlim.ExitWriteLock();
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,296 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Runtime.Serialization.Formatters.Binary;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace JY.Inspection.Common
|
||||
{
|
||||
public class CurrentInfo
|
||||
{
|
||||
public static Autuority autuority = Autuority.Empty;
|
||||
public static bool LoginOut = false;
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class User
|
||||
{
|
||||
/// <summary>
|
||||
/// 序号
|
||||
/// </summary>
|
||||
///
|
||||
[Display(Name = "序号")]
|
||||
public int Index { get; set; }
|
||||
/// <summary>
|
||||
/// 用户名
|
||||
/// </summary>
|
||||
///
|
||||
[Display(Name = "用户名")]
|
||||
public string UserName { get; set; }
|
||||
/// <summary>
|
||||
/// 密码
|
||||
/// </summary>
|
||||
///
|
||||
[Display(Name = "密码")]
|
||||
public string PassWord { get; set; }
|
||||
/// <summary>
|
||||
/// 权限
|
||||
/// </summary>
|
||||
///
|
||||
[Display(Name = "权限")]
|
||||
public Autuority Level { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 权限枚举
|
||||
/// </summary>
|
||||
public enum Autuority
|
||||
{
|
||||
管理员,//管理员
|
||||
工程师,//工程师
|
||||
操作员,//操作员
|
||||
Empty,
|
||||
}
|
||||
|
||||
public class UserHelper
|
||||
{
|
||||
private string filePath = string.Empty;
|
||||
public UserHelper(string path)
|
||||
{
|
||||
filePath = path;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 序列化到文件
|
||||
/// </summary>
|
||||
/// <param name="path"></param>
|
||||
/// <param name="listUser"></param>
|
||||
/// <returns></returns>
|
||||
public bool SerializedUser(string path, List<User> listUser)
|
||||
{
|
||||
if (listUser == null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
BinaryFormatter format = new BinaryFormatter();
|
||||
using (FileStream fs = new FileStream(path, FileMode.Create, FileAccess.Write))
|
||||
{
|
||||
format.Serialize(fs, listUser);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 反序列化到文件
|
||||
/// </summary>
|
||||
/// <param name="path"></param>
|
||||
/// <returns></returns>
|
||||
public List<User> DeSerializedUser(string path)
|
||||
{
|
||||
BinaryFormatter format = new BinaryFormatter();
|
||||
try
|
||||
{
|
||||
using (FileStream fs = new FileStream(path, FileMode.Open, FileAccess.Read))
|
||||
{
|
||||
object o = format.Deserialize(fs);
|
||||
return o as List<User>;
|
||||
}
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 创建超级用户
|
||||
/// </summary>
|
||||
/// <param name="path"></param>
|
||||
/// <param name="listUser"></param>
|
||||
public void CheckSupperUser(string path, List<User> listUser)
|
||||
{
|
||||
if (!File.Exists(path))
|
||||
{
|
||||
User user = new User()
|
||||
{
|
||||
Index = 0,
|
||||
UserName = "Admin",
|
||||
PassWord = "Admin",
|
||||
Level = Autuority.管理员
|
||||
};
|
||||
listUser.Add(user);
|
||||
SerializedUser(path, listUser);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 检查重复性
|
||||
/// </summary>
|
||||
/// <param name="listUser"></param>
|
||||
/// <param name="userNmae"></param>
|
||||
/// <returns></returns>
|
||||
public bool CheckContainUser(List<User> listUser, string userNmae)
|
||||
{
|
||||
var user = from item in listUser
|
||||
where item.UserName == userNmae
|
||||
select item;
|
||||
if (user.Count() > 0)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加用户
|
||||
/// </summary>
|
||||
/// <param name="path"></param>
|
||||
/// <param name="listUser"></param>
|
||||
/// <param name="user"></param>
|
||||
/// <returns></returns>
|
||||
public bool AddUser(string path, List<User> listUser, User user)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (user == null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
if (CheckContainUser(listUser, user.UserName))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
listUser.Add(user);
|
||||
SerializedUser(path, listUser);
|
||||
return true;
|
||||
}
|
||||
catch
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 删除
|
||||
/// </summary>
|
||||
/// <param name="path"></param>
|
||||
/// <param name="listUser"></param>
|
||||
/// <param name="userNmae"></param>
|
||||
/// <returns></returns>
|
||||
public bool DeleteUser(string path, List<User> listUser, string userNmae)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (listUser == null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
int index = 0;
|
||||
foreach (var item in listUser)
|
||||
{
|
||||
if (item.UserName == userNmae)
|
||||
{
|
||||
break;
|
||||
}
|
||||
index++;
|
||||
}
|
||||
if (index == 0)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
listUser.RemoveAt(index);
|
||||
SerializedUser(path, listUser);
|
||||
return true;
|
||||
}
|
||||
catch
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改用户
|
||||
/// </summary>
|
||||
/// <param name="path"></param>
|
||||
/// <param name="listUser"></param>
|
||||
/// <param name="user"></param>
|
||||
/// <returns></returns>
|
||||
public bool EditUser(string path, List<User> listUser, User user)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (listUser == null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
foreach (var item in listUser)
|
||||
{
|
||||
if (item.UserName == user.UserName)
|
||||
{
|
||||
item.PassWord = user.PassWord;
|
||||
item.Level = user.Level;
|
||||
SerializedUser(path, listUser);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
catch
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public User CheckUserLogin(string path, string userName, string passWord, ref string strErr)
|
||||
{
|
||||
if (!File.Exists(path))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
List<User> list = DeSerializedUser(path);
|
||||
if (list == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
User user = new User();
|
||||
if (string.IsNullOrEmpty(userName))
|
||||
{
|
||||
var res1 = from item in list
|
||||
where item.PassWord == passWord
|
||||
select item;
|
||||
if (res1.Count() == 0)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
foreach (var item in res1)
|
||||
{
|
||||
user.UserName = item.UserName;
|
||||
user.PassWord = item.PassWord;
|
||||
user.Level = item.Level;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
var res = from item in list
|
||||
where item.PassWord == passWord && item.UserName == userName
|
||||
select item;
|
||||
if (res.Count() == 0)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
foreach (var item in res)
|
||||
{
|
||||
user.UserName = item.UserName;
|
||||
user.PassWord = item.PassWord;
|
||||
user.Level = item.Level;
|
||||
}
|
||||
}
|
||||
return user;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,66 @@
|
||||
[SystemConfig]
|
||||
ComCount=2
|
||||
|
||||
[1#COMMUNICATION_SETTING]
|
||||
Tgr_Count=1
|
||||
Auto_Connect=True
|
||||
Connect_Typt=2
|
||||
Endsymbol=1
|
||||
HeartBeat=False
|
||||
HeartText=3000
|
||||
HeartTime=1000
|
||||
TCP_IP=127.0.0.1
|
||||
TCP_Port=7321
|
||||
COM_Port=COM3
|
||||
COM_BaudRate=38400
|
||||
COM_Parity=None
|
||||
COM_DataBit=8
|
||||
COM_StopBit=1
|
||||
|
||||
[2#COMMUNICATION_SETTING]
|
||||
Tgr_Count=1
|
||||
Auto_Connect=True
|
||||
Connect_Typt=2
|
||||
Endsymbol=0
|
||||
HeartBeat=False
|
||||
HeartText=3000
|
||||
HeartTime=1000
|
||||
TCP_IP=127.0.0.1
|
||||
TCP_Port=8321
|
||||
COM_Port=COM1
|
||||
COM_BaudRate=9600
|
||||
COM_Parity=None
|
||||
COM_DataBit=8
|
||||
COM_StopBit=1
|
||||
|
||||
[3#COMMUNICATION_SETTING]
|
||||
Tgr_Count=3
|
||||
Auto_Connect=True
|
||||
Connect_Typt=3
|
||||
Endsymbol=0
|
||||
HeartBeat=False
|
||||
HeartText=3000
|
||||
HeartTime=1000
|
||||
TCP_IP=127.0.0.3
|
||||
TCP_Port=60000
|
||||
COM_Port=COM1
|
||||
COM_BaudRate=9600
|
||||
COM_Parity=None
|
||||
COM_DataBit=8
|
||||
COM_StopBit=1
|
||||
|
||||
[4#COMMUNICATION_SETTING]
|
||||
Tgr_Count=4
|
||||
Auto_Connect=True
|
||||
Connect_Typt=3
|
||||
Endsymbol=0
|
||||
HeartBeat=False
|
||||
HeartText=3000
|
||||
HeartTime=1000
|
||||
TCP_IP=127.0.0.4
|
||||
TCP_Port=60000
|
||||
COM_Port=COM1
|
||||
COM_BaudRate=9600
|
||||
COM_Parity=None
|
||||
COM_DataBit=8
|
||||
COM_StopBit=1
|
||||
@@ -0,0 +1,58 @@
|
||||
[SYSTEM_CONFIGURE]
|
||||
Company_Name=外观分档系统
|
||||
Project_Name=外观分档系统
|
||||
Project_FlowingText=外观分档系统
|
||||
IsMesUP=1
|
||||
IsSK=0
|
||||
Worker_code=123
|
||||
portName=COM2
|
||||
baudRate=9600
|
||||
ClassShift=2
|
||||
No=0
|
||||
TCP_IP=192.168.2.253
|
||||
TCP_Port=1030
|
||||
|
||||
[MES配置]
|
||||
siteCode=18J
|
||||
lineCode=18J-BZ-181
|
||||
equipCode=EVEDL18BZWGJ02
|
||||
materialCode=81035332
|
||||
productType=test
|
||||
GradingMesUrl=http://10.22.167.141/core/api/public/eve/pm/eqm/new/grading
|
||||
ResultProcessMesUrl=http://10.22.167.2/core/api/public/product/process/param/new/result
|
||||
StationArrivalUrl=http://10.22.167.2/core/api/public/formation/section/arrival/bz
|
||||
StationExitUrl=http://10.22.167.2/core/api/public/eve/pm/formation-section/bz
|
||||
NGMessage=不分类,正面(2D/3D),反面(2D/3D),左侧面(2D/3D),右侧面(2D/3D),顶面(2D/3D),底面(2D/3D),底WE2,底WE2,底WE3,底WE4,中ME1,中ME2,中ME3,中ME1,极柱(POS/NEG),防爆阀(PRO),扫码NG,分档NG,其他
|
||||
CCDResultMessage=不分类,NG,OK
|
||||
Grading1=K77
|
||||
Grading2=K77
|
||||
Grading3=K77
|
||||
Grading4=K77
|
||||
Grading5=K77
|
||||
Grading6=K77
|
||||
TensionStrap1=5
|
||||
TensionStrap2=6
|
||||
TensionStrap3=7
|
||||
TensionStrapCCDReslut1=1
|
||||
TensionStrapCCDReslut2=1
|
||||
TensionStrapCCDReslut3=1
|
||||
TensionStrapCCDReslut4=1
|
||||
StartNGFL=0
|
||||
Grading=1
|
||||
MesRequestTime=2
|
||||
LoginTime=10
|
||||
|
||||
[统计计数]
|
||||
ProdAllQty=0
|
||||
ProdOKQty=0
|
||||
ProdSanNgQty=0
|
||||
ProdVolNgQty=0
|
||||
ProdImpNgty=0
|
||||
ProdBvolNgQty=0
|
||||
ProdKvalueNgty=0
|
||||
ProdLenthNgty=0
|
||||
ProdWideNgty=0
|
||||
ProdLMDNgty=0
|
||||
ProdLCDNgty=0
|
||||
ProdThinessNgty=0
|
||||
ProdMESNgty=0
|
||||
@@ -0,0 +1,59 @@
|
||||
[SystemConfig]
|
||||
ComCount=1
|
||||
|
||||
[1#PLCParameter]
|
||||
Index=1
|
||||
IP=192.168.2.50
|
||||
Port=44818
|
||||
JobCount=3
|
||||
HeartBeat=True
|
||||
HeartAddr=W100
|
||||
ScanTime=50
|
||||
Solt=0
|
||||
|
||||
1#ThreadName=ÉÏÁÏ
|
||||
1#RecvAddr=W2000
|
||||
1#RecvType=Short
|
||||
1#WriteAddr=W2020
|
||||
1#WriteType=Short
|
||||
1#TriggerCmd=1
|
||||
1#IsRead=True
|
||||
1#ReadAddr=W2010
|
||||
1#ReadType=Byte
|
||||
1#ReadLength=80
|
||||
|
||||
2#ThreadName=ÏÂÁÏ
|
||||
2#RecvAddr=W3000
|
||||
2#RecvType=Short
|
||||
2#WriteAddr=W3020
|
||||
2#WriteType=Short
|
||||
2#TriggerCmd=1
|
||||
2#IsRead=True
|
||||
2#ReadAddr=W3010
|
||||
2#ReadType=Byte
|
||||
2#ReadLength=118
|
||||
|
||||
3#ThreadName=±¨¾¯
|
||||
3#RecvAddr=W6000
|
||||
3#RecvType=Short
|
||||
3#WriteAddr=W2006
|
||||
3#WriteType=Short
|
||||
3#TriggerCmd=1
|
||||
3#IsRead=True
|
||||
3#ReadAddr=W6100
|
||||
3#ReadType=Byte
|
||||
3#ReadLength=1
|
||||
|
||||
4#ThreadName=Òì³£²¥±¨
|
||||
4#RecvAddr=W7000
|
||||
4#RecvType=Short
|
||||
4#WriteAddr=W7100
|
||||
4#WriteType=Short
|
||||
4#TriggerCmd=1
|
||||
4#IsRead=True
|
||||
4#ReadAddr=W7010
|
||||
4#ReadType=Byte
|
||||
4#ReadLength=1
|
||||
|
||||
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,21 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace JY.Inspection.Entity
|
||||
{
|
||||
public class AlarmStatus
|
||||
{
|
||||
/// <summary>
|
||||
/// 报警地址
|
||||
/// </summary>
|
||||
public string PLCAdress { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 报警状态
|
||||
/// </summary>
|
||||
public bool Status { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,107 @@
|
||||
using JY.Inspection.Common;
|
||||
using JY.Inspection.ViewModel;
|
||||
using JY.Utility;
|
||||
using JYControl;
|
||||
using MetroFramework.Forms;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
|
||||
namespace JY.Inspection.Frm
|
||||
{
|
||||
public partial class FormMesDataSet : MetroForm
|
||||
{
|
||||
private FrmMesSettingVM _viewModel = null;
|
||||
public FormMesDataSet()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
_viewModel = new FrmMesSettingVM();
|
||||
SetDataBindings();
|
||||
}
|
||||
|
||||
#region 数据绑定
|
||||
private void SetDataBindings()
|
||||
{
|
||||
bindingSource1.DataSource = _viewModel;
|
||||
|
||||
tb_productType.DataBindings.Add(new Binding("Text", bindingSource1, "ProductType", true, DataSourceUpdateMode.OnPropertyChanged));
|
||||
tb_StationArrival.DataBindings.Add(new Binding("Text", bindingSource1, "StationArrivalUrl", true, DataSourceUpdateMode.OnPropertyChanged));
|
||||
tb_stationExit.DataBindings.Add(new Binding("Text", bindingSource1, "StationExitUrl", true, DataSourceUpdateMode.OnPropertyChanged));
|
||||
}
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
/// 加载MES配置文件
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void FormMesDataSet_Load(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
txtsiteCode.Text = IniFileHelper.ReadIniData("MES配置", "siteCode");
|
||||
txtlineCode.Text = IniFileHelper.ReadIniData("MES配置", "lineCode");
|
||||
txtequipCode.Text = IniFileHelper.ReadIniData("MES配置", "equipCode");
|
||||
txtmaterialCode.Text = IniFileHelper.ReadIniData("MES配置", "materialCode");
|
||||
_viewModel.ProductType = IniFileHelper.ReadIniData("MES配置", "productType");
|
||||
|
||||
txtGradingMesUrl.Text = IniFileHelper.ReadIniData("MES配置", "GradingMesUrl");
|
||||
txtResultProcessMesUrl.Text = IniFileHelper.ReadIniData("MES配置", "ResultProcessMesUrl");
|
||||
_viewModel.StationArrivalUrl = IniFileHelper.ReadIniData("MES配置", "StationArrivalUrl");
|
||||
_viewModel.StationExitUrl = IniFileHelper.ReadIniData("MES配置", "StationExitUrl");
|
||||
|
||||
LoginTime.Text = IniFileHelper.ReadIniData("MES配置", "LoginTime");
|
||||
txtMesRequestTime.Text = IniFileHelper.ReadIniData("MES配置", "MesRequestTime");
|
||||
|
||||
ckStartZNDB.Checked = IniFileHelper.ReadIniData("MES配置", "StartZNDB") == "1" ? true : false;
|
||||
chkIsMesUP.Checked = IniFileHelper.ReadIniData("SYSTEM_CONFIGURE", "IsMesUP") == "1" ? true : false;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 保存MES配置文件信息
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void btnSave_Click(object sender, EventArgs e)
|
||||
{
|
||||
IniFileHelper.WriteIniData("MES配置", "siteCode", txtsiteCode.Text.Trim());
|
||||
IniFileHelper.WriteIniData("MES配置", "lineCode", txtlineCode.Text.Trim());
|
||||
IniFileHelper.WriteIniData("MES配置", "equipCode", txtequipCode.Text.Trim());
|
||||
IniFileHelper.WriteIniData("MES配置", "materialCode", txtmaterialCode.Text.Trim());
|
||||
IniFileHelper.WriteIniData("MES配置", "productType", _viewModel.ProductType.Trim());
|
||||
|
||||
IniFileHelper.WriteIniData("MES配置", "GradingMesUrl", txtGradingMesUrl.Text.Trim());
|
||||
IniFileHelper.WriteIniData("MES配置", "ResultProcessMesUrl", txtResultProcessMesUrl.Text.Trim());
|
||||
IniFileHelper.WriteIniData("MES配置", "StationArrivalUrl", _viewModel.StationArrivalUrl.Trim());
|
||||
IniFileHelper.WriteIniData("MES配置", "StationExitUrl", _viewModel.StationExitUrl.Trim());
|
||||
|
||||
IniFileHelper.WriteIniData("MES配置", "LoginTime", LoginTime.Text.Trim());
|
||||
LogManagerControl.AddLog($"用户[{Global.systemConfig.userName}]设置权限超时时间[{LoginTime.Text.Trim()}]", LogAddtype.local, Logtype.Warning);
|
||||
IniFileHelper.WriteIniData("MES配置", "MesRequestTime", txtMesRequestTime.Text.Trim());
|
||||
|
||||
IniFileHelper.WriteIniData("MES配置", "StartZNDB", ckStartZNDB.Checked ? "1" : "0");
|
||||
//是否启用MES
|
||||
IniFileHelper.WriteIniData("SYSTEM_CONFIGURE", "IsMesUP", chkIsMesUP.Checked ? "1" : "2");
|
||||
MessageBox.Show("参数保存成功!", "系统提示");
|
||||
this.DialogResult = DialogResult.OK;
|
||||
|
||||
}
|
||||
|
||||
private void btnExit_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.Close();
|
||||
}
|
||||
|
||||
private void linkLabel_editCollectItemCfg_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
|
||||
{
|
||||
System.Diagnostics.Process.Start(Global.CollectItemCfgPath);
|
||||
}
|
||||
}
|
||||
}
|
||||
+713
@@ -0,0 +1,713 @@
|
||||
|
||||
namespace JY.Inspection.Frm
|
||||
{
|
||||
partial class FormMesDataSet
|
||||
{
|
||||
/// <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();
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FormMesDataSet));
|
||||
this.btnExit = new MetroFramework.Controls.MetroButton();
|
||||
this.metroLabel1 = new MetroFramework.Controls.MetroLabel();
|
||||
this.txtlineCode = new MetroFramework.Controls.MetroTextBox();
|
||||
this.btnSave = new MetroFramework.Controls.MetroButton();
|
||||
this.metroLabel3 = new MetroFramework.Controls.MetroLabel();
|
||||
this.txtequipCode = new MetroFramework.Controls.MetroTextBox();
|
||||
this.txtsiteCode = new MetroFramework.Controls.MetroTextBox();
|
||||
this.metroLabel2 = new MetroFramework.Controls.MetroLabel();
|
||||
this.ckStartZNDB = new System.Windows.Forms.CheckBox();
|
||||
this.txtmaterialCode = new MetroFramework.Controls.MetroTextBox();
|
||||
this.metroLabel4 = new MetroFramework.Controls.MetroLabel();
|
||||
this.txtGradingMesUrl = new MetroFramework.Controls.MetroTextBox();
|
||||
this.metroLabel5 = new MetroFramework.Controls.MetroLabel();
|
||||
this.txtResultProcessMesUrl = new MetroFramework.Controls.MetroTextBox();
|
||||
this.metroLabel6 = new MetroFramework.Controls.MetroLabel();
|
||||
this.groupBox1 = new System.Windows.Forms.GroupBox();
|
||||
this.linkLabel_editCollectItemCfg = new System.Windows.Forms.LinkLabel();
|
||||
this.metroLabel21 = new MetroFramework.Controls.MetroLabel();
|
||||
this.LoginTime = new System.Windows.Forms.NumericUpDown();
|
||||
this.metroLabel22 = new MetroFramework.Controls.MetroLabel();
|
||||
this.metroLabel18 = new MetroFramework.Controls.MetroLabel();
|
||||
this.txtMesRequestTime = new System.Windows.Forms.NumericUpDown();
|
||||
this.metroLabel20 = new MetroFramework.Controls.MetroLabel();
|
||||
this.chkIsMesUP = new System.Windows.Forms.CheckBox();
|
||||
this.metroLabel7 = new MetroFramework.Controls.MetroLabel();
|
||||
this.tb_productType = new MetroFramework.Controls.MetroTextBox();
|
||||
this.metroPanel_top = new MetroFramework.Controls.MetroPanel();
|
||||
this.metroPanel_mid = new MetroFramework.Controls.MetroPanel();
|
||||
this.metroPanel_bottom = new MetroFramework.Controls.MetroPanel();
|
||||
this.metroLabel8 = new MetroFramework.Controls.MetroLabel();
|
||||
this.tb_StationArrival = new MetroFramework.Controls.MetroTextBox();
|
||||
this.metroLabel9 = new MetroFramework.Controls.MetroLabel();
|
||||
this.tb_stationExit = new MetroFramework.Controls.MetroTextBox();
|
||||
this.bindingSource1 = new System.Windows.Forms.BindingSource(this.components);
|
||||
this.groupBox1.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.LoginTime)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.txtMesRequestTime)).BeginInit();
|
||||
this.metroPanel_top.SuspendLayout();
|
||||
this.metroPanel_mid.SuspendLayout();
|
||||
this.metroPanel_bottom.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// btnExit
|
||||
//
|
||||
this.btnExit.Location = new System.Drawing.Point(484, 40);
|
||||
this.btnExit.Name = "btnExit";
|
||||
this.btnExit.Size = new System.Drawing.Size(103, 37);
|
||||
this.btnExit.TabIndex = 13;
|
||||
this.btnExit.Text = "退出";
|
||||
this.btnExit.UseSelectable = true;
|
||||
this.btnExit.Click += new System.EventHandler(this.btnExit_Click);
|
||||
//
|
||||
// metroLabel1
|
||||
//
|
||||
this.metroLabel1.AutoSize = true;
|
||||
this.metroLabel1.Location = new System.Drawing.Point(33, 53);
|
||||
this.metroLabel1.Name = "metroLabel1";
|
||||
this.metroLabel1.Size = new System.Drawing.Size(79, 19);
|
||||
this.metroLabel1.TabIndex = 12;
|
||||
this.metroLabel1.Text = "产线名称:";
|
||||
//
|
||||
// txtlineCode
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
this.txtlineCode.CustomButton.Image = null;
|
||||
this.txtlineCode.CustomButton.Location = new System.Drawing.Point(123, 1);
|
||||
this.txtlineCode.CustomButton.Name = "";
|
||||
this.txtlineCode.CustomButton.Size = new System.Drawing.Size(16, 17);
|
||||
this.txtlineCode.CustomButton.Style = MetroFramework.MetroColorStyle.Blue;
|
||||
this.txtlineCode.CustomButton.TabIndex = 1;
|
||||
this.txtlineCode.CustomButton.Theme = MetroFramework.MetroThemeStyle.Light;
|
||||
this.txtlineCode.CustomButton.UseSelectable = true;
|
||||
this.txtlineCode.CustomButton.Visible = false;
|
||||
this.txtlineCode.Lines = new string[0];
|
||||
this.txtlineCode.Location = new System.Drawing.Point(118, 53);
|
||||
this.txtlineCode.MaxLength = 32767;
|
||||
this.txtlineCode.Name = "txtlineCode";
|
||||
this.txtlineCode.PasswordChar = '\0';
|
||||
this.txtlineCode.ScrollBars = System.Windows.Forms.ScrollBars.None;
|
||||
this.txtlineCode.SelectedText = "";
|
||||
this.txtlineCode.SelectionLength = 0;
|
||||
this.txtlineCode.SelectionStart = 0;
|
||||
this.txtlineCode.ShortcutsEnabled = true;
|
||||
this.txtlineCode.Size = new System.Drawing.Size(186, 23);
|
||||
this.txtlineCode.TabIndex = 11;
|
||||
this.txtlineCode.UseSelectable = true;
|
||||
this.txtlineCode.WaterMarkColor = System.Drawing.Color.FromArgb(((int)(((byte)(109)))), ((int)(((byte)(109)))), ((int)(((byte)(109)))));
|
||||
this.txtlineCode.WaterMarkFont = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Pixel);
|
||||
//
|
||||
// btnSave
|
||||
//
|
||||
this.btnSave.Location = new System.Drawing.Point(68, 40);
|
||||
this.btnSave.Name = "btnSave";
|
||||
this.btnSave.Size = new System.Drawing.Size(112, 37);
|
||||
this.btnSave.TabIndex = 10;
|
||||
this.btnSave.Text = "保存";
|
||||
this.btnSave.UseSelectable = true;
|
||||
this.btnSave.Click += new System.EventHandler(this.btnSave_Click);
|
||||
//
|
||||
// metroLabel3
|
||||
//
|
||||
this.metroLabel3.AutoSize = true;
|
||||
this.metroLabel3.Location = new System.Drawing.Point(33, 92);
|
||||
this.metroLabel3.Name = "metroLabel3";
|
||||
this.metroLabel3.Size = new System.Drawing.Size(79, 19);
|
||||
this.metroLabel3.TabIndex = 25;
|
||||
this.metroLabel3.Text = "设备编码:";
|
||||
//
|
||||
// txtequipCode
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
this.txtequipCode.CustomButton.Image = null;
|
||||
this.txtequipCode.CustomButton.Location = new System.Drawing.Point(123, 1);
|
||||
this.txtequipCode.CustomButton.Name = "";
|
||||
this.txtequipCode.CustomButton.Size = new System.Drawing.Size(16, 17);
|
||||
this.txtequipCode.CustomButton.Style = MetroFramework.MetroColorStyle.Blue;
|
||||
this.txtequipCode.CustomButton.TabIndex = 1;
|
||||
this.txtequipCode.CustomButton.Theme = MetroFramework.MetroThemeStyle.Light;
|
||||
this.txtequipCode.CustomButton.UseSelectable = true;
|
||||
this.txtequipCode.CustomButton.Visible = false;
|
||||
this.txtequipCode.Lines = new string[0];
|
||||
this.txtequipCode.Location = new System.Drawing.Point(118, 88);
|
||||
this.txtequipCode.MaxLength = 32767;
|
||||
this.txtequipCode.Name = "txtequipCode";
|
||||
this.txtequipCode.PasswordChar = '\0';
|
||||
this.txtequipCode.ScrollBars = System.Windows.Forms.ScrollBars.None;
|
||||
this.txtequipCode.SelectedText = "";
|
||||
this.txtequipCode.SelectionLength = 0;
|
||||
this.txtequipCode.SelectionStart = 0;
|
||||
this.txtequipCode.ShortcutsEnabled = true;
|
||||
this.txtequipCode.Size = new System.Drawing.Size(186, 23);
|
||||
this.txtequipCode.TabIndex = 26;
|
||||
this.txtequipCode.UseSelectable = true;
|
||||
this.txtequipCode.WaterMarkColor = System.Drawing.Color.FromArgb(((int)(((byte)(109)))), ((int)(((byte)(109)))), ((int)(((byte)(109)))));
|
||||
this.txtequipCode.WaterMarkFont = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Pixel);
|
||||
//
|
||||
// txtsiteCode
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
this.txtsiteCode.CustomButton.Image = null;
|
||||
this.txtsiteCode.CustomButton.Location = new System.Drawing.Point(123, 1);
|
||||
this.txtsiteCode.CustomButton.Name = "";
|
||||
this.txtsiteCode.CustomButton.Size = new System.Drawing.Size(16, 17);
|
||||
this.txtsiteCode.CustomButton.Style = MetroFramework.MetroColorStyle.Blue;
|
||||
this.txtsiteCode.CustomButton.TabIndex = 1;
|
||||
this.txtsiteCode.CustomButton.Theme = MetroFramework.MetroThemeStyle.Light;
|
||||
this.txtsiteCode.CustomButton.UseSelectable = true;
|
||||
this.txtsiteCode.CustomButton.Visible = false;
|
||||
this.txtsiteCode.Lines = new string[0];
|
||||
this.txtsiteCode.Location = new System.Drawing.Point(118, 15);
|
||||
this.txtsiteCode.MaxLength = 32767;
|
||||
this.txtsiteCode.Name = "txtsiteCode";
|
||||
this.txtsiteCode.PasswordChar = '\0';
|
||||
this.txtsiteCode.ScrollBars = System.Windows.Forms.ScrollBars.None;
|
||||
this.txtsiteCode.SelectedText = "";
|
||||
this.txtsiteCode.SelectionLength = 0;
|
||||
this.txtsiteCode.SelectionStart = 0;
|
||||
this.txtsiteCode.ShortcutsEnabled = true;
|
||||
this.txtsiteCode.Size = new System.Drawing.Size(186, 23);
|
||||
this.txtsiteCode.TabIndex = 28;
|
||||
this.txtsiteCode.UseSelectable = true;
|
||||
this.txtsiteCode.WaterMarkColor = System.Drawing.Color.FromArgb(((int)(((byte)(109)))), ((int)(((byte)(109)))), ((int)(((byte)(109)))));
|
||||
this.txtsiteCode.WaterMarkFont = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Pixel);
|
||||
//
|
||||
// metroLabel2
|
||||
//
|
||||
this.metroLabel2.AutoSize = true;
|
||||
this.metroLabel2.Location = new System.Drawing.Point(33, 15);
|
||||
this.metroLabel2.Name = "metroLabel2";
|
||||
this.metroLabel2.Size = new System.Drawing.Size(79, 19);
|
||||
this.metroLabel2.TabIndex = 27;
|
||||
this.metroLabel2.Text = "工厂代码:";
|
||||
//
|
||||
// ckStartZNDB
|
||||
//
|
||||
this.ckStartZNDB.AutoSize = true;
|
||||
this.ckStartZNDB.Location = new System.Drawing.Point(68, 6);
|
||||
this.ckStartZNDB.Name = "ckStartZNDB";
|
||||
this.ckStartZNDB.Size = new System.Drawing.Size(96, 16);
|
||||
this.ckStartZNDB.TabIndex = 29;
|
||||
this.ckStartZNDB.Text = "开启智能电表";
|
||||
this.ckStartZNDB.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// txtmaterialCode
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
this.txtmaterialCode.CustomButton.Image = null;
|
||||
this.txtmaterialCode.CustomButton.Location = new System.Drawing.Point(123, 1);
|
||||
this.txtmaterialCode.CustomButton.Name = "";
|
||||
this.txtmaterialCode.CustomButton.Size = new System.Drawing.Size(16, 17);
|
||||
this.txtmaterialCode.CustomButton.Style = MetroFramework.MetroColorStyle.Blue;
|
||||
this.txtmaterialCode.CustomButton.TabIndex = 1;
|
||||
this.txtmaterialCode.CustomButton.Theme = MetroFramework.MetroThemeStyle.Light;
|
||||
this.txtmaterialCode.CustomButton.UseSelectable = true;
|
||||
this.txtmaterialCode.CustomButton.Visible = false;
|
||||
this.txtmaterialCode.Lines = new string[0];
|
||||
this.txtmaterialCode.Location = new System.Drawing.Point(118, 129);
|
||||
this.txtmaterialCode.MaxLength = 32767;
|
||||
this.txtmaterialCode.Name = "txtmaterialCode";
|
||||
this.txtmaterialCode.PasswordChar = '\0';
|
||||
this.txtmaterialCode.ScrollBars = System.Windows.Forms.ScrollBars.None;
|
||||
this.txtmaterialCode.SelectedText = "";
|
||||
this.txtmaterialCode.SelectionLength = 0;
|
||||
this.txtmaterialCode.SelectionStart = 0;
|
||||
this.txtmaterialCode.ShortcutsEnabled = true;
|
||||
this.txtmaterialCode.Size = new System.Drawing.Size(186, 23);
|
||||
this.txtmaterialCode.TabIndex = 31;
|
||||
this.txtmaterialCode.UseSelectable = true;
|
||||
this.txtmaterialCode.WaterMarkColor = System.Drawing.Color.FromArgb(((int)(((byte)(109)))), ((int)(((byte)(109)))), ((int)(((byte)(109)))));
|
||||
this.txtmaterialCode.WaterMarkFont = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Pixel);
|
||||
//
|
||||
// metroLabel4
|
||||
//
|
||||
this.metroLabel4.AutoSize = true;
|
||||
this.metroLabel4.Location = new System.Drawing.Point(33, 127);
|
||||
this.metroLabel4.Name = "metroLabel4";
|
||||
this.metroLabel4.Size = new System.Drawing.Size(79, 19);
|
||||
this.metroLabel4.TabIndex = 30;
|
||||
this.metroLabel4.Text = "物料编码:";
|
||||
//
|
||||
// txtGradingMesUrl
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
this.txtGradingMesUrl.CustomButton.Image = null;
|
||||
this.txtGradingMesUrl.CustomButton.Location = new System.Drawing.Point(376, 1);
|
||||
this.txtGradingMesUrl.CustomButton.Name = "";
|
||||
this.txtGradingMesUrl.CustomButton.Size = new System.Drawing.Size(16, 17);
|
||||
this.txtGradingMesUrl.CustomButton.Style = MetroFramework.MetroColorStyle.Blue;
|
||||
this.txtGradingMesUrl.CustomButton.TabIndex = 1;
|
||||
this.txtGradingMesUrl.CustomButton.Theme = MetroFramework.MetroThemeStyle.Light;
|
||||
this.txtGradingMesUrl.CustomButton.UseSelectable = true;
|
||||
this.txtGradingMesUrl.CustomButton.Visible = false;
|
||||
this.txtGradingMesUrl.Lines = new string[0];
|
||||
this.txtGradingMesUrl.Location = new System.Drawing.Point(176, 177);
|
||||
this.txtGradingMesUrl.MaxLength = 32767;
|
||||
this.txtGradingMesUrl.Name = "txtGradingMesUrl";
|
||||
this.txtGradingMesUrl.PasswordChar = '\0';
|
||||
this.txtGradingMesUrl.ScrollBars = System.Windows.Forms.ScrollBars.None;
|
||||
this.txtGradingMesUrl.SelectedText = "";
|
||||
this.txtGradingMesUrl.SelectionLength = 0;
|
||||
this.txtGradingMesUrl.SelectionStart = 0;
|
||||
this.txtGradingMesUrl.ShortcutsEnabled = true;
|
||||
this.txtGradingMesUrl.Size = new System.Drawing.Size(524, 23);
|
||||
this.txtGradingMesUrl.TabIndex = 33;
|
||||
this.txtGradingMesUrl.UseSelectable = true;
|
||||
this.txtGradingMesUrl.WaterMarkColor = System.Drawing.Color.FromArgb(((int)(((byte)(109)))), ((int)(((byte)(109)))), ((int)(((byte)(109)))));
|
||||
this.txtGradingMesUrl.WaterMarkFont = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Pixel);
|
||||
//
|
||||
// metroLabel5
|
||||
//
|
||||
this.metroLabel5.AutoSize = true;
|
||||
this.metroLabel5.Location = new System.Drawing.Point(29, 177);
|
||||
this.metroLabel5.Name = "metroLabel5";
|
||||
this.metroLabel5.Size = new System.Drawing.Size(135, 19);
|
||||
this.metroLabel5.TabIndex = 32;
|
||||
this.metroLabel5.Text = "分档查询接口地址:";
|
||||
//
|
||||
// txtResultProcessMesUrl
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
this.txtResultProcessMesUrl.CustomButton.Image = null;
|
||||
this.txtResultProcessMesUrl.CustomButton.Location = new System.Drawing.Point(376, 1);
|
||||
this.txtResultProcessMesUrl.CustomButton.Name = "";
|
||||
this.txtResultProcessMesUrl.CustomButton.Size = new System.Drawing.Size(16, 17);
|
||||
this.txtResultProcessMesUrl.CustomButton.Style = MetroFramework.MetroColorStyle.Blue;
|
||||
this.txtResultProcessMesUrl.CustomButton.TabIndex = 1;
|
||||
this.txtResultProcessMesUrl.CustomButton.Theme = MetroFramework.MetroThemeStyle.Light;
|
||||
this.txtResultProcessMesUrl.CustomButton.UseSelectable = true;
|
||||
this.txtResultProcessMesUrl.CustomButton.Visible = false;
|
||||
this.txtResultProcessMesUrl.Lines = new string[0];
|
||||
this.txtResultProcessMesUrl.Location = new System.Drawing.Point(176, 214);
|
||||
this.txtResultProcessMesUrl.MaxLength = 32767;
|
||||
this.txtResultProcessMesUrl.Name = "txtResultProcessMesUrl";
|
||||
this.txtResultProcessMesUrl.PasswordChar = '\0';
|
||||
this.txtResultProcessMesUrl.ScrollBars = System.Windows.Forms.ScrollBars.None;
|
||||
this.txtResultProcessMesUrl.SelectedText = "";
|
||||
this.txtResultProcessMesUrl.SelectionLength = 0;
|
||||
this.txtResultProcessMesUrl.SelectionStart = 0;
|
||||
this.txtResultProcessMesUrl.ShortcutsEnabled = true;
|
||||
this.txtResultProcessMesUrl.Size = new System.Drawing.Size(524, 23);
|
||||
this.txtResultProcessMesUrl.TabIndex = 35;
|
||||
this.txtResultProcessMesUrl.UseSelectable = true;
|
||||
this.txtResultProcessMesUrl.WaterMarkColor = System.Drawing.Color.FromArgb(((int)(((byte)(109)))), ((int)(((byte)(109)))), ((int)(((byte)(109)))));
|
||||
this.txtResultProcessMesUrl.WaterMarkFont = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Pixel);
|
||||
//
|
||||
// metroLabel6
|
||||
//
|
||||
this.metroLabel6.AutoSize = true;
|
||||
this.metroLabel6.Location = new System.Drawing.Point(3, 214);
|
||||
this.metroLabel6.Name = "metroLabel6";
|
||||
this.metroLabel6.Size = new System.Drawing.Size(163, 19);
|
||||
this.metroLabel6.TabIndex = 34;
|
||||
this.metroLabel6.Text = "结果加工参数接口地址:";
|
||||
//
|
||||
// groupBox1
|
||||
//
|
||||
this.groupBox1.Controls.Add(this.metroPanel_top);
|
||||
this.groupBox1.Controls.Add(this.metroPanel_mid);
|
||||
this.groupBox1.Controls.Add(this.metroPanel_bottom);
|
||||
this.groupBox1.Location = new System.Drawing.Point(23, 63);
|
||||
this.groupBox1.Name = "groupBox1";
|
||||
this.groupBox1.Size = new System.Drawing.Size(719, 492);
|
||||
this.groupBox1.TabIndex = 36;
|
||||
this.groupBox1.TabStop = false;
|
||||
this.groupBox1.Text = "MES配置";
|
||||
//
|
||||
// linkLabel_editCollectItemCfg
|
||||
//
|
||||
this.linkLabel_editCollectItemCfg.AutoSize = true;
|
||||
this.linkLabel_editCollectItemCfg.Location = new System.Drawing.Point(482, 7);
|
||||
this.linkLabel_editCollectItemCfg.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
|
||||
this.linkLabel_editCollectItemCfg.Name = "linkLabel_editCollectItemCfg";
|
||||
this.linkLabel_editCollectItemCfg.Size = new System.Drawing.Size(101, 12);
|
||||
this.linkLabel_editCollectItemCfg.TabIndex = 182;
|
||||
this.linkLabel_editCollectItemCfg.TabStop = true;
|
||||
this.linkLabel_editCollectItemCfg.Text = "配置采集项参照表";
|
||||
this.linkLabel_editCollectItemCfg.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabel_editCollectItemCfg_LinkClicked);
|
||||
//
|
||||
// metroLabel21
|
||||
//
|
||||
this.metroLabel21.AutoSize = true;
|
||||
this.metroLabel21.Location = new System.Drawing.Point(573, 127);
|
||||
this.metroLabel21.Name = "metroLabel21";
|
||||
this.metroLabel21.Size = new System.Drawing.Size(31, 19);
|
||||
this.metroLabel21.TabIndex = 180;
|
||||
this.metroLabel21.Text = "min";
|
||||
this.metroLabel21.Visible = false;
|
||||
//
|
||||
// LoginTime
|
||||
//
|
||||
this.LoginTime.Location = new System.Drawing.Point(491, 127);
|
||||
this.LoginTime.Maximum = new decimal(new int[] {
|
||||
1000,
|
||||
0,
|
||||
0,
|
||||
0});
|
||||
this.LoginTime.Name = "LoginTime";
|
||||
this.LoginTime.Size = new System.Drawing.Size(76, 21);
|
||||
this.LoginTime.TabIndex = 179;
|
||||
this.LoginTime.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
|
||||
this.LoginTime.Value = new decimal(new int[] {
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
0});
|
||||
this.LoginTime.Visible = false;
|
||||
//
|
||||
// metroLabel22
|
||||
//
|
||||
this.metroLabel22.AutoSize = true;
|
||||
this.metroLabel22.Location = new System.Drawing.Point(378, 127);
|
||||
this.metroLabel22.Name = "metroLabel22";
|
||||
this.metroLabel22.Size = new System.Drawing.Size(107, 19);
|
||||
this.metroLabel22.TabIndex = 176;
|
||||
this.metroLabel22.Text = "权限登录时长:";
|
||||
this.metroLabel22.Visible = false;
|
||||
//
|
||||
// metroLabel18
|
||||
//
|
||||
this.metroLabel18.AutoSize = true;
|
||||
this.metroLabel18.Location = new System.Drawing.Point(573, 53);
|
||||
this.metroLabel18.Name = "metroLabel18";
|
||||
this.metroLabel18.Size = new System.Drawing.Size(14, 19);
|
||||
this.metroLabel18.TabIndex = 97;
|
||||
this.metroLabel18.Text = "s";
|
||||
//
|
||||
// txtMesRequestTime
|
||||
//
|
||||
this.txtMesRequestTime.DecimalPlaces = 1;
|
||||
this.txtMesRequestTime.Increment = new decimal(new int[] {
|
||||
5,
|
||||
0,
|
||||
0,
|
||||
65536});
|
||||
this.txtMesRequestTime.Location = new System.Drawing.Point(491, 53);
|
||||
this.txtMesRequestTime.Maximum = new decimal(new int[] {
|
||||
1000,
|
||||
0,
|
||||
0,
|
||||
0});
|
||||
this.txtMesRequestTime.Minimum = new decimal(new int[] {
|
||||
5,
|
||||
0,
|
||||
0,
|
||||
65536});
|
||||
this.txtMesRequestTime.Name = "txtMesRequestTime";
|
||||
this.txtMesRequestTime.Size = new System.Drawing.Size(76, 21);
|
||||
this.txtMesRequestTime.TabIndex = 96;
|
||||
this.txtMesRequestTime.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
|
||||
this.txtMesRequestTime.Value = new decimal(new int[] {
|
||||
5,
|
||||
0,
|
||||
0,
|
||||
65536});
|
||||
//
|
||||
// metroLabel20
|
||||
//
|
||||
this.metroLabel20.AutoSize = true;
|
||||
this.metroLabel20.Location = new System.Drawing.Point(352, 53);
|
||||
this.metroLabel20.Name = "metroLabel20";
|
||||
this.metroLabel20.Size = new System.Drawing.Size(133, 19);
|
||||
this.metroLabel20.TabIndex = 49;
|
||||
this.metroLabel20.Text = "请求MES超时时长:";
|
||||
//
|
||||
// chkIsMesUP
|
||||
//
|
||||
this.chkIsMesUP.AutoSize = true;
|
||||
this.chkIsMesUP.Enabled = false;
|
||||
this.chkIsMesUP.Location = new System.Drawing.Point(279, 6);
|
||||
this.chkIsMesUP.Name = "chkIsMesUP";
|
||||
this.chkIsMesUP.Size = new System.Drawing.Size(90, 16);
|
||||
this.chkIsMesUP.TabIndex = 36;
|
||||
this.chkIsMesUP.Text = "开启MES模式";
|
||||
this.chkIsMesUP.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// metroLabel7
|
||||
//
|
||||
this.metroLabel7.AutoSize = true;
|
||||
this.metroLabel7.Location = new System.Drawing.Point(406, 15);
|
||||
this.metroLabel7.Name = "metroLabel7";
|
||||
this.metroLabel7.Size = new System.Drawing.Size(79, 19);
|
||||
this.metroLabel7.TabIndex = 183;
|
||||
this.metroLabel7.Text = "产品类型:";
|
||||
//
|
||||
// tb_productType
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
this.tb_productType.CustomButton.Image = null;
|
||||
this.tb_productType.CustomButton.Location = new System.Drawing.Point(164, 1);
|
||||
this.tb_productType.CustomButton.Name = "";
|
||||
this.tb_productType.CustomButton.Size = new System.Drawing.Size(21, 21);
|
||||
this.tb_productType.CustomButton.Style = MetroFramework.MetroColorStyle.Blue;
|
||||
this.tb_productType.CustomButton.TabIndex = 1;
|
||||
this.tb_productType.CustomButton.Theme = MetroFramework.MetroThemeStyle.Light;
|
||||
this.tb_productType.CustomButton.UseSelectable = true;
|
||||
this.tb_productType.CustomButton.Visible = false;
|
||||
this.tb_productType.Lines = new string[0];
|
||||
this.tb_productType.Location = new System.Drawing.Point(491, 15);
|
||||
this.tb_productType.MaxLength = 32767;
|
||||
this.tb_productType.Name = "tb_productType";
|
||||
this.tb_productType.PasswordChar = '\0';
|
||||
this.tb_productType.ScrollBars = System.Windows.Forms.ScrollBars.None;
|
||||
this.tb_productType.SelectedText = "";
|
||||
this.tb_productType.SelectionLength = 0;
|
||||
this.tb_productType.SelectionStart = 0;
|
||||
this.tb_productType.ShortcutsEnabled = true;
|
||||
this.tb_productType.Size = new System.Drawing.Size(186, 23);
|
||||
this.tb_productType.TabIndex = 184;
|
||||
this.tb_productType.UseSelectable = true;
|
||||
this.tb_productType.WaterMarkColor = System.Drawing.Color.FromArgb(((int)(((byte)(109)))), ((int)(((byte)(109)))), ((int)(((byte)(109)))));
|
||||
this.tb_productType.WaterMarkFont = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Pixel);
|
||||
//
|
||||
// metroPanel_top
|
||||
//
|
||||
this.metroPanel_top.Controls.Add(this.tb_productType);
|
||||
this.metroPanel_top.Controls.Add(this.metroLabel18);
|
||||
this.metroPanel_top.Controls.Add(this.metroLabel21);
|
||||
this.metroPanel_top.Controls.Add(this.metroLabel7);
|
||||
this.metroPanel_top.Controls.Add(this.LoginTime);
|
||||
this.metroPanel_top.Controls.Add(this.txtMesRequestTime);
|
||||
this.metroPanel_top.Controls.Add(this.metroLabel2);
|
||||
this.metroPanel_top.Controls.Add(this.metroLabel22);
|
||||
this.metroPanel_top.Controls.Add(this.metroLabel1);
|
||||
this.metroPanel_top.Controls.Add(this.metroLabel3);
|
||||
this.metroPanel_top.Controls.Add(this.metroLabel4);
|
||||
this.metroPanel_top.Controls.Add(this.metroLabel20);
|
||||
this.metroPanel_top.Controls.Add(this.txtsiteCode);
|
||||
this.metroPanel_top.Controls.Add(this.txtlineCode);
|
||||
this.metroPanel_top.Controls.Add(this.txtequipCode);
|
||||
this.metroPanel_top.Controls.Add(this.txtmaterialCode);
|
||||
this.metroPanel_top.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this.metroPanel_top.HorizontalScrollbarBarColor = true;
|
||||
this.metroPanel_top.HorizontalScrollbarHighlightOnWheel = false;
|
||||
this.metroPanel_top.HorizontalScrollbarSize = 10;
|
||||
this.metroPanel_top.Location = new System.Drawing.Point(3, 17);
|
||||
this.metroPanel_top.Name = "metroPanel_top";
|
||||
this.metroPanel_top.Size = new System.Drawing.Size(713, 163);
|
||||
this.metroPanel_top.TabIndex = 185;
|
||||
this.metroPanel_top.VerticalScrollbarBarColor = true;
|
||||
this.metroPanel_top.VerticalScrollbarHighlightOnWheel = false;
|
||||
this.metroPanel_top.VerticalScrollbarSize = 10;
|
||||
//
|
||||
// metroPanel_mid
|
||||
//
|
||||
this.metroPanel_mid.Controls.Add(this.tb_stationExit);
|
||||
this.metroPanel_mid.Controls.Add(this.metroLabel9);
|
||||
this.metroPanel_mid.Controls.Add(this.tb_StationArrival);
|
||||
this.metroPanel_mid.Controls.Add(this.metroLabel8);
|
||||
this.metroPanel_mid.Controls.Add(this.txtResultProcessMesUrl);
|
||||
this.metroPanel_mid.Controls.Add(this.txtGradingMesUrl);
|
||||
this.metroPanel_mid.Controls.Add(this.metroLabel6);
|
||||
this.metroPanel_mid.Controls.Add(this.metroLabel5);
|
||||
this.metroPanel_mid.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.metroPanel_mid.HorizontalScrollbarBarColor = true;
|
||||
this.metroPanel_mid.HorizontalScrollbarHighlightOnWheel = false;
|
||||
this.metroPanel_mid.HorizontalScrollbarSize = 10;
|
||||
this.metroPanel_mid.Location = new System.Drawing.Point(3, 17);
|
||||
this.metroPanel_mid.Name = "metroPanel_mid";
|
||||
this.metroPanel_mid.Size = new System.Drawing.Size(713, 379);
|
||||
this.metroPanel_mid.TabIndex = 186;
|
||||
this.metroPanel_mid.VerticalScrollbarBarColor = true;
|
||||
this.metroPanel_mid.VerticalScrollbarHighlightOnWheel = false;
|
||||
this.metroPanel_mid.VerticalScrollbarSize = 10;
|
||||
//
|
||||
// metroPanel_bottom
|
||||
//
|
||||
this.metroPanel_bottom.Controls.Add(this.linkLabel_editCollectItemCfg);
|
||||
this.metroPanel_bottom.Controls.Add(this.ckStartZNDB);
|
||||
this.metroPanel_bottom.Controls.Add(this.chkIsMesUP);
|
||||
this.metroPanel_bottom.Controls.Add(this.btnSave);
|
||||
this.metroPanel_bottom.Controls.Add(this.btnExit);
|
||||
this.metroPanel_bottom.Dock = System.Windows.Forms.DockStyle.Bottom;
|
||||
this.metroPanel_bottom.HorizontalScrollbarBarColor = true;
|
||||
this.metroPanel_bottom.HorizontalScrollbarHighlightOnWheel = false;
|
||||
this.metroPanel_bottom.HorizontalScrollbarSize = 10;
|
||||
this.metroPanel_bottom.Location = new System.Drawing.Point(3, 396);
|
||||
this.metroPanel_bottom.Name = "metroPanel_bottom";
|
||||
this.metroPanel_bottom.Size = new System.Drawing.Size(713, 93);
|
||||
this.metroPanel_bottom.TabIndex = 187;
|
||||
this.metroPanel_bottom.VerticalScrollbarBarColor = true;
|
||||
this.metroPanel_bottom.VerticalScrollbarHighlightOnWheel = false;
|
||||
this.metroPanel_bottom.VerticalScrollbarSize = 10;
|
||||
//
|
||||
// metroLabel8
|
||||
//
|
||||
this.metroLabel8.AutoSize = true;
|
||||
this.metroLabel8.Location = new System.Drawing.Point(29, 250);
|
||||
this.metroLabel8.Name = "metroLabel8";
|
||||
this.metroLabel8.Size = new System.Drawing.Size(135, 19);
|
||||
this.metroLabel8.TabIndex = 36;
|
||||
this.metroLabel8.Text = "产品进站接口地址:";
|
||||
//
|
||||
// tb_StationArrival
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
this.tb_StationArrival.CustomButton.Image = null;
|
||||
this.tb_StationArrival.CustomButton.Location = new System.Drawing.Point(502, 1);
|
||||
this.tb_StationArrival.CustomButton.Name = "";
|
||||
this.tb_StationArrival.CustomButton.Size = new System.Drawing.Size(21, 21);
|
||||
this.tb_StationArrival.CustomButton.Style = MetroFramework.MetroColorStyle.Blue;
|
||||
this.tb_StationArrival.CustomButton.TabIndex = 1;
|
||||
this.tb_StationArrival.CustomButton.Theme = MetroFramework.MetroThemeStyle.Light;
|
||||
this.tb_StationArrival.CustomButton.UseSelectable = true;
|
||||
this.tb_StationArrival.CustomButton.Visible = false;
|
||||
this.tb_StationArrival.Lines = new string[0];
|
||||
this.tb_StationArrival.Location = new System.Drawing.Point(176, 250);
|
||||
this.tb_StationArrival.MaxLength = 32767;
|
||||
this.tb_StationArrival.Name = "tb_StationArrival";
|
||||
this.tb_StationArrival.PasswordChar = '\0';
|
||||
this.tb_StationArrival.ScrollBars = System.Windows.Forms.ScrollBars.None;
|
||||
this.tb_StationArrival.SelectedText = "";
|
||||
this.tb_StationArrival.SelectionLength = 0;
|
||||
this.tb_StationArrival.SelectionStart = 0;
|
||||
this.tb_StationArrival.ShortcutsEnabled = true;
|
||||
this.tb_StationArrival.Size = new System.Drawing.Size(524, 23);
|
||||
this.tb_StationArrival.TabIndex = 37;
|
||||
this.tb_StationArrival.UseSelectable = true;
|
||||
this.tb_StationArrival.WaterMarkColor = System.Drawing.Color.FromArgb(((int)(((byte)(109)))), ((int)(((byte)(109)))), ((int)(((byte)(109)))));
|
||||
this.tb_StationArrival.WaterMarkFont = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Pixel);
|
||||
//
|
||||
// metroLabel9
|
||||
//
|
||||
this.metroLabel9.AutoSize = true;
|
||||
this.metroLabel9.Location = new System.Drawing.Point(29, 283);
|
||||
this.metroLabel9.Name = "metroLabel9";
|
||||
this.metroLabel9.Size = new System.Drawing.Size(135, 19);
|
||||
this.metroLabel9.TabIndex = 38;
|
||||
this.metroLabel9.Text = "产品出站接口地址:";
|
||||
//
|
||||
// tb_stationExit
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
this.tb_stationExit.CustomButton.Image = null;
|
||||
this.tb_stationExit.CustomButton.Location = new System.Drawing.Point(502, 1);
|
||||
this.tb_stationExit.CustomButton.Name = "";
|
||||
this.tb_stationExit.CustomButton.Size = new System.Drawing.Size(21, 21);
|
||||
this.tb_stationExit.CustomButton.Style = MetroFramework.MetroColorStyle.Blue;
|
||||
this.tb_stationExit.CustomButton.TabIndex = 1;
|
||||
this.tb_stationExit.CustomButton.Theme = MetroFramework.MetroThemeStyle.Light;
|
||||
this.tb_stationExit.CustomButton.UseSelectable = true;
|
||||
this.tb_stationExit.CustomButton.Visible = false;
|
||||
this.tb_stationExit.Lines = new string[0];
|
||||
this.tb_stationExit.Location = new System.Drawing.Point(176, 283);
|
||||
this.tb_stationExit.MaxLength = 32767;
|
||||
this.tb_stationExit.Name = "tb_stationExit";
|
||||
this.tb_stationExit.PasswordChar = '\0';
|
||||
this.tb_stationExit.ScrollBars = System.Windows.Forms.ScrollBars.None;
|
||||
this.tb_stationExit.SelectedText = "";
|
||||
this.tb_stationExit.SelectionLength = 0;
|
||||
this.tb_stationExit.SelectionStart = 0;
|
||||
this.tb_stationExit.ShortcutsEnabled = true;
|
||||
this.tb_stationExit.Size = new System.Drawing.Size(524, 23);
|
||||
this.tb_stationExit.TabIndex = 39;
|
||||
this.tb_stationExit.UseSelectable = true;
|
||||
this.tb_stationExit.WaterMarkColor = System.Drawing.Color.FromArgb(((int)(((byte)(109)))), ((int)(((byte)(109)))), ((int)(((byte)(109)))));
|
||||
this.tb_stationExit.WaterMarkFont = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Pixel);
|
||||
//
|
||||
// FormMesDataSet
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(763, 578);
|
||||
this.Controls.Add(this.groupBox1);
|
||||
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||||
this.MaximizeBox = false;
|
||||
this.MinimizeBox = false;
|
||||
this.Name = "FormMesDataSet";
|
||||
this.Resizable = false;
|
||||
this.Text = "系统参数设置";
|
||||
this.Load += new System.EventHandler(this.FormMesDataSet_Load);
|
||||
this.groupBox1.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.LoginTime)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.txtMesRequestTime)).EndInit();
|
||||
this.metroPanel_top.ResumeLayout(false);
|
||||
this.metroPanel_top.PerformLayout();
|
||||
this.metroPanel_mid.ResumeLayout(false);
|
||||
this.metroPanel_mid.PerformLayout();
|
||||
this.metroPanel_bottom.ResumeLayout(false);
|
||||
this.metroPanel_bottom.PerformLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
private MetroFramework.Controls.MetroButton btnExit;
|
||||
private MetroFramework.Controls.MetroLabel metroLabel1;
|
||||
private MetroFramework.Controls.MetroTextBox txtlineCode;
|
||||
private MetroFramework.Controls.MetroButton btnSave;
|
||||
private MetroFramework.Controls.MetroLabel metroLabel3;
|
||||
private MetroFramework.Controls.MetroTextBox txtequipCode;
|
||||
private MetroFramework.Controls.MetroTextBox txtsiteCode;
|
||||
private MetroFramework.Controls.MetroLabel metroLabel2;
|
||||
private System.Windows.Forms.CheckBox ckStartZNDB;
|
||||
private MetroFramework.Controls.MetroTextBox txtmaterialCode;
|
||||
private MetroFramework.Controls.MetroLabel metroLabel4;
|
||||
private MetroFramework.Controls.MetroTextBox txtGradingMesUrl;
|
||||
private MetroFramework.Controls.MetroLabel metroLabel5;
|
||||
private MetroFramework.Controls.MetroTextBox txtResultProcessMesUrl;
|
||||
private MetroFramework.Controls.MetroLabel metroLabel6;
|
||||
private System.Windows.Forms.GroupBox groupBox1;
|
||||
private System.Windows.Forms.CheckBox chkIsMesUP;
|
||||
private MetroFramework.Controls.MetroLabel metroLabel20;
|
||||
private MetroFramework.Controls.MetroLabel metroLabel21;
|
||||
private System.Windows.Forms.NumericUpDown LoginTime;
|
||||
private MetroFramework.Controls.MetroLabel metroLabel22;
|
||||
private MetroFramework.Controls.MetroLabel metroLabel18;
|
||||
private System.Windows.Forms.NumericUpDown txtMesRequestTime;
|
||||
private System.Windows.Forms.LinkLabel linkLabel_editCollectItemCfg;
|
||||
private MetroFramework.Controls.MetroLabel metroLabel7;
|
||||
private MetroFramework.Controls.MetroTextBox tb_productType;
|
||||
private MetroFramework.Controls.MetroPanel metroPanel_bottom;
|
||||
private MetroFramework.Controls.MetroPanel metroPanel_mid;
|
||||
private MetroFramework.Controls.MetroPanel metroPanel_top;
|
||||
private MetroFramework.Controls.MetroTextBox tb_stationExit;
|
||||
private MetroFramework.Controls.MetroLabel metroLabel9;
|
||||
private MetroFramework.Controls.MetroTextBox tb_StationArrival;
|
||||
private MetroFramework.Controls.MetroLabel metroLabel8;
|
||||
private System.Windows.Forms.BindingSource bindingSource1;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,200 @@
|
||||
<?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="bindingSource1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
AAABAAEAICAAAAEAIACoEAAAFgAAACgAAAAgAAAAQAAAAAEAIAAAAAAAABAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAFlNUABZTVAAWU1QAFlNUABZTVAAWU1QAFlNUABZTVAAWU1QAFlN
|
||||
UABZTVAAWU1QAFlNUABZTVAAWU1QAF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AAAAAAAAAAAAAAAAAAAAAAAAAAVklRAFlNUABZTVA7WU1QwlhMT+BYTE/gWExP4FhM
|
||||
T+BYTE/gWExP4FlNUMJZTVA7WU1QAFZKUgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABYTFEAWE1QAFlNUABZTVAPWU1QH1lN
|
||||
UB9ZTVAfWU1QH1lNUB9ZTVAfWU1QD1lNUABYTFEAWExRAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABZTVAAWE1QAFlN
|
||||
UABZTVAAWU1QAFlNUABZTVAAWU1QAFlNUABZTVAAWU1QAFlNUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAA+AAAH/AAAA/gAAAH4AAAB+AAAAfgAAAH4AAAB+AAAAfgAAAH4AAAB+AA
|
||||
AAfgAAAH4AAAB+AAAAfgAAAH4AAAB+AAAAfgAAAH4AAAB+AAAAfgAAAH4AAAB+AAAAfgAAAH4AAAB+AA
|
||||
AAfgAAAH8AAAD/gAAB//gAH//4AB///AA/8=
|
||||
</value>
|
||||
</data>
|
||||
</root>
|
||||
+488
@@ -0,0 +1,488 @@
|
||||
namespace JY.Inspection.Frm
|
||||
{
|
||||
partial class FormMesGradingSet
|
||||
{
|
||||
/// <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.chkStartNGFL = new System.Windows.Forms.CheckBox();
|
||||
this.cmbTensionStrap2 = new MetroFramework.Controls.MetroComboBox();
|
||||
this.cmbTensionStrap1 = new MetroFramework.Controls.MetroComboBox();
|
||||
this.metroLabel6 = new MetroFramework.Controls.MetroLabel();
|
||||
this.metroLabel5 = new MetroFramework.Controls.MetroLabel();
|
||||
this.txtgrading4 = new MetroFramework.Controls.MetroTextBox();
|
||||
this.metroLabel4 = new MetroFramework.Controls.MetroLabel();
|
||||
this.txtgrading2 = new MetroFramework.Controls.MetroTextBox();
|
||||
this.metroLabel3 = new MetroFramework.Controls.MetroLabel();
|
||||
this.txtgrading1 = new MetroFramework.Controls.MetroTextBox();
|
||||
this.metroLabel2 = new MetroFramework.Controls.MetroLabel();
|
||||
this.txtgrading3 = new MetroFramework.Controls.MetroTextBox();
|
||||
this.metroLabel1 = new MetroFramework.Controls.MetroLabel();
|
||||
this.btnExit = new MetroFramework.Controls.MetroButton();
|
||||
this.btnSave = new MetroFramework.Controls.MetroButton();
|
||||
this.cmbTensionStrap3 = new MetroFramework.Controls.MetroComboBox();
|
||||
this.metroLabel7 = new MetroFramework.Controls.MetroLabel();
|
||||
this.chkCkGrading = new System.Windows.Forms.CheckBox();
|
||||
this.cmbTensionStrapCCD1 = new MetroFramework.Controls.MetroComboBox();
|
||||
this.cmbTensionStrapCCD2 = new MetroFramework.Controls.MetroComboBox();
|
||||
this.cmbTensionStrapCCD3 = new MetroFramework.Controls.MetroComboBox();
|
||||
this.cmbTensionStrapCCD4 = new MetroFramework.Controls.MetroComboBox();
|
||||
this.metroLabel8 = new MetroFramework.Controls.MetroLabel();
|
||||
this.metroLabel9 = new MetroFramework.Controls.MetroLabel();
|
||||
this.metroLabel10 = new MetroFramework.Controls.MetroLabel();
|
||||
this.metroLabel11 = new MetroFramework.Controls.MetroLabel();
|
||||
this.metroLabel12 = new MetroFramework.Controls.MetroLabel();
|
||||
this.metroLabel13 = new MetroFramework.Controls.MetroLabel();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// chkStartNGFL
|
||||
//
|
||||
this.chkStartNGFL.AutoSize = true;
|
||||
this.chkStartNGFL.Location = new System.Drawing.Point(210, 399);
|
||||
this.chkStartNGFL.Name = "chkStartNGFL";
|
||||
this.chkStartNGFL.Size = new System.Drawing.Size(120, 16);
|
||||
this.chkStartNGFL.TabIndex = 178;
|
||||
this.chkStartNGFL.Text = "NG电池不分类排出";
|
||||
this.chkStartNGFL.UseVisualStyleBackColor = true;
|
||||
this.chkStartNGFL.Click += new System.EventHandler(this.chkStartNGFL_Click);
|
||||
//
|
||||
// cmbTensionStrap2
|
||||
//
|
||||
this.cmbTensionStrap2.FormattingEnabled = true;
|
||||
this.cmbTensionStrap2.ItemHeight = 23;
|
||||
this.cmbTensionStrap2.Location = new System.Drawing.Point(143, 293);
|
||||
this.cmbTensionStrap2.Name = "cmbTensionStrap2";
|
||||
this.cmbTensionStrap2.Size = new System.Drawing.Size(186, 29);
|
||||
this.cmbTensionStrap2.TabIndex = 176;
|
||||
this.cmbTensionStrap2.UseSelectable = true;
|
||||
this.cmbTensionStrap2.DropDownClosed += new System.EventHandler(this.cmbTensionStrap2_DropDownClosed);
|
||||
//
|
||||
// cmbTensionStrap1
|
||||
//
|
||||
this.cmbTensionStrap1.FormattingEnabled = true;
|
||||
this.cmbTensionStrap1.ItemHeight = 23;
|
||||
this.cmbTensionStrap1.Location = new System.Drawing.Point(143, 251);
|
||||
this.cmbTensionStrap1.Name = "cmbTensionStrap1";
|
||||
this.cmbTensionStrap1.Size = new System.Drawing.Size(186, 29);
|
||||
this.cmbTensionStrap1.TabIndex = 177;
|
||||
this.cmbTensionStrap1.UseSelectable = true;
|
||||
this.cmbTensionStrap1.DropDownClosed += new System.EventHandler(this.cmbTensionStrap1_DropDownClosed);
|
||||
//
|
||||
// metroLabel6
|
||||
//
|
||||
this.metroLabel6.AutoSize = true;
|
||||
this.metroLabel6.Location = new System.Drawing.Point(47, 298);
|
||||
this.metroLabel6.Name = "metroLabel6";
|
||||
this.metroLabel6.Size = new System.Drawing.Size(85, 19);
|
||||
this.metroLabel6.TabIndex = 173;
|
||||
this.metroLabel6.Text = "NG拉带(6):";
|
||||
//
|
||||
// metroLabel5
|
||||
//
|
||||
this.metroLabel5.AutoSize = true;
|
||||
this.metroLabel5.Location = new System.Drawing.Point(47, 255);
|
||||
this.metroLabel5.Name = "metroLabel5";
|
||||
this.metroLabel5.Size = new System.Drawing.Size(85, 19);
|
||||
this.metroLabel5.TabIndex = 174;
|
||||
this.metroLabel5.Text = "NG拉带(5):";
|
||||
//
|
||||
// txtgrading4
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
this.txtgrading4.CustomButton.Image = null;
|
||||
this.txtgrading4.CustomButton.Location = new System.Drawing.Point(60, 1);
|
||||
this.txtgrading4.CustomButton.Name = "";
|
||||
this.txtgrading4.CustomButton.Size = new System.Drawing.Size(21, 21);
|
||||
this.txtgrading4.CustomButton.Style = MetroFramework.MetroColorStyle.Blue;
|
||||
this.txtgrading4.CustomButton.TabIndex = 1;
|
||||
this.txtgrading4.CustomButton.Theme = MetroFramework.MetroThemeStyle.Light;
|
||||
this.txtgrading4.CustomButton.UseSelectable = true;
|
||||
this.txtgrading4.CustomButton.Visible = false;
|
||||
this.txtgrading4.FontSize = MetroFramework.MetroTextBoxSize.Medium;
|
||||
this.txtgrading4.Lines = new string[0];
|
||||
this.txtgrading4.Location = new System.Drawing.Point(144, 200);
|
||||
this.txtgrading4.MaxLength = 32767;
|
||||
this.txtgrading4.Name = "txtgrading4";
|
||||
this.txtgrading4.PasswordChar = '\0';
|
||||
this.txtgrading4.ScrollBars = System.Windows.Forms.ScrollBars.None;
|
||||
this.txtgrading4.SelectedText = "";
|
||||
this.txtgrading4.SelectionLength = 0;
|
||||
this.txtgrading4.SelectionStart = 0;
|
||||
this.txtgrading4.ShortcutsEnabled = true;
|
||||
this.txtgrading4.Size = new System.Drawing.Size(70, 28);
|
||||
this.txtgrading4.TabIndex = 172;
|
||||
this.txtgrading4.UseSelectable = true;
|
||||
this.txtgrading4.WaterMarkColor = System.Drawing.Color.FromArgb(((int)(((byte)(109)))), ((int)(((byte)(109)))), ((int)(((byte)(109)))));
|
||||
this.txtgrading4.WaterMarkFont = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Pixel);
|
||||
//
|
||||
// metroLabel4
|
||||
//
|
||||
this.metroLabel4.AutoSize = true;
|
||||
this.metroLabel4.Location = new System.Drawing.Point(47, 202);
|
||||
this.metroLabel4.Name = "metroLabel4";
|
||||
this.metroLabel4.Size = new System.Drawing.Size(84, 19);
|
||||
this.metroLabel4.TabIndex = 175;
|
||||
this.metroLabel4.Text = "OK拉带(4):";
|
||||
//
|
||||
// txtgrading2
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
this.txtgrading2.CustomButton.Image = null;
|
||||
this.txtgrading2.CustomButton.Location = new System.Drawing.Point(60, 1);
|
||||
this.txtgrading2.CustomButton.Name = "";
|
||||
this.txtgrading2.CustomButton.Size = new System.Drawing.Size(21, 21);
|
||||
this.txtgrading2.CustomButton.Style = MetroFramework.MetroColorStyle.Blue;
|
||||
this.txtgrading2.CustomButton.TabIndex = 1;
|
||||
this.txtgrading2.CustomButton.Theme = MetroFramework.MetroThemeStyle.Light;
|
||||
this.txtgrading2.CustomButton.UseSelectable = true;
|
||||
this.txtgrading2.CustomButton.Visible = false;
|
||||
this.txtgrading2.FontSize = MetroFramework.MetroTextBoxSize.Medium;
|
||||
this.txtgrading2.Lines = new string[0];
|
||||
this.txtgrading2.Location = new System.Drawing.Point(144, 136);
|
||||
this.txtgrading2.MaxLength = 32767;
|
||||
this.txtgrading2.Name = "txtgrading2";
|
||||
this.txtgrading2.PasswordChar = '\0';
|
||||
this.txtgrading2.ScrollBars = System.Windows.Forms.ScrollBars.None;
|
||||
this.txtgrading2.SelectedText = "";
|
||||
this.txtgrading2.SelectionLength = 0;
|
||||
this.txtgrading2.SelectionStart = 0;
|
||||
this.txtgrading2.ShortcutsEnabled = true;
|
||||
this.txtgrading2.Size = new System.Drawing.Size(70, 28);
|
||||
this.txtgrading2.TabIndex = 171;
|
||||
this.txtgrading2.UseSelectable = true;
|
||||
this.txtgrading2.WaterMarkColor = System.Drawing.Color.FromArgb(((int)(((byte)(109)))), ((int)(((byte)(109)))), ((int)(((byte)(109)))));
|
||||
this.txtgrading2.WaterMarkFont = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Pixel);
|
||||
//
|
||||
// metroLabel3
|
||||
//
|
||||
this.metroLabel3.AutoSize = true;
|
||||
this.metroLabel3.Location = new System.Drawing.Point(47, 139);
|
||||
this.metroLabel3.Name = "metroLabel3";
|
||||
this.metroLabel3.Size = new System.Drawing.Size(84, 19);
|
||||
this.metroLabel3.TabIndex = 170;
|
||||
this.metroLabel3.Text = "OK拉带(2):";
|
||||
//
|
||||
// txtgrading1
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
this.txtgrading1.CustomButton.Image = null;
|
||||
this.txtgrading1.CustomButton.Location = new System.Drawing.Point(56, 2);
|
||||
this.txtgrading1.CustomButton.Name = "";
|
||||
this.txtgrading1.CustomButton.Size = new System.Drawing.Size(23, 23);
|
||||
this.txtgrading1.CustomButton.Style = MetroFramework.MetroColorStyle.Blue;
|
||||
this.txtgrading1.CustomButton.TabIndex = 1;
|
||||
this.txtgrading1.CustomButton.Theme = MetroFramework.MetroThemeStyle.Light;
|
||||
this.txtgrading1.CustomButton.UseSelectable = true;
|
||||
this.txtgrading1.CustomButton.Visible = false;
|
||||
this.txtgrading1.FontSize = MetroFramework.MetroTextBoxSize.Medium;
|
||||
this.txtgrading1.Lines = new string[0];
|
||||
this.txtgrading1.Location = new System.Drawing.Point(144, 103);
|
||||
this.txtgrading1.MaxLength = 32767;
|
||||
this.txtgrading1.Name = "txtgrading1";
|
||||
this.txtgrading1.PasswordChar = '\0';
|
||||
this.txtgrading1.ScrollBars = System.Windows.Forms.ScrollBars.None;
|
||||
this.txtgrading1.SelectedText = "";
|
||||
this.txtgrading1.SelectionLength = 0;
|
||||
this.txtgrading1.SelectionStart = 0;
|
||||
this.txtgrading1.ShortcutsEnabled = true;
|
||||
this.txtgrading1.Size = new System.Drawing.Size(70, 28);
|
||||
this.txtgrading1.TabIndex = 168;
|
||||
this.txtgrading1.UseSelectable = true;
|
||||
this.txtgrading1.WaterMarkColor = System.Drawing.Color.FromArgb(((int)(((byte)(109)))), ((int)(((byte)(109)))), ((int)(((byte)(109)))));
|
||||
this.txtgrading1.WaterMarkFont = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Pixel);
|
||||
//
|
||||
// metroLabel2
|
||||
//
|
||||
this.metroLabel2.AutoSize = true;
|
||||
this.metroLabel2.Location = new System.Drawing.Point(47, 106);
|
||||
this.metroLabel2.Name = "metroLabel2";
|
||||
this.metroLabel2.Size = new System.Drawing.Size(82, 19);
|
||||
this.metroLabel2.TabIndex = 169;
|
||||
this.metroLabel2.Text = "OK拉带(1):";
|
||||
//
|
||||
// txtgrading3
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
this.txtgrading3.CustomButton.Image = null;
|
||||
this.txtgrading3.CustomButton.Location = new System.Drawing.Point(60, 1);
|
||||
this.txtgrading3.CustomButton.Name = "";
|
||||
this.txtgrading3.CustomButton.Size = new System.Drawing.Size(21, 21);
|
||||
this.txtgrading3.CustomButton.Style = MetroFramework.MetroColorStyle.Blue;
|
||||
this.txtgrading3.CustomButton.TabIndex = 1;
|
||||
this.txtgrading3.CustomButton.Theme = MetroFramework.MetroThemeStyle.Light;
|
||||
this.txtgrading3.CustomButton.UseSelectable = true;
|
||||
this.txtgrading3.CustomButton.Visible = false;
|
||||
this.txtgrading3.FontSize = MetroFramework.MetroTextBoxSize.Medium;
|
||||
this.txtgrading3.Lines = new string[0];
|
||||
this.txtgrading3.Location = new System.Drawing.Point(144, 168);
|
||||
this.txtgrading3.MaxLength = 32767;
|
||||
this.txtgrading3.Name = "txtgrading3";
|
||||
this.txtgrading3.PasswordChar = '\0';
|
||||
this.txtgrading3.ScrollBars = System.Windows.Forms.ScrollBars.None;
|
||||
this.txtgrading3.SelectedText = "";
|
||||
this.txtgrading3.SelectionLength = 0;
|
||||
this.txtgrading3.SelectionStart = 0;
|
||||
this.txtgrading3.ShortcutsEnabled = true;
|
||||
this.txtgrading3.Size = new System.Drawing.Size(70, 28);
|
||||
this.txtgrading3.TabIndex = 166;
|
||||
this.txtgrading3.UseSelectable = true;
|
||||
this.txtgrading3.WaterMarkColor = System.Drawing.Color.FromArgb(((int)(((byte)(109)))), ((int)(((byte)(109)))), ((int)(((byte)(109)))));
|
||||
this.txtgrading3.WaterMarkFont = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Pixel);
|
||||
//
|
||||
// metroLabel1
|
||||
//
|
||||
this.metroLabel1.AutoSize = true;
|
||||
this.metroLabel1.Location = new System.Drawing.Point(47, 172);
|
||||
this.metroLabel1.Name = "metroLabel1";
|
||||
this.metroLabel1.Size = new System.Drawing.Size(84, 19);
|
||||
this.metroLabel1.TabIndex = 167;
|
||||
this.metroLabel1.Text = "OK拉带(3):";
|
||||
//
|
||||
// btnExit
|
||||
//
|
||||
this.btnExit.Location = new System.Drawing.Point(227, 438);
|
||||
this.btnExit.Name = "btnExit";
|
||||
this.btnExit.Size = new System.Drawing.Size(103, 37);
|
||||
this.btnExit.TabIndex = 165;
|
||||
this.btnExit.Text = "退出";
|
||||
this.btnExit.UseSelectable = true;
|
||||
this.btnExit.Click += new System.EventHandler(this.btnExit_Click);
|
||||
//
|
||||
// btnSave
|
||||
//
|
||||
this.btnSave.Location = new System.Drawing.Point(41, 438);
|
||||
this.btnSave.Name = "btnSave";
|
||||
this.btnSave.Size = new System.Drawing.Size(112, 37);
|
||||
this.btnSave.TabIndex = 164;
|
||||
this.btnSave.Text = "保存";
|
||||
this.btnSave.UseSelectable = true;
|
||||
this.btnSave.Click += new System.EventHandler(this.btnSave_Click);
|
||||
//
|
||||
// cmbTensionStrap3
|
||||
//
|
||||
this.cmbTensionStrap3.FormattingEnabled = true;
|
||||
this.cmbTensionStrap3.ItemHeight = 23;
|
||||
this.cmbTensionStrap3.Location = new System.Drawing.Point(144, 334);
|
||||
this.cmbTensionStrap3.Name = "cmbTensionStrap3";
|
||||
this.cmbTensionStrap3.Size = new System.Drawing.Size(186, 29);
|
||||
this.cmbTensionStrap3.TabIndex = 180;
|
||||
this.cmbTensionStrap3.UseSelectable = true;
|
||||
this.cmbTensionStrap3.DropDownClosed += new System.EventHandler(this.cmbTensionStrap3_DropDownClosed);
|
||||
//
|
||||
// metroLabel7
|
||||
//
|
||||
this.metroLabel7.AutoSize = true;
|
||||
this.metroLabel7.Location = new System.Drawing.Point(47, 340);
|
||||
this.metroLabel7.Name = "metroLabel7";
|
||||
this.metroLabel7.Size = new System.Drawing.Size(85, 19);
|
||||
this.metroLabel7.TabIndex = 179;
|
||||
this.metroLabel7.Text = "NG拉带(7):";
|
||||
//
|
||||
// chkCkGrading
|
||||
//
|
||||
this.chkCkGrading.AutoSize = true;
|
||||
this.chkCkGrading.Location = new System.Drawing.Point(47, 399);
|
||||
this.chkCkGrading.Name = "chkCkGrading";
|
||||
this.chkCkGrading.Size = new System.Drawing.Size(96, 16);
|
||||
this.chkCkGrading.TabIndex = 181;
|
||||
this.chkCkGrading.Text = "是否启用分档";
|
||||
this.chkCkGrading.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// cmbTensionStrapCCD1
|
||||
//
|
||||
this.cmbTensionStrapCCD1.FormattingEnabled = true;
|
||||
this.cmbTensionStrapCCD1.ItemHeight = 23;
|
||||
this.cmbTensionStrapCCD1.Location = new System.Drawing.Point(260, 102);
|
||||
this.cmbTensionStrapCCD1.Name = "cmbTensionStrapCCD1";
|
||||
this.cmbTensionStrapCCD1.Size = new System.Drawing.Size(70, 29);
|
||||
this.cmbTensionStrapCCD1.TabIndex = 182;
|
||||
this.cmbTensionStrapCCD1.UseSelectable = true;
|
||||
//
|
||||
// cmbTensionStrapCCD2
|
||||
//
|
||||
this.cmbTensionStrapCCD2.FormattingEnabled = true;
|
||||
this.cmbTensionStrapCCD2.ItemHeight = 23;
|
||||
this.cmbTensionStrapCCD2.Location = new System.Drawing.Point(260, 133);
|
||||
this.cmbTensionStrapCCD2.Name = "cmbTensionStrapCCD2";
|
||||
this.cmbTensionStrapCCD2.Size = new System.Drawing.Size(70, 29);
|
||||
this.cmbTensionStrapCCD2.TabIndex = 183;
|
||||
this.cmbTensionStrapCCD2.UseSelectable = true;
|
||||
//
|
||||
// cmbTensionStrapCCD3
|
||||
//
|
||||
this.cmbTensionStrapCCD3.FormattingEnabled = true;
|
||||
this.cmbTensionStrapCCD3.ItemHeight = 23;
|
||||
this.cmbTensionStrapCCD3.Location = new System.Drawing.Point(260, 165);
|
||||
this.cmbTensionStrapCCD3.Name = "cmbTensionStrapCCD3";
|
||||
this.cmbTensionStrapCCD3.Size = new System.Drawing.Size(70, 29);
|
||||
this.cmbTensionStrapCCD3.TabIndex = 184;
|
||||
this.cmbTensionStrapCCD3.UseSelectable = true;
|
||||
//
|
||||
// cmbTensionStrapCCD4
|
||||
//
|
||||
this.cmbTensionStrapCCD4.FormattingEnabled = true;
|
||||
this.cmbTensionStrapCCD4.ItemHeight = 23;
|
||||
this.cmbTensionStrapCCD4.Location = new System.Drawing.Point(260, 198);
|
||||
this.cmbTensionStrapCCD4.Name = "cmbTensionStrapCCD4";
|
||||
this.cmbTensionStrapCCD4.Size = new System.Drawing.Size(70, 29);
|
||||
this.cmbTensionStrapCCD4.TabIndex = 185;
|
||||
this.cmbTensionStrapCCD4.UseSelectable = true;
|
||||
//
|
||||
// metroLabel8
|
||||
//
|
||||
this.metroLabel8.AutoSize = true;
|
||||
this.metroLabel8.Location = new System.Drawing.Point(229, 106);
|
||||
this.metroLabel8.Name = "metroLabel8";
|
||||
this.metroLabel8.Size = new System.Drawing.Size(15, 19);
|
||||
this.metroLabel8.TabIndex = 186;
|
||||
this.metroLabel8.Text = "-";
|
||||
//
|
||||
// metroLabel9
|
||||
//
|
||||
this.metroLabel9.AutoSize = true;
|
||||
this.metroLabel9.Location = new System.Drawing.Point(230, 139);
|
||||
this.metroLabel9.Name = "metroLabel9";
|
||||
this.metroLabel9.Size = new System.Drawing.Size(15, 19);
|
||||
this.metroLabel9.TabIndex = 187;
|
||||
this.metroLabel9.Text = "-";
|
||||
//
|
||||
// metroLabel10
|
||||
//
|
||||
this.metroLabel10.AutoSize = true;
|
||||
this.metroLabel10.Location = new System.Drawing.Point(230, 171);
|
||||
this.metroLabel10.Name = "metroLabel10";
|
||||
this.metroLabel10.Size = new System.Drawing.Size(15, 19);
|
||||
this.metroLabel10.TabIndex = 188;
|
||||
this.metroLabel10.Text = "-";
|
||||
//
|
||||
// metroLabel11
|
||||
//
|
||||
this.metroLabel11.AutoSize = true;
|
||||
this.metroLabel11.Location = new System.Drawing.Point(230, 203);
|
||||
this.metroLabel11.Name = "metroLabel11";
|
||||
this.metroLabel11.Size = new System.Drawing.Size(15, 19);
|
||||
this.metroLabel11.TabIndex = 189;
|
||||
this.metroLabel11.Text = "-";
|
||||
//
|
||||
// metroLabel12
|
||||
//
|
||||
this.metroLabel12.AutoSize = true;
|
||||
this.metroLabel12.Location = new System.Drawing.Point(261, 71);
|
||||
this.metroLabel12.Name = "metroLabel12";
|
||||
this.metroLabel12.Size = new System.Drawing.Size(63, 19);
|
||||
this.metroLabel12.TabIndex = 190;
|
||||
this.metroLabel12.Text = "CCD结果";
|
||||
//
|
||||
// metroLabel13
|
||||
//
|
||||
this.metroLabel13.AutoSize = true;
|
||||
this.metroLabel13.Location = new System.Drawing.Point(155, 71);
|
||||
this.metroLabel13.Name = "metroLabel13";
|
||||
this.metroLabel13.Size = new System.Drawing.Size(37, 19);
|
||||
this.metroLabel13.TabIndex = 191;
|
||||
this.metroLabel13.Text = "档位";
|
||||
//
|
||||
// FormMesGradingSet
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(394, 529);
|
||||
this.Controls.Add(this.metroLabel13);
|
||||
this.Controls.Add(this.metroLabel12);
|
||||
this.Controls.Add(this.txtgrading4);
|
||||
this.Controls.Add(this.cmbTensionStrapCCD4);
|
||||
this.Controls.Add(this.txtgrading3);
|
||||
this.Controls.Add(this.cmbTensionStrapCCD3);
|
||||
this.Controls.Add(this.txtgrading2);
|
||||
this.Controls.Add(this.cmbTensionStrapCCD2);
|
||||
this.Controls.Add(this.txtgrading1);
|
||||
this.Controls.Add(this.cmbTensionStrapCCD1);
|
||||
this.Controls.Add(this.metroLabel11);
|
||||
this.Controls.Add(this.metroLabel10);
|
||||
this.Controls.Add(this.metroLabel9);
|
||||
this.Controls.Add(this.metroLabel8);
|
||||
this.Controls.Add(this.chkCkGrading);
|
||||
this.Controls.Add(this.cmbTensionStrap3);
|
||||
this.Controls.Add(this.metroLabel7);
|
||||
this.Controls.Add(this.chkStartNGFL);
|
||||
this.Controls.Add(this.cmbTensionStrap2);
|
||||
this.Controls.Add(this.cmbTensionStrap1);
|
||||
this.Controls.Add(this.metroLabel6);
|
||||
this.Controls.Add(this.metroLabel5);
|
||||
this.Controls.Add(this.metroLabel4);
|
||||
this.Controls.Add(this.metroLabel3);
|
||||
this.Controls.Add(this.metroLabel2);
|
||||
this.Controls.Add(this.metroLabel1);
|
||||
this.Controls.Add(this.btnExit);
|
||||
this.Controls.Add(this.btnSave);
|
||||
this.Name = "FormMesGradingSet";
|
||||
this.Text = "MES档位设置";
|
||||
this.Load += new System.EventHandler(this.FormMesGradingSet_Load);
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.CheckBox chkStartNGFL;
|
||||
private MetroFramework.Controls.MetroComboBox cmbTensionStrap2;
|
||||
private MetroFramework.Controls.MetroComboBox cmbTensionStrap1;
|
||||
private MetroFramework.Controls.MetroLabel metroLabel6;
|
||||
private MetroFramework.Controls.MetroLabel metroLabel5;
|
||||
private MetroFramework.Controls.MetroTextBox txtgrading4;
|
||||
private MetroFramework.Controls.MetroLabel metroLabel4;
|
||||
private MetroFramework.Controls.MetroTextBox txtgrading2;
|
||||
private MetroFramework.Controls.MetroLabel metroLabel3;
|
||||
private MetroFramework.Controls.MetroTextBox txtgrading1;
|
||||
private MetroFramework.Controls.MetroLabel metroLabel2;
|
||||
private MetroFramework.Controls.MetroTextBox txtgrading3;
|
||||
private MetroFramework.Controls.MetroLabel metroLabel1;
|
||||
private MetroFramework.Controls.MetroButton btnExit;
|
||||
private MetroFramework.Controls.MetroButton btnSave;
|
||||
private MetroFramework.Controls.MetroComboBox cmbTensionStrap3;
|
||||
private MetroFramework.Controls.MetroLabel metroLabel7;
|
||||
private System.Windows.Forms.CheckBox chkCkGrading;
|
||||
private MetroFramework.Controls.MetroComboBox cmbTensionStrapCCD1;
|
||||
private MetroFramework.Controls.MetroComboBox cmbTensionStrapCCD2;
|
||||
private MetroFramework.Controls.MetroComboBox cmbTensionStrapCCD3;
|
||||
private MetroFramework.Controls.MetroComboBox cmbTensionStrapCCD4;
|
||||
private MetroFramework.Controls.MetroLabel metroLabel8;
|
||||
private MetroFramework.Controls.MetroLabel metroLabel9;
|
||||
private MetroFramework.Controls.MetroLabel metroLabel10;
|
||||
private MetroFramework.Controls.MetroLabel metroLabel11;
|
||||
private MetroFramework.Controls.MetroLabel metroLabel12;
|
||||
private MetroFramework.Controls.MetroLabel metroLabel13;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,402 @@
|
||||
using JY.Utility;
|
||||
using JYControl;
|
||||
using PLCCommunication;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace JY.Inspection.Frm
|
||||
{
|
||||
public partial class FormMesGradingSet : MetroFramework.Forms.MetroForm
|
||||
{
|
||||
private FrmOmronPLCCom MelsecPLCCom;
|
||||
public short[] MESGradingSet = new short[] { (short)1, (short)1, (short)1, (short)1 };
|
||||
public FormMesGradingSet(FrmOmronPLCCom plcccom)
|
||||
{
|
||||
InitializeComponent();
|
||||
MelsecPLCCom = plcccom;
|
||||
}
|
||||
|
||||
private void FormMesGradingSet_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (Global.systemConfig.isUpMes)
|
||||
{
|
||||
chkCkGrading.Visible = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
chkCkGrading.Visible = false;
|
||||
}
|
||||
|
||||
|
||||
BangDingcmb();
|
||||
BangDingcmbCCD();
|
||||
txtgrading1.Text = IniFileHelper.ReadIniData("MES配置", "Grading1");
|
||||
txtgrading2.Text = IniFileHelper.ReadIniData("MES配置", "Grading2");
|
||||
txtgrading3.Text = IniFileHelper.ReadIniData("MES配置", "Grading3");
|
||||
txtgrading4.Text = IniFileHelper.ReadIniData("MES配置", "Grading4");
|
||||
cmbTensionStrap1.SelectedIndex = Convert.ToInt32(IniFileHelper.ReadIniData("MES配置", "TensionStrap1"));
|
||||
cmbTensionStrap2.SelectedIndex = Convert.ToInt32(IniFileHelper.ReadIniData("MES配置", "TensionStrap2"));
|
||||
cmbTensionStrap3.SelectedIndex = Convert.ToInt32(IniFileHelper.ReadIniData("MES配置", "TensionStrap3"));
|
||||
cmbTensionStrapCCD1.SelectedIndex = Convert.ToInt32(IniFileHelper.ReadIniData("MES配置", "TensionStrapCCDReslut1"));
|
||||
cmbTensionStrapCCD2.SelectedIndex = Convert.ToInt32(IniFileHelper.ReadIniData("MES配置", "TensionStrapCCDReslut2"));
|
||||
cmbTensionStrapCCD3.SelectedIndex = Convert.ToInt32(IniFileHelper.ReadIniData("MES配置", "TensionStrapCCDReslut3"));
|
||||
cmbTensionStrapCCD4.SelectedIndex = Convert.ToInt32(IniFileHelper.ReadIniData("MES配置", "TensionStrapCCDReslut4"));
|
||||
//不分类
|
||||
chkStartNGFL.Checked = IniFileHelper.ReadIniData("MES配置", "StartNGFL") == "1" ? true : false;
|
||||
//是否启用分档
|
||||
chkCkGrading.Checked = IniFileHelper.ReadIniData("MES配置", "Grading") == "1" ? true : false;
|
||||
}
|
||||
|
||||
public void BangDingcmb()
|
||||
{
|
||||
string[] bound = IniFileHelper.ReadIniData("MES配置", "NGMessage").Split(',');
|
||||
List<cmb> cmbls = new List<cmb>();
|
||||
List<cmb> cmbls2 = new List<cmb>();
|
||||
List<cmb> cmbls3 = new List<cmb>();
|
||||
for (int i = 0; i < bound.Length; i++)
|
||||
{
|
||||
cmb _cmb = new cmb();
|
||||
_cmb.Key = i.ToString();
|
||||
_cmb.Value = bound[i];
|
||||
cmbls.Add(_cmb);
|
||||
cmbls2.Add(_cmb);
|
||||
cmbls3.Add(_cmb);
|
||||
}
|
||||
cmbTensionStrap1.DataSource = cmbls;
|
||||
cmbTensionStrap1.DisplayMember = "Value";
|
||||
cmbTensionStrap2.DataSource = cmbls2;
|
||||
cmbTensionStrap2.DisplayMember = "Value";
|
||||
cmbTensionStrap3.DataSource = cmbls3;
|
||||
cmbTensionStrap3.DisplayMember = "Value";
|
||||
}
|
||||
|
||||
public void BangDingcmbCCD()
|
||||
{
|
||||
string[] bound = IniFileHelper.ReadIniData("MES配置", "CCDResultMessage").Split(',');
|
||||
List<cmb> cmbls = new List<cmb>();
|
||||
List<cmb> cmbls2 = new List<cmb>();
|
||||
List<cmb> cmbls3 = new List<cmb>();
|
||||
List<cmb> cmbls4 = new List<cmb>();
|
||||
for (int i = 0; i < bound.Length; i++)
|
||||
{
|
||||
cmb _cmb = new cmb();
|
||||
_cmb.Key = i.ToString();
|
||||
_cmb.Value = bound[i];
|
||||
cmbls.Add(_cmb);
|
||||
cmbls2.Add(_cmb);
|
||||
cmbls3.Add(_cmb);
|
||||
cmbls4.Add(_cmb);
|
||||
}
|
||||
cmbTensionStrapCCD1.DataSource = cmbls;
|
||||
cmbTensionStrapCCD1.DisplayMember = "Value";
|
||||
cmbTensionStrapCCD2.DataSource = cmbls2;
|
||||
cmbTensionStrapCCD2.DisplayMember = "Value";
|
||||
cmbTensionStrapCCD3.DataSource = cmbls3;
|
||||
cmbTensionStrapCCD3.DisplayMember = "Value";
|
||||
cmbTensionStrapCCD4.DataSource = cmbls4;
|
||||
cmbTensionStrapCCD4.DisplayMember = "Value";
|
||||
}
|
||||
|
||||
public class cmb
|
||||
{
|
||||
public string Key { get; set; }
|
||||
public string Value { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 保存MES配置文件信息
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void btnSave_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (txtgrading1.Text.Trim().Equals(""))
|
||||
{
|
||||
MessageBox.Show("MES参数保存失败,一档(OK拉带1)对应档位不可为空!", "系统提示");
|
||||
return;
|
||||
}
|
||||
if (txtgrading2.Text.Trim().Equals(""))
|
||||
{
|
||||
MessageBox.Show("MES参数保存失败,一档(OK拉带2)对应档位不可为空!", "系统提示");
|
||||
return;
|
||||
}
|
||||
if (txtgrading3.Text.Trim().Equals(""))
|
||||
{
|
||||
MessageBox.Show("MES参数保存失败,一档(OK拉带3)对应档位不可为空!", "系统提示");
|
||||
return;
|
||||
}
|
||||
if (txtgrading4.Text.Trim().Equals(""))
|
||||
{
|
||||
MessageBox.Show("MES参数保存失败,一档(OK拉带4)对应档位不可为空!", "系统提示");
|
||||
return;
|
||||
}
|
||||
if (chkStartNGFL.Checked && cmbTensionStrap1.SelectedIndex != 0 && cmbTensionStrap2.SelectedIndex != 0 && cmbTensionStrap3.SelectedIndex != 0)
|
||||
{
|
||||
MessageBox.Show("MES参数保存失败,NG电池不分类排出时NG拉带1和NG拉带2以及NG拉带3必须为不分类", "系统提示");
|
||||
return;
|
||||
}
|
||||
if (!chkStartNGFL.Checked && (cmbTensionStrap1.SelectedIndex == 0 || cmbTensionStrap2.SelectedIndex == 0 || cmbTensionStrap3.SelectedIndex == 0))
|
||||
{
|
||||
MessageBox.Show("MES参数保存失败,NG电池分类排出时NG拉带1和NG拉带2以及NG拉带3,不能选择不分类", "系统提示");
|
||||
return;
|
||||
}
|
||||
|
||||
if (txtgrading1.Text.Trim().Equals(txtgrading2.Text.Trim()))
|
||||
{
|
||||
if (cmbTensionStrapCCD1.SelectedIndex == 0 || cmbTensionStrapCCD2.SelectedIndex == 0)
|
||||
{
|
||||
if (cmbTensionStrapCCD1.SelectedIndex == 1 || cmbTensionStrapCCD2.SelectedIndex == 1 || cmbTensionStrapCCD1.SelectedIndex == 2 || cmbTensionStrapCCD2.SelectedIndex == 2)
|
||||
{
|
||||
MessageBox.Show("同一档位(一档、二档)不允许同时选择“不分类”与“OK/NG”", "系统提示");
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (txtgrading1.Text.Trim().Equals(txtgrading3.Text.Trim()))
|
||||
{
|
||||
if (cmbTensionStrapCCD1.SelectedIndex == 0 || cmbTensionStrapCCD3.SelectedIndex == 0)
|
||||
{
|
||||
if (cmbTensionStrapCCD1.SelectedIndex == 1 || cmbTensionStrapCCD3.SelectedIndex == 1 || cmbTensionStrapCCD1.SelectedIndex == 2 || cmbTensionStrapCCD3.SelectedIndex == 2)
|
||||
{
|
||||
MessageBox.Show("同一档位(一档、三档)不允许同时选择“不分类”与“OK/NG”", "系统提示");
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (txtgrading1.Text.Trim().Equals(txtgrading4.Text.Trim()))
|
||||
{
|
||||
if (cmbTensionStrapCCD1.SelectedIndex == 0 || cmbTensionStrapCCD4.SelectedIndex == 0)
|
||||
{
|
||||
if (cmbTensionStrapCCD1.SelectedIndex == 1 || cmbTensionStrapCCD4.SelectedIndex == 1 || cmbTensionStrapCCD1.SelectedIndex == 2 || cmbTensionStrapCCD4.SelectedIndex == 2)
|
||||
{
|
||||
MessageBox.Show("同一档位(一档、四档)不允许同时选择“不分类”与“OK/NG”", "系统提示");
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (txtgrading2.Text.Trim().Equals(txtgrading3.Text.Trim()))
|
||||
{
|
||||
if (cmbTensionStrapCCD2.SelectedIndex == 0 || cmbTensionStrapCCD3.SelectedIndex == 0)
|
||||
{
|
||||
if (cmbTensionStrapCCD2.SelectedIndex == 1 || cmbTensionStrapCCD3.SelectedIndex == 1 || cmbTensionStrapCCD2.SelectedIndex == 2 || cmbTensionStrapCCD3.SelectedIndex == 2)
|
||||
{
|
||||
MessageBox.Show("同一档位(二档、三档)不允许同时选择“不分类”与“OK/NG”", "系统提示");
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (txtgrading2.Text.Trim().Equals(txtgrading4.Text.Trim()))
|
||||
{
|
||||
if (cmbTensionStrapCCD2.SelectedIndex == 0 || cmbTensionStrapCCD4.SelectedIndex == 0)
|
||||
{
|
||||
if (cmbTensionStrapCCD2.SelectedIndex == 1 || cmbTensionStrapCCD4.SelectedIndex == 1 || cmbTensionStrapCCD2.SelectedIndex == 2 || cmbTensionStrapCCD4.SelectedIndex == 2)
|
||||
{
|
||||
MessageBox.Show("同一档位(二档、四档)不允许同时选择“不分类”与“OK/NG”", "系统提示");
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (txtgrading3.Text.Trim().Equals(txtgrading4.Text.Trim()))
|
||||
{
|
||||
if (cmbTensionStrapCCD3.SelectedIndex == 0 || cmbTensionStrapCCD4.SelectedIndex == 0)
|
||||
{
|
||||
if (cmbTensionStrapCCD3.SelectedIndex == 1 || cmbTensionStrapCCD4.SelectedIndex == 1 || cmbTensionStrapCCD3.SelectedIndex == 2 || cmbTensionStrapCCD4.SelectedIndex == 2)
|
||||
{
|
||||
MessageBox.Show("同一档位(三档、四档)不允许同时选择“不分类”与“OK/NG”", "系统提示");
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#region plc中ccd屏蔽
|
||||
//开启了ccd屏蔽的,只能使用 ccd结果 不分类
|
||||
//关闭了ccd屏蔽的,只能使用 ccd结果 ng ok
|
||||
//同ok档位 必须有一个选择ccd ok 或者不分类
|
||||
var listGradingCCD = new List<string>();
|
||||
listGradingCCD.Add(txtgrading1.Text.Trim() + "-" + cmbTensionStrapCCD1.Text);
|
||||
listGradingCCD.Add(txtgrading2.Text.Trim() + "-" + cmbTensionStrapCCD2.Text);
|
||||
listGradingCCD.Add(txtgrading3.Text.Trim() + "-" + cmbTensionStrapCCD3.Text);
|
||||
listGradingCCD.Add(txtgrading4.Text.Trim() + "-" + cmbTensionStrapCCD4.Text);
|
||||
//读取plc地址W260。9 是开启屏蔽。1 是默认不开启。 反馈地址w261。 1 是正常不报警。 2 是报警。
|
||||
var int_IsMaskCCD = MelsecPLCCom.lstMcUI[0].ReadshortDReg("W260");
|
||||
|
||||
if (int_IsMaskCCD == 9)
|
||||
{
|
||||
var gradingCCD_NoClassCount = listGradingCCD.Count(x => x.Contains("不分类"));
|
||||
if(gradingCCD_NoClassCount <=0)
|
||||
{
|
||||
MessageBox.Show($"已开启CCD结果屏蔽,全部档位设置CCD结果不分类", "系统提示");
|
||||
return;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
//必须有一个OK ccd结果拉带
|
||||
var gradingCCD_OKCount = listGradingCCD.Count(x => x.Contains("OK"));
|
||||
if(gradingCCD_OKCount <= 0)
|
||||
{
|
||||
MessageBox.Show($"已关闭CCD结果屏蔽,档位设置至少有一个CCD结果OK选择值", "系统提示");
|
||||
return;
|
||||
}
|
||||
var lstGradingCCD_NG = listGradingCCD.Where(x => x.Contains("NG")).Distinct().ToList();
|
||||
foreach (var item_NG in lstGradingCCD_NG)
|
||||
{
|
||||
var grading_array = item_NG.Split(new string[] { "-" }, StringSplitOptions.RemoveEmptyEntries);
|
||||
var indexGrading = listGradingCCD.IndexOf(grading_array[0] + "-" + "OK");
|
||||
if (indexGrading < 0)
|
||||
{
|
||||
MessageBox.Show($"已关闭CCD结果屏蔽,OK拉带档位{item_NG},必须选一个{grading_array[0]}档位对应的CCD结果OK值", "系统提示");
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
IniFileHelper.WriteIniData("MES配置", "Grading1", txtgrading1.Text.Trim());
|
||||
IniFileHelper.WriteIniData("MES配置", "Grading2", txtgrading2.Text.Trim());
|
||||
IniFileHelper.WriteIniData("MES配置", "Grading3", txtgrading3.Text.Trim());
|
||||
IniFileHelper.WriteIniData("MES配置", "Grading4", txtgrading4.Text.Trim());
|
||||
IniFileHelper.WriteIniData("MES配置", "TensionStrapCCDReslut1", cmbTensionStrapCCD1.SelectedIndex.ToString());
|
||||
IniFileHelper.WriteIniData("MES配置", "TensionStrapCCDReslut2", cmbTensionStrapCCD2.SelectedIndex.ToString());
|
||||
IniFileHelper.WriteIniData("MES配置", "TensionStrapCCDReslut3", cmbTensionStrapCCD3.SelectedIndex.ToString());
|
||||
IniFileHelper.WriteIniData("MES配置", "TensionStrapCCDReslut4", cmbTensionStrapCCD4.SelectedIndex.ToString());
|
||||
IniFileHelper.WriteIniData("MES配置", "TensionStrap1", cmbTensionStrap1.SelectedIndex.ToString());
|
||||
IniFileHelper.WriteIniData("MES配置", "TensionStrap2", cmbTensionStrap2.SelectedIndex.ToString());
|
||||
IniFileHelper.WriteIniData("MES配置", "TensionStrap3", cmbTensionStrap3.SelectedIndex.ToString());
|
||||
|
||||
//不分类
|
||||
IniFileHelper.WriteIniData("MES配置", "StartNGFL", chkStartNGFL.Checked ? "1" : "0");
|
||||
//是否启用分档
|
||||
IniFileHelper.WriteIniData("MES配置", "Grading", chkCkGrading.Checked ? "1" : "2");
|
||||
|
||||
MESGradingSet[0] = (short)1;
|
||||
if ((txtgrading2.Text.Trim()+ cmbTensionStrapCCD2.Text).Equals(txtgrading1.Text.Trim()+ cmbTensionStrapCCD1.Text))
|
||||
MESGradingSet[1] = MESGradingSet[0];
|
||||
else
|
||||
MESGradingSet[1] = (short)(MESGradingSet[0] + 1);
|
||||
|
||||
if ((txtgrading3.Text.Trim() + cmbTensionStrapCCD3.Text).Equals(txtgrading1.Text.Trim()+ cmbTensionStrapCCD1.Text))
|
||||
MESGradingSet[2] = MESGradingSet[0];
|
||||
else
|
||||
{
|
||||
if ((txtgrading3.Text.Trim() + cmbTensionStrapCCD3.Text).Equals(txtgrading2.Text.Trim() + cmbTensionStrapCCD2.Text))
|
||||
MESGradingSet[2] = MESGradingSet[1];
|
||||
else
|
||||
MESGradingSet[2] = (short)(MESGradingSet[1] + 1);
|
||||
}
|
||||
|
||||
if ((txtgrading4.Text.Trim() + cmbTensionStrapCCD4.Text).Equals(txtgrading1.Text.Trim() + cmbTensionStrapCCD1.Text))
|
||||
MESGradingSet[3] = MESGradingSet[0];
|
||||
else
|
||||
{
|
||||
if ((txtgrading4.Text.Trim() + cmbTensionStrapCCD4.Text).Equals(txtgrading2.Text.Trim() + cmbTensionStrapCCD2.Text))
|
||||
MESGradingSet[3] = MESGradingSet[1];
|
||||
else
|
||||
{
|
||||
if ((txtgrading4.Text.Trim() + cmbTensionStrapCCD4.Text).Equals(txtgrading3.Text.Trim() + cmbTensionStrapCCD3.Text))
|
||||
MESGradingSet[3] = MESGradingSet[2];
|
||||
else
|
||||
MESGradingSet[3] = (short)(MESGradingSet[2] + 1);
|
||||
}
|
||||
}
|
||||
|
||||
int Grading = Convert.ToInt32(IniFileHelper.ReadIniData("MES配置", "Grading"));
|
||||
|
||||
//告诉PLC当前OK与NG拉带设置挡位
|
||||
//
|
||||
if(cmbTensionStrapCCD1.Text.ToUpper() =="NG")
|
||||
{
|
||||
MESGradingSet[0] = (short)(30 + MESGradingSet[0]);
|
||||
}
|
||||
if (cmbTensionStrapCCD2.Text.ToUpper() == "NG")
|
||||
{
|
||||
MESGradingSet[1] = (short)(30 + MESGradingSet[1]);
|
||||
}
|
||||
if (cmbTensionStrapCCD3.Text.ToUpper() == "NG")
|
||||
{
|
||||
MESGradingSet[2] = (short)(30 + MESGradingSet[2]);
|
||||
}
|
||||
if (cmbTensionStrapCCD4.Text.ToUpper() == "NG")
|
||||
{
|
||||
MESGradingSet[3] = (short)(30 + MESGradingSet[3]);
|
||||
}
|
||||
MelsecPLCCom.lstMcUI[0].WriteDReg("W241", MESGradingSet[0]);
|
||||
MelsecPLCCom.lstMcUI[0].WriteDReg("W242", MESGradingSet[1]);
|
||||
MelsecPLCCom.lstMcUI[0].WriteDReg("W243", MESGradingSet[2]);
|
||||
MelsecPLCCom.lstMcUI[0].WriteDReg("W244", MESGradingSet[3]);
|
||||
//+10
|
||||
//MelsecPLCCom.lstMcUI[0].WriteDReg("W245", (short)cmbTensionStrap1.SelectedIndex);
|
||||
//MelsecPLCCom.lstMcUI[0].WriteDReg("W246", (short)cmbTensionStrap2.SelectedIndex);
|
||||
//MelsecPLCCom.lstMcUI[0].WriteDReg("W247", (short)cmbTensionStrap3.SelectedIndex);
|
||||
|
||||
MelsecPLCCom.lstMcUI[0].WriteDReg("W245", (short)(cmbTensionStrap1.SelectedIndex ==0 ? 99 : cmbTensionStrap1.SelectedIndex + 10));
|
||||
MelsecPLCCom.lstMcUI[0].WriteDReg("W246", (short)(cmbTensionStrap2.SelectedIndex == 0 ? 99 : cmbTensionStrap2.SelectedIndex + 10));
|
||||
MelsecPLCCom.lstMcUI[0].WriteDReg("W247", (short)(cmbTensionStrap3.SelectedIndex == 0 ? 99 : cmbTensionStrap3.SelectedIndex + 10));
|
||||
MelsecPLCCom.lstMcUI[0].WriteDReg("W248", (short)Grading);
|
||||
|
||||
|
||||
LogManagerControl.AddLog($"用户[{Global.systemConfig.userName}]设置一档,W241[值:{MESGradingSet[0]}-档位:{txtgrading1.Text.Trim()}{cmbTensionStrapCCD1.Text}]", LogAddtype.local, Logtype.Message);
|
||||
LogManagerControl.AddLog($"用户[{Global.systemConfig.userName}]设置二档,W242[值:{MESGradingSet[1]}-档位:{txtgrading2.Text.Trim()}{cmbTensionStrapCCD2.Text}]", LogAddtype.local, Logtype.Message);
|
||||
LogManagerControl.AddLog($"用户[{Global.systemConfig.userName}]设置三档,W243[值:{MESGradingSet[2]}-档位:{txtgrading3.Text.Trim()}{cmbTensionStrapCCD3.Text}]", LogAddtype.local, Logtype.Message);
|
||||
LogManagerControl.AddLog($"用户[{Global.systemConfig.userName}]设置四档,W244[值:{MESGradingSet[3]}-档位:{txtgrading4.Text.Trim()}{cmbTensionStrapCCD4.Text}]", LogAddtype.local, Logtype.Message);
|
||||
|
||||
var ng1 = (short)(cmbTensionStrap1.SelectedIndex == 0 ? 99 : cmbTensionStrap1.SelectedIndex + 10);
|
||||
var ng2 = (short)(cmbTensionStrap2.SelectedIndex == 0 ? 99 : cmbTensionStrap2.SelectedIndex + 10);
|
||||
var ng3 = (short)(cmbTensionStrap3.SelectedIndex == 0 ? 99 : cmbTensionStrap3.SelectedIndex + 10);
|
||||
|
||||
LogManagerControl.AddLog($"用户[{Global.systemConfig.userName}]设置NG拉带1,W245[值:{ng1}-档位:{cmbTensionStrap1.Text.Trim()}]", LogAddtype.local, Logtype.Message);
|
||||
LogManagerControl.AddLog($"用户[{Global.systemConfig.userName}]设置NG拉带2,W246[值:{ng2}-档位:{cmbTensionStrap2.Text.Trim()}]", LogAddtype.local, Logtype.Message);
|
||||
LogManagerControl.AddLog($"用户[{Global.systemConfig.userName}]设置NG拉带3,W247[值:{ng3}-档位:{cmbTensionStrap3.Text.Trim()}]", LogAddtype.local, Logtype.Message);
|
||||
if ((short)Grading == 1)
|
||||
{
|
||||
LogManagerControl.AddLog($"用户[{Global.systemConfig.userName}],设置W248[值:{(short)Grading}-启用分档模式]", LogAddtype.local, Logtype.Message);
|
||||
}
|
||||
else
|
||||
{
|
||||
LogManagerControl.AddLog($"用户[{Global.systemConfig.userName}],设置W248[值:{(short)Grading}-关闭分档模式]", LogAddtype.local, Logtype.Message);
|
||||
}
|
||||
MessageBox.Show("MES参数保存成功!", "系统提示");
|
||||
this.DialogResult = DialogResult.OK;
|
||||
}
|
||||
|
||||
private void btnExit_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.Close();
|
||||
}
|
||||
|
||||
private void cmbTensionStrap1_DropDownClosed(object sender, EventArgs e)
|
||||
{
|
||||
if (cmbTensionStrap1.SelectedIndex != cmbTensionStrap1.Items.Count - 1)
|
||||
cmbTensionStrap2.SelectedIndex = cmbTensionStrap2.Items.Count - 1;
|
||||
}
|
||||
|
||||
private void cmbTensionStrap2_DropDownClosed(object sender, EventArgs e)
|
||||
{
|
||||
if (cmbTensionStrap2.SelectedIndex != cmbTensionStrap2.Items.Count - 1)
|
||||
cmbTensionStrap3.SelectedIndex = cmbTensionStrap3.Items.Count - 1;
|
||||
}
|
||||
|
||||
private void cmbTensionStrap3_DropDownClosed(object sender, EventArgs e)
|
||||
{
|
||||
if (cmbTensionStrap3.SelectedIndex != cmbTensionStrap3.Items.Count - 1)
|
||||
cmbTensionStrap1.SelectedIndex = cmbTensionStrap1.Items.Count - 1;
|
||||
}
|
||||
|
||||
private void chkStartNGFL_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (chkStartNGFL.Checked)
|
||||
{
|
||||
cmbTensionStrap1.SelectedIndex = 0;
|
||||
cmbTensionStrap2.SelectedIndex = 0;
|
||||
cmbTensionStrap3.SelectedIndex = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,120 @@
|
||||
<?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>
|
||||
</root>
|
||||
+225
@@ -0,0 +1,225 @@
|
||||
|
||||
namespace JY.Inspection.Frm
|
||||
{
|
||||
partial class FrmAbnormalVoice
|
||||
{
|
||||
/// <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.groupBox3 = new System.Windows.Forms.GroupBox();
|
||||
this.grdData = new System.Windows.Forms.DataGridView();
|
||||
this.metroLabel7 = new MetroFramework.Controls.MetroLabel();
|
||||
this.btnEdit = new MetroFramework.Controls.MetroButton();
|
||||
this.txtCode = new MetroFramework.Controls.MetroTextBox();
|
||||
this.btnDelete = new MetroFramework.Controls.MetroButton();
|
||||
this.metroLabel1 = new MetroFramework.Controls.MetroLabel();
|
||||
this.btnAdd = new MetroFramework.Controls.MetroButton();
|
||||
this.txtRemark = new MetroFramework.Controls.MetroTextBox();
|
||||
this.groupBox3.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.grdData)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// groupBox3
|
||||
//
|
||||
this.groupBox3.Controls.Add(this.grdData);
|
||||
this.groupBox3.Controls.Add(this.metroLabel7);
|
||||
this.groupBox3.Controls.Add(this.btnEdit);
|
||||
this.groupBox3.Controls.Add(this.txtCode);
|
||||
this.groupBox3.Controls.Add(this.btnDelete);
|
||||
this.groupBox3.Controls.Add(this.metroLabel1);
|
||||
this.groupBox3.Controls.Add(this.btnAdd);
|
||||
this.groupBox3.Controls.Add(this.txtRemark);
|
||||
this.groupBox3.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.groupBox3.Location = new System.Drawing.Point(20, 30);
|
||||
this.groupBox3.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
|
||||
this.groupBox3.Name = "groupBox3";
|
||||
this.groupBox3.Padding = new System.Windows.Forms.Padding(4, 3, 4, 3);
|
||||
this.groupBox3.Size = new System.Drawing.Size(1039, 543);
|
||||
this.groupBox3.TabIndex = 21;
|
||||
this.groupBox3.TabStop = false;
|
||||
this.groupBox3.Text = "异常播报设置";
|
||||
//
|
||||
// grdData
|
||||
//
|
||||
this.grdData.AllowUserToAddRows = false;
|
||||
this.grdData.AllowUserToDeleteRows = false;
|
||||
this.grdData.BackgroundColor = System.Drawing.Color.White;
|
||||
this.grdData.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
||||
this.grdData.Location = new System.Drawing.Point(9, 25);
|
||||
this.grdData.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
|
||||
this.grdData.Name = "grdData";
|
||||
this.grdData.ReadOnly = true;
|
||||
this.grdData.RowHeadersWidth = 51;
|
||||
this.grdData.RowTemplate.Height = 23;
|
||||
this.grdData.Size = new System.Drawing.Size(679, 500);
|
||||
this.grdData.TabIndex = 5;
|
||||
//
|
||||
// metroLabel7
|
||||
//
|
||||
this.metroLabel7.AutoSize = true;
|
||||
this.metroLabel7.Location = new System.Drawing.Point(696, 40);
|
||||
this.metroLabel7.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
|
||||
this.metroLabel7.Name = "metroLabel7";
|
||||
this.metroLabel7.Size = new System.Drawing.Size(84, 20);
|
||||
this.metroLabel7.TabIndex = 16;
|
||||
this.metroLabel7.Text = "工位编码:";
|
||||
//
|
||||
// btnEdit
|
||||
//
|
||||
this.btnEdit.Location = new System.Drawing.Point(813, 231);
|
||||
this.btnEdit.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
|
||||
this.btnEdit.Name = "btnEdit";
|
||||
this.btnEdit.Size = new System.Drawing.Size(100, 28);
|
||||
this.btnEdit.TabIndex = 4;
|
||||
this.btnEdit.Text = "编 辑";
|
||||
this.btnEdit.UseSelectable = true;
|
||||
//
|
||||
// txtCode
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
this.txtCode.CustomButton.Image = null;
|
||||
this.txtCode.CustomButton.Location = new System.Drawing.Point(192, 2);
|
||||
this.txtCode.CustomButton.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
|
||||
this.txtCode.CustomButton.Name = "";
|
||||
this.txtCode.CustomButton.Size = new System.Drawing.Size(23, 23);
|
||||
this.txtCode.CustomButton.Style = MetroFramework.MetroColorStyle.Blue;
|
||||
this.txtCode.CustomButton.TabIndex = 1;
|
||||
this.txtCode.CustomButton.Theme = MetroFramework.MetroThemeStyle.Light;
|
||||
this.txtCode.CustomButton.UseSelectable = true;
|
||||
this.txtCode.CustomButton.Visible = false;
|
||||
this.txtCode.Lines = new string[0];
|
||||
this.txtCode.Location = new System.Drawing.Point(803, 36);
|
||||
this.txtCode.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
|
||||
this.txtCode.MaxLength = 10;
|
||||
this.txtCode.Name = "txtCode";
|
||||
this.txtCode.PasswordChar = '\0';
|
||||
this.txtCode.ScrollBars = System.Windows.Forms.ScrollBars.None;
|
||||
this.txtCode.SelectedText = "";
|
||||
this.txtCode.SelectionLength = 0;
|
||||
this.txtCode.SelectionStart = 0;
|
||||
this.txtCode.ShortcutsEnabled = true;
|
||||
this.txtCode.Size = new System.Drawing.Size(218, 28);
|
||||
this.txtCode.TabIndex = 1;
|
||||
this.txtCode.UseSelectable = true;
|
||||
this.txtCode.WaterMarkColor = System.Drawing.Color.FromArgb(((int)(((byte)(109)))), ((int)(((byte)(109)))), ((int)(((byte)(109)))));
|
||||
this.txtCode.WaterMarkFont = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Pixel);
|
||||
//
|
||||
// btnDelete
|
||||
//
|
||||
this.btnDelete.Location = new System.Drawing.Point(921, 231);
|
||||
this.btnDelete.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
|
||||
this.btnDelete.Name = "btnDelete";
|
||||
this.btnDelete.Size = new System.Drawing.Size(100, 28);
|
||||
this.btnDelete.TabIndex = 5;
|
||||
this.btnDelete.Text = "删 除";
|
||||
this.btnDelete.UseSelectable = true;
|
||||
//
|
||||
// metroLabel1
|
||||
//
|
||||
this.metroLabel1.AutoSize = true;
|
||||
this.metroLabel1.Location = new System.Drawing.Point(696, 76);
|
||||
this.metroLabel1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
|
||||
this.metroLabel1.Name = "metroLabel1";
|
||||
this.metroLabel1.Size = new System.Drawing.Size(84, 20);
|
||||
this.metroLabel1.TabIndex = 4;
|
||||
this.metroLabel1.Text = "播报内容:";
|
||||
//
|
||||
// btnAdd
|
||||
//
|
||||
this.btnAdd.Location = new System.Drawing.Point(706, 231);
|
||||
this.btnAdd.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
|
||||
this.btnAdd.Name = "btnAdd";
|
||||
this.btnAdd.Size = new System.Drawing.Size(100, 28);
|
||||
this.btnAdd.TabIndex = 3;
|
||||
this.btnAdd.Text = "添 加";
|
||||
this.btnAdd.UseSelectable = true;
|
||||
//
|
||||
// txtRemark
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
this.txtRemark.CustomButton.Image = null;
|
||||
this.txtRemark.CustomButton.Location = new System.Drawing.Point(80, 1);
|
||||
this.txtRemark.CustomButton.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
|
||||
this.txtRemark.CustomButton.Name = "";
|
||||
this.txtRemark.CustomButton.Size = new System.Drawing.Size(137, 137);
|
||||
this.txtRemark.CustomButton.Style = MetroFramework.MetroColorStyle.Blue;
|
||||
this.txtRemark.CustomButton.TabIndex = 1;
|
||||
this.txtRemark.CustomButton.Theme = MetroFramework.MetroThemeStyle.Light;
|
||||
this.txtRemark.CustomButton.UseSelectable = true;
|
||||
this.txtRemark.CustomButton.Visible = false;
|
||||
this.txtRemark.Lines = new string[0];
|
||||
this.txtRemark.Location = new System.Drawing.Point(803, 76);
|
||||
this.txtRemark.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
|
||||
this.txtRemark.MaxLength = 100;
|
||||
this.txtRemark.Multiline = true;
|
||||
this.txtRemark.Name = "txtRemark";
|
||||
this.txtRemark.PasswordChar = '\0';
|
||||
this.txtRemark.ScrollBars = System.Windows.Forms.ScrollBars.None;
|
||||
this.txtRemark.SelectedText = "";
|
||||
this.txtRemark.SelectionLength = 0;
|
||||
this.txtRemark.SelectionStart = 0;
|
||||
this.txtRemark.ShortcutsEnabled = true;
|
||||
this.txtRemark.Size = new System.Drawing.Size(218, 139);
|
||||
this.txtRemark.TabIndex = 2;
|
||||
this.txtRemark.UseSelectable = true;
|
||||
this.txtRemark.WaterMarkColor = System.Drawing.Color.FromArgb(((int)(((byte)(109)))), ((int)(((byte)(109)))), ((int)(((byte)(109)))));
|
||||
this.txtRemark.WaterMarkFont = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Pixel);
|
||||
//
|
||||
// FrmAbnormalVoice
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(1079, 593);
|
||||
this.Controls.Add(this.groupBox3);
|
||||
this.DisplayHeader = false;
|
||||
this.MaximizeBox = false;
|
||||
this.Name = "FrmAbnormalVoice";
|
||||
this.Padding = new System.Windows.Forms.Padding(20, 30, 20, 20);
|
||||
this.Resizable = false;
|
||||
this.groupBox3.ResumeLayout(false);
|
||||
this.groupBox3.PerformLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.grdData)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.GroupBox groupBox3;
|
||||
private System.Windows.Forms.DataGridView grdData;
|
||||
private MetroFramework.Controls.MetroLabel metroLabel7;
|
||||
private MetroFramework.Controls.MetroButton btnEdit;
|
||||
private MetroFramework.Controls.MetroTextBox txtCode;
|
||||
private MetroFramework.Controls.MetroButton btnDelete;
|
||||
private MetroFramework.Controls.MetroLabel metroLabel1;
|
||||
private MetroFramework.Controls.MetroButton btnAdd;
|
||||
private MetroFramework.Controls.MetroTextBox txtRemark;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,214 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using System.Speech.Synthesis;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using JY.DAL;
|
||||
using JY.Model;
|
||||
|
||||
namespace JY.Inspection.Frm
|
||||
{
|
||||
public partial class FrmAbnormalVoice : MetroFramework.Forms.MetroForm
|
||||
{
|
||||
private DataTable _dt;
|
||||
private SpeechSynthesizer _speech;
|
||||
public FrmAbnormalVoice()
|
||||
{
|
||||
InitializeComponent();
|
||||
this.Load += FrmAbnormalVoice_Load;
|
||||
this.FormClosing += FrmAbnormalVoice_FormClosing;
|
||||
|
||||
btnAdd.Click += BtnAdd_Click;
|
||||
btnEdit.Click += BtnEdit_Click;
|
||||
btnDelete.Click += BtnDelete_Click;
|
||||
grdData.SelectionChanged += GrdData_SelectionChanged;
|
||||
grdData.CellContentClick += GrdData_CellContentClick;
|
||||
}
|
||||
|
||||
private void FrmAbnormalVoice_Load(object sender, EventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
BindGridStyle();
|
||||
LoadData();
|
||||
|
||||
_speech = new SpeechSynthesizer();
|
||||
_speech.Volume = 100; //音量
|
||||
CultureInfo keyboardCulture = InputLanguage.CurrentInputLanguage.Culture;
|
||||
InstalledVoice neededVoice = _speech.GetInstalledVoices(keyboardCulture).FirstOrDefault();
|
||||
if (neededVoice != null)
|
||||
{
|
||||
_speech.SelectVoice(neededVoice.VoiceInfo.Name);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
MessageBox.Show(ex.Message);
|
||||
}
|
||||
}
|
||||
private void LoadData()
|
||||
{
|
||||
_dt = SqlHelper<AbnormalVoice>.QueryTable("select *,'播放' as Operation from tb_AbnormalVoice");
|
||||
grdData.DataSource = _dt.DefaultView;
|
||||
}
|
||||
|
||||
private void BtnAdd_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (string.IsNullOrEmpty(txtCode.Text.Trim()))
|
||||
{
|
||||
txtCode.Focus();
|
||||
MessageBox.Show("请输入工位编码");
|
||||
return;
|
||||
}
|
||||
if (string.IsNullOrEmpty(txtRemark.Text.Trim()))
|
||||
{
|
||||
txtRemark.Focus();
|
||||
MessageBox.Show("请输入播报内容");
|
||||
return;
|
||||
}
|
||||
try
|
||||
{
|
||||
string sql = $"insert tb_AbnormalVoice(Code,Remark) values('{txtCode.Text.Trim()}','{txtRemark.Text.Trim()}')";
|
||||
int result = SqlHelper<object>.Execute(sql);
|
||||
if (result > 0)
|
||||
{
|
||||
LoadData();
|
||||
MessageBox.Show("保存成功!");
|
||||
}
|
||||
else
|
||||
{
|
||||
MessageBox.Show("保存失败!");
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
MessageBox.Show("保存失败:" + ex.Message);
|
||||
}
|
||||
}
|
||||
|
||||
private void BtnEdit_Click(object sender, EventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
string sql = $"update tb_AbnormalVoice set Code='{txtCode.Text.Trim()}',Remark='{txtRemark.Text.Trim()}' where id={grdData.CurrentRow.Cells["ID"].Value}";
|
||||
int result = SqlHelper<object>.Execute(sql);
|
||||
if (result > 0)
|
||||
{
|
||||
LoadData();
|
||||
MessageBox.Show("编辑成功!");
|
||||
}
|
||||
else
|
||||
{
|
||||
MessageBox.Show("编辑失败!");
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
MessageBox.Show("编辑失败:" + ex.Message);
|
||||
}
|
||||
}
|
||||
|
||||
private void BtnDelete_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (MessageBox.Show("确认删除当前选中记录吗?", "提示", MessageBoxButtons.YesNo) == DialogResult.No)
|
||||
{
|
||||
return;
|
||||
}
|
||||
try
|
||||
{
|
||||
string sql = $"delete tb_AbnormalVoice where id={grdData.CurrentRow.Cells["ID"].Value}";
|
||||
int result = SqlHelper<object>.Execute(sql);
|
||||
if (result > 0)
|
||||
{
|
||||
LoadData();
|
||||
MessageBox.Show("删除成功!");
|
||||
}
|
||||
else
|
||||
{
|
||||
MessageBox.Show("删除失败!");
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
MessageBox.Show("删除失败:" + ex.Message);
|
||||
}
|
||||
}
|
||||
private void GrdData_SelectionChanged(object sender, EventArgs e)
|
||||
{
|
||||
DataGridViewRow row = grdData.CurrentRow;
|
||||
txtCode.Text = row.Cells["Code"].Value.ToString();
|
||||
txtRemark.Text = row.Cells["Remark"].Value.ToString();
|
||||
}
|
||||
|
||||
private void GrdData_CellContentClick(object sender, DataGridViewCellEventArgs e)
|
||||
{
|
||||
if (e.ColumnIndex == 3)
|
||||
{
|
||||
DataGridViewRow row = grdData.CurrentRow;
|
||||
if (_speech != null)
|
||||
{
|
||||
_speech.SpeakAsync(row.Cells["Remark"].Value.ToString());
|
||||
}
|
||||
}
|
||||
}
|
||||
private void FrmAbnormalVoice_FormClosing(object sender, FormClosingEventArgs e)
|
||||
{
|
||||
if (_speech != null)
|
||||
{
|
||||
if (_speech.State == SynthesizerState.Speaking)
|
||||
{
|
||||
_speech.Pause();
|
||||
_speech.Dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void BindGridStyle()
|
||||
{
|
||||
grdData.AlternatingRowsDefaultCellStyle.BackColor = System.Drawing.Color.WhiteSmoke;//FromArgb(((int)(((byte)(255)))), ((int)(((byte)(224)))), ((int)(((byte)(192)))));
|
||||
//grdData.SelectionMode = DataGridViewSelectionMode.FullRowSelect;
|
||||
grdData.MultiSelect = false;
|
||||
grdData.AllowUserToAddRows = false;
|
||||
grdData.AutoGenerateColumns = false;
|
||||
|
||||
DataGridViewTextBoxColumn col1 = new DataGridViewTextBoxColumn();
|
||||
col1.DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter;
|
||||
col1.Name = "ID";
|
||||
col1.DataPropertyName = col1.Name;
|
||||
col1.HeaderText = "ID";
|
||||
col1.Width = 50;
|
||||
grdData.Columns.Add(col1);
|
||||
|
||||
DataGridViewTextBoxColumn col2 = new DataGridViewTextBoxColumn();
|
||||
col2.DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter;
|
||||
col2.Name = "Code";
|
||||
col2.DataPropertyName = col2.Name;
|
||||
col2.HeaderText = "工位编码";
|
||||
col2.Width = 90;
|
||||
grdData.Columns.Add(col2);
|
||||
|
||||
DataGridViewTextBoxColumn col3 = new DataGridViewTextBoxColumn();
|
||||
col3.DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleLeft;
|
||||
col3.Name = "Remark";
|
||||
col3.DataPropertyName = col3.Name;
|
||||
col3.HeaderText = "播报内容";
|
||||
col3.AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
|
||||
//col2.Width = 200;
|
||||
grdData.Columns.Add(col3);
|
||||
|
||||
DataGridViewLinkColumn col7 = new DataGridViewLinkColumn();
|
||||
col7.DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter;
|
||||
col7.Name = "Operation";
|
||||
col7.DataPropertyName = col7.Name;
|
||||
col7.HeaderText = "";
|
||||
col7.Width = 60;
|
||||
grdData.Columns.Add(col7);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,120 @@
|
||||
<?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>
|
||||
</root>
|
||||
@@ -0,0 +1,110 @@
|
||||
using JY.DAL;
|
||||
using JY.Model;
|
||||
using MetroFramework.Forms;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace JY.Inspection.Frm
|
||||
{
|
||||
public partial class FrmAlamQuery : MetroForm
|
||||
{
|
||||
public delegate void myDelegate(List<AlarmData> dtt);
|
||||
public delegate void PDelegate();
|
||||
Thread tSo;
|
||||
|
||||
/// <summary>
|
||||
/// 数据库访问接口
|
||||
/// </summary>
|
||||
private IDbHelper dbHelper = new OpSqlDataBase();
|
||||
public FrmAlamQuery()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void FrmAlamQuery_Load(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
/// 查询报警日志
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void btnSelect_Click(object sender, EventArgs e)
|
||||
{
|
||||
//string strDate1 = dtStartTime.Value.ToString("yyyy-MM-dd HH:mm") + ":01";
|
||||
//string strDate2 = dtEndTime.Value.ToString("yyyy-MM-dd HH:mm") + ":59";
|
||||
|
||||
//var list = dbHelper.GetAlarmData(strDate1, strDate2);
|
||||
|
||||
//if (list == null || list.Count == 0)
|
||||
//{
|
||||
// MessageBox.Show("此时间段无数据或无此条码数据", "系统提示");
|
||||
// lblSelectStures.BeginInvoke(new PDelegate(bb));
|
||||
// return;
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// dgvData.DataSource = list;
|
||||
//}
|
||||
//以下线程方法
|
||||
try
|
||||
{
|
||||
tSo = new Thread(new ThreadStart(ThreadWork));
|
||||
tSo.IsBackground = true;
|
||||
tSo.Start();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
MessageBox.Show(ex.Message.ToString() + ",数据查询失败", "查询提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void ThreadWork()
|
||||
{
|
||||
lblSelectStures.BeginInvoke(new PDelegate(aa));
|
||||
string strDate1 = dtStartTime.Value.ToString("yyyy-MM-dd HH:mm") + ":01";
|
||||
string strDate2 = dtEndTime.Value.ToString("yyyy-MM-dd HH:mm") + ":59";
|
||||
if (dtEndTime.Value.Year != dtStartTime.Value.Year)
|
||||
{
|
||||
MessageBox.Show("请选择日期必须在同一年份内!");
|
||||
lblSelectStures.BeginInvoke(new PDelegate(bb));
|
||||
return;
|
||||
}
|
||||
|
||||
var result = dbHelper.GetAlarmData(strDate1, strDate2);
|
||||
if (result == null || result.Count == 0)
|
||||
{
|
||||
MessageBox.Show("此时间段无数据或无此条码数据", "系统提示");
|
||||
lblSelectStures.BeginInvoke(new PDelegate(bb));
|
||||
return;
|
||||
}
|
||||
this.dgvData.BeginInvoke(new myDelegate(FillData), new object[] { result });//异步调用(来填充)
|
||||
lblSelectStures.BeginInvoke(new PDelegate(bb));
|
||||
}
|
||||
|
||||
private void FillData(List<AlarmData> dt )
|
||||
{
|
||||
this.dgvData.DataSource = dt;
|
||||
}
|
||||
|
||||
private void aa()
|
||||
{
|
||||
this.lblSelectStures.Text = "正在查询数据...";
|
||||
}
|
||||
private void bb()
|
||||
{
|
||||
this.lblSelectStures.Text = "查询结束";
|
||||
}
|
||||
}
|
||||
}
|
||||
+319
@@ -0,0 +1,319 @@
|
||||
namespace JY.Inspection.Frm
|
||||
{
|
||||
partial class FrmAlamQuery
|
||||
{
|
||||
/// <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()
|
||||
{
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmAlamQuery));
|
||||
this.btnSelect = new MetroFramework.Controls.MetroButton();
|
||||
this.metroLabel2 = new MetroFramework.Controls.MetroLabel();
|
||||
this.metroLabel1 = new MetroFramework.Controls.MetroLabel();
|
||||
this.lblSelectStures = new System.Windows.Forms.Label();
|
||||
this.dtEndTime = new System.Windows.Forms.DateTimePicker();
|
||||
this.dtStartTime = new System.Windows.Forms.DateTimePicker();
|
||||
this.dgvData = new MetroFramework.Controls.MetroGrid();
|
||||
this.AlarmType = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.AlarmGuid = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.PLCAdress = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.AlarmContent = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.AlarmCode = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.AlarmDesc = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.AlarmState = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.AlarmTime = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.BurningTime = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.Flag = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
((System.ComponentModel.ISupportInitialize)(this.dgvData)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// btnSelect
|
||||
//
|
||||
this.btnSelect.Location = new System.Drawing.Point(984, 38);
|
||||
this.btnSelect.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
|
||||
this.btnSelect.Name = "btnSelect";
|
||||
this.btnSelect.Size = new System.Drawing.Size(100, 29);
|
||||
this.btnSelect.TabIndex = 12;
|
||||
this.btnSelect.Text = "查询";
|
||||
this.btnSelect.UseSelectable = true;
|
||||
this.btnSelect.Click += new System.EventHandler(this.btnSelect_Click);
|
||||
//
|
||||
// metroLabel2
|
||||
//
|
||||
this.metroLabel2.AutoSize = true;
|
||||
this.metroLabel2.Location = new System.Drawing.Point(688, 40);
|
||||
this.metroLabel2.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
|
||||
this.metroLabel2.Name = "metroLabel2";
|
||||
this.metroLabel2.Size = new System.Drawing.Size(19, 20);
|
||||
this.metroLabel2.TabIndex = 11;
|
||||
this.metroLabel2.Text = "~";
|
||||
//
|
||||
// metroLabel1
|
||||
//
|
||||
this.metroLabel1.AutoSize = true;
|
||||
this.metroLabel1.Location = new System.Drawing.Point(353, 40);
|
||||
this.metroLabel1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
|
||||
this.metroLabel1.Name = "metroLabel1";
|
||||
this.metroLabel1.Size = new System.Drawing.Size(84, 20);
|
||||
this.metroLabel1.TabIndex = 10;
|
||||
this.metroLabel1.Text = "查询时间:";
|
||||
//
|
||||
// lblSelectStures
|
||||
//
|
||||
this.lblSelectStures.AutoSize = true;
|
||||
this.lblSelectStures.Location = new System.Drawing.Point(1271, 40);
|
||||
this.lblSelectStures.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
|
||||
this.lblSelectStures.Name = "lblSelectStures";
|
||||
this.lblSelectStures.Size = new System.Drawing.Size(0, 15);
|
||||
this.lblSelectStures.TabIndex = 14;
|
||||
//
|
||||
// dtEndTime
|
||||
//
|
||||
this.dtEndTime.CustomFormat = "yyyy-MM-dd HH:mm:ss";
|
||||
this.dtEndTime.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.dtEndTime.Format = System.Windows.Forms.DateTimePickerFormat.Custom;
|
||||
this.dtEndTime.Location = new System.Drawing.Point(720, 36);
|
||||
this.dtEndTime.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
|
||||
this.dtEndTime.Name = "dtEndTime";
|
||||
this.dtEndTime.Size = new System.Drawing.Size(233, 31);
|
||||
this.dtEndTime.TabIndex = 19;
|
||||
//
|
||||
// dtStartTime
|
||||
//
|
||||
this.dtStartTime.CalendarForeColor = System.Drawing.SystemColors.ControlLight;
|
||||
this.dtStartTime.CustomFormat = "yyyy-MM-dd HH:mm:ss";
|
||||
this.dtStartTime.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.dtStartTime.Format = System.Windows.Forms.DateTimePickerFormat.Custom;
|
||||
this.dtStartTime.Location = new System.Drawing.Point(448, 36);
|
||||
this.dtStartTime.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
|
||||
this.dtStartTime.Name = "dtStartTime";
|
||||
this.dtStartTime.Size = new System.Drawing.Size(233, 31);
|
||||
this.dtStartTime.TabIndex = 18;
|
||||
//
|
||||
// dgvData
|
||||
//
|
||||
this.dgvData.AllowUserToAddRows = false;
|
||||
this.dgvData.AllowUserToDeleteRows = false;
|
||||
this.dgvData.AllowUserToResizeRows = false;
|
||||
this.dgvData.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||
| System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.dgvData.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.AllCells;
|
||||
this.dgvData.BackgroundColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
|
||||
this.dgvData.BorderStyle = System.Windows.Forms.BorderStyle.None;
|
||||
this.dgvData.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.None;
|
||||
this.dgvData.ColumnHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.None;
|
||||
dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
|
||||
dataGridViewCellStyle1.BackColor = System.Drawing.Color.SkyBlue;
|
||||
dataGridViewCellStyle1.Font = new System.Drawing.Font("Segoe UI", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel);
|
||||
dataGridViewCellStyle1.ForeColor = System.Drawing.Color.Black;
|
||||
dataGridViewCellStyle1.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(198)))), ((int)(((byte)(247)))));
|
||||
dataGridViewCellStyle1.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(17)))), ((int)(((byte)(17)))), ((int)(((byte)(17)))));
|
||||
dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
|
||||
this.dgvData.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle1;
|
||||
this.dgvData.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
||||
this.dgvData.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
|
||||
this.AlarmType,
|
||||
this.AlarmGuid,
|
||||
this.PLCAdress,
|
||||
this.AlarmContent,
|
||||
this.AlarmCode,
|
||||
this.AlarmDesc,
|
||||
this.AlarmState,
|
||||
this.AlarmTime,
|
||||
this.BurningTime,
|
||||
this.Flag});
|
||||
dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
|
||||
dataGridViewCellStyle2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
|
||||
dataGridViewCellStyle2.Font = new System.Drawing.Font("Segoe UI", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel);
|
||||
dataGridViewCellStyle2.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(136)))), ((int)(((byte)(136)))), ((int)(((byte)(136)))));
|
||||
dataGridViewCellStyle2.SelectionBackColor = System.Drawing.Color.Silver;
|
||||
dataGridViewCellStyle2.SelectionForeColor = System.Drawing.Color.Black;
|
||||
dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
|
||||
this.dgvData.DefaultCellStyle = dataGridViewCellStyle2;
|
||||
this.dgvData.EnableHeadersVisualStyles = false;
|
||||
this.dgvData.Font = new System.Drawing.Font("Segoe UI", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel);
|
||||
this.dgvData.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
|
||||
this.dgvData.Location = new System.Drawing.Point(7, 75);
|
||||
this.dgvData.Margin = new System.Windows.Forms.Padding(4);
|
||||
this.dgvData.Name = "dgvData";
|
||||
this.dgvData.ReadOnly = true;
|
||||
this.dgvData.RowHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.None;
|
||||
dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
|
||||
dataGridViewCellStyle3.BackColor = System.Drawing.Color.White;
|
||||
dataGridViewCellStyle3.Font = new System.Drawing.Font("Segoe UI", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel);
|
||||
dataGridViewCellStyle3.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
|
||||
dataGridViewCellStyle3.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(198)))), ((int)(((byte)(247)))));
|
||||
dataGridViewCellStyle3.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(17)))), ((int)(((byte)(17)))), ((int)(((byte)(17)))));
|
||||
dataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
|
||||
this.dgvData.RowHeadersDefaultCellStyle = dataGridViewCellStyle3;
|
||||
this.dgvData.RowHeadersWidth = 51;
|
||||
this.dgvData.RowHeadersWidthSizeMode = System.Windows.Forms.DataGridViewRowHeadersWidthSizeMode.DisableResizing;
|
||||
this.dgvData.RowTemplate.Height = 23;
|
||||
this.dgvData.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
|
||||
this.dgvData.Size = new System.Drawing.Size(1479, 808);
|
||||
this.dgvData.TabIndex = 20;
|
||||
//
|
||||
// AlarmType
|
||||
//
|
||||
this.AlarmType.DataPropertyName = "AlarmType";
|
||||
this.AlarmType.HeaderText = "报警类型";
|
||||
this.AlarmType.MinimumWidth = 6;
|
||||
this.AlarmType.Name = "AlarmType";
|
||||
this.AlarmType.ReadOnly = true;
|
||||
this.AlarmType.Width = 86;
|
||||
//
|
||||
// AlarmGuid
|
||||
//
|
||||
this.AlarmGuid.DataPropertyName = "AlarmGuid";
|
||||
this.AlarmGuid.HeaderText = "报警GUID";
|
||||
this.AlarmGuid.MinimumWidth = 6;
|
||||
this.AlarmGuid.Name = "AlarmGuid";
|
||||
this.AlarmGuid.ReadOnly = true;
|
||||
this.AlarmGuid.Width = 87;
|
||||
//
|
||||
// PLCAdress
|
||||
//
|
||||
this.PLCAdress.DataPropertyName = "PLCAdress";
|
||||
this.PLCAdress.HeaderText = "PLC报警地址";
|
||||
this.PLCAdress.MinimumWidth = 6;
|
||||
this.PLCAdress.Name = "PLCAdress";
|
||||
this.PLCAdress.ReadOnly = true;
|
||||
this.PLCAdress.Width = 107;
|
||||
//
|
||||
// AlarmContent
|
||||
//
|
||||
this.AlarmContent.DataPropertyName = "AlarmContent";
|
||||
this.AlarmContent.HeaderText = "报警内容";
|
||||
this.AlarmContent.MinimumWidth = 6;
|
||||
this.AlarmContent.Name = "AlarmContent";
|
||||
this.AlarmContent.ReadOnly = true;
|
||||
this.AlarmContent.Width = 86;
|
||||
//
|
||||
// AlarmCode
|
||||
//
|
||||
this.AlarmCode.DataPropertyName = "AlarmCode";
|
||||
this.AlarmCode.HeaderText = "报警代码";
|
||||
this.AlarmCode.MinimumWidth = 6;
|
||||
this.AlarmCode.Name = "AlarmCode";
|
||||
this.AlarmCode.ReadOnly = true;
|
||||
this.AlarmCode.Width = 86;
|
||||
//
|
||||
// AlarmDesc
|
||||
//
|
||||
this.AlarmDesc.DataPropertyName = "AlarmDesc";
|
||||
this.AlarmDesc.HeaderText = "报警说明";
|
||||
this.AlarmDesc.MinimumWidth = 6;
|
||||
this.AlarmDesc.Name = "AlarmDesc";
|
||||
this.AlarmDesc.ReadOnly = true;
|
||||
this.AlarmDesc.Visible = false;
|
||||
this.AlarmDesc.Width = 82;
|
||||
//
|
||||
// AlarmState
|
||||
//
|
||||
this.AlarmState.DataPropertyName = "AlarmState";
|
||||
this.AlarmState.HeaderText = "报警状态";
|
||||
this.AlarmState.MinimumWidth = 6;
|
||||
this.AlarmState.Name = "AlarmState";
|
||||
this.AlarmState.ReadOnly = true;
|
||||
this.AlarmState.Visible = false;
|
||||
this.AlarmState.Width = 82;
|
||||
//
|
||||
// AlarmTime
|
||||
//
|
||||
this.AlarmTime.DataPropertyName = "StartTime";
|
||||
this.AlarmTime.HeaderText = "报警开始时间";
|
||||
this.AlarmTime.MinimumWidth = 6;
|
||||
this.AlarmTime.Name = "AlarmTime";
|
||||
this.AlarmTime.ReadOnly = true;
|
||||
this.AlarmTime.Width = 112;
|
||||
//
|
||||
// BurningTime
|
||||
//
|
||||
this.BurningTime.DataPropertyName = "EndTime";
|
||||
this.BurningTime.HeaderText = "报警结束时间";
|
||||
this.BurningTime.MinimumWidth = 6;
|
||||
this.BurningTime.Name = "BurningTime";
|
||||
this.BurningTime.ReadOnly = true;
|
||||
this.BurningTime.Width = 112;
|
||||
//
|
||||
// Flag
|
||||
//
|
||||
this.Flag.DataPropertyName = "Flag";
|
||||
this.Flag.HeaderText = "更新状态";
|
||||
this.Flag.MinimumWidth = 6;
|
||||
this.Flag.Name = "Flag";
|
||||
this.Flag.ReadOnly = true;
|
||||
this.Flag.Visible = false;
|
||||
this.Flag.Width = 64;
|
||||
//
|
||||
// FrmAlamQuery
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(1492, 925);
|
||||
this.Controls.Add(this.dgvData);
|
||||
this.Controls.Add(this.dtEndTime);
|
||||
this.Controls.Add(this.dtStartTime);
|
||||
this.Controls.Add(this.lblSelectStures);
|
||||
this.Controls.Add(this.btnSelect);
|
||||
this.Controls.Add(this.metroLabel2);
|
||||
this.Controls.Add(this.metroLabel1);
|
||||
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||||
this.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
|
||||
this.Name = "FrmAlamQuery";
|
||||
this.Padding = new System.Windows.Forms.Padding(27, 75, 27, 25);
|
||||
this.Text = "历史报警信息查询";
|
||||
this.Load += new System.EventHandler(this.FrmAlamQuery_Load);
|
||||
((System.ComponentModel.ISupportInitialize)(this.dgvData)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private MetroFramework.Controls.MetroButton btnSelect;
|
||||
private MetroFramework.Controls.MetroLabel metroLabel2;
|
||||
private MetroFramework.Controls.MetroLabel metroLabel1;
|
||||
private System.Windows.Forms.Label lblSelectStures;
|
||||
private System.Windows.Forms.DateTimePicker dtEndTime;
|
||||
private System.Windows.Forms.DateTimePicker dtStartTime;
|
||||
private MetroFramework.Controls.MetroGrid dgvData;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn AlarmType;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn AlarmGuid;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn PLCAdress;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn AlarmContent;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn AlarmCode;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn AlarmDesc;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn AlarmState;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn AlarmTime;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn BurningTime;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn Flag;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,227 @@
|
||||
<?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="AlarmType.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="AlarmGuid.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="PLCAdress.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="AlarmContent.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="AlarmCode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="AlarmDesc.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="AlarmState.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="AlarmTime.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="BurningTime.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="Flag.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
AAABAAEAICAAAAEAIACoEAAAFgAAACgAAAAgAAAAQAAAAAEAIAAAAAAAABAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAFlNUABZTVAAWU1QAFlNUABZTVAAWU1QAFlNUABZTVAAWU1QAFlN
|
||||
UABZTVAAWU1QAFlNUABZTVAAWU1QAFlNUABZTVAAWU1QAFlNUABZTVAAWU1QAFlNUAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABZTVAAWU1QAFpNUABZTVASWU1QH1lNUB9ZTVAfWU1QH1lN
|
||||
UB9ZTVAfWU1QH1lNUB9ZTVAfWU1QH1lNUB9ZTVAfWU1QH1lNUB9ZTVAfWU1QH1lNUBJaTVAAWU1QAFlN
|
||||
UAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAXE5OAFlNUABZTVAFWU1QaFlLUM1YS0/gWEtQ4FhL
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AAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABZTVAAWE1QAFlN
|
||||
UABZTVAAWU1QAFlNUABZTVAAWU1QAFlNUABZTVAAWU1QAFlNUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAA+AAAH/AAAA/gAAAH4AAAB+AAAAfgAAAH4AAAB+AAAAfgAAAH4AAAB+AA
|
||||
AAfgAAAH4AAAB+AAAAfgAAAH4AAAB+AAAAfgAAAH4AAAB+AAAAfgAAAH4AAAB+AAAAfgAAAH4AAAB+AA
|
||||
AAfgAAAH8AAAD/gAAB//gAH//4AB///AA/8=
|
||||
</value>
|
||||
</data>
|
||||
</root>
|
||||
Generated
+101
@@ -0,0 +1,101 @@
|
||||
|
||||
namespace JY.Inspection
|
||||
{
|
||||
partial class FrmAlert
|
||||
{
|
||||
/// <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.timer1 = new System.Windows.Forms.Timer(this.components);
|
||||
this.lblMsg = new System.Windows.Forms.Label();
|
||||
this.pictureBox2 = new System.Windows.Forms.PictureBox();
|
||||
this.pictureBox1 = new System.Windows.Forms.PictureBox();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
|
||||
//
|
||||
// lblMsg
|
||||
//
|
||||
this.lblMsg.AutoSize = true;
|
||||
this.lblMsg.Font = new System.Drawing.Font("黑体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.lblMsg.ForeColor = System.Drawing.Color.White;
|
||||
this.lblMsg.Location = new System.Drawing.Point(79, 37);
|
||||
this.lblMsg.Name = "lblMsg";
|
||||
this.lblMsg.Size = new System.Drawing.Size(91, 14);
|
||||
this.lblMsg.TabIndex = 2;
|
||||
this.lblMsg.Text = "Message Text";
|
||||
//
|
||||
// pictureBox2
|
||||
//
|
||||
this.pictureBox2.Image = global::JY.Inspection.Properties.Resources.白色X32;
|
||||
this.pictureBox2.Location = new System.Drawing.Point(276, -1);
|
||||
this.pictureBox2.Name = "pictureBox2";
|
||||
this.pictureBox2.Size = new System.Drawing.Size(33, 32);
|
||||
this.pictureBox2.TabIndex = 1;
|
||||
this.pictureBox2.TabStop = false;
|
||||
//
|
||||
// pictureBox1
|
||||
//
|
||||
this.pictureBox1.Image = global::JY.Inspection.Properties.Resources.warning;
|
||||
this.pictureBox1.Location = new System.Drawing.Point(12, 28);
|
||||
this.pictureBox1.Name = "pictureBox1";
|
||||
this.pictureBox1.Size = new System.Drawing.Size(32, 32);
|
||||
this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
|
||||
this.pictureBox1.TabIndex = 0;
|
||||
this.pictureBox1.TabStop = false;
|
||||
//
|
||||
// FrmAlert
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(120)))), ((int)(((byte)(215)))));
|
||||
this.ClientSize = new System.Drawing.Size(310, 89);
|
||||
this.Controls.Add(this.lblMsg);
|
||||
this.Controls.Add(this.pictureBox2);
|
||||
this.Controls.Add(this.pictureBox1);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
|
||||
this.Name = "FrmAlert";
|
||||
this.ShowIcon = false;
|
||||
this.Text = "信息提示";
|
||||
this.TopMost = true;
|
||||
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.Timer timer1;
|
||||
private System.Windows.Forms.PictureBox pictureBox1;
|
||||
private System.Windows.Forms.PictureBox pictureBox2;
|
||||
private System.Windows.Forms.Label lblMsg;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,108 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace JY.Inspection
|
||||
{
|
||||
public partial class FrmAlert : Form
|
||||
{
|
||||
|
||||
public FrmAlert()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
|
||||
private FrmAlert.enmAction action; //当前窗体状态变量
|
||||
private int x, y; //显示的坐标变量
|
||||
//定义窗体状态枚举
|
||||
private enum enmAction
|
||||
{
|
||||
wait,
|
||||
start,
|
||||
close
|
||||
}
|
||||
//定义弹窗类型枚举
|
||||
public enum enmType
|
||||
{
|
||||
Success,
|
||||
Warning,
|
||||
Error,
|
||||
Info
|
||||
}
|
||||
//外部访问该函数实现窗体的实现 传入显示信息,弹窗类型
|
||||
public void ShowAlert(string msg, enmType type)
|
||||
{
|
||||
this.Opacity = 0.0;
|
||||
this.StartPosition = FormStartPosition.Manual;
|
||||
string fname;
|
||||
|
||||
for (int i = 1; i < 10; i++)
|
||||
{
|
||||
fname = "alert" + i.ToString();
|
||||
FrmAlert frm = (FrmAlert)Application.OpenForms[fname];
|
||||
|
||||
if (frm == null)
|
||||
{
|
||||
this.Name = fname;
|
||||
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);
|
||||
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
this.x = Screen.PrimaryScreen.WorkingArea.Width - this.Width - 5;
|
||||
|
||||
switch (type)
|
||||
{
|
||||
case enmType.Success:
|
||||
this.pictureBox1.Image = JY.Inspection.Properties.Resources.success;
|
||||
this.BackColor = Color.SeaGreen;
|
||||
break;
|
||||
case enmType.Error:
|
||||
this.pictureBox1.Image = JY.Inspection.Properties.Resources.error;
|
||||
this.BackColor = Color.DarkRed;
|
||||
break;
|
||||
case enmType.Info:
|
||||
this.pictureBox1.Image = JY.Inspection.Properties.Resources.info;
|
||||
this.BackColor = Color.RoyalBlue;
|
||||
break;
|
||||
case enmType.Warning:
|
||||
this.pictureBox1.Image = JY.Inspection.Properties.Resources.warning;
|
||||
this.BackColor = Color.DarkOrange;
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
this.lblMsg.Text = msg;
|
||||
|
||||
this.Show();
|
||||
//this.action = enmAction.start;
|
||||
this.timer1.Interval = 2000;
|
||||
this.timer1.Start();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//关闭窗体调用
|
||||
public void ShowClose()
|
||||
{
|
||||
timer1.Interval = 1;
|
||||
action = enmAction.close;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -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,153 @@
|
||||
using JY.DAL;
|
||||
using JY.Model;
|
||||
using JY.Utility;
|
||||
using MetroFramework.Forms;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace JY.Inspection.Frm
|
||||
{
|
||||
public partial class FrmCCDQuery : MetroForm
|
||||
{
|
||||
public delegate void myDelegate(DataTable dt);
|
||||
public delegate void PDelegate();
|
||||
Thread tSo;
|
||||
string strWorkerNum;
|
||||
private string selectDate = "";
|
||||
private DataTable dataTable = null;
|
||||
/// <summary>
|
||||
/// 数据库访问接口
|
||||
/// </summary>
|
||||
private IDbHelper dbHelper = new OpSqlDataBase();
|
||||
public FrmCCDQuery()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
}
|
||||
|
||||
private void FrmAlamQuery_Load(object sender, EventArgs e)
|
||||
{
|
||||
dtStartTime.Value = Convert.ToDateTime(DateTime.Now.ToString("yyyy-MM-dd 08:00"));
|
||||
dtEndTime.Value = Convert.ToDateTime(DateTime.Now.ToString("yyyy-MM-dd 23:59"));
|
||||
}
|
||||
/// <summary>
|
||||
/// 查询报警日志
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void btnSelect_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
|
||||
//if (txtOrderNum.Text == "")
|
||||
//{
|
||||
// MessageBox.Show("工单号未输入","系统提示");
|
||||
// return;
|
||||
//}
|
||||
|
||||
strWorkerNum = txtOrderNum.Text.Trim();
|
||||
try
|
||||
{
|
||||
tSo = new Thread(new ThreadStart(ThreadWork));
|
||||
tSo.IsBackground = true;
|
||||
tSo.Start();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
MessageBox.Show(ex.Message.ToString() + ",数据查询失败", "查询提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void ThreadWork()
|
||||
{
|
||||
lblSelectStures.BeginInvoke(new PDelegate(aa));
|
||||
string strDate1 = dtStartTime.Value.ToString("yyyy-MM-dd ") + "00:00:01";
|
||||
string strDate2 = dtEndTime.Value.ToString("yyyy-MM-dd ") + "23:59:59";
|
||||
selectDate = dtStartTime.Value.ToString("yyyy-MM-dd ");
|
||||
|
||||
if (dtEndTime.Value.Year != dtStartTime.Value.Year)
|
||||
{
|
||||
MessageBox.Show("请选择日期必须在同一年份内!");
|
||||
lblSelectStures.BeginInvoke(new PDelegate(bb));
|
||||
return;
|
||||
}
|
||||
|
||||
var result = dbHelper.GetCCDData(strWorkerNum, selectDate, selectDate);
|
||||
if (result == null)
|
||||
{
|
||||
MessageBox.Show("此时间段无数据或无此条码数据", "系统提示");
|
||||
lblSelectStures.BeginInvoke(new PDelegate(bb));
|
||||
return;
|
||||
}
|
||||
this.dgvData.BeginInvoke(new myDelegate(FillData), new object[] { result });//异步调用(来填充)
|
||||
lblSelectStures.BeginInvoke(new PDelegate(bb));
|
||||
}
|
||||
|
||||
private void FillData(DataTable dt)
|
||||
{
|
||||
dataTable = dt;
|
||||
this.dgvData.DataSource = dt.DefaultView;
|
||||
}
|
||||
|
||||
private void aa()
|
||||
{
|
||||
this.lblSelectStures.Text = "正在查询数据...";
|
||||
}
|
||||
private void bb()
|
||||
{
|
||||
this.lblSelectStures.Text = "查询结束";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 导出数据
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void btnExcel_Click(object sender, EventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
string strErr = "";
|
||||
DataTable dt = dataTable;
|
||||
int b = OpenOfficeXML.ExportExcel(dt, selectDate, ref strErr);
|
||||
switch (b)
|
||||
{
|
||||
case 0:
|
||||
MessageBox.Show(strErr, "系统错误");
|
||||
break;
|
||||
case 1:
|
||||
MessageBox.Show(strErr, "系统错误");
|
||||
break;
|
||||
case 2:
|
||||
MessageBox.Show(strErr, "系统错误");
|
||||
break;
|
||||
case 3:
|
||||
MessageBox.Show(strErr, "系统错误");
|
||||
break;
|
||||
case 4:
|
||||
if (MessageBox.Show("导出成功,是否打开文件?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Information) == DialogResult.Yes)
|
||||
{
|
||||
System.Diagnostics.Process.Start(strErr);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
|
||||
throw;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
+272
@@ -0,0 +1,272 @@
|
||||
namespace JY.Inspection.Frm
|
||||
{
|
||||
partial class FrmCCDQuery
|
||||
{
|
||||
/// <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()
|
||||
{
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmCCDQuery));
|
||||
this.btnSelect = new MetroFramework.Controls.MetroButton();
|
||||
this.metroLabel2 = new MetroFramework.Controls.MetroLabel();
|
||||
this.metroLabel1 = new MetroFramework.Controls.MetroLabel();
|
||||
this.dtEndTime = new MetroFramework.Controls.MetroDateTime();
|
||||
this.dtStartTime = new MetroFramework.Controls.MetroDateTime();
|
||||
this.lblSelectStures = new System.Windows.Forms.Label();
|
||||
this.dgvData = new MetroFramework.Controls.MetroGrid();
|
||||
this.txtOrderNum = new MetroFramework.Controls.MetroTextBox();
|
||||
this.metroLabel8 = new MetroFramework.Controls.MetroLabel();
|
||||
this.btnExcel = new MetroFramework.Controls.MetroButton();
|
||||
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
|
||||
((System.ComponentModel.ISupportInitialize)(this.dgvData)).BeginInit();
|
||||
this.tableLayoutPanel1.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// btnSelect
|
||||
//
|
||||
this.btnSelect.Location = new System.Drawing.Point(578, 26);
|
||||
this.btnSelect.Name = "btnSelect";
|
||||
this.btnSelect.Size = new System.Drawing.Size(75, 23);
|
||||
this.btnSelect.TabIndex = 12;
|
||||
this.btnSelect.Text = "查询";
|
||||
this.btnSelect.UseSelectable = true;
|
||||
this.btnSelect.Click += new System.EventHandler(this.btnSelect_Click);
|
||||
//
|
||||
// metroLabel2
|
||||
//
|
||||
this.metroLabel2.AutoSize = true;
|
||||
this.metroLabel2.Location = new System.Drawing.Point(1062, 31);
|
||||
this.metroLabel2.Name = "metroLabel2";
|
||||
this.metroLabel2.Size = new System.Drawing.Size(18, 19);
|
||||
this.metroLabel2.TabIndex = 11;
|
||||
this.metroLabel2.Text = "~";
|
||||
this.metroLabel2.Visible = false;
|
||||
//
|
||||
// metroLabel1
|
||||
//
|
||||
this.metroLabel1.AutoSize = true;
|
||||
this.metroLabel1.Location = new System.Drawing.Point(928, 37);
|
||||
this.metroLabel1.Name = "metroLabel1";
|
||||
this.metroLabel1.Size = new System.Drawing.Size(79, 19);
|
||||
this.metroLabel1.TabIndex = 10;
|
||||
this.metroLabel1.Text = "查询时间:";
|
||||
this.metroLabel1.Visible = false;
|
||||
//
|
||||
// dtEndTime
|
||||
//
|
||||
this.dtEndTime.CustomFormat = "yyyy-MM-dd";
|
||||
this.dtEndTime.Format = System.Windows.Forms.DateTimePickerFormat.Custom;
|
||||
this.dtEndTime.Location = new System.Drawing.Point(1086, 26);
|
||||
this.dtEndTime.MinimumSize = new System.Drawing.Size(4, 29);
|
||||
this.dtEndTime.Name = "dtEndTime";
|
||||
this.dtEndTime.Size = new System.Drawing.Size(106, 29);
|
||||
this.dtEndTime.TabIndex = 9;
|
||||
this.dtEndTime.Value = new System.DateTime(2022, 3, 5, 0, 0, 0, 0);
|
||||
this.dtEndTime.Visible = false;
|
||||
//
|
||||
// dtStartTime
|
||||
//
|
||||
this.dtStartTime.CustomFormat = "yyyy-MM-dd";
|
||||
this.dtStartTime.Format = System.Windows.Forms.DateTimePickerFormat.Custom;
|
||||
this.dtStartTime.Location = new System.Drawing.Point(1008, 32);
|
||||
this.dtStartTime.MinimumSize = new System.Drawing.Size(4, 29);
|
||||
this.dtStartTime.Name = "dtStartTime";
|
||||
this.dtStartTime.Size = new System.Drawing.Size(104, 29);
|
||||
this.dtStartTime.TabIndex = 8;
|
||||
this.dtStartTime.Value = new System.DateTime(2022, 3, 5, 0, 0, 0, 0);
|
||||
this.dtStartTime.Visible = false;
|
||||
//
|
||||
// lblSelectStures
|
||||
//
|
||||
this.lblSelectStures.AutoSize = true;
|
||||
this.lblSelectStures.Location = new System.Drawing.Point(833, 32);
|
||||
this.lblSelectStures.Name = "lblSelectStures";
|
||||
this.lblSelectStures.Size = new System.Drawing.Size(0, 12);
|
||||
this.lblSelectStures.TabIndex = 14;
|
||||
//
|
||||
// dgvData
|
||||
//
|
||||
this.dgvData.AllowUserToAddRows = false;
|
||||
this.dgvData.AllowUserToDeleteRows = false;
|
||||
this.dgvData.AllowUserToResizeRows = false;
|
||||
this.dgvData.BackgroundColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
|
||||
this.dgvData.BorderStyle = System.Windows.Forms.BorderStyle.None;
|
||||
this.dgvData.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.None;
|
||||
this.dgvData.ColumnHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.None;
|
||||
dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
|
||||
dataGridViewCellStyle1.BackColor = System.Drawing.Color.Gold;
|
||||
dataGridViewCellStyle1.Font = new System.Drawing.Font("Segoe UI", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel);
|
||||
dataGridViewCellStyle1.ForeColor = System.Drawing.Color.Black;
|
||||
dataGridViewCellStyle1.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(198)))), ((int)(((byte)(247)))));
|
||||
dataGridViewCellStyle1.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(17)))), ((int)(((byte)(17)))), ((int)(((byte)(17)))));
|
||||
dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
|
||||
this.dgvData.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle1;
|
||||
this.dgvData.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
||||
dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
|
||||
dataGridViewCellStyle2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
|
||||
dataGridViewCellStyle2.Font = new System.Drawing.Font("微软雅黑", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
dataGridViewCellStyle2.ForeColor = System.Drawing.Color.Black;
|
||||
dataGridViewCellStyle2.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(198)))), ((int)(((byte)(247)))));
|
||||
dataGridViewCellStyle2.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(17)))), ((int)(((byte)(17)))), ((int)(((byte)(17)))));
|
||||
dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
|
||||
this.dgvData.DefaultCellStyle = dataGridViewCellStyle2;
|
||||
this.dgvData.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.dgvData.EnableHeadersVisualStyles = false;
|
||||
this.dgvData.Font = new System.Drawing.Font("Segoe UI", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel);
|
||||
this.dgvData.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
|
||||
this.dgvData.Location = new System.Drawing.Point(3, 3);
|
||||
this.dgvData.Name = "dgvData";
|
||||
this.dgvData.ReadOnly = true;
|
||||
this.dgvData.RowHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.None;
|
||||
dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
|
||||
dataGridViewCellStyle3.BackColor = System.Drawing.Color.White;
|
||||
dataGridViewCellStyle3.Font = new System.Drawing.Font("Segoe UI", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel);
|
||||
dataGridViewCellStyle3.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
|
||||
dataGridViewCellStyle3.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(198)))), ((int)(((byte)(247)))));
|
||||
dataGridViewCellStyle3.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(17)))), ((int)(((byte)(17)))), ((int)(((byte)(17)))));
|
||||
dataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
|
||||
this.dgvData.RowHeadersDefaultCellStyle = dataGridViewCellStyle3;
|
||||
this.dgvData.RowHeadersVisible = false;
|
||||
this.dgvData.RowHeadersWidth = 51;
|
||||
this.dgvData.RowHeadersWidthSizeMode = System.Windows.Forms.DataGridViewRowHeadersWidthSizeMode.DisableResizing;
|
||||
this.dgvData.RowTemplate.Height = 23;
|
||||
this.dgvData.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
|
||||
this.dgvData.Size = new System.Drawing.Size(1371, 174);
|
||||
this.dgvData.TabIndex = 15;
|
||||
//
|
||||
// txtOrderNum
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
this.txtOrderNum.CustomButton.Image = null;
|
||||
this.txtOrderNum.CustomButton.Location = new System.Drawing.Point(130, 1);
|
||||
this.txtOrderNum.CustomButton.Name = "";
|
||||
this.txtOrderNum.CustomButton.Size = new System.Drawing.Size(21, 21);
|
||||
this.txtOrderNum.CustomButton.Style = MetroFramework.MetroColorStyle.Blue;
|
||||
this.txtOrderNum.CustomButton.TabIndex = 1;
|
||||
this.txtOrderNum.CustomButton.Theme = MetroFramework.MetroThemeStyle.Light;
|
||||
this.txtOrderNum.CustomButton.UseSelectable = true;
|
||||
this.txtOrderNum.CustomButton.Visible = false;
|
||||
this.txtOrderNum.FontSize = MetroFramework.MetroTextBoxSize.Medium;
|
||||
this.txtOrderNum.Lines = new string[0];
|
||||
this.txtOrderNum.Location = new System.Drawing.Point(378, 29);
|
||||
this.txtOrderNum.MaxLength = 32767;
|
||||
this.txtOrderNum.Name = "txtOrderNum";
|
||||
this.txtOrderNum.PasswordChar = '\0';
|
||||
this.txtOrderNum.PromptText = "输入要查询的工单";
|
||||
this.txtOrderNum.ScrollBars = System.Windows.Forms.ScrollBars.None;
|
||||
this.txtOrderNum.SelectedText = "";
|
||||
this.txtOrderNum.SelectionLength = 0;
|
||||
this.txtOrderNum.SelectionStart = 0;
|
||||
this.txtOrderNum.ShortcutsEnabled = true;
|
||||
this.txtOrderNum.Size = new System.Drawing.Size(152, 23);
|
||||
this.txtOrderNum.TabIndex = 16;
|
||||
this.txtOrderNum.UseSelectable = true;
|
||||
this.txtOrderNum.WaterMark = "输入要查询的工单";
|
||||
this.txtOrderNum.WaterMarkColor = System.Drawing.Color.FromArgb(((int)(((byte)(109)))), ((int)(((byte)(109)))), ((int)(((byte)(109)))));
|
||||
this.txtOrderNum.WaterMarkFont = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Pixel);
|
||||
//
|
||||
// metroLabel8
|
||||
//
|
||||
this.metroLabel8.AutoSize = true;
|
||||
this.metroLabel8.Location = new System.Drawing.Point(331, 30);
|
||||
this.metroLabel8.Name = "metroLabel8";
|
||||
this.metroLabel8.Size = new System.Drawing.Size(51, 19);
|
||||
this.metroLabel8.TabIndex = 17;
|
||||
this.metroLabel8.Text = "工单:";
|
||||
//
|
||||
// btnExcel
|
||||
//
|
||||
this.btnExcel.Location = new System.Drawing.Point(695, 26);
|
||||
this.btnExcel.Name = "btnExcel";
|
||||
this.btnExcel.Size = new System.Drawing.Size(75, 23);
|
||||
this.btnExcel.TabIndex = 18;
|
||||
this.btnExcel.Text = "导出";
|
||||
this.btnExcel.UseSelectable = true;
|
||||
this.btnExcel.Click += new System.EventHandler(this.btnExcel_Click);
|
||||
//
|
||||
// tableLayoutPanel1
|
||||
//
|
||||
this.tableLayoutPanel1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||
| System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.tableLayoutPanel1.ColumnCount = 1;
|
||||
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
|
||||
this.tableLayoutPanel1.Controls.Add(this.dgvData, 0, 0);
|
||||
this.tableLayoutPanel1.Location = new System.Drawing.Point(4, 72);
|
||||
this.tableLayoutPanel1.Name = "tableLayoutPanel1";
|
||||
this.tableLayoutPanel1.RowCount = 2;
|
||||
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 25.45455F));
|
||||
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 74.54546F));
|
||||
this.tableLayoutPanel1.Size = new System.Drawing.Size(1377, 708);
|
||||
this.tableLayoutPanel1.TabIndex = 19;
|
||||
//
|
||||
// FrmCCDQuery
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(1386, 788);
|
||||
this.Controls.Add(this.tableLayoutPanel1);
|
||||
this.Controls.Add(this.lblSelectStures);
|
||||
this.Controls.Add(this.btnExcel);
|
||||
this.Controls.Add(this.txtOrderNum);
|
||||
this.Controls.Add(this.metroLabel8);
|
||||
this.Controls.Add(this.btnSelect);
|
||||
this.Controls.Add(this.metroLabel2);
|
||||
this.Controls.Add(this.metroLabel1);
|
||||
this.Controls.Add(this.dtEndTime);
|
||||
this.Controls.Add(this.dtStartTime);
|
||||
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||||
this.Name = "FrmCCDQuery";
|
||||
this.Resizable = false;
|
||||
this.ShadowType = MetroFramework.Forms.MetroFormShadowType.SystemShadow;
|
||||
this.Text = "CCD统计数据查询";
|
||||
this.Load += new System.EventHandler(this.FrmAlamQuery_Load);
|
||||
((System.ComponentModel.ISupportInitialize)(this.dgvData)).EndInit();
|
||||
this.tableLayoutPanel1.ResumeLayout(false);
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private MetroFramework.Controls.MetroButton btnSelect;
|
||||
private MetroFramework.Controls.MetroLabel metroLabel2;
|
||||
private MetroFramework.Controls.MetroLabel metroLabel1;
|
||||
private MetroFramework.Controls.MetroDateTime dtEndTime;
|
||||
private MetroFramework.Controls.MetroDateTime dtStartTime;
|
||||
private System.Windows.Forms.Label lblSelectStures;
|
||||
private MetroFramework.Controls.MetroGrid dgvData;
|
||||
private MetroFramework.Controls.MetroTextBox txtOrderNum;
|
||||
private MetroFramework.Controls.MetroLabel metroLabel8;
|
||||
private MetroFramework.Controls.MetroButton btnExcel;
|
||||
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,197 @@
|
||||
<?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.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
AAABAAEAICAAAAEAIACoEAAAFgAAACgAAAAgAAAAQAAAAAEAIAAAAAAAABAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAFlNUABZTVAAWU1QAFlNUABZTVAAWU1QAFlNUABZTVAAWU1QAFlN
|
||||
UABZTVAAWU1Q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||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAVklRAFlNUABZTVA7WU1QwlhMT+BYTE/gWExP4FhM
|
||||
T+BYTE/gWExP4FlNUMJZTVA7WU1QAFZKUgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABYTFEAWE1QAFlNUABZTVAPWU1QH1lN
|
||||
UB9ZTVAfWU1QH1lNUB9ZTVAfWU1QD1lNUABYTFEAWExRAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABZTVAAWE1QAFlN
|
||||
UABZTVAAWU1QAFlNUABZTVAAWU1QAFlNUABZTVAAWU1QAFlNUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAA+AAAH/AAAA/gAAAH4AAAB+AAAAfgAAAH4AAAB+AAAAfgAAAH4AAAB+AA
|
||||
AAfgAAAH4AAAB+AAAAfgAAAH4AAAB+AAAAfgAAAH4AAAB+AAAAfgAAAH4AAAB+AAAAfgAAAH4AAAB+AA
|
||||
AAfgAAAH8AAAD/gAAB//gAH//4AB///AA/8=
|
||||
</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -0,0 +1,309 @@
|
||||
using JY.DAL;
|
||||
using JY.Model;
|
||||
using MetroFramework.Forms;
|
||||
using PLCCommunication;
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace JY.Inspection.Frm
|
||||
{
|
||||
public partial class FrmChangeModel : MetroForm
|
||||
{
|
||||
/// <summary>
|
||||
/// 数据库访问接口
|
||||
/// </summary>
|
||||
private IDbHelper dbHelper = new OpSqlDataBase();
|
||||
/// <summary>
|
||||
/// 定义DataGridView数据源
|
||||
/// </summary>
|
||||
private BindingList<PLCConfigPara> blPLCConfigParaList = new BindingList<PLCConfigPara>();
|
||||
|
||||
private delegate void UpdateBar(int value);
|
||||
private FrmOmronPLCCom MelsecPLCCom;
|
||||
public string strModelType;
|
||||
//bool IsNoOrg = false;
|
||||
int AxisCount = 0;
|
||||
|
||||
|
||||
public FrmChangeModel(FrmOmronPLCCom melsecPLCCom, string ModelType)
|
||||
{
|
||||
InitializeComponent();
|
||||
MelsecPLCCom = melsecPLCCom;
|
||||
strModelType = ModelType;
|
||||
this.dgvParaPLC.AutoGenerateColumns = false;
|
||||
dgvParaPLC.DataSource = blPLCConfigParaList;
|
||||
}
|
||||
|
||||
private void FrmChangeModel_Load(object sender, EventArgs e)
|
||||
{
|
||||
progressBar1.Maximum = 100;//进度条
|
||||
progressBar1.Step = 1;
|
||||
setCombOrg();
|
||||
cmbProductModel.Text = strModelType;
|
||||
GetPLCConfigPara(strModelType);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 加载产品型号下拉
|
||||
/// </summary>
|
||||
private void setCombOrg()
|
||||
{
|
||||
var list = dbHelper.GetProductModelList();
|
||||
cmbProductModel.Items.Clear();
|
||||
|
||||
cmbProductModel.DataSource = list;
|
||||
cmbProductModel.DisplayMember = "ModelName";
|
||||
cmbProductModel.ValueMember = "ModelName";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 一键保存
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void btnReadPLC_Click(object sender, EventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (!HomeForm.startup)
|
||||
{
|
||||
MessageBox.Show("请先开启监控连接PLC!");
|
||||
return;
|
||||
}
|
||||
if (cmbProductModel.Text == "")
|
||||
{
|
||||
MessageBox.Show("请先选择型号!");
|
||||
return;
|
||||
}
|
||||
ChangeButtonStatus(false);
|
||||
string model = cmbProductModel.Text;
|
||||
if (blPLCConfigParaList.Count <= 0)
|
||||
{
|
||||
MessageBox.Show("轴参数为空不能保存", "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
}
|
||||
else
|
||||
{
|
||||
AxisCount = blPLCConfigParaList.Count;
|
||||
Task.Run(() =>
|
||||
{
|
||||
ClearPos(true);
|
||||
for (int i = 1; i < AxisCount; i++)
|
||||
{
|
||||
try
|
||||
{
|
||||
blPLCConfigParaList[i].PLCValue = MelsecPLCCom.lstMcUI[0].ReadIntDReg(blPLCConfigParaList[i].PLCAddress);
|
||||
blPLCConfigParaList[i].UpdateData = DateTime.Now;//更新数据时间
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
blPLCConfigParaList[i].PLCValue = 0;//没有值的话,给予0值
|
||||
blPLCConfigParaList[i].UpdateData = DateTime.Now;//更新数据时间
|
||||
}
|
||||
Thread.Sleep(100);
|
||||
ChangeBar(i);
|
||||
}
|
||||
Thread.Sleep(100);
|
||||
if (this.InvokeRequired)
|
||||
{
|
||||
Action w = colosbar;
|
||||
this.Invoke(w);
|
||||
}
|
||||
else
|
||||
{
|
||||
progressBar1.Visible = false;
|
||||
metroLabel2.Text = string.Empty;
|
||||
metroLabel2.Visible = false;
|
||||
}
|
||||
|
||||
var result = dbHelper.InsertPLCConfigParam(blPLCConfigParaList.ToList());
|
||||
MessageBox.Show("保存成功!", "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
ChangeButtonStatus(true);
|
||||
ClearPos(false);
|
||||
});
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
MessageBox.Show(ex.ToString(), "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 一键换型
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void btnChangeConfig_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (!HomeForm.startup)
|
||||
{
|
||||
MessageBox.Show("请先开启监控连接PLC!");
|
||||
return;
|
||||
}
|
||||
if (MessageBox.Show("确定要更改" + cmbProductModel.Text + "型号吗?", "系统提示", MessageBoxButtons.OKCancel,
|
||||
MessageBoxIcon.Question) != DialogResult.OK)
|
||||
{
|
||||
return;
|
||||
}
|
||||
try
|
||||
{
|
||||
if (blPLCConfigParaList.Count > 0)
|
||||
{
|
||||
ChangeButtonStatus(false);
|
||||
AxisCount = blPLCConfigParaList.Count;
|
||||
Task.Run(() =>
|
||||
{
|
||||
ClearPos(true);
|
||||
for (int i = 0; i < blPLCConfigParaList.Count; i++)
|
||||
{
|
||||
try
|
||||
{
|
||||
MelsecPLCCom.lstMcUI[0].WriteDReg(blPLCConfigParaList[i].PLCAddress, blPLCConfigParaList[i].PLCValue);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
MessageBox.Show(ex.ToString());
|
||||
return;
|
||||
}
|
||||
Thread.Sleep(100);
|
||||
ChangeBar(i);
|
||||
}
|
||||
Thread.Sleep(100);
|
||||
if (this.InvokeRequired)
|
||||
{
|
||||
Action w = colosbar;
|
||||
this.Invoke(w);
|
||||
}
|
||||
else
|
||||
{
|
||||
progressBar1.Visible = false;
|
||||
metroLabel2.Text = string.Empty;
|
||||
metroLabel2.Visible = false;
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
//melsec.Write("R500", ProdTypeNum_All);//写回到PLC。型号序号下发到PLC。R500是跟黄晓宇工确定好的PLC地址,固定不变。
|
||||
MessageBox.Show("一键换型成功!");
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
MessageBox.Show("没有参数换型!");
|
||||
}
|
||||
|
||||
ChangeButtonStatus(true);
|
||||
ClearPos(false);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
MessageBox.Show(ex.ToString());
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 打开轴参数配置页面
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void btnConfigBaseSet_Click(object sender, EventArgs e)
|
||||
{
|
||||
FrmConfigBaseSet frmConfigBaseSet = new FrmConfigBaseSet();
|
||||
frmConfigBaseSet.ShowDialog();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 选择产品机型事件
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void cmbProductModel_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
GetPLCConfigPara(cmbProductModel.Text);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查询当前产品型号轴参数信息
|
||||
/// </summary>
|
||||
/// <param name="str"></param>
|
||||
private void GetPLCConfigPara(string str)
|
||||
{
|
||||
try
|
||||
{
|
||||
var list = dbHelper.GetPLCConfigPara(str);
|
||||
blPLCConfigParaList = new BindingList<PLCConfigPara>(list);
|
||||
dgvParaPLC.DataSource = blPLCConfigParaList;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
throw ex;
|
||||
}
|
||||
}
|
||||
|
||||
#region 进度条码设置
|
||||
public void colosbar()
|
||||
{
|
||||
progressBar1.Visible = false;
|
||||
metroLabel2.Visible = false;
|
||||
}
|
||||
public void ClearPos(bool b)
|
||||
{
|
||||
this.Invoke(new Action(() =>
|
||||
{
|
||||
progressBar1.Visible = b;
|
||||
metroLabel2.Visible = b;
|
||||
}));
|
||||
}
|
||||
|
||||
public void ChangeBar(int value)
|
||||
{
|
||||
if (progressBar1.InvokeRequired)
|
||||
{
|
||||
UpdateBar c = new UpdateBar(ChangeBar);
|
||||
this.Invoke(c, new object[] { value });
|
||||
}
|
||||
else
|
||||
{
|
||||
if (value < AxisCount)
|
||||
{
|
||||
progressBar1.Value = Convert.ToInt16(((double)value / AxisCount) * 100);
|
||||
progressBar1.PerformStep();
|
||||
Thread.Sleep(100);
|
||||
metroLabel2.Text = "已完成" + progressBar1.Value + "%";
|
||||
Application.DoEvents();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void ChangeButtonStatus(bool b)
|
||||
{
|
||||
this.Invoke(new Action(() =>
|
||||
{
|
||||
btnSavePLCConfig.Enabled = b;
|
||||
btnChangeConfig.Enabled = b;
|
||||
btnConfigBaseSet.Enabled = b;
|
||||
}));
|
||||
}
|
||||
#endregion
|
||||
|
||||
private void dgvParaPLC_RowPostPaint(object sender, DataGridViewRowPostPaintEventArgs e)
|
||||
{
|
||||
Rectangle rectangle = new Rectangle(e.RowBounds.Location.X,
|
||||
e.RowBounds.Location.Y,
|
||||
dgvParaPLC.RowHeadersWidth - 4,
|
||||
e.RowBounds.Height);
|
||||
TextRenderer.DrawText(e.Graphics, (e.RowIndex + 1).ToString(),
|
||||
dgvParaPLC.RowHeadersDefaultCellStyle.Font,
|
||||
rectangle,
|
||||
dgvParaPLC.RowHeadersDefaultCellStyle.ForeColor=Color.Gray,
|
||||
TextFormatFlags.VerticalCenter | TextFormatFlags.Right);
|
||||
}
|
||||
}
|
||||
}
|
||||
+298
@@ -0,0 +1,298 @@
|
||||
|
||||
namespace JY.Inspection.Frm
|
||||
{
|
||||
partial class FrmChangeModel
|
||||
{
|
||||
/// <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()
|
||||
{
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmChangeModel));
|
||||
this.dgvParaPLC = new MetroFramework.Controls.MetroGrid();
|
||||
this.cmbProductModel = new MetroFramework.Controls.MetroComboBox();
|
||||
this.metroLabel1 = new MetroFramework.Controls.MetroLabel();
|
||||
this.btnSavePLCConfig = new MetroFramework.Controls.MetroButton();
|
||||
this.btnChangeConfig = new MetroFramework.Controls.MetroButton();
|
||||
this.btnConfigBaseSet = new MetroFramework.Controls.MetroButton();
|
||||
this.progressBar1 = new System.Windows.Forms.ProgressBar();
|
||||
this.metroLabel2 = new MetroFramework.Controls.MetroLabel();
|
||||
this.序号 = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.ModelName = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.PLCAddress = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.PLCValue = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.UpdateTime = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.PLCRemark = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.OrderNum = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
((System.ComponentModel.ISupportInitialize)(this.dgvParaPLC)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// dgvParaPLC
|
||||
//
|
||||
this.dgvParaPLC.AllowUserToAddRows = false;
|
||||
this.dgvParaPLC.AllowUserToDeleteRows = false;
|
||||
this.dgvParaPLC.AllowUserToResizeRows = false;
|
||||
this.dgvParaPLC.BackgroundColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
|
||||
this.dgvParaPLC.BorderStyle = System.Windows.Forms.BorderStyle.None;
|
||||
this.dgvParaPLC.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.None;
|
||||
this.dgvParaPLC.ColumnHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.None;
|
||||
dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
|
||||
dataGridViewCellStyle1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(174)))), ((int)(((byte)(219)))));
|
||||
dataGridViewCellStyle1.Font = new System.Drawing.Font("Segoe UI", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel);
|
||||
dataGridViewCellStyle1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
|
||||
dataGridViewCellStyle1.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(198)))), ((int)(((byte)(247)))));
|
||||
dataGridViewCellStyle1.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(17)))), ((int)(((byte)(17)))), ((int)(((byte)(17)))));
|
||||
dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
|
||||
this.dgvParaPLC.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle1;
|
||||
this.dgvParaPLC.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
||||
this.dgvParaPLC.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
|
||||
this.序号,
|
||||
this.ModelName,
|
||||
this.PLCAddress,
|
||||
this.PLCValue,
|
||||
this.UpdateTime,
|
||||
this.PLCRemark,
|
||||
this.OrderNum});
|
||||
dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
|
||||
dataGridViewCellStyle2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
|
||||
dataGridViewCellStyle2.Font = new System.Drawing.Font("Segoe UI", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel);
|
||||
dataGridViewCellStyle2.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(136)))), ((int)(((byte)(136)))), ((int)(((byte)(136)))));
|
||||
dataGridViewCellStyle2.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(198)))), ((int)(((byte)(247)))));
|
||||
dataGridViewCellStyle2.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(17)))), ((int)(((byte)(17)))), ((int)(((byte)(17)))));
|
||||
dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
|
||||
this.dgvParaPLC.DefaultCellStyle = dataGridViewCellStyle2;
|
||||
this.dgvParaPLC.Dock = System.Windows.Forms.DockStyle.Right;
|
||||
this.dgvParaPLC.EnableHeadersVisualStyles = false;
|
||||
this.dgvParaPLC.Font = new System.Drawing.Font("Segoe UI", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel);
|
||||
this.dgvParaPLC.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
|
||||
this.dgvParaPLC.Location = new System.Drawing.Point(490, 75);
|
||||
this.dgvParaPLC.Margin = new System.Windows.Forms.Padding(4);
|
||||
this.dgvParaPLC.Name = "dgvParaPLC";
|
||||
this.dgvParaPLC.ReadOnly = true;
|
||||
this.dgvParaPLC.RowHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.None;
|
||||
dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
|
||||
dataGridViewCellStyle3.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(174)))), ((int)(((byte)(219)))));
|
||||
dataGridViewCellStyle3.Font = new System.Drawing.Font("Segoe UI", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel);
|
||||
dataGridViewCellStyle3.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
|
||||
dataGridViewCellStyle3.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(198)))), ((int)(((byte)(247)))));
|
||||
dataGridViewCellStyle3.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(17)))), ((int)(((byte)(17)))), ((int)(((byte)(17)))));
|
||||
dataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
|
||||
this.dgvParaPLC.RowHeadersDefaultCellStyle = dataGridViewCellStyle3;
|
||||
this.dgvParaPLC.RowHeadersVisible = false;
|
||||
this.dgvParaPLC.RowHeadersWidth = 51;
|
||||
this.dgvParaPLC.RowHeadersWidthSizeMode = System.Windows.Forms.DataGridViewRowHeadersWidthSizeMode.DisableResizing;
|
||||
this.dgvParaPLC.RowTemplate.Height = 23;
|
||||
this.dgvParaPLC.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
|
||||
this.dgvParaPLC.Size = new System.Drawing.Size(935, 814);
|
||||
this.dgvParaPLC.TabIndex = 0;
|
||||
this.dgvParaPLC.RowPostPaint += new System.Windows.Forms.DataGridViewRowPostPaintEventHandler(this.dgvParaPLC_RowPostPaint);
|
||||
//
|
||||
// cmbProductModel
|
||||
//
|
||||
this.cmbProductModel.FormattingEnabled = true;
|
||||
this.cmbProductModel.ItemHeight = 24;
|
||||
this.cmbProductModel.Location = new System.Drawing.Point(161, 118);
|
||||
this.cmbProductModel.Margin = new System.Windows.Forms.Padding(4);
|
||||
this.cmbProductModel.Name = "cmbProductModel";
|
||||
this.cmbProductModel.Size = new System.Drawing.Size(257, 30);
|
||||
this.cmbProductModel.TabIndex = 2;
|
||||
this.cmbProductModel.UseSelectable = true;
|
||||
this.cmbProductModel.SelectedIndexChanged += new System.EventHandler(this.cmbProductModel_SelectedIndexChanged);
|
||||
//
|
||||
// metroLabel1
|
||||
//
|
||||
this.metroLabel1.AutoSize = true;
|
||||
this.metroLabel1.Location = new System.Drawing.Point(53, 122);
|
||||
this.metroLabel1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
|
||||
this.metroLabel1.Name = "metroLabel1";
|
||||
this.metroLabel1.Size = new System.Drawing.Size(84, 20);
|
||||
this.metroLabel1.TabIndex = 3;
|
||||
this.metroLabel1.Text = "电芯型号:";
|
||||
//
|
||||
// btnSavePLCConfig
|
||||
//
|
||||
this.btnSavePLCConfig.Location = new System.Drawing.Point(51, 259);
|
||||
this.btnSavePLCConfig.Margin = new System.Windows.Forms.Padding(4);
|
||||
this.btnSavePLCConfig.Name = "btnSavePLCConfig";
|
||||
this.btnSavePLCConfig.Size = new System.Drawing.Size(152, 46);
|
||||
this.btnSavePLCConfig.TabIndex = 4;
|
||||
this.btnSavePLCConfig.Text = "一键保存";
|
||||
this.btnSavePLCConfig.UseSelectable = true;
|
||||
this.btnSavePLCConfig.Click += new System.EventHandler(this.btnReadPLC_Click);
|
||||
//
|
||||
// btnChangeConfig
|
||||
//
|
||||
this.btnChangeConfig.Location = new System.Drawing.Point(252, 259);
|
||||
this.btnChangeConfig.Margin = new System.Windows.Forms.Padding(4);
|
||||
this.btnChangeConfig.Name = "btnChangeConfig";
|
||||
this.btnChangeConfig.Size = new System.Drawing.Size(152, 46);
|
||||
this.btnChangeConfig.TabIndex = 5;
|
||||
this.btnChangeConfig.Text = "一键换型";
|
||||
this.btnChangeConfig.UseSelectable = true;
|
||||
this.btnChangeConfig.Click += new System.EventHandler(this.btnChangeConfig_Click);
|
||||
//
|
||||
// btnConfigBaseSet
|
||||
//
|
||||
this.btnConfigBaseSet.Location = new System.Drawing.Point(51, 352);
|
||||
this.btnConfigBaseSet.Margin = new System.Windows.Forms.Padding(4);
|
||||
this.btnConfigBaseSet.Name = "btnConfigBaseSet";
|
||||
this.btnConfigBaseSet.Size = new System.Drawing.Size(152, 46);
|
||||
this.btnConfigBaseSet.TabIndex = 6;
|
||||
this.btnConfigBaseSet.Text = "轴参数维护设置";
|
||||
this.btnConfigBaseSet.UseSelectable = true;
|
||||
this.btnConfigBaseSet.Click += new System.EventHandler(this.btnConfigBaseSet_Click);
|
||||
//
|
||||
// progressBar1
|
||||
//
|
||||
this.progressBar1.Location = new System.Drawing.Point(51, 190);
|
||||
this.progressBar1.Margin = new System.Windows.Forms.Padding(4);
|
||||
this.progressBar1.Name = "progressBar1";
|
||||
this.progressBar1.Size = new System.Drawing.Size(353, 29);
|
||||
this.progressBar1.TabIndex = 7;
|
||||
this.progressBar1.Visible = false;
|
||||
//
|
||||
// metroLabel2
|
||||
//
|
||||
this.metroLabel2.AutoSize = true;
|
||||
this.metroLabel2.Location = new System.Drawing.Point(144, 162);
|
||||
this.metroLabel2.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
|
||||
this.metroLabel2.Name = "metroLabel2";
|
||||
this.metroLabel2.Size = new System.Drawing.Size(0, 0);
|
||||
this.metroLabel2.TabIndex = 8;
|
||||
this.metroLabel2.Visible = false;
|
||||
//
|
||||
// 序号
|
||||
//
|
||||
this.序号.DataPropertyName = "序号";
|
||||
this.序号.HeaderText = "序号";
|
||||
this.序号.MinimumWidth = 6;
|
||||
this.序号.Name = "序号";
|
||||
this.序号.ReadOnly = true;
|
||||
this.序号.Width = 125;
|
||||
//
|
||||
// ModelName
|
||||
//
|
||||
this.ModelName.DataPropertyName = "ModelName";
|
||||
this.ModelName.HeaderText = "型号";
|
||||
this.ModelName.MinimumWidth = 6;
|
||||
this.ModelName.Name = "ModelName";
|
||||
this.ModelName.ReadOnly = true;
|
||||
this.ModelName.Width = 125;
|
||||
//
|
||||
// PLCAddress
|
||||
//
|
||||
this.PLCAddress.DataPropertyName = "PLCAddress";
|
||||
this.PLCAddress.HeaderText = "PLC地址";
|
||||
this.PLCAddress.MinimumWidth = 6;
|
||||
this.PLCAddress.Name = "PLCAddress";
|
||||
this.PLCAddress.ReadOnly = true;
|
||||
this.PLCAddress.Width = 125;
|
||||
//
|
||||
// PLCValue
|
||||
//
|
||||
this.PLCValue.DataPropertyName = "PLCValue";
|
||||
this.PLCValue.HeaderText = "PLC值";
|
||||
this.PLCValue.MinimumWidth = 6;
|
||||
this.PLCValue.Name = "PLCValue";
|
||||
this.PLCValue.ReadOnly = true;
|
||||
this.PLCValue.Width = 125;
|
||||
//
|
||||
// UpdateTime
|
||||
//
|
||||
this.UpdateTime.DataPropertyName = "UpdateTime";
|
||||
this.UpdateTime.HeaderText = "更新时间";
|
||||
this.UpdateTime.MinimumWidth = 6;
|
||||
this.UpdateTime.Name = "UpdateTime";
|
||||
this.UpdateTime.ReadOnly = true;
|
||||
this.UpdateTime.Width = 125;
|
||||
//
|
||||
// PLCRemark
|
||||
//
|
||||
this.PLCRemark.DataPropertyName = "PLCRemark";
|
||||
this.PLCRemark.HeaderText = "备注";
|
||||
this.PLCRemark.MinimumWidth = 6;
|
||||
this.PLCRemark.Name = "PLCRemark";
|
||||
this.PLCRemark.ReadOnly = true;
|
||||
this.PLCRemark.Width = 125;
|
||||
//
|
||||
// OrderNum
|
||||
//
|
||||
this.OrderNum.DataPropertyName = "OrderNum";
|
||||
this.OrderNum.HeaderText = "排序";
|
||||
this.OrderNum.MinimumWidth = 6;
|
||||
this.OrderNum.Name = "OrderNum";
|
||||
this.OrderNum.ReadOnly = true;
|
||||
this.OrderNum.Width = 125;
|
||||
//
|
||||
// FrmChangeModel
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.BorderStyle = MetroFramework.Forms.MetroFormBorderStyle.FixedSingle;
|
||||
this.ClientSize = new System.Drawing.Size(1452, 914);
|
||||
this.Controls.Add(this.metroLabel2);
|
||||
this.Controls.Add(this.progressBar1);
|
||||
this.Controls.Add(this.btnConfigBaseSet);
|
||||
this.Controls.Add(this.btnChangeConfig);
|
||||
this.Controls.Add(this.btnSavePLCConfig);
|
||||
this.Controls.Add(this.metroLabel1);
|
||||
this.Controls.Add(this.cmbProductModel);
|
||||
this.Controls.Add(this.dgvParaPLC);
|
||||
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||||
this.Margin = new System.Windows.Forms.Padding(4);
|
||||
this.MaximizeBox = false;
|
||||
this.MinimizeBox = false;
|
||||
this.Movable = false;
|
||||
this.Name = "FrmChangeModel";
|
||||
this.Padding = new System.Windows.Forms.Padding(27, 75, 27, 25);
|
||||
this.Text = "9978-";
|
||||
this.Load += new System.EventHandler(this.FrmChangeModel_Load);
|
||||
((System.ComponentModel.ISupportInitialize)(this.dgvParaPLC)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private MetroFramework.Controls.MetroGrid dgvParaPLC;
|
||||
private MetroFramework.Controls.MetroComboBox cmbProductModel;
|
||||
private MetroFramework.Controls.MetroLabel metroLabel1;
|
||||
private MetroFramework.Controls.MetroButton btnSavePLCConfig;
|
||||
private MetroFramework.Controls.MetroButton btnChangeConfig;
|
||||
private MetroFramework.Controls.MetroButton btnConfigBaseSet;
|
||||
private System.Windows.Forms.ProgressBar progressBar1;
|
||||
private MetroFramework.Controls.MetroLabel metroLabel2;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn 序号;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn ModelName;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn PLCAddress;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn PLCValue;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn UpdateTime;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn PLCRemark;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn OrderNum;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,218 @@
|
||||
<?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="序号.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="ModelName.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="PLCAddress.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="PLCValue.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="UpdateTime.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="PLCRemark.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="OrderNum.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
AAABAAEAICAAAAEAIACoEAAAFgAAACgAAAAgAAAAQAAAAAEAIAAAAAAAABAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAFlNUABZTVAAWU1QAFlNUABZTVAAWU1QAFlNUABZTVAAWU1QAFlN
|
||||
UABZTVAAWU1QAFlNUABZTVAAWU1QAFlNUABZTVAAWU1QAFlNUABZTVAAWU1QAFlNUAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABZTVAAWU1QAFpNUABZTVASWU1QH1lNUB9ZTVAfWU1QH1lN
|
||||
UB9ZTVAfWU1QH1lNUB9ZTVAfWU1QH1lNUB9ZTVAfWU1QH1lNUB9ZTVAfWU1QH1lNUBJaTVAAWU1QAFlN
|
||||
UAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAXE5OAFlNUABZTVAFWU1QaFlLUM1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AAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABZTVAAWE1QAFlN
|
||||
UABZTVAAWU1QAFlNUABZTVAAWU1QAFlNUABZTVAAWU1QAFlNUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAA+AAAH/AAAA/gAAAH4AAAB+AAAAfgAAAH4AAAB+AAAAfgAAAH4AAAB+AA
|
||||
AAfgAAAH4AAAB+AAAAfgAAAH4AAAB+AAAAfgAAAH4AAAB+AAAAfgAAAH4AAAB+AAAAfgAAAH4AAAB+AA
|
||||
AAfgAAAH8AAAD/gAAB//gAH//4AB///AA/8=
|
||||
</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -0,0 +1,173 @@
|
||||
using JY.DAL;
|
||||
using JY.Inspection.Common;
|
||||
using JY.Model;
|
||||
using JY.Utility;
|
||||
using MetroFramework.Forms;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace JY.Inspection.Frm
|
||||
{
|
||||
public partial class FrmConfigBaseSet : MetroForm
|
||||
{
|
||||
/// <summary>
|
||||
/// 数据库访问接口
|
||||
/// </summary>
|
||||
private IDbHelper dbHelper = new OpSqlDataBase();
|
||||
/// <summary>
|
||||
/// 定义DataGridView数据源
|
||||
/// </summary>
|
||||
private BindingList<PLCConfigBase> blPLCConfigBaseList = new BindingList<PLCConfigBase>();
|
||||
public FrmConfigBaseSet()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
//bool IsOrg = true;
|
||||
|
||||
private void FrmConfigBaseSet_Load(object sender, EventArgs e)
|
||||
{
|
||||
this.dgvPara.AutoGenerateColumns = false;
|
||||
//IsOrg = false;
|
||||
GetData();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 加载PLC轴参数数据到页面列表
|
||||
/// </summary>
|
||||
private void GetData()
|
||||
{
|
||||
var list = dbHelper.GetPLCConfigBases();
|
||||
blPLCConfigBaseList = new BindingList<PLCConfigBase>(list);
|
||||
dgvPara.DataSource = blPLCConfigBaseList;
|
||||
//dgvPara.Columns[0].Visible = false;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 导出到Excel
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void btnExcelToDgv_Click(object sender, EventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
OpenFileDialog fd = new OpenFileDialog();
|
||||
fd.Filter = "导入Excel数据库|*.xlsx;"; //打开文件对话框筛选器
|
||||
if (fd.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
EPPlusExcelHelper excelHepler = new EPPlusExcelHelper(fd.FileName);
|
||||
DataTable dt = excelHepler.ImportExcel(1);
|
||||
if (dt != null && dt.Rows.Count > 0)
|
||||
{
|
||||
blPLCConfigBaseList.Clear();
|
||||
foreach (DataRow dr in dt.Rows)
|
||||
{
|
||||
blPLCConfigBaseList.Add(new PLCConfigBase()
|
||||
{
|
||||
OrderNum = int.Parse(dr["顺序"].ToString()),
|
||||
PLCAddress = dr["PLC地址"].ToString(),
|
||||
PLCRemark = dr["地址说明"].ToString()
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception exception)
|
||||
{
|
||||
MessageBox.Show(exception.ToString(), "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 保存轴参数信息
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void btnOk_Click(object sender, EventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
string PlcAddressErr = "";//判断 PLC地址 是否重复
|
||||
|
||||
if (blPLCConfigBaseList.Count == 0)
|
||||
{
|
||||
MessageBox.Show("列表数据空数据,不能保存!", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
return;
|
||||
}
|
||||
|
||||
var duplicateData = blPLCConfigBaseList.GroupBy(p => p.PLCAddress);
|
||||
foreach (var item in duplicateData)
|
||||
{
|
||||
if (item.Count() > 1)
|
||||
{
|
||||
PlcAddressErr += $"PLC地址不能重复:{item.FirstOrDefault().PLCAddress}";
|
||||
}
|
||||
}
|
||||
|
||||
if (PlcAddressErr != "")//重复,需要报错并返出
|
||||
{
|
||||
MessageBox.Show(PlcAddressErr, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
return;//返出
|
||||
}
|
||||
|
||||
dbHelper.InsertPLCConfigBase(blPLCConfigBaseList.ToList());
|
||||
MessageBox.Show("保存成功!");
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
MessageBox.Show(ex.ToString());
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// 关闭窗体
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void btnCancel_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.Close();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加记录
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void tsmiAdd_Click(object sender, EventArgs e)
|
||||
{
|
||||
blPLCConfigBaseList.Add(new PLCConfigBase()
|
||||
{
|
||||
OrderNum = blPLCConfigBaseList.Count + 1,
|
||||
PLCAddress = "D00",
|
||||
PLCRemark = ""
|
||||
});
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 删除记录
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void tsmiDelete_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (dgvPara.RowCount == 0)
|
||||
{
|
||||
MessageBox.Show("没有数据需要删除!");
|
||||
return;
|
||||
}
|
||||
if (MessageBox.Show("确定要删除该行?", "系统提示", MessageBoxButtons.OKCancel, MessageBoxIcon.Question) == DialogResult.OK)
|
||||
{
|
||||
int row = dgvPara.CurrentCell.RowIndex;
|
||||
blPLCConfigBaseList.RemoveAt(row);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+226
@@ -0,0 +1,226 @@
|
||||
|
||||
namespace JY.Inspection.Frm
|
||||
{
|
||||
partial class FrmConfigBaseSet
|
||||
{
|
||||
/// <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();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmConfigBaseSet));
|
||||
this.dgvPara = new MetroFramework.Controls.MetroGrid();
|
||||
this.PLCAddress = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.PLCRemark = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.OrderNum = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.contextMenuStrip1 = new System.Windows.Forms.ContextMenuStrip(this.components);
|
||||
this.tsmiAdd = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.tsmiDelete = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.btnOk = new MetroFramework.Controls.MetroButton();
|
||||
this.btnCancel = new MetroFramework.Controls.MetroButton();
|
||||
this.btnExcelToDgv = new MetroFramework.Controls.MetroButton();
|
||||
((System.ComponentModel.ISupportInitialize)(this.dgvPara)).BeginInit();
|
||||
this.contextMenuStrip1.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// dgvPara
|
||||
//
|
||||
this.dgvPara.AllowUserToAddRows = false;
|
||||
this.dgvPara.AllowUserToDeleteRows = false;
|
||||
this.dgvPara.AllowUserToResizeRows = false;
|
||||
this.dgvPara.BackgroundColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
|
||||
this.dgvPara.BorderStyle = System.Windows.Forms.BorderStyle.None;
|
||||
this.dgvPara.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.None;
|
||||
this.dgvPara.ColumnHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.None;
|
||||
dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
|
||||
dataGridViewCellStyle1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(174)))), ((int)(((byte)(219)))));
|
||||
dataGridViewCellStyle1.Font = new System.Drawing.Font("Segoe UI", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel);
|
||||
dataGridViewCellStyle1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
|
||||
dataGridViewCellStyle1.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(198)))), ((int)(((byte)(247)))));
|
||||
dataGridViewCellStyle1.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(17)))), ((int)(((byte)(17)))), ((int)(((byte)(17)))));
|
||||
dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
|
||||
this.dgvPara.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle1;
|
||||
this.dgvPara.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
||||
this.dgvPara.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
|
||||
this.PLCAddress,
|
||||
this.PLCRemark,
|
||||
this.OrderNum});
|
||||
this.dgvPara.ContextMenuStrip = this.contextMenuStrip1;
|
||||
dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
|
||||
dataGridViewCellStyle2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
|
||||
dataGridViewCellStyle2.Font = new System.Drawing.Font("Segoe UI", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel);
|
||||
dataGridViewCellStyle2.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(136)))), ((int)(((byte)(136)))), ((int)(((byte)(136)))));
|
||||
dataGridViewCellStyle2.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(198)))), ((int)(((byte)(247)))));
|
||||
dataGridViewCellStyle2.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(17)))), ((int)(((byte)(17)))), ((int)(((byte)(17)))));
|
||||
dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
|
||||
this.dgvPara.DefaultCellStyle = dataGridViewCellStyle2;
|
||||
this.dgvPara.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this.dgvPara.EnableHeadersVisualStyles = false;
|
||||
this.dgvPara.Font = new System.Drawing.Font("Segoe UI", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel);
|
||||
this.dgvPara.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
|
||||
this.dgvPara.Location = new System.Drawing.Point(27, 75);
|
||||
this.dgvPara.Margin = new System.Windows.Forms.Padding(4);
|
||||
this.dgvPara.Name = "dgvPara";
|
||||
this.dgvPara.RowHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.None;
|
||||
dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
|
||||
dataGridViewCellStyle3.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(174)))), ((int)(((byte)(219)))));
|
||||
dataGridViewCellStyle3.Font = new System.Drawing.Font("Segoe UI", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel);
|
||||
dataGridViewCellStyle3.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
|
||||
dataGridViewCellStyle3.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(198)))), ((int)(((byte)(247)))));
|
||||
dataGridViewCellStyle3.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(17)))), ((int)(((byte)(17)))), ((int)(((byte)(17)))));
|
||||
dataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
|
||||
this.dgvPara.RowHeadersDefaultCellStyle = dataGridViewCellStyle3;
|
||||
this.dgvPara.RowHeadersVisible = false;
|
||||
this.dgvPara.RowHeadersWidth = 51;
|
||||
this.dgvPara.RowHeadersWidthSizeMode = System.Windows.Forms.DataGridViewRowHeadersWidthSizeMode.DisableResizing;
|
||||
this.dgvPara.RowTemplate.Height = 23;
|
||||
this.dgvPara.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
|
||||
this.dgvPara.Size = new System.Drawing.Size(737, 680);
|
||||
this.dgvPara.TabIndex = 0;
|
||||
//
|
||||
// PLCAddress
|
||||
//
|
||||
this.PLCAddress.DataPropertyName = "PLCAddress";
|
||||
this.PLCAddress.HeaderText = "PLC地址";
|
||||
this.PLCAddress.MinimumWidth = 6;
|
||||
this.PLCAddress.Name = "PLCAddress";
|
||||
this.PLCAddress.Width = 125;
|
||||
//
|
||||
// PLCRemark
|
||||
//
|
||||
this.PLCRemark.DataPropertyName = "PLCRemark";
|
||||
this.PLCRemark.HeaderText = "地址说明";
|
||||
this.PLCRemark.MinimumWidth = 6;
|
||||
this.PLCRemark.Name = "PLCRemark";
|
||||
this.PLCRemark.Width = 300;
|
||||
//
|
||||
// OrderNum
|
||||
//
|
||||
this.OrderNum.DataPropertyName = "OrderNum";
|
||||
this.OrderNum.HeaderText = "顺序";
|
||||
this.OrderNum.MinimumWidth = 6;
|
||||
this.OrderNum.Name = "OrderNum";
|
||||
this.OrderNum.Width = 125;
|
||||
//
|
||||
// contextMenuStrip1
|
||||
//
|
||||
this.contextMenuStrip1.ImageScalingSize = new System.Drawing.Size(20, 20);
|
||||
this.contextMenuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.tsmiAdd,
|
||||
this.tsmiDelete});
|
||||
this.contextMenuStrip1.Name = "contextMenuStrip1";
|
||||
this.contextMenuStrip1.Size = new System.Drawing.Size(124, 52);
|
||||
//
|
||||
// tsmiAdd
|
||||
//
|
||||
this.tsmiAdd.Name = "tsmiAdd";
|
||||
this.tsmiAdd.Size = new System.Drawing.Size(123, 24);
|
||||
this.tsmiAdd.Text = "添加行";
|
||||
this.tsmiAdd.Click += new System.EventHandler(this.tsmiAdd_Click);
|
||||
//
|
||||
// tsmiDelete
|
||||
//
|
||||
this.tsmiDelete.Name = "tsmiDelete";
|
||||
this.tsmiDelete.Size = new System.Drawing.Size(123, 24);
|
||||
this.tsmiDelete.Text = "删除行";
|
||||
this.tsmiDelete.Click += new System.EventHandler(this.tsmiDelete_Click);
|
||||
//
|
||||
// btnOk
|
||||
//
|
||||
this.btnOk.Location = new System.Drawing.Point(292, 811);
|
||||
this.btnOk.Margin = new System.Windows.Forms.Padding(4);
|
||||
this.btnOk.Name = "btnOk";
|
||||
this.btnOk.Size = new System.Drawing.Size(181, 55);
|
||||
this.btnOk.TabIndex = 1;
|
||||
this.btnOk.Text = "保存";
|
||||
this.btnOk.UseSelectable = true;
|
||||
this.btnOk.Click += new System.EventHandler(this.btnOk_Click);
|
||||
//
|
||||
// btnCancel
|
||||
//
|
||||
this.btnCancel.Location = new System.Drawing.Point(537, 811);
|
||||
this.btnCancel.Margin = new System.Windows.Forms.Padding(4);
|
||||
this.btnCancel.Name = "btnCancel";
|
||||
this.btnCancel.Size = new System.Drawing.Size(181, 55);
|
||||
this.btnCancel.TabIndex = 2;
|
||||
this.btnCancel.Text = "退出";
|
||||
this.btnCancel.UseSelectable = true;
|
||||
this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click);
|
||||
//
|
||||
// btnExcelToDgv
|
||||
//
|
||||
this.btnExcelToDgv.Location = new System.Drawing.Point(64, 811);
|
||||
this.btnExcelToDgv.Margin = new System.Windows.Forms.Padding(4);
|
||||
this.btnExcelToDgv.Name = "btnExcelToDgv";
|
||||
this.btnExcelToDgv.Size = new System.Drawing.Size(181, 55);
|
||||
this.btnExcelToDgv.TabIndex = 3;
|
||||
this.btnExcelToDgv.Text = "导入轴寄存器";
|
||||
this.btnExcelToDgv.UseSelectable = true;
|
||||
this.btnExcelToDgv.Click += new System.EventHandler(this.btnExcelToDgv_Click);
|
||||
//
|
||||
// FrmConfigBaseSet
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.BorderStyle = MetroFramework.Forms.MetroFormBorderStyle.FixedSingle;
|
||||
this.ClientSize = new System.Drawing.Size(791, 877);
|
||||
this.Controls.Add(this.btnExcelToDgv);
|
||||
this.Controls.Add(this.btnCancel);
|
||||
this.Controls.Add(this.btnOk);
|
||||
this.Controls.Add(this.dgvPara);
|
||||
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||||
this.Margin = new System.Windows.Forms.Padding(4);
|
||||
this.MaximizeBox = false;
|
||||
this.MinimizeBox = false;
|
||||
this.Movable = false;
|
||||
this.Name = "FrmConfigBaseSet";
|
||||
this.Padding = new System.Windows.Forms.Padding(27, 75, 27, 25);
|
||||
this.Text = "PLC轴寄存器维护地址";
|
||||
this.Load += new System.EventHandler(this.FrmConfigBaseSet_Load);
|
||||
((System.ComponentModel.ISupportInitialize)(this.dgvPara)).EndInit();
|
||||
this.contextMenuStrip1.ResumeLayout(false);
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private MetroFramework.Controls.MetroGrid dgvPara;
|
||||
private MetroFramework.Controls.MetroButton btnOk;
|
||||
private MetroFramework.Controls.MetroButton btnCancel;
|
||||
private System.Windows.Forms.ContextMenuStrip contextMenuStrip1;
|
||||
private System.Windows.Forms.ToolStripMenuItem tsmiAdd;
|
||||
private System.Windows.Forms.ToolStripMenuItem tsmiDelete;
|
||||
private MetroFramework.Controls.MetroButton btnExcelToDgv;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn PLCAddress;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn PLCRemark;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn OrderNum;
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,209 @@
|
||||
<?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="PLCAddress.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="PLCRemark.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="OrderNum.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="contextMenuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype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VAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAWU1QAFlNUABZTVAAWU1QAFlNUABWSlAAWExPpV5TVv9yaGr/c2ps/3NqbP9zamz/c2ps/3Jo
|
||||
av9eU1b/WExPpVZKUQFZTVAAWU1QAFlNUABYTVAAWU1QAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAVklRAFlNUABZTVA7WU1QwlhMT+BYTE/gWExP4FhM
|
||||
T+BYTE/gWExP4FlNUMJZTVA7WU1QAFZKUgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABYTFEAWE1QAFlNUABZTVAPWU1QH1lN
|
||||
UB9ZTVAfWU1QH1lNUB9ZTVAfWU1QD1lNUABYTFEAWExRAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABZTVAAWE1QAFlN
|
||||
UABZTVAAWU1QAFlNUABZTVAAWU1QAFlNUABZTVAAWU1QAFlNUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAA+AAAH/AAAA/gAAAH4AAAB+AAAAfgAAAH4AAAB+AAAAfgAAAH4AAAB+AA
|
||||
AAfgAAAH4AAAB+AAAAfgAAAH4AAAB+AAAAfgAAAH4AAAB+AAAAfgAAAH4AAAB+AAAAfgAAAH4AAAB+AA
|
||||
AAfgAAAH8AAAD/gAAB//gAH//4AB///AA/8=
|
||||
</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -0,0 +1,47 @@
|
||||
using MetroFramework.Forms;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using JY.Inspection.Common;
|
||||
using JY.Utility;
|
||||
|
||||
namespace JY.Inspection.Frm
|
||||
{
|
||||
public partial class FrmDBbaseSet : MetroForm
|
||||
{
|
||||
public FrmDBbaseSet()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void FrmDBbaseSet_Load(object sender, EventArgs e)
|
||||
{
|
||||
txtDBIP.Text = IniFileHelper.ReadIniData("MYSQL配置", "DB_IP");
|
||||
txtDBName.Text = IniFileHelper.ReadIniData("MYSQL配置", "DB_Name");
|
||||
txtDBUser.Text = IniFileHelper.ReadIniData("MYSQL配置", "DB_User");
|
||||
txtDBPwd.Text = IniFileHelper.ReadIniData("MYSQL配置", "DB_Pwd");
|
||||
|
||||
}
|
||||
|
||||
private void btnSave_Click(object sender, EventArgs e)
|
||||
{
|
||||
IniFileHelper.WriteIniData("MYSQL配置", "DB_IP", txtDBIP.Text.Trim());
|
||||
IniFileHelper.WriteIniData("MYSQL配置", "DB_Name", txtDBName.Text.Trim());
|
||||
IniFileHelper.WriteIniData("MYSQL配置", "DB_User", txtDBUser.Text.Trim());
|
||||
IniFileHelper.WriteIniData("MYSQL配置", "DB_Pwd", txtDBPwd.Text.Trim());
|
||||
|
||||
MessageBox.Show("数据库参数保存成功!", "系统提示");
|
||||
}
|
||||
|
||||
private void btnExit_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.Close();
|
||||
}
|
||||
}
|
||||
}
|
||||
+276
@@ -0,0 +1,276 @@
|
||||
|
||||
namespace JY.Inspection.Frm
|
||||
{
|
||||
partial class FrmDBbaseSet
|
||||
{
|
||||
/// <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()
|
||||
{
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmDBbaseSet));
|
||||
this.btnSave = new MetroFramework.Controls.MetroButton();
|
||||
this.txtDBIP = new MetroFramework.Controls.MetroTextBox();
|
||||
this.metroLabel1 = new MetroFramework.Controls.MetroLabel();
|
||||
this.btnExit = new MetroFramework.Controls.MetroButton();
|
||||
this.metroLabel2 = new MetroFramework.Controls.MetroLabel();
|
||||
this.txtDBName = new MetroFramework.Controls.MetroTextBox();
|
||||
this.metroLabel3 = new MetroFramework.Controls.MetroLabel();
|
||||
this.txtDBUser = new MetroFramework.Controls.MetroTextBox();
|
||||
this.metroLabel4 = new MetroFramework.Controls.MetroLabel();
|
||||
this.txtDBPwd = new MetroFramework.Controls.MetroTextBox();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// btnSave
|
||||
//
|
||||
this.btnSave.Location = new System.Drawing.Point(87, 331);
|
||||
this.btnSave.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
|
||||
this.btnSave.Name = "btnSave";
|
||||
this.btnSave.Size = new System.Drawing.Size(149, 46);
|
||||
this.btnSave.TabIndex = 0;
|
||||
this.btnSave.Text = "保存";
|
||||
this.btnSave.UseSelectable = true;
|
||||
this.btnSave.Click += new System.EventHandler(this.btnSave_Click);
|
||||
//
|
||||
// txtDBIP
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
this.txtDBIP.CustomButton.Image = null;
|
||||
this.txtDBIP.CustomButton.Location = new System.Drawing.Point(273, 1);
|
||||
this.txtDBIP.CustomButton.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
|
||||
this.txtDBIP.CustomButton.Name = "";
|
||||
this.txtDBIP.CustomButton.Size = new System.Drawing.Size(36, 34);
|
||||
this.txtDBIP.CustomButton.Style = MetroFramework.MetroColorStyle.Blue;
|
||||
this.txtDBIP.CustomButton.TabIndex = 1;
|
||||
this.txtDBIP.CustomButton.Theme = MetroFramework.MetroThemeStyle.Light;
|
||||
this.txtDBIP.CustomButton.UseSelectable = true;
|
||||
this.txtDBIP.CustomButton.Visible = false;
|
||||
this.txtDBIP.Lines = new string[0];
|
||||
this.txtDBIP.Location = new System.Drawing.Point(204, 95);
|
||||
this.txtDBIP.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
|
||||
this.txtDBIP.MaxLength = 32767;
|
||||
this.txtDBIP.Name = "txtDBIP";
|
||||
this.txtDBIP.PasswordChar = '\0';
|
||||
this.txtDBIP.ScrollBars = System.Windows.Forms.ScrollBars.None;
|
||||
this.txtDBIP.SelectedText = "";
|
||||
this.txtDBIP.SelectionLength = 0;
|
||||
this.txtDBIP.SelectionStart = 0;
|
||||
this.txtDBIP.ShortcutsEnabled = true;
|
||||
this.txtDBIP.Size = new System.Drawing.Size(233, 29);
|
||||
this.txtDBIP.TabIndex = 1;
|
||||
this.txtDBIP.UseSelectable = true;
|
||||
this.txtDBIP.WaterMarkColor = System.Drawing.Color.FromArgb(((int)(((byte)(109)))), ((int)(((byte)(109)))), ((int)(((byte)(109)))));
|
||||
this.txtDBIP.WaterMarkFont = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Pixel);
|
||||
//
|
||||
// metroLabel1
|
||||
//
|
||||
this.metroLabel1.AutoSize = true;
|
||||
this.metroLabel1.Location = new System.Drawing.Point(75, 95);
|
||||
this.metroLabel1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
|
||||
this.metroLabel1.Name = "metroLabel1";
|
||||
this.metroLabel1.Size = new System.Drawing.Size(99, 20);
|
||||
this.metroLabel1.TabIndex = 2;
|
||||
this.metroLabel1.Text = "数据库地址:";
|
||||
//
|
||||
// btnExit
|
||||
//
|
||||
this.btnExit.Location = new System.Drawing.Point(300, 331);
|
||||
this.btnExit.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
|
||||
this.btnExit.Name = "btnExit";
|
||||
this.btnExit.Size = new System.Drawing.Size(137, 46);
|
||||
this.btnExit.TabIndex = 3;
|
||||
this.btnExit.Text = "退出";
|
||||
this.btnExit.UseSelectable = true;
|
||||
this.btnExit.Click += new System.EventHandler(this.btnExit_Click);
|
||||
//
|
||||
// metroLabel2
|
||||
//
|
||||
this.metroLabel2.AutoSize = true;
|
||||
this.metroLabel2.Location = new System.Drawing.Point(75, 150);
|
||||
this.metroLabel2.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
|
||||
this.metroLabel2.Name = "metroLabel2";
|
||||
this.metroLabel2.Size = new System.Drawing.Size(99, 20);
|
||||
this.metroLabel2.TabIndex = 5;
|
||||
this.metroLabel2.Text = "数据库名称:";
|
||||
//
|
||||
// txtDBName
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
this.txtDBName.CustomButton.Image = null;
|
||||
this.txtDBName.CustomButton.Location = new System.Drawing.Point(273, 1);
|
||||
this.txtDBName.CustomButton.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
|
||||
this.txtDBName.CustomButton.Name = "";
|
||||
this.txtDBName.CustomButton.Size = new System.Drawing.Size(36, 34);
|
||||
this.txtDBName.CustomButton.Style = MetroFramework.MetroColorStyle.Blue;
|
||||
this.txtDBName.CustomButton.TabIndex = 1;
|
||||
this.txtDBName.CustomButton.Theme = MetroFramework.MetroThemeStyle.Light;
|
||||
this.txtDBName.CustomButton.UseSelectable = true;
|
||||
this.txtDBName.CustomButton.Visible = false;
|
||||
this.txtDBName.Lines = new string[0];
|
||||
this.txtDBName.Location = new System.Drawing.Point(204, 150);
|
||||
this.txtDBName.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
|
||||
this.txtDBName.MaxLength = 32767;
|
||||
this.txtDBName.Name = "txtDBName";
|
||||
this.txtDBName.PasswordChar = '\0';
|
||||
this.txtDBName.ScrollBars = System.Windows.Forms.ScrollBars.None;
|
||||
this.txtDBName.SelectedText = "";
|
||||
this.txtDBName.SelectionLength = 0;
|
||||
this.txtDBName.SelectionStart = 0;
|
||||
this.txtDBName.ShortcutsEnabled = true;
|
||||
this.txtDBName.Size = new System.Drawing.Size(233, 29);
|
||||
this.txtDBName.TabIndex = 4;
|
||||
this.txtDBName.UseSelectable = true;
|
||||
this.txtDBName.WaterMarkColor = System.Drawing.Color.FromArgb(((int)(((byte)(109)))), ((int)(((byte)(109)))), ((int)(((byte)(109)))));
|
||||
this.txtDBName.WaterMarkFont = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Pixel);
|
||||
//
|
||||
// metroLabel3
|
||||
//
|
||||
this.metroLabel3.AutoSize = true;
|
||||
this.metroLabel3.Location = new System.Drawing.Point(75, 206);
|
||||
this.metroLabel3.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
|
||||
this.metroLabel3.Name = "metroLabel3";
|
||||
this.metroLabel3.Size = new System.Drawing.Size(99, 20);
|
||||
this.metroLabel3.TabIndex = 7;
|
||||
this.metroLabel3.Text = "数据库用户:";
|
||||
//
|
||||
// txtDBUser
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
this.txtDBUser.CustomButton.Image = null;
|
||||
this.txtDBUser.CustomButton.Location = new System.Drawing.Point(273, 1);
|
||||
this.txtDBUser.CustomButton.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
|
||||
this.txtDBUser.CustomButton.Name = "";
|
||||
this.txtDBUser.CustomButton.Size = new System.Drawing.Size(36, 34);
|
||||
this.txtDBUser.CustomButton.Style = MetroFramework.MetroColorStyle.Blue;
|
||||
this.txtDBUser.CustomButton.TabIndex = 1;
|
||||
this.txtDBUser.CustomButton.Theme = MetroFramework.MetroThemeStyle.Light;
|
||||
this.txtDBUser.CustomButton.UseSelectable = true;
|
||||
this.txtDBUser.CustomButton.Visible = false;
|
||||
this.txtDBUser.Lines = new string[0];
|
||||
this.txtDBUser.Location = new System.Drawing.Point(204, 206);
|
||||
this.txtDBUser.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
|
||||
this.txtDBUser.MaxLength = 32767;
|
||||
this.txtDBUser.Name = "txtDBUser";
|
||||
this.txtDBUser.PasswordChar = '\0';
|
||||
this.txtDBUser.ScrollBars = System.Windows.Forms.ScrollBars.None;
|
||||
this.txtDBUser.SelectedText = "";
|
||||
this.txtDBUser.SelectionLength = 0;
|
||||
this.txtDBUser.SelectionStart = 0;
|
||||
this.txtDBUser.ShortcutsEnabled = true;
|
||||
this.txtDBUser.Size = new System.Drawing.Size(233, 29);
|
||||
this.txtDBUser.TabIndex = 6;
|
||||
this.txtDBUser.UseSelectable = true;
|
||||
this.txtDBUser.WaterMarkColor = System.Drawing.Color.FromArgb(((int)(((byte)(109)))), ((int)(((byte)(109)))), ((int)(((byte)(109)))));
|
||||
this.txtDBUser.WaterMarkFont = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Pixel);
|
||||
//
|
||||
// metroLabel4
|
||||
//
|
||||
this.metroLabel4.AutoSize = true;
|
||||
this.metroLabel4.Location = new System.Drawing.Point(75, 259);
|
||||
this.metroLabel4.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
|
||||
this.metroLabel4.Name = "metroLabel4";
|
||||
this.metroLabel4.Size = new System.Drawing.Size(99, 20);
|
||||
this.metroLabel4.TabIndex = 9;
|
||||
this.metroLabel4.Text = "数据库密码:";
|
||||
//
|
||||
// txtDBPwd
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
this.txtDBPwd.CustomButton.Image = null;
|
||||
this.txtDBPwd.CustomButton.Location = new System.Drawing.Point(273, 1);
|
||||
this.txtDBPwd.CustomButton.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
|
||||
this.txtDBPwd.CustomButton.Name = "";
|
||||
this.txtDBPwd.CustomButton.Size = new System.Drawing.Size(36, 34);
|
||||
this.txtDBPwd.CustomButton.Style = MetroFramework.MetroColorStyle.Blue;
|
||||
this.txtDBPwd.CustomButton.TabIndex = 1;
|
||||
this.txtDBPwd.CustomButton.Theme = MetroFramework.MetroThemeStyle.Light;
|
||||
this.txtDBPwd.CustomButton.UseSelectable = true;
|
||||
this.txtDBPwd.CustomButton.Visible = false;
|
||||
this.txtDBPwd.Lines = new string[0];
|
||||
this.txtDBPwd.Location = new System.Drawing.Point(204, 259);
|
||||
this.txtDBPwd.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
|
||||
this.txtDBPwd.MaxLength = 32767;
|
||||
this.txtDBPwd.Name = "txtDBPwd";
|
||||
this.txtDBPwd.PasswordChar = '\0';
|
||||
this.txtDBPwd.ScrollBars = System.Windows.Forms.ScrollBars.None;
|
||||
this.txtDBPwd.SelectedText = "";
|
||||
this.txtDBPwd.SelectionLength = 0;
|
||||
this.txtDBPwd.SelectionStart = 0;
|
||||
this.txtDBPwd.ShortcutsEnabled = true;
|
||||
this.txtDBPwd.Size = new System.Drawing.Size(233, 29);
|
||||
this.txtDBPwd.TabIndex = 8;
|
||||
this.txtDBPwd.UseSelectable = true;
|
||||
this.txtDBPwd.WaterMarkColor = System.Drawing.Color.FromArgb(((int)(((byte)(109)))), ((int)(((byte)(109)))), ((int)(((byte)(109)))));
|
||||
this.txtDBPwd.WaterMarkFont = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Pixel);
|
||||
//
|
||||
// FrmDBbaseSet
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(497, 420);
|
||||
this.Controls.Add(this.metroLabel4);
|
||||
this.Controls.Add(this.txtDBPwd);
|
||||
this.Controls.Add(this.metroLabel3);
|
||||
this.Controls.Add(this.txtDBUser);
|
||||
this.Controls.Add(this.metroLabel2);
|
||||
this.Controls.Add(this.txtDBName);
|
||||
this.Controls.Add(this.btnExit);
|
||||
this.Controls.Add(this.metroLabel1);
|
||||
this.Controls.Add(this.txtDBIP);
|
||||
this.Controls.Add(this.btnSave);
|
||||
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||||
this.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
|
||||
this.MaximizeBox = false;
|
||||
this.MinimizeBox = false;
|
||||
this.Name = "FrmDBbaseSet";
|
||||
this.Padding = new System.Windows.Forms.Padding(27, 75, 27, 25);
|
||||
this.Text = "数据库设置";
|
||||
this.Load += new System.EventHandler(this.FrmDBbaseSet_Load);
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private MetroFramework.Controls.MetroButton btnSave;
|
||||
private MetroFramework.Controls.MetroTextBox txtDBIP;
|
||||
private MetroFramework.Controls.MetroLabel metroLabel1;
|
||||
private MetroFramework.Controls.MetroButton btnExit;
|
||||
private MetroFramework.Controls.MetroLabel metroLabel2;
|
||||
private MetroFramework.Controls.MetroTextBox txtDBName;
|
||||
private MetroFramework.Controls.MetroLabel metroLabel3;
|
||||
private MetroFramework.Controls.MetroTextBox txtDBUser;
|
||||
private MetroFramework.Controls.MetroLabel metroLabel4;
|
||||
private MetroFramework.Controls.MetroTextBox txtDBPwd;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,197 @@
|
||||
<?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.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
AAABAAEAICAAAAEAIACoEAAAFgAAACgAAAAgAAAAQAAAAAEAIAAAAAAAABAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAFlNUABZTVAAWU1QAFlNUABZTVAAWU1QAFlNUABZTVAAWU1QAFlN
|
||||
UABZTVAAWU1QAFlNUABZTVAAWU1QAFlNUABZTVAAWU1QAFlNUABZTVAAWU1QAFlNUAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABZTVAAWU1QAFpNUABZTVASWU1QH1lNUB9ZTVAfWU1QH1lN
|
||||
UB9ZTVAfWU1QH1lNUB9ZTVAfWU1QH1lNUB9ZTVAfWU1QH1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AAAAAAAAAAAAAAAAABYTFEAWE1QAFlNUABZTVAPWU1QH1lN
|
||||
UB9ZTVAfWU1QH1lNUB9ZTVAfWU1QD1lNUABYTFEAWExRAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABZTVAAWE1QAFlN
|
||||
UABZTVAAWU1QAFlNUABZTVAAWU1QAFlNUABZTVAAWU1QAFlNUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAA+AAAH/AAAA/gAAAH4AAAB+AAAAfgAAAH4AAAB+AAAAfgAAAH4AAAB+AA
|
||||
AAfgAAAH4AAAB+AAAAfgAAAH4AAAB+AAAAfgAAAH4AAAB+AAAAfgAAAH4AAAB+AAAAfgAAAH4AAAB+AA
|
||||
AAfgAAAH8AAAD/gAAB//gAH//4AB///AA/8=
|
||||
</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -0,0 +1,21 @@
|
||||
using MetroFramework.Forms;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace JY.Inspection.Frm
|
||||
{
|
||||
public partial class FrmHelper : MetroForm
|
||||
{
|
||||
public FrmHelper()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
Generated
+82
@@ -0,0 +1,82 @@
|
||||
|
||||
namespace JY.Inspection.Frm
|
||||
{
|
||||
partial class FrmHelper
|
||||
{
|
||||
/// <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()
|
||||
{
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmHelper));
|
||||
this.metroLabel1 = new MetroFramework.Controls.MetroLabel();
|
||||
this.metroLabel2 = new MetroFramework.Controls.MetroLabel();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// metroLabel1
|
||||
//
|
||||
this.metroLabel1.AutoSize = true;
|
||||
this.metroLabel1.Location = new System.Drawing.Point(114, 166);
|
||||
this.metroLabel1.Name = "metroLabel1";
|
||||
this.metroLabel1.Size = new System.Drawing.Size(317, 19);
|
||||
this.metroLabel1.TabIndex = 0;
|
||||
this.metroLabel1.Text = "本系统由惠州金源精密自动化设备有限公司开发。";
|
||||
//
|
||||
// metroLabel2
|
||||
//
|
||||
this.metroLabel2.AutoSize = true;
|
||||
this.metroLabel2.Location = new System.Drawing.Point(114, 185);
|
||||
this.metroLabel2.Name = "metroLabel2";
|
||||
this.metroLabel2.Size = new System.Drawing.Size(216, 19);
|
||||
this.metroLabel2.TabIndex = 1;
|
||||
this.metroLabel2.Text = "版本号V1.2,更新时间2025.11.22。";
|
||||
//
|
||||
// FrmHelper
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(531, 332);
|
||||
this.Controls.Add(this.metroLabel2);
|
||||
this.Controls.Add(this.metroLabel1);
|
||||
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||||
this.MaximizeBox = false;
|
||||
this.MinimizeBox = false;
|
||||
this.Movable = false;
|
||||
this.Name = "FrmHelper";
|
||||
this.Resizable = false;
|
||||
this.ShadowType = MetroFramework.Forms.MetroFormShadowType.AeroShadow;
|
||||
this.ShowIcon = false;
|
||||
this.ShowInTaskbar = false;
|
||||
this.Text = "帮助页面";
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private MetroFramework.Controls.MetroLabel metroLabel1;
|
||||
private MetroFramework.Controls.MetroLabel metroLabel2;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,197 @@
|
||||
<?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.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
AAABAAEAICAAAAEAIACoEAAAFgAAACgAAAAgAAAAQAAAAAEAIAAAAAAAABAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAFlNUABZTVAAWU1QAFlNUABZTVAAWU1QAFlNUABZTVAAWU1QAFlN
|
||||
UABZTVAAWU1QAFlNUABZTVAAWU1QAFlNUABZTVAAWU1QAFlNUABZTVAAWU1QAFlNUAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABZTVAAWU1QAFpNUABZTVASWU1QH1lNUB9ZTVAfWU1QH1lN
|
||||
UB9ZTVAfWU1QH1lNUB9ZTVAfWU1QH1lNUB9ZTVAfWU1QH1lNUB9ZTVAfWU1QH1lNUBJaTVAAWU1QAFlN
|
||||
UAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAXE5OAFlNUABZTVAFWU1QaFlLUM1YS0/gWEtQ4FhL
|
||||
UOBYS1DgWEtQ4FhLUOBYS1DgWEtQ4FhLUOBYS1DgWEtQ4FhLUOBYS1DgWEtQ4FhLUOBYS0/gWUtQzVlN
|
||||
UGhZTVAFWU1QAFxOTgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABWS1EAWU1QAFlNUE5ZTlD0YGxY/2eH
|
||||
Xv9nh17/Z4de/2eHXv9nh17/Z4de/2eHXv9nh17/Z4de/2eHXv9nh17/Z4de/2eHXv9nh17/Z4de/2eH
|
||||
Xv9gbFj/WU5Q9FlNUE5ZTVAAVktRAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFhNUABaTVAAWUtQkl1c
|
||||
VP9xtWn/dchu/3TIbf90yG3/dMht/3TIbf90yG3/dMht/3THbf91yG7/dMht/3TIbf90yG3/dMht/3TI
|
||||
bf90yG3/dchu/3G1af9d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;
|
||||
using System.Data;
|
||||
using System.IO;
|
||||
using System.Threading;
|
||||
using System.Windows.Forms;
|
||||
using JY.DAL;
|
||||
using JY.Utility;
|
||||
using System.Drawing;
|
||||
using Newtonsoft.Json;
|
||||
using JYControl;
|
||||
using JY.MES.Entity;
|
||||
using JY.MES;
|
||||
using OfficeOpenXml;
|
||||
using MiniExcelLibs;
|
||||
|
||||
namespace JY.Inspection.Frm
|
||||
{
|
||||
public partial class FrmHistoricalDataQuery : MetroFramework.Forms.MetroForm
|
||||
{
|
||||
public delegate void myDelegate(DataTable t);
|
||||
public delegate void PDelegate();
|
||||
Thread tSo;
|
||||
int type = 0;//查询类型
|
||||
int resulttype = 0;//结果类型
|
||||
DataTable dts = null;
|
||||
/// <summary>
|
||||
/// 用于电芯进站时设备与FMS校验电芯合法性
|
||||
/// </summary>
|
||||
string CheckBarCodeInUrl = "";
|
||||
/// <summary>
|
||||
/// 用于电芯出站时向FMS上报出站及生产数据
|
||||
/// </summary>
|
||||
string BarCodeOutUrl = "";
|
||||
/// <summary>
|
||||
/// MES上传验证码
|
||||
/// </summary>
|
||||
string authorization = "";
|
||||
|
||||
/// <summary>
|
||||
/// 数据库访问接口
|
||||
/// </summary>
|
||||
private IDbHelper dbHelper = new OpSqlDataBase();
|
||||
public FrmHistoricalDataQuery()
|
||||
{
|
||||
InitializeComponent();
|
||||
CheckForIllegalCrossThreadCalls = false;
|
||||
}
|
||||
/// <summary>
|
||||
/// 窗体加载事件
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void FrmHistoricalDataQuery_Load(object sender, EventArgs e)
|
||||
{
|
||||
cbSelectType.SelectedIndex = 0;
|
||||
resultSelectType.SelectedIndex = 0;
|
||||
cmbFlag.SelectedIndex = 0;
|
||||
dtStartTime.Value = Convert.ToDateTime(DateTime.Now.ToString("yyyy-MM-dd HH:mm"));
|
||||
dtEndTime.Value = Convert.ToDateTime(DateTime.Now.ToString("yyyy-MM-dd HH:mm"));
|
||||
//为dgv添加复选框列
|
||||
DataGridViewCheckBoxColumn checkbox = new DataGridViewCheckBoxColumn();
|
||||
//列显示名称
|
||||
checkbox.HeaderText = "选择";
|
||||
checkbox.Name = "IsChecked";
|
||||
checkbox.TrueValue = true;
|
||||
checkbox.FalseValue = false;
|
||||
checkbox.DataPropertyName = "IsChecked";
|
||||
//列宽
|
||||
checkbox.Width = 30;
|
||||
//列大小不改变
|
||||
checkbox.Resizable = DataGridViewTriState.False;
|
||||
//添加的checkbox在dgv的第一列
|
||||
this.dgvData.Columns.Insert(0, checkbox);
|
||||
}
|
||||
|
||||
private void btnSelect_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
try
|
||||
{
|
||||
tSo = new Thread(new ThreadStart(ThreadWork));
|
||||
tSo.IsBackground = true;
|
||||
tSo.Start();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
MessageBox.Show(ex.Message.ToString() + ",数据查询失败", "查询提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
return;
|
||||
}
|
||||
this.dgvData.DataSource = null;
|
||||
type = cbSelectType.SelectedIndex;
|
||||
resulttype = resultSelectType.SelectedIndex;
|
||||
}
|
||||
|
||||
|
||||
private void ThreadWork()
|
||||
{
|
||||
lblSelectStures.BeginInvoke(new PDelegate(aa));
|
||||
|
||||
string strDate1 = dtStartTime.Value.ToString("yyyy-MM-dd HH:mm") + ":01";
|
||||
string strDate2 = dtEndTime.Value.ToString("yyyy-MM-dd HH:mm") + ":01";
|
||||
if (dtEndTime.Value.Year != dtStartTime.Value.Year)
|
||||
{
|
||||
MessageBox.Show("请选择日期必须在同一年份内!");
|
||||
lblSelectStures.BeginInvoke(new PDelegate(bb));
|
||||
return;
|
||||
}
|
||||
string flag = cmbFlag.Text;
|
||||
string strBarcode = txtBarCode.Text.Trim();
|
||||
// var dt = dbHelper.GetTestData(type, strBarcode, strDate1, strDate2, flag);
|
||||
var dt = dbHelper.GetTestData2(type,resulttype, strBarcode, strDate1, strDate2, flag);
|
||||
if (dt == null || dt.Rows.Count == 0)
|
||||
{
|
||||
MessageBox.Show("此时间段无数据或无此条码数据", "系统提示");
|
||||
lblSelectStures.BeginInvoke(new PDelegate(bb));
|
||||
return;
|
||||
}
|
||||
this.dgvData.BeginInvoke(new myDelegate(FillData), new object[] { dt });//异步调用(来填充)
|
||||
lblSelectStures.BeginInvoke(new PDelegate(bb));
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
private void FillData(DataTable dt)
|
||||
{
|
||||
dts = dt;
|
||||
this.dgvData.DataSource = dt.DefaultView;
|
||||
}
|
||||
|
||||
private void aa()
|
||||
{
|
||||
this.lblSelectStures.Text = "正在查询数据...";
|
||||
}
|
||||
private void bb()
|
||||
{
|
||||
this.lblSelectStures.Text = "查询结束";
|
||||
}
|
||||
|
||||
|
||||
private void btnExcel_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (dts != null && dgvData.Columns.Count <= 0)
|
||||
{
|
||||
MessageBox.Show("请先查询数据,再进行导出", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
return;
|
||||
}
|
||||
SaveFileDialog saveFileDialog = new SaveFileDialog();
|
||||
saveFileDialog.Title = "导出Excel";
|
||||
saveFileDialog.Filter = "Excel文件(*.xlsx)|*.xlsx";
|
||||
saveFileDialog.FilterIndex = 1;
|
||||
//保存对话框是否记忆上次打开的目录
|
||||
saveFileDialog.RestoreDirectory = true;
|
||||
//设置默认的文件名
|
||||
saveFileDialog.DefaultExt = "xlsx";
|
||||
//saveFileDialog.DefaultFileName = "查询结果" + DateTime.Now.ToString("yyyyMMddHHmmss");
|
||||
var dialogResult = saveFileDialog.ShowDialog(this);
|
||||
|
||||
if (dialogResult == DialogResult.OK)
|
||||
{
|
||||
|
||||
//string filter = saveFileDialog.FileName.Substring(saveFileDialog.FileName.LastIndexOf(".") + 1);
|
||||
try
|
||||
{
|
||||
MiniExcel.SaveAs(saveFileDialog.FileName, dts);
|
||||
//ExcelPackage.License.SetNonCommercialOrganization("My Noncommercial organization");
|
||||
//EPPlusExcelHelper excelHelper = new EPPlusExcelHelper(saveFileDialog.FileName);
|
||||
//excelHelper.ExportDataTable("sheet1", dts);
|
||||
Thread.Sleep(50);
|
||||
MessageBox.Show("数据导出成功!");
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
MessageBox.Show("保存的EXCEL已有数据,无法覆盖,重新创建" + ex.Message);
|
||||
}
|
||||
|
||||
|
||||
//if (MessageBox.Show("保存成功,是否打开文件?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Information) == DialogResult.Yes)
|
||||
//{
|
||||
// System.Diagnostics.Process.Start(saveFileDialog.FileName);
|
||||
//}
|
||||
}
|
||||
}
|
||||
|
||||
private void dgvData_RowPostPaint(object sender, DataGridViewRowPostPaintEventArgs e)
|
||||
{
|
||||
//自动编号,与数据无关
|
||||
Rectangle rectangle = new Rectangle(e.RowBounds.Location.X,
|
||||
e.RowBounds.Location.Y,
|
||||
dgvData.RowHeadersWidth - 4,
|
||||
e.RowBounds.Height);
|
||||
TextRenderer.DrawText(e.Graphics,
|
||||
(e.RowIndex + 1).ToString(),
|
||||
dgvData.RowHeadersDefaultCellStyle.Font,
|
||||
rectangle,
|
||||
dgvData.RowHeadersDefaultCellStyle.ForeColor,
|
||||
TextFormatFlags.VerticalCenter | TextFormatFlags.Right);
|
||||
}
|
||||
/// <summary>
|
||||
/// 上传MES按钮设置
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void btnUpMES_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (dgvData.Columns.Count <= 1)
|
||||
{
|
||||
MessageBox.Show("请先查询数据,再进行上传MES操作", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
return;
|
||||
}
|
||||
try
|
||||
{
|
||||
if (cbSelectType.Text=="查询进站数据")//上料
|
||||
{
|
||||
foreach (DataGridViewRow row in dgvData.Rows)
|
||||
{
|
||||
if (Convert.ToBoolean(row.Cells[0].Value))
|
||||
{
|
||||
if (Convert.ToInt32(row.Cells["状态"].Value) == 1 || Convert.ToInt32(row.Cells["状态"].Value) == 2)
|
||||
{
|
||||
MessageBox.Show("勾选电芯数据已上传", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
JY.MES.FMS.FMS_In fMS_In = new MES.FMS.FMS_In();
|
||||
|
||||
//fMS_In.systemCode = Global.systemConfig.systemCode;
|
||||
//fMS_In.houseCode = Global.systemConfig.houseCode;
|
||||
//fMS_In.skuCode = Convert.ToString(row.Cells["条码"].Value);
|
||||
//fMS_In.deviceCode = Global.systemConfig.deviceCode;
|
||||
//fMS_In.processCode = Global.systemConfig.processCode;
|
||||
|
||||
|
||||
string strJosn = JsonConvert.SerializeObject(fMS_In);
|
||||
LogManagerControl.AddLog($"PC->FMS[电芯出站]:{strJosn}", LogAddtype.MES);
|
||||
var result = JY.MES.FMS.MesHelper_EVE.MES_Inbound(fMS_In);
|
||||
string strRes = "statusCode:" + "[" + result.statusCode + "]" + "statusMessage" + "[" + result.statusMessage + "]";
|
||||
LogManagerControl.AddLog($"FMS->PC[电芯出站]:{strRes}", LogAddtype.MES);
|
||||
|
||||
|
||||
string NowTime = DateTime.Now.ToString("yyyy - MM - dd HH: mm: ss");
|
||||
var result1 = @" UPDATE FeedingData set Flag=2,UploadMESTime='" + NowTime + "' where[ID]=" + Convert.ToString(row.Cells["唯一ID"].Value);
|
||||
//var result2 = @" UPDATE FeedingData set UploadMESTime='" + NowTime + "' where[ID]='" + Convert.ToString(row.Cells["唯一ID"].Value) + "'";
|
||||
DataTable dt = SqlHelper<object>.QueryTable(result1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else//下料
|
||||
{
|
||||
foreach (DataGridViewRow row in dgvData.Rows)
|
||||
{
|
||||
if (Convert.ToBoolean(row.Cells[0].Value))
|
||||
{
|
||||
if (Convert.ToInt32(row.Cells["状态"].Value) == 1 || Convert.ToInt32(row.Cells["状态"].Value) == 2)
|
||||
{
|
||||
MessageBox.Show("勾选电芯数据已上传", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
JY.MES.FMS.FMS_Out fMS_Out = new MES.FMS.FMS_Out();
|
||||
//fMS_In.deviceCode = Global.systemConfig.eqp_code;
|
||||
//fMS_In.houseCode = "test11";
|
||||
//fMS_In.skuCode = m.BarCode;
|
||||
//fMS_In.systemCode = "win10";
|
||||
//fMS_In.processCode = Global.systemConfig.seq_code;
|
||||
//fMS_In.ngCode = "";
|
||||
//fMS_Out.systemCode = Global.systemConfig.systemCode;
|
||||
//fMS_Out.houseCode = Global.systemConfig.houseCode;
|
||||
//fMS_Out.skuCode = Convert.ToString(row.Cells["条码"].Value);
|
||||
//fMS_Out.deviceCode = Global.systemConfig.deviceCode;
|
||||
//fMS_Out.processCode = Global.systemConfig.processCode;
|
||||
fMS_Out.testResult = "NG";
|
||||
fMS_Out.ngCode = "0";
|
||||
|
||||
JY.MES.FMS.processData ProData = new JY.MES.FMS.processData();
|
||||
|
||||
ProData.inTime = Convert.ToString(row.Cells["进站时间"].Value);
|
||||
ProData.outTime = Convert.ToString(row.Cells["进站时间"].Value);
|
||||
ProData.cspdjg = Convert.ToString(row.Cells["综合结果"].Value);
|
||||
ProData.cssj = "";
|
||||
ProData.cspc = "";
|
||||
ProData.csjg = Convert.ToString(row.Cells["综合结果"].Value);
|
||||
ProData.fcbj = "";
|
||||
ProData.fccs = "";
|
||||
ProData.fcsj = "";
|
||||
ProData.fcyy = "";
|
||||
ProData.ngyy = Convert.ToString(row.Cells["备注"].Value);
|
||||
ProData.ngsj = "";
|
||||
ProData.ngwz = "";
|
||||
ProData.hjwd = "";
|
||||
ProData.hjsd = "";
|
||||
ProData.kqjjd = "";
|
||||
ProData.workShift = Convert.ToString(row.Cells["班次"].Value);
|
||||
fMS_Out.processData = ProData;
|
||||
|
||||
string strJosn = JsonConvert.SerializeObject(fMS_Out);
|
||||
LogManagerControl.AddLog($"PC->FMS[电芯出站]:{strJosn}", LogAddtype.MES);
|
||||
var result = JY.MES.FMS.MesHelper_EVE.MES_Outbound(fMS_Out);
|
||||
string strRes = "statusCode:" + "[" + result.statusCode + "]" + "statusMessage" + "[" + result.statusMessage + "]";
|
||||
LogManagerControl.AddLog($"FMS->PC[电芯出站]:{strRes}", LogAddtype.MES);
|
||||
|
||||
string NowTime = DateTime.Now.ToString("yyyy - MM - dd HH: mm: ss");
|
||||
var result1 = @" UPDATE BlankingData set Flag=2,strUploadMESTime='" + NowTime + "' where[ID]=" + Convert.ToInt32(row.Cells["唯一ID"].Value);
|
||||
//var result2 = @" UPDATE BlankingData set UploadMESTime='" + NowTime + "' where[ID]='" + Convert.ToString(row.Cells["唯一ID"].Value) + "'";
|
||||
DataTable dt = SqlHelper<object>.QueryTable(result1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
MessageBox.Show("手动上传MES失败", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
return;
|
||||
}
|
||||
MessageBox.Show("手动上传MES成功", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
/// dgvCellMouseClick鼠标点击列事件
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void dgvData_CellMouseClick(object sender, DataGridViewCellMouseEventArgs e)
|
||||
{
|
||||
//不是序号列和标题列时才执行
|
||||
if (e.RowIndex != -1 && e.ColumnIndex != -1)
|
||||
{
|
||||
//checkbox勾上
|
||||
if ((bool)dgvData.Rows[e.RowIndex].Cells[0].EditedFormattedValue == true)
|
||||
{
|
||||
//选中改为不选中
|
||||
this.dgvData.Rows[e.RowIndex].Cells[0].Value = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
//不选中改为选中
|
||||
this.dgvData.Rows[e.RowIndex].Cells[0].Value = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+386
@@ -0,0 +1,386 @@
|
||||
|
||||
namespace JY.Inspection.Frm
|
||||
{
|
||||
partial class FrmHistoricalDataQuery
|
||||
{
|
||||
/// <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()
|
||||
{
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmHistoricalDataQuery));
|
||||
this.txtBarCode = new MetroFramework.Controls.MetroTextBox();
|
||||
this.metroLabel1 = new MetroFramework.Controls.MetroLabel();
|
||||
this.metroLabel3 = new MetroFramework.Controls.MetroLabel();
|
||||
this.btnSelect = new MetroFramework.Controls.MetroButton();
|
||||
this.btnExcel = new MetroFramework.Controls.MetroButton();
|
||||
this.metroLabel4 = new MetroFramework.Controls.MetroLabel();
|
||||
this.cbSelectType = new MetroFramework.Controls.MetroComboBox();
|
||||
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
|
||||
this.dgvData = new MetroFramework.Controls.MetroGrid();
|
||||
this.groupBox1 = new System.Windows.Forms.GroupBox();
|
||||
this.metroLabel5 = new MetroFramework.Controls.MetroLabel();
|
||||
this.btnUpMES = new MetroFramework.Controls.MetroButton();
|
||||
this.cmbFlag = new MetroFramework.Controls.MetroComboBox();
|
||||
this.dtEndTime = new System.Windows.Forms.DateTimePicker();
|
||||
this.dtStartTime = new System.Windows.Forms.DateTimePicker();
|
||||
this.lblSelectStures = new System.Windows.Forms.Label();
|
||||
this.metroLabel2 = new MetroFramework.Controls.MetroLabel();
|
||||
this.resultSelectType = new MetroFramework.Controls.MetroComboBox();
|
||||
this.metroLabel6 = new MetroFramework.Controls.MetroLabel();
|
||||
this.tableLayoutPanel1.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.dgvData)).BeginInit();
|
||||
this.groupBox1.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// txtBarCode
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
this.txtBarCode.CustomButton.Image = null;
|
||||
this.txtBarCode.CustomButton.Location = new System.Drawing.Point(171, 1);
|
||||
this.txtBarCode.CustomButton.Name = "";
|
||||
this.txtBarCode.CustomButton.Size = new System.Drawing.Size(21, 21);
|
||||
this.txtBarCode.CustomButton.Style = MetroFramework.MetroColorStyle.Blue;
|
||||
this.txtBarCode.CustomButton.TabIndex = 1;
|
||||
this.txtBarCode.CustomButton.Theme = MetroFramework.MetroThemeStyle.Light;
|
||||
this.txtBarCode.CustomButton.UseSelectable = true;
|
||||
this.txtBarCode.CustomButton.Visible = false;
|
||||
this.txtBarCode.FontSize = MetroFramework.MetroTextBoxSize.Medium;
|
||||
this.txtBarCode.Lines = new string[0];
|
||||
this.txtBarCode.Location = new System.Drawing.Point(7, 186);
|
||||
this.txtBarCode.MaxLength = 32767;
|
||||
this.txtBarCode.Name = "txtBarCode";
|
||||
this.txtBarCode.PasswordChar = '\0';
|
||||
this.txtBarCode.PromptText = "输入要查询的条码";
|
||||
this.txtBarCode.ScrollBars = System.Windows.Forms.ScrollBars.None;
|
||||
this.txtBarCode.SelectedText = "";
|
||||
this.txtBarCode.SelectionLength = 0;
|
||||
this.txtBarCode.SelectionStart = 0;
|
||||
this.txtBarCode.ShortcutsEnabled = true;
|
||||
this.txtBarCode.Size = new System.Drawing.Size(193, 23);
|
||||
this.txtBarCode.TabIndex = 1;
|
||||
this.txtBarCode.UseSelectable = true;
|
||||
this.txtBarCode.WaterMark = "输入要查询的条码";
|
||||
this.txtBarCode.WaterMarkColor = System.Drawing.Color.FromArgb(((int)(((byte)(109)))), ((int)(((byte)(109)))), ((int)(((byte)(109)))));
|
||||
this.txtBarCode.WaterMarkFont = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Pixel);
|
||||
//
|
||||
// metroLabel1
|
||||
//
|
||||
this.metroLabel1.AutoSize = true;
|
||||
this.metroLabel1.Location = new System.Drawing.Point(7, 34);
|
||||
this.metroLabel1.Name = "metroLabel1";
|
||||
this.metroLabel1.Size = new System.Drawing.Size(107, 19);
|
||||
this.metroLabel1.TabIndex = 4;
|
||||
this.metroLabel1.Text = "查询起始时间:";
|
||||
//
|
||||
// metroLabel3
|
||||
//
|
||||
this.metroLabel3.AutoSize = true;
|
||||
this.metroLabel3.Location = new System.Drawing.Point(9, 164);
|
||||
this.metroLabel3.Name = "metroLabel3";
|
||||
this.metroLabel3.Size = new System.Drawing.Size(79, 19);
|
||||
this.metroLabel3.TabIndex = 6;
|
||||
this.metroLabel3.Text = "查询条码:";
|
||||
//
|
||||
// btnSelect
|
||||
//
|
||||
this.btnSelect.Location = new System.Drawing.Point(10, 360);
|
||||
this.btnSelect.Name = "btnSelect";
|
||||
this.btnSelect.Size = new System.Drawing.Size(75, 23);
|
||||
this.btnSelect.TabIndex = 7;
|
||||
this.btnSelect.Text = "查 询";
|
||||
this.btnSelect.UseSelectable = true;
|
||||
this.btnSelect.Click += new System.EventHandler(this.btnSelect_Click);
|
||||
//
|
||||
// btnExcel
|
||||
//
|
||||
this.btnExcel.Location = new System.Drawing.Point(123, 360);
|
||||
this.btnExcel.Name = "btnExcel";
|
||||
this.btnExcel.Size = new System.Drawing.Size(75, 23);
|
||||
this.btnExcel.TabIndex = 8;
|
||||
this.btnExcel.Text = "导 出";
|
||||
this.btnExcel.UseSelectable = true;
|
||||
this.btnExcel.Click += new System.EventHandler(this.btnExcel_Click);
|
||||
//
|
||||
// metroLabel4
|
||||
//
|
||||
this.metroLabel4.AutoSize = true;
|
||||
this.metroLabel4.Location = new System.Drawing.Point(9, 230);
|
||||
this.metroLabel4.Name = "metroLabel4";
|
||||
this.metroLabel4.Size = new System.Drawing.Size(79, 19);
|
||||
this.metroLabel4.TabIndex = 11;
|
||||
this.metroLabel4.Text = "查询类型:";
|
||||
//
|
||||
// cbSelectType
|
||||
//
|
||||
this.cbSelectType.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.cbSelectType.FormattingEnabled = true;
|
||||
this.cbSelectType.ItemHeight = 23;
|
||||
this.cbSelectType.Items.AddRange(new object[] {
|
||||
"查询进站数据",
|
||||
"查询出站数据"});
|
||||
this.cbSelectType.Location = new System.Drawing.Point(7, 252);
|
||||
this.cbSelectType.Name = "cbSelectType";
|
||||
this.cbSelectType.Size = new System.Drawing.Size(193, 29);
|
||||
this.cbSelectType.TabIndex = 12;
|
||||
this.cbSelectType.UseSelectable = true;
|
||||
//
|
||||
// tableLayoutPanel1
|
||||
//
|
||||
this.tableLayoutPanel1.ColumnCount = 2;
|
||||
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 220F));
|
||||
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
|
||||
this.tableLayoutPanel1.Controls.Add(this.dgvData, 1, 0);
|
||||
this.tableLayoutPanel1.Controls.Add(this.groupBox1, 0, 0);
|
||||
this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.tableLayoutPanel1.Location = new System.Drawing.Point(20, 60);
|
||||
this.tableLayoutPanel1.Name = "tableLayoutPanel1";
|
||||
this.tableLayoutPanel1.RowCount = 1;
|
||||
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
|
||||
this.tableLayoutPanel1.Size = new System.Drawing.Size(1044, 546);
|
||||
this.tableLayoutPanel1.TabIndex = 13;
|
||||
//
|
||||
// dgvData
|
||||
//
|
||||
this.dgvData.AllowUserToAddRows = false;
|
||||
this.dgvData.AllowUserToDeleteRows = false;
|
||||
this.dgvData.AllowUserToResizeRows = false;
|
||||
this.dgvData.BackgroundColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
|
||||
this.dgvData.BorderStyle = System.Windows.Forms.BorderStyle.None;
|
||||
this.dgvData.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.None;
|
||||
this.dgvData.ColumnHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.None;
|
||||
dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
|
||||
dataGridViewCellStyle1.BackColor = System.Drawing.Color.SkyBlue;
|
||||
dataGridViewCellStyle1.Font = new System.Drawing.Font("Segoe UI", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel);
|
||||
dataGridViewCellStyle1.ForeColor = System.Drawing.Color.Black;
|
||||
dataGridViewCellStyle1.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(198)))), ((int)(((byte)(247)))));
|
||||
dataGridViewCellStyle1.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(17)))), ((int)(((byte)(17)))), ((int)(((byte)(17)))));
|
||||
dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
|
||||
this.dgvData.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle1;
|
||||
this.dgvData.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
||||
dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
|
||||
dataGridViewCellStyle2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
|
||||
dataGridViewCellStyle2.Font = new System.Drawing.Font("Segoe UI", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel);
|
||||
dataGridViewCellStyle2.ForeColor = System.Drawing.Color.Black;
|
||||
dataGridViewCellStyle2.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(198)))), ((int)(((byte)(247)))));
|
||||
dataGridViewCellStyle2.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(17)))), ((int)(((byte)(17)))), ((int)(((byte)(17)))));
|
||||
dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
|
||||
this.dgvData.DefaultCellStyle = dataGridViewCellStyle2;
|
||||
this.dgvData.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.dgvData.EnableHeadersVisualStyles = false;
|
||||
this.dgvData.Font = new System.Drawing.Font("Segoe UI", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel);
|
||||
this.dgvData.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
|
||||
this.dgvData.Location = new System.Drawing.Point(223, 3);
|
||||
this.dgvData.Name = "dgvData";
|
||||
this.dgvData.ReadOnly = true;
|
||||
this.dgvData.RowHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.None;
|
||||
dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
|
||||
dataGridViewCellStyle3.BackColor = System.Drawing.Color.White;
|
||||
dataGridViewCellStyle3.Font = new System.Drawing.Font("Segoe UI", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel);
|
||||
dataGridViewCellStyle3.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
|
||||
dataGridViewCellStyle3.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(198)))), ((int)(((byte)(247)))));
|
||||
dataGridViewCellStyle3.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(17)))), ((int)(((byte)(17)))), ((int)(((byte)(17)))));
|
||||
dataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
|
||||
this.dgvData.RowHeadersDefaultCellStyle = dataGridViewCellStyle3;
|
||||
this.dgvData.RowHeadersWidth = 51;
|
||||
this.dgvData.RowHeadersWidthSizeMode = System.Windows.Forms.DataGridViewRowHeadersWidthSizeMode.DisableResizing;
|
||||
this.dgvData.RowTemplate.Height = 23;
|
||||
this.dgvData.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
|
||||
this.dgvData.Size = new System.Drawing.Size(819, 540);
|
||||
this.dgvData.TabIndex = 16;
|
||||
this.dgvData.CellMouseClick += new System.Windows.Forms.DataGridViewCellMouseEventHandler(this.dgvData_CellMouseClick);
|
||||
this.dgvData.RowPostPaint += new System.Windows.Forms.DataGridViewRowPostPaintEventHandler(this.dgvData_RowPostPaint);
|
||||
//
|
||||
// groupBox1
|
||||
//
|
||||
this.groupBox1.Controls.Add(this.resultSelectType);
|
||||
this.groupBox1.Controls.Add(this.metroLabel6);
|
||||
this.groupBox1.Controls.Add(this.metroLabel5);
|
||||
this.groupBox1.Controls.Add(this.btnUpMES);
|
||||
this.groupBox1.Controls.Add(this.cmbFlag);
|
||||
this.groupBox1.Controls.Add(this.dtEndTime);
|
||||
this.groupBox1.Controls.Add(this.dtStartTime);
|
||||
this.groupBox1.Controls.Add(this.lblSelectStures);
|
||||
this.groupBox1.Controls.Add(this.metroLabel2);
|
||||
this.groupBox1.Controls.Add(this.btnExcel);
|
||||
this.groupBox1.Controls.Add(this.btnSelect);
|
||||
this.groupBox1.Controls.Add(this.cbSelectType);
|
||||
this.groupBox1.Controls.Add(this.metroLabel1);
|
||||
this.groupBox1.Controls.Add(this.metroLabel4);
|
||||
this.groupBox1.Controls.Add(this.txtBarCode);
|
||||
this.groupBox1.Controls.Add(this.metroLabel3);
|
||||
this.groupBox1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.groupBox1.Location = new System.Drawing.Point(3, 3);
|
||||
this.groupBox1.Name = "groupBox1";
|
||||
this.groupBox1.Size = new System.Drawing.Size(214, 540);
|
||||
this.groupBox1.TabIndex = 0;
|
||||
this.groupBox1.TabStop = false;
|
||||
this.groupBox1.Text = "查询条件";
|
||||
//
|
||||
// metroLabel5
|
||||
//
|
||||
this.metroLabel5.AutoSize = true;
|
||||
this.metroLabel5.Location = new System.Drawing.Point(9, 425);
|
||||
this.metroLabel5.Name = "metroLabel5";
|
||||
this.metroLabel5.Size = new System.Drawing.Size(91, 19);
|
||||
this.metroLabel5.TabIndex = 53;
|
||||
this.metroLabel5.Text = "上传MES状态";
|
||||
this.metroLabel5.Visible = false;
|
||||
//
|
||||
// btnUpMES
|
||||
//
|
||||
this.btnUpMES.Location = new System.Drawing.Point(10, 392);
|
||||
this.btnUpMES.Name = "btnUpMES";
|
||||
this.btnUpMES.Size = new System.Drawing.Size(75, 23);
|
||||
this.btnUpMES.TabIndex = 51;
|
||||
this.btnUpMES.Text = "上传MES";
|
||||
this.btnUpMES.UseSelectable = true;
|
||||
this.btnUpMES.Visible = false;
|
||||
this.btnUpMES.Click += new System.EventHandler(this.btnUpMES_Click);
|
||||
//
|
||||
// cmbFlag
|
||||
//
|
||||
this.cmbFlag.FormattingEnabled = true;
|
||||
this.cmbFlag.ImeMode = System.Windows.Forms.ImeMode.NoControl;
|
||||
this.cmbFlag.ItemHeight = 23;
|
||||
this.cmbFlag.Items.AddRange(new object[] {
|
||||
"全部",
|
||||
"自动上传MES数据",
|
||||
"手动上传MES数据",
|
||||
"未上传MES数据"});
|
||||
this.cmbFlag.Location = new System.Drawing.Point(6, 447);
|
||||
this.cmbFlag.Name = "cmbFlag";
|
||||
this.cmbFlag.Size = new System.Drawing.Size(192, 29);
|
||||
this.cmbFlag.TabIndex = 50;
|
||||
this.cmbFlag.UseSelectable = true;
|
||||
this.cmbFlag.Visible = false;
|
||||
//
|
||||
// dtEndTime
|
||||
//
|
||||
this.dtEndTime.CustomFormat = "yyyy-MM-dd HH:mm:ss";
|
||||
this.dtEndTime.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.dtEndTime.Format = System.Windows.Forms.DateTimePickerFormat.Custom;
|
||||
this.dtEndTime.Location = new System.Drawing.Point(10, 118);
|
||||
this.dtEndTime.Name = "dtEndTime";
|
||||
this.dtEndTime.Size = new System.Drawing.Size(189, 26);
|
||||
this.dtEndTime.TabIndex = 17;
|
||||
//
|
||||
// dtStartTime
|
||||
//
|
||||
this.dtStartTime.CalendarForeColor = System.Drawing.SystemColors.ControlLight;
|
||||
this.dtStartTime.CustomFormat = "yyyy-MM-dd HH:mm:ss";
|
||||
this.dtStartTime.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.dtStartTime.Format = System.Windows.Forms.DateTimePickerFormat.Custom;
|
||||
this.dtStartTime.Location = new System.Drawing.Point(10, 56);
|
||||
this.dtStartTime.Name = "dtStartTime";
|
||||
this.dtStartTime.Size = new System.Drawing.Size(189, 26);
|
||||
this.dtStartTime.TabIndex = 16;
|
||||
//
|
||||
// lblSelectStures
|
||||
//
|
||||
this.lblSelectStures.AutoSize = true;
|
||||
this.lblSelectStures.Location = new System.Drawing.Point(59, 354);
|
||||
this.lblSelectStures.Name = "lblSelectStures";
|
||||
this.lblSelectStures.Size = new System.Drawing.Size(0, 12);
|
||||
this.lblSelectStures.TabIndex = 15;
|
||||
//
|
||||
// metroLabel2
|
||||
//
|
||||
this.metroLabel2.AutoSize = true;
|
||||
this.metroLabel2.Location = new System.Drawing.Point(7, 96);
|
||||
this.metroLabel2.Name = "metroLabel2";
|
||||
this.metroLabel2.Size = new System.Drawing.Size(107, 19);
|
||||
this.metroLabel2.TabIndex = 5;
|
||||
this.metroLabel2.Text = "查询结束时间:";
|
||||
//
|
||||
// resultSelectType
|
||||
//
|
||||
this.resultSelectType.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.resultSelectType.FormattingEnabled = true;
|
||||
this.resultSelectType.ItemHeight = 23;
|
||||
this.resultSelectType.Items.AddRange(new object[] {
|
||||
"全部",
|
||||
"OK",
|
||||
"NG"});
|
||||
this.resultSelectType.Location = new System.Drawing.Point(8, 317);
|
||||
this.resultSelectType.Name = "resultSelectType";
|
||||
this.resultSelectType.Size = new System.Drawing.Size(193, 29);
|
||||
this.resultSelectType.TabIndex = 55;
|
||||
this.resultSelectType.UseSelectable = true;
|
||||
//
|
||||
// metroLabel6
|
||||
//
|
||||
this.metroLabel6.AutoSize = true;
|
||||
this.metroLabel6.Location = new System.Drawing.Point(10, 295);
|
||||
this.metroLabel6.Name = "metroLabel6";
|
||||
this.metroLabel6.Size = new System.Drawing.Size(79, 19);
|
||||
this.metroLabel6.TabIndex = 54;
|
||||
this.metroLabel6.Text = "结果类型:";
|
||||
//
|
||||
// FrmHistoricalDataQuery
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(1084, 626);
|
||||
this.Controls.Add(this.tableLayoutPanel1);
|
||||
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||||
this.Movable = false;
|
||||
this.Name = "FrmHistoricalDataQuery";
|
||||
this.Text = "历史数据查询";
|
||||
this.Load += new System.EventHandler(this.FrmHistoricalDataQuery_Load);
|
||||
this.tableLayoutPanel1.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.dgvData)).EndInit();
|
||||
this.groupBox1.ResumeLayout(false);
|
||||
this.groupBox1.PerformLayout();
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
private MetroFramework.Controls.MetroTextBox txtBarCode;
|
||||
private MetroFramework.Controls.MetroLabel metroLabel1;
|
||||
private MetroFramework.Controls.MetroLabel metroLabel3;
|
||||
private MetroFramework.Controls.MetroButton btnSelect;
|
||||
private MetroFramework.Controls.MetroButton btnExcel;
|
||||
private MetroFramework.Controls.MetroLabel metroLabel4;
|
||||
private MetroFramework.Controls.MetroComboBox cbSelectType;
|
||||
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
|
||||
private System.Windows.Forms.GroupBox groupBox1;
|
||||
private MetroFramework.Controls.MetroLabel metroLabel2;
|
||||
private MetroFramework.Controls.MetroGrid dgvData;
|
||||
private System.Windows.Forms.Label lblSelectStures;
|
||||
private System.Windows.Forms.DateTimePicker dtStartTime;
|
||||
private System.Windows.Forms.DateTimePicker dtEndTime;
|
||||
private MetroFramework.Controls.MetroButton btnUpMES;
|
||||
private MetroFramework.Controls.MetroComboBox cmbFlag;
|
||||
private MetroFramework.Controls.MetroLabel metroLabel5;
|
||||
private MetroFramework.Controls.MetroComboBox resultSelectType;
|
||||
private MetroFramework.Controls.MetroLabel metroLabel6;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,197 @@
|
||||
<?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.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
AAABAAEAICAAAAEAIACoEAAAFgAAACgAAAAgAAAAQAAAAAEAIAAAAAAAABAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAFlNUABZTVAAWU1QAFlNUABZTVAAWU1QAFlNUABZTVAAWU1QAFlN
|
||||
UABZTVAAWU1QAFlNUABZTVAAWU1QAFlNUABZTVAAWU1QAFlNUABZTVAAWU1QAFlNUAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAA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4FlNUMJZTVA7WU1QAFZKUgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABYTFEAWE1QAFlNUABZTVAPWU1QH1lN
|
||||
UB9ZTVAfWU1QH1lNUB9ZTVAfWU1QD1lNUABYTFEAWExRAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABZTVAAWE1QAFlN
|
||||
UABZTVAAWU1QAFlNUABZTVAAWU1QAFlNUABZTVAAWU1QAFlNUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAA+AAAH/AAAA/gAAAH4AAAB+AAAAfgAAAH4AAAB+AAAAfgAAAH4AAAB+AA
|
||||
AAfgAAAH4AAAB+AAAAfgAAAH4AAAB+AAAAfgAAAH4AAAB+AAAAfgAAAH4AAAB+AAAAfgAAAH4AAAB+AA
|
||||
AAfgAAAH8AAAD/gAAB//gAH//4AB///AA/8=
|
||||
</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -0,0 +1,182 @@
|
||||
using JY.DAL;
|
||||
using JY.Model;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace JY.Inspection.Frm
|
||||
{
|
||||
public partial class FrmParaConfig : MetroFramework.Forms.MetroForm
|
||||
{
|
||||
public delegate void SendParamIN();
|
||||
public SendParamIN sendParamIN;
|
||||
|
||||
/// <summary>
|
||||
/// 数据库访问接口
|
||||
/// </summary>
|
||||
private IDbHelper dbHelper = new OpSqlDataBase();
|
||||
/// <summary>
|
||||
/// 定义DataGridView数据源
|
||||
/// </summary>
|
||||
private BindingList<ProductPara> blPLCConfigBaseList = new BindingList<ProductPara>();
|
||||
|
||||
|
||||
public FrmParaConfig()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void FrmParaEdit_Load(object sender, EventArgs e)
|
||||
{
|
||||
this.dgvEdit.AutoGenerateColumns = false;
|
||||
this.dgvEdit.DataSource = blPLCConfigBaseList;
|
||||
setComb();
|
||||
}
|
||||
/// <summary>
|
||||
/// 加载产品型号下拉
|
||||
/// </summary>
|
||||
private void setComb()
|
||||
{
|
||||
var list = dbHelper.GetProductModelList();
|
||||
|
||||
cmbProductModel.DataSource = list;
|
||||
cmbProductModel.DisplayMember = "ModelName";
|
||||
cmbProductModel.ValueMember = "ModelName";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 保存数据
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void btnOK_Click(object sender, EventArgs e)
|
||||
{
|
||||
string strModelType = cmbProductModel.Text.Trim();
|
||||
if (string.IsNullOrEmpty(strModelType) || blPLCConfigBaseList.Count <= 0)
|
||||
{
|
||||
MessageBox.Show("产品型号和参数列表不能为空!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
return;
|
||||
}
|
||||
try
|
||||
{
|
||||
dbHelper.AddProductParaList(blPLCConfigBaseList.ToList());
|
||||
MessageBox.Show("保存成功!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
MessageBox.Show("保存失败:" + ex.Message, "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加型号
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void btnAddProductModel_Click(object sender, EventArgs e)
|
||||
{
|
||||
var productModel = new ProductModel();
|
||||
productModel.ModelName = txtProductModel.Text;
|
||||
productModel.Remark = txtProductModel.Text;
|
||||
|
||||
if (string.IsNullOrEmpty(productModel.ModelName))
|
||||
{
|
||||
MessageBox.Show("产品型号不能为空!", "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
return;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
dbHelper.AddProductModel(productModel);
|
||||
setComb();
|
||||
MessageBox.Show("新增成功!", "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
MessageBox.Show("新增失败:" + ex.Message, "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
}
|
||||
|
||||
//同步刷新主界面的类型选项
|
||||
sendParamIN();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 删除型号
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void btnDelProductModel_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (string.IsNullOrEmpty(cmbProductModel.Text.Trim()))
|
||||
{
|
||||
MessageBox.Show("产品型号不能为空!", "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
return;
|
||||
}
|
||||
if (MessageBox.Show("删除该型号设置将无法恢复,确定要删除该产品型号?", "系统提示", MessageBoxButtons.OKCancel, MessageBoxIcon.Question) == DialogResult.OK)
|
||||
{
|
||||
try
|
||||
{
|
||||
dbHelper.DelProductModel(cmbProductModel.Text);
|
||||
|
||||
setComb();
|
||||
MessageBox.Show("删除成功!", "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
MessageBox.Show("删除失败:" + ex.Message, "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 产品型号下拉框选择变更事件
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void cmbProductModel_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
var list = dbHelper.GetProductParaByProdModel(cmbProductModel.Text);
|
||||
blPLCConfigBaseList.Clear();
|
||||
foreach (var item in list)
|
||||
{
|
||||
blPLCConfigBaseList.Add(item);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 关闭事件
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void FrmParaEdit_FormClosing(object sender, FormClosingEventArgs e)
|
||||
{
|
||||
this.DialogResult = DialogResult.OK;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// DataGrid自动添加行号
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void dgvEdit_RowPostPaint(object sender, DataGridViewRowPostPaintEventArgs e)
|
||||
{
|
||||
//自动编号,与数据无关
|
||||
Rectangle rectangle = new Rectangle(e.RowBounds.Location.X,
|
||||
e.RowBounds.Location.Y,
|
||||
dgvEdit.RowHeadersWidth - 4,
|
||||
e.RowBounds.Height);
|
||||
TextRenderer.DrawText(e.Graphics,
|
||||
(e.RowIndex + 1).ToString(),
|
||||
dgvEdit.RowHeadersDefaultCellStyle.Font,
|
||||
rectangle,
|
||||
dgvEdit.RowHeadersDefaultCellStyle.ForeColor,
|
||||
TextFormatFlags.VerticalCenter | TextFormatFlags.Right);
|
||||
}
|
||||
}
|
||||
}
|
||||
+263
@@ -0,0 +1,263 @@
|
||||
|
||||
namespace JY.Inspection.Frm
|
||||
{
|
||||
partial class FrmParaConfig
|
||||
{
|
||||
/// <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()
|
||||
{
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmParaConfig));
|
||||
this.btnAddProductModel = new MetroFramework.Controls.MetroButton();
|
||||
this.txtProductModel = new MetroFramework.Controls.MetroTextBox();
|
||||
this.metroLabel1 = new MetroFramework.Controls.MetroLabel();
|
||||
this.dgvEdit = new MetroFramework.Controls.MetroGrid();
|
||||
this.ParaName = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.ParaValue = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.btnDelProductModel = new MetroFramework.Controls.MetroButton();
|
||||
this.cmbProductModel = new MetroFramework.Controls.MetroComboBox();
|
||||
this.metroLabel2 = new MetroFramework.Controls.MetroLabel();
|
||||
this.btnOK = new MetroFramework.Controls.MetroButton();
|
||||
((System.ComponentModel.ISupportInitialize)(this.dgvEdit)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// btnAddProductModel
|
||||
//
|
||||
this.btnAddProductModel.Location = new System.Drawing.Point(811, 420);
|
||||
this.btnAddProductModel.Margin = new System.Windows.Forms.Padding(4);
|
||||
this.btnAddProductModel.Name = "btnAddProductModel";
|
||||
this.btnAddProductModel.Size = new System.Drawing.Size(100, 29);
|
||||
this.btnAddProductModel.TabIndex = 1;
|
||||
this.btnAddProductModel.Text = "添 加";
|
||||
this.btnAddProductModel.UseSelectable = true;
|
||||
this.btnAddProductModel.Click += new System.EventHandler(this.btnAddProductModel_Click);
|
||||
//
|
||||
// txtProductModel
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
this.txtProductModel.CustomButton.Image = null;
|
||||
this.txtProductModel.CustomButton.Location = new System.Drawing.Point(185, 1);
|
||||
this.txtProductModel.CustomButton.Margin = new System.Windows.Forms.Padding(4);
|
||||
this.txtProductModel.CustomButton.Name = "";
|
||||
this.txtProductModel.CustomButton.Size = new System.Drawing.Size(27, 27);
|
||||
this.txtProductModel.CustomButton.Style = MetroFramework.MetroColorStyle.Blue;
|
||||
this.txtProductModel.CustomButton.TabIndex = 1;
|
||||
this.txtProductModel.CustomButton.Theme = MetroFramework.MetroThemeStyle.Light;
|
||||
this.txtProductModel.CustomButton.UseSelectable = true;
|
||||
this.txtProductModel.CustomButton.Visible = false;
|
||||
this.txtProductModel.Lines = new string[0];
|
||||
this.txtProductModel.Location = new System.Drawing.Point(891, 352);
|
||||
this.txtProductModel.Margin = new System.Windows.Forms.Padding(4);
|
||||
this.txtProductModel.MaxLength = 32767;
|
||||
this.txtProductModel.Name = "txtProductModel";
|
||||
this.txtProductModel.PasswordChar = '\0';
|
||||
this.txtProductModel.PromptText = "请输入新增加的产品型号";
|
||||
this.txtProductModel.ScrollBars = System.Windows.Forms.ScrollBars.None;
|
||||
this.txtProductModel.SelectedText = "";
|
||||
this.txtProductModel.SelectionLength = 0;
|
||||
this.txtProductModel.SelectionStart = 0;
|
||||
this.txtProductModel.ShortcutsEnabled = true;
|
||||
this.txtProductModel.Size = new System.Drawing.Size(213, 29);
|
||||
this.txtProductModel.TabIndex = 2;
|
||||
this.txtProductModel.UseSelectable = true;
|
||||
this.txtProductModel.WaterMark = "请输入新增加的产品型号";
|
||||
this.txtProductModel.WaterMarkColor = System.Drawing.Color.FromArgb(((int)(((byte)(109)))), ((int)(((byte)(109)))), ((int)(((byte)(109)))));
|
||||
this.txtProductModel.WaterMarkFont = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Pixel);
|
||||
//
|
||||
// metroLabel1
|
||||
//
|
||||
this.metroLabel1.AutoSize = true;
|
||||
this.metroLabel1.Location = new System.Drawing.Point(757, 352);
|
||||
this.metroLabel1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
|
||||
this.metroLabel1.Name = "metroLabel1";
|
||||
this.metroLabel1.Size = new System.Drawing.Size(114, 20);
|
||||
this.metroLabel1.TabIndex = 3;
|
||||
this.metroLabel1.Text = "新增产品型号:";
|
||||
//
|
||||
// dgvEdit
|
||||
//
|
||||
this.dgvEdit.AllowUserToAddRows = false;
|
||||
this.dgvEdit.AllowUserToDeleteRows = false;
|
||||
this.dgvEdit.AllowUserToResizeRows = false;
|
||||
this.dgvEdit.BackgroundColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
|
||||
this.dgvEdit.BorderStyle = System.Windows.Forms.BorderStyle.None;
|
||||
this.dgvEdit.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.None;
|
||||
this.dgvEdit.ColumnHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.None;
|
||||
dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
|
||||
dataGridViewCellStyle1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(174)))), ((int)(((byte)(219)))));
|
||||
dataGridViewCellStyle1.Font = new System.Drawing.Font("Segoe UI", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel);
|
||||
dataGridViewCellStyle1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
|
||||
dataGridViewCellStyle1.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(198)))), ((int)(((byte)(247)))));
|
||||
dataGridViewCellStyle1.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(17)))), ((int)(((byte)(17)))), ((int)(((byte)(17)))));
|
||||
dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
|
||||
this.dgvEdit.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle1;
|
||||
this.dgvEdit.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
||||
this.dgvEdit.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
|
||||
this.ParaName,
|
||||
this.ParaValue});
|
||||
dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
|
||||
dataGridViewCellStyle2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
|
||||
dataGridViewCellStyle2.Font = new System.Drawing.Font("Segoe UI", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel);
|
||||
dataGridViewCellStyle2.ForeColor = System.Drawing.Color.Black;
|
||||
dataGridViewCellStyle2.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(198)))), ((int)(((byte)(247)))));
|
||||
dataGridViewCellStyle2.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(17)))), ((int)(((byte)(17)))), ((int)(((byte)(17)))));
|
||||
dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
|
||||
this.dgvEdit.DefaultCellStyle = dataGridViewCellStyle2;
|
||||
this.dgvEdit.EnableHeadersVisualStyles = false;
|
||||
this.dgvEdit.Font = new System.Drawing.Font("Segoe UI", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel);
|
||||
this.dgvEdit.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
|
||||
this.dgvEdit.Location = new System.Drawing.Point(15, 79);
|
||||
this.dgvEdit.Margin = new System.Windows.Forms.Padding(4);
|
||||
this.dgvEdit.Name = "dgvEdit";
|
||||
this.dgvEdit.RowHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.None;
|
||||
dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
|
||||
dataGridViewCellStyle3.BackColor = System.Drawing.Color.White;
|
||||
dataGridViewCellStyle3.Font = new System.Drawing.Font("Segoe UI", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel);
|
||||
dataGridViewCellStyle3.ForeColor = System.Drawing.Color.Black;
|
||||
dataGridViewCellStyle3.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(198)))), ((int)(((byte)(247)))));
|
||||
dataGridViewCellStyle3.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(17)))), ((int)(((byte)(17)))), ((int)(((byte)(17)))));
|
||||
dataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
|
||||
this.dgvEdit.RowHeadersDefaultCellStyle = dataGridViewCellStyle3;
|
||||
this.dgvEdit.RowHeadersWidth = 51;
|
||||
this.dgvEdit.RowHeadersWidthSizeMode = System.Windows.Forms.DataGridViewRowHeadersWidthSizeMode.DisableResizing;
|
||||
dataGridViewCellStyle4.BackColor = System.Drawing.Color.White;
|
||||
dataGridViewCellStyle4.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
dataGridViewCellStyle4.ForeColor = System.Drawing.Color.Black;
|
||||
this.dgvEdit.RowsDefaultCellStyle = dataGridViewCellStyle4;
|
||||
this.dgvEdit.RowTemplate.Height = 23;
|
||||
this.dgvEdit.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
|
||||
this.dgvEdit.Size = new System.Drawing.Size(731, 866);
|
||||
this.dgvEdit.TabIndex = 4;
|
||||
this.dgvEdit.RowPostPaint += new System.Windows.Forms.DataGridViewRowPostPaintEventHandler(this.dgvEdit_RowPostPaint);
|
||||
//
|
||||
// ParaName
|
||||
//
|
||||
this.ParaName.DataPropertyName = "ParaName";
|
||||
this.ParaName.HeaderText = "名称";
|
||||
this.ParaName.MinimumWidth = 6;
|
||||
this.ParaName.Name = "ParaName";
|
||||
this.ParaName.ReadOnly = true;
|
||||
this.ParaName.Width = 350;
|
||||
//
|
||||
// ParaValue
|
||||
//
|
||||
this.ParaValue.DataPropertyName = "ParaValue";
|
||||
this.ParaValue.HeaderText = "值";
|
||||
this.ParaValue.MinimumWidth = 6;
|
||||
this.ParaValue.Name = "ParaValue";
|
||||
this.ParaValue.Width = 125;
|
||||
//
|
||||
// btnDelProductModel
|
||||
//
|
||||
this.btnDelProductModel.Location = new System.Drawing.Point(941, 420);
|
||||
this.btnDelProductModel.Margin = new System.Windows.Forms.Padding(4);
|
||||
this.btnDelProductModel.Name = "btnDelProductModel";
|
||||
this.btnDelProductModel.Size = new System.Drawing.Size(100, 29);
|
||||
this.btnDelProductModel.TabIndex = 5;
|
||||
this.btnDelProductModel.Text = "删 除";
|
||||
this.btnDelProductModel.UseSelectable = true;
|
||||
this.btnDelProductModel.Click += new System.EventHandler(this.btnDelProductModel_Click);
|
||||
//
|
||||
// cmbProductModel
|
||||
//
|
||||
this.cmbProductModel.FormattingEnabled = true;
|
||||
this.cmbProductModel.ItemHeight = 24;
|
||||
this.cmbProductModel.Location = new System.Drawing.Point(867, 112);
|
||||
this.cmbProductModel.Margin = new System.Windows.Forms.Padding(4);
|
||||
this.cmbProductModel.Name = "cmbProductModel";
|
||||
this.cmbProductModel.Size = new System.Drawing.Size(228, 30);
|
||||
this.cmbProductModel.TabIndex = 6;
|
||||
this.cmbProductModel.UseSelectable = true;
|
||||
this.cmbProductModel.SelectedIndexChanged += new System.EventHandler(this.cmbProductModel_SelectedIndexChanged);
|
||||
//
|
||||
// metroLabel2
|
||||
//
|
||||
this.metroLabel2.AutoSize = true;
|
||||
this.metroLabel2.Location = new System.Drawing.Point(753, 115);
|
||||
this.metroLabel2.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
|
||||
this.metroLabel2.Name = "metroLabel2";
|
||||
this.metroLabel2.Size = new System.Drawing.Size(84, 20);
|
||||
this.metroLabel2.TabIndex = 8;
|
||||
this.metroLabel2.Text = "产品型号:";
|
||||
//
|
||||
// btnOK
|
||||
//
|
||||
this.btnOK.Location = new System.Drawing.Point(811, 204);
|
||||
this.btnOK.Margin = new System.Windows.Forms.Padding(4);
|
||||
this.btnOK.Name = "btnOK";
|
||||
this.btnOK.Size = new System.Drawing.Size(229, 41);
|
||||
this.btnOK.TabIndex = 10;
|
||||
this.btnOK.Text = "保 存";
|
||||
this.btnOK.UseSelectable = true;
|
||||
this.btnOK.Click += new System.EventHandler(this.btnOK_Click);
|
||||
//
|
||||
// FrmParaConfig
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(1200, 961);
|
||||
this.Controls.Add(this.txtProductModel);
|
||||
this.Controls.Add(this.btnOK);
|
||||
this.Controls.Add(this.metroLabel2);
|
||||
this.Controls.Add(this.cmbProductModel);
|
||||
this.Controls.Add(this.btnDelProductModel);
|
||||
this.Controls.Add(this.dgvEdit);
|
||||
this.Controls.Add(this.metroLabel1);
|
||||
this.Controls.Add(this.btnAddProductModel);
|
||||
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||||
this.Margin = new System.Windows.Forms.Padding(4);
|
||||
this.MinimizeBox = false;
|
||||
this.Movable = false;
|
||||
this.Name = "FrmParaConfig";
|
||||
this.Padding = new System.Windows.Forms.Padding(27, 75, 27, 25);
|
||||
this.Text = "参数编辑";
|
||||
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.FrmParaEdit_FormClosing);
|
||||
this.Load += new System.EventHandler(this.FrmParaEdit_Load);
|
||||
((System.ComponentModel.ISupportInitialize)(this.dgvEdit)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private MetroFramework.Controls.MetroButton btnAddProductModel;
|
||||
private MetroFramework.Controls.MetroTextBox txtProductModel;
|
||||
private MetroFramework.Controls.MetroLabel metroLabel1;
|
||||
private MetroFramework.Controls.MetroGrid dgvEdit;
|
||||
private MetroFramework.Controls.MetroButton btnDelProductModel;
|
||||
private MetroFramework.Controls.MetroComboBox cmbProductModel;
|
||||
private MetroFramework.Controls.MetroLabel metroLabel2;
|
||||
private MetroFramework.Controls.MetroButton btnOK;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn ParaName;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn ParaValue;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,203 @@
|
||||
<?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="ParaName.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="ParaValue.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
AAABAAEAICAAAAEAIACoEAAAFgAAACgAAAAgAAAAQAAAAAEAIAAAAAAAABAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAFlNUABZTVAAWU1QAFlNUABZTVAAWU1QAFlNUABZTVAAWU1QAFlN
|
||||
UABZTVAAWU1QAFlNUABZTVAAWU1QAFlNUABZTVAAWU1QAFlNUABZTVAAWU1QAFlNUAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABZTVAAWU1QAFpNUABZTVASWU1QH1lNUB9ZTVAfWU1QH1lN
|
||||
UB9ZTVAfWU1QH1lNUB9ZTVAfWU1QH1lNUB9ZTVAfWU1QH1lNUB9ZTVAfWU1QH1lNUBJaTVAAWU1QAFlN
|
||||
UAAAAAAAAAAAAAAAAAAAAAAA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1lNUB9ZTVAfWU1QD1lNUABYTFEAWExRAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABZTVAAWE1QAFlN
|
||||
UABZTVAAWU1QAFlNUABZTVAAWU1QAFlNUABZTVAAWU1QAFlNUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAA+AAAH/AAAA/gAAAH4AAAB+AAAAfgAAAH4AAAB+AAAAfgAAAH4AAAB+AA
|
||||
AAfgAAAH4AAAB+AAAAfgAAAH4AAAB+AAAAfgAAAH4AAAB+AAAAfgAAAH4AAAB+AAAAfgAAAH4AAAB+AA
|
||||
AAfgAAAH8AAAD/gAAB//gAH//4AB///AA/8=
|
||||
</value>
|
||||
</data>
|
||||
</root>
|
||||
Generated
+103
@@ -0,0 +1,103 @@
|
||||
namespace JY.Inspection.Frm
|
||||
{
|
||||
partial class FrmPwd
|
||||
{
|
||||
/// <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.txtPwd = new System.Windows.Forms.TextBox();
|
||||
this.btOK = new System.Windows.Forms.Button();
|
||||
this.btExit = new System.Windows.Forms.Button();
|
||||
this.metroLabel6 = new MetroFramework.Controls.MetroLabel();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// txtPwd
|
||||
//
|
||||
this.txtPwd.Location = new System.Drawing.Point(28, 32);
|
||||
this.txtPwd.Name = "txtPwd";
|
||||
this.txtPwd.PasswordChar = '*';
|
||||
this.txtPwd.Size = new System.Drawing.Size(203, 21);
|
||||
this.txtPwd.TabIndex = 0;
|
||||
//
|
||||
// btOK
|
||||
//
|
||||
this.btOK.Location = new System.Drawing.Point(41, 59);
|
||||
this.btOK.Name = "btOK";
|
||||
this.btOK.Size = new System.Drawing.Size(75, 23);
|
||||
this.btOK.TabIndex = 1;
|
||||
this.btOK.Text = "确定";
|
||||
this.btOK.UseVisualStyleBackColor = true;
|
||||
this.btOK.Click += new System.EventHandler(this.btOK_Click);
|
||||
//
|
||||
// btExit
|
||||
//
|
||||
this.btExit.Location = new System.Drawing.Point(134, 59);
|
||||
this.btExit.Name = "btExit";
|
||||
this.btExit.Size = new System.Drawing.Size(75, 23);
|
||||
this.btExit.TabIndex = 2;
|
||||
this.btExit.Text = "退出";
|
||||
this.btExit.UseVisualStyleBackColor = true;
|
||||
this.btExit.Click += new System.EventHandler(this.btExit_Click);
|
||||
//
|
||||
// metroLabel6
|
||||
//
|
||||
this.metroLabel6.AutoSize = true;
|
||||
this.metroLabel6.BackColor = System.Drawing.SystemColors.Control;
|
||||
this.metroLabel6.Location = new System.Drawing.Point(98, 9);
|
||||
this.metroLabel6.Name = "metroLabel6";
|
||||
this.metroLabel6.Size = new System.Drawing.Size(65, 19);
|
||||
this.metroLabel6.TabIndex = 11;
|
||||
this.metroLabel6.Text = "输入密码";
|
||||
//
|
||||
// FrmPwd
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(243, 94);
|
||||
this.Controls.Add(this.metroLabel6);
|
||||
this.Controls.Add(this.btExit);
|
||||
this.Controls.Add(this.btOK);
|
||||
this.Controls.Add(this.txtPwd);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
|
||||
this.MaximizeBox = false;
|
||||
this.MinimizeBox = false;
|
||||
this.Name = "FrmPwd";
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
||||
this.Text = "FrmPwd";
|
||||
this.Load += new System.EventHandler(this.FrmPwd_Load);
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.TextBox txtPwd;
|
||||
private System.Windows.Forms.Button btOK;
|
||||
private System.Windows.Forms.Button btExit;
|
||||
private MetroFramework.Controls.MetroLabel metroLabel6;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace JY.Inspection.Frm
|
||||
{
|
||||
public partial class FrmPwd : Form
|
||||
{
|
||||
public FrmPwd()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void FrmPwd_Load(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void btOK_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (txtPwd.Text.ToLower().Trim() == "eve@2022")
|
||||
{
|
||||
this.DialogResult = DialogResult.OK;
|
||||
}
|
||||
else
|
||||
{
|
||||
MessageBox.Show("输入的密码不正确!");
|
||||
}
|
||||
}
|
||||
|
||||
private void btExit_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.DialogResult = DialogResult.Cancel;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,120 @@
|
||||
<?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>
|
||||
</root>
|
||||
@@ -0,0 +1,551 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Windows.Forms;
|
||||
using System.Windows.Forms.DataVisualization.Charting;
|
||||
using JY.DAL;
|
||||
using JY.Model;
|
||||
using JY.Utility;
|
||||
using MetroFramework.Forms;
|
||||
|
||||
namespace JY.Inspection.Frm
|
||||
{
|
||||
public partial class FrmStatistics : MetroForm
|
||||
{
|
||||
/// <summary>
|
||||
/// 数据库访问接口
|
||||
/// </summary>
|
||||
private IDbHelper dbHelper = new OpSqlDataBase();
|
||||
/// <summary>
|
||||
/// 读取成功
|
||||
/// </summary>
|
||||
public bool isReadOK = true;
|
||||
/// <summary>
|
||||
/// Timer是否运行
|
||||
/// </summary>
|
||||
public bool isEnabled = false;
|
||||
/// <summary>
|
||||
/// chart图表Y轴的上限值
|
||||
/// </summary>
|
||||
int iChartHeight = 5000;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 读取
|
||||
/// </summary>
|
||||
public System.Timers.Timer timerStatistics1;
|
||||
/// <summary>
|
||||
/// 读取24小时产能统计
|
||||
/// </summary>
|
||||
public System.Timers.Timer timer_HourProd;
|
||||
|
||||
/// <summary>
|
||||
/// 投入产出饼状图显示委托
|
||||
/// </summary>
|
||||
/// <param name="xData"></param>
|
||||
/// <param name="yData"></param>
|
||||
private delegate void UpdateDataChart2(List<string> xData, List<int> yData);
|
||||
/// <summary>
|
||||
/// 各不良统计NG显示委托
|
||||
/// </summary>
|
||||
/// <param name="dt"></param>
|
||||
private delegate void UpdateDataChart3(List<string> xData, List<int> yData);
|
||||
/// <summary>
|
||||
/// 不良统计项目
|
||||
/// </summary>
|
||||
List<ChartDataType> NGList = new List<ChartDataType>();
|
||||
/// <summary>
|
||||
/// 生产统计项目
|
||||
/// </summary>
|
||||
List<ChartDataType> ProductionList = new List<ChartDataType>();
|
||||
|
||||
|
||||
public FrmStatistics()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 窗体实例
|
||||
/// </summary>
|
||||
private static FrmStatistics _instance;
|
||||
internal static FrmStatistics Instance
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_instance == null)
|
||||
_instance = new FrmStatistics();
|
||||
return _instance;
|
||||
}
|
||||
}
|
||||
|
||||
private void FrmStatistics_Load(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
//SetProductionList();
|
||||
//OrgChart();
|
||||
//GetValue();
|
||||
//InitTimer();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 初始化Timer控件
|
||||
/// </summary>
|
||||
internal void InitTimer()
|
||||
{
|
||||
|
||||
OrgChart();
|
||||
SetProductionList();
|
||||
isEnabled = true;
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///定义饼图和右上角柱状图显示类型
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
internal void SetProductionList()
|
||||
{
|
||||
//不良统计项目
|
||||
NGList.Add(new ChartDataType() { DataType = "线扫扫码NG" });
|
||||
NGList.Add(new ChartDataType() { DataType = "分档扫码NG" });
|
||||
NGList.Add(new ChartDataType() { DataType = "侧面不良" });
|
||||
NGList.Add(new ChartDataType() { DataType = "正极不良" });
|
||||
NGList.Add(new ChartDataType() { DataType = "负极不良" });
|
||||
//生产统计项目
|
||||
ProductionList.Add(new ChartDataType() { DataType = "生产总数" });
|
||||
ProductionList.Add(new ChartDataType() { DataType = "良品数" });
|
||||
ProductionList.Add(new ChartDataType() { DataType = "不良数" });
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Chart控件初始化
|
||||
/// </summary>
|
||||
internal void OrgChart()
|
||||
{
|
||||
#region 24小时统计
|
||||
chart1.Series.Clear();
|
||||
chart1.Titles.Clear();
|
||||
chart1.ChartAreas[0].AxisY.Minimum = 0;
|
||||
chart1.ChartAreas[0].AxisY.Maximum = iChartHeight + 500;
|
||||
|
||||
ChartHelper.AddSeries(chart1, "投入", SeriesChartType.Column, Color.DodgerBlue, Color.Red, true);
|
||||
ChartHelper.AddSeries(chart1, "产出", SeriesChartType.Column, Color.Lime, Color.Red, true);
|
||||
ChartHelper.AddSeries(chart1, "优率", SeriesChartType.Spline, Color.Red, Color.Red);
|
||||
|
||||
ChartHelper.SetTitle(chart1, "当日每2小时投入与产出", new Font("微软雅黑", 18), Docking.Top, Color.Black);
|
||||
ChartHelper.SetStyle(chart1, Color.White, Color.Black);
|
||||
ChartHelper.SetLegend(chart1, Docking.Top, StringAlignment.Center, Color.White, Color.Black);
|
||||
ChartHelper.SetXY(chart1, "时间", "数值", StringAlignment.Far, Color.Black, Color.Black, AxisArrowStyle.None, 1, 2);
|
||||
ChartHelper.SetMajorGrid(chart1, Color.White, 20, 2);
|
||||
#endregion
|
||||
|
||||
#region 数据统计
|
||||
chartNgShow.Series.Clear();
|
||||
chartNgShow.Titles.Clear();
|
||||
chartNgShow.ChartAreas[0].AxisY.Minimum = 0;
|
||||
chartNgShow.ChartAreas[0].AxisY.Maximum = iChartHeight + 500;
|
||||
foreach (var item in NGList)
|
||||
{
|
||||
ChartHelper.AddSeries(chartNgShow, item.DataType, SeriesChartType.Column, Color.Red, Color.Red, true);
|
||||
}
|
||||
ChartHelper.SetTitle(chartNgShow, "各不良项", new Font("微软雅黑", 22), Docking.Top, Color.Black);
|
||||
ChartHelper.SetStyle(chartNgShow, Color.White, Color.Black);
|
||||
ChartHelper.SetLegend(chartNgShow, Docking.Top, StringAlignment.Center, Color.White, Color.Black);
|
||||
ChartHelper.SetXY(chartNgShow, "不良项", "数值", StringAlignment.Far, Color.Black, Color.Black, AxisArrowStyle.None, 1, 2);
|
||||
ChartHelper.SetMajorGrid(chartNgShow, Color.White, 20, 2);
|
||||
#endregion
|
||||
|
||||
//投入产出统计
|
||||
ChartHelper.SetTitle(chartToalShow, "投入产出", new Font("微软雅黑", 22), Docking.Top, Color.Black);
|
||||
chartToalShow.Series[0].ChartType = SeriesChartType.Pie;//设置图表类型为饼图
|
||||
//chart2.Series[0].CustomProperties="PieLabel"+"PieSize = 50";//设置饼图参数
|
||||
chartToalShow.Series[0].CustomProperties = "DoughnutRadius=60, PieLabelStyle=Disabled, PieDrawingStyle=SoftEdge";
|
||||
chartToalShow.Series[0]["PieLabelStyle"] = "Inside";//将文字移到外侧
|
||||
chartToalShow.Series[0].XValueType = ChartValueType.String;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 读取PLC产能统计
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void TimerUpGetData()
|
||||
{
|
||||
if (!HomeForm.startup)
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (isReadOK)
|
||||
{
|
||||
isReadOK = false;
|
||||
GetValue();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取图表数据
|
||||
/// </summary>
|
||||
public void GetValue()
|
||||
{
|
||||
try
|
||||
{
|
||||
if (isEnabled)
|
||||
{
|
||||
|
||||
int ProdAllQty = HomeForm.omronPLCCom.lstMcUI[0].ReadIntDReg("HMI.生产总数");
|
||||
int ProdOKQty = HomeForm.omronPLCCom.lstMcUI[0].ReadIntDReg("HMI.OK总数");
|
||||
int ProdNGQty= HomeForm.omronPLCCom.lstMcUI[0].ReadIntDReg("HMI.NG总数");
|
||||
int ProdSanNgQty = 123;//扫码NG
|
||||
int ProdVolNgQty = 145;//电压NG
|
||||
|
||||
//從PLC讀取數據賦值給到NGList
|
||||
ProductionList.Where(p => p.DataType == "生产总数").FirstOrDefault().DataCount = ProdAllQty;
|
||||
ProductionList.Where(p => p.DataType == "良品数").FirstOrDefault().DataCount = ProdOKQty;
|
||||
ProductionList.Where(p => p.DataType == "不良数").FirstOrDefault().DataCount = ProdNGQty;
|
||||
|
||||
|
||||
|
||||
//從PLC讀取數據賦值給到NGList
|
||||
NGList.Where(p => p.DataType == "线扫扫码NG").FirstOrDefault().DataCount = ProdSanNgQty;
|
||||
NGList.Where(p => p.DataType == "分档扫码NG").FirstOrDefault().DataCount = ProdSanNgQty;
|
||||
NGList.Where(p => p.DataType == "侧面不良").FirstOrDefault().DataCount = ProdVolNgQty;
|
||||
NGList.Where(p => p.DataType == "正极不良").FirstOrDefault().DataCount = ProdVolNgQty;
|
||||
NGList.Where(p => p.DataType == "负极不良").FirstOrDefault().DataCount = ProdSanNgQty;
|
||||
|
||||
ShowChartData();
|
||||
//------------------------------每小时产能------------------------------------------
|
||||
string strErr = "";
|
||||
DateTime dateTime = DateTime.Now;
|
||||
string strDate = dateTime.ToString("yyyy-MM-dd");
|
||||
int Hour = dateTime.Hour;
|
||||
|
||||
//读取PLC投入总数
|
||||
int ProdCurrAllQty = GetToDayHourQty(Hour, true);
|
||||
//读取PLC产出数
|
||||
int ProdCurrOKQty = GetToDayHourQty(Hour, false);
|
||||
HourprodEntity mh = new HourprodEntity();
|
||||
mh.FDate = strDate;
|
||||
mh.FHour = Hour;
|
||||
mh.ProdIn = ProdCurrAllQty;
|
||||
mh.ProdOut = ProdCurrOKQty;
|
||||
mh.TestTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
|
||||
|
||||
var iResult = dbHelper.UpdateHourprodData(mh);
|
||||
if (iResult <= 0)
|
||||
{
|
||||
MessageBox.Show("存储每小时产能失败" + strErr, "系统异常", MessageBoxButtons.OK, MessageBoxIcon.Hand);
|
||||
LogHelper.Error("存储每小时产能失败" + strErr, new Exception("异常信息"));
|
||||
}
|
||||
isReadOK = true;
|
||||
}
|
||||
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
LogHelper.Error(ex.Message, new Exception("异常信息"));
|
||||
timerStatistics1.Enabled = false;
|
||||
isReadOK = true;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 每小时产能读取处理
|
||||
/// </summary>
|
||||
/// <param name="hour"></param>
|
||||
/// <param name="flag"></param>
|
||||
/// <returns></returns>
|
||||
private int GetToDayHourQty(int hour, bool flag)
|
||||
{
|
||||
try
|
||||
{
|
||||
string strAddr = "";
|
||||
if (hour == 0)
|
||||
{
|
||||
hour = 24;
|
||||
}
|
||||
//else
|
||||
//{
|
||||
// hour = hour - 1;
|
||||
//}
|
||||
if (flag)//产出
|
||||
{
|
||||
strAddr = "W" + (1040 + hour);
|
||||
}
|
||||
else//良品数
|
||||
{
|
||||
strAddr = "W" + (1070 + hour);
|
||||
}
|
||||
int ProdNGQty = HomeForm.omronPLCCom.lstMcUI[0].ReadIntDReg(strAddr);//生产NG数量
|
||||
return ProdNGQty;
|
||||
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
LogHelper.Error(ex.Message, new Exception("异常信息"));
|
||||
MessageBox.Show(ex.Message, "系统异常", MessageBoxButtons.OK, MessageBoxIcon.Hand);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 刷新饼图生产统计信息;刷新生产不良统计信息
|
||||
/// </summary>
|
||||
public void ShowChartData()
|
||||
{
|
||||
try
|
||||
{
|
||||
//不良类型统计
|
||||
List<string> xData = NGList.Select(c => c.DataType).ToList();
|
||||
List<int> yData = NGList.Select(c => c.DataCount).ToList();
|
||||
ShowNGChart(xData, yData);
|
||||
|
||||
//生产总数统计
|
||||
var xlist = ProductionList.Select(c => c.DataType).ToList();
|
||||
var ylist = ProductionList.Select(c => c.DataCount).ToList();
|
||||
ShowChartToal(xlist, ylist);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
LogHelper.Error(ex.Message, new Exception("异常信息"));
|
||||
MessageBox.Show(ex.Message, "系统异常", MessageBoxButtons.OK, MessageBoxIcon.Hand);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 投入产出饼状图显示
|
||||
/// </summary>
|
||||
/// <param name="xData"></param>
|
||||
/// <param name="yData"></param>
|
||||
private void ShowChartToal(List<string> xData, List<int> yData)
|
||||
{
|
||||
if (chartToalShow.InvokeRequired)
|
||||
{
|
||||
UpdateDataChart2 c = new UpdateDataChart2(ShowChartToal);
|
||||
this.Invoke(c, new object[] { xData, yData });
|
||||
}
|
||||
else
|
||||
{
|
||||
chartToalShow.Series[0].Points.DataBindXY(xData, yData);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 不良数统计显示
|
||||
/// </summary>
|
||||
/// <param name="dt"></param>
|
||||
private void ShowNGChart(List<string> xData, List<int> yData)
|
||||
{
|
||||
if (chartNgShow.InvokeRequired)
|
||||
{
|
||||
UpdateDataChart3 c = new UpdateDataChart3(ShowNGChart);
|
||||
this.Invoke(c, new object[] { xData, yData });
|
||||
}
|
||||
else
|
||||
{
|
||||
chartNgShow.Series[0].Points.DataBindXY(xData, yData);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 读取产入产出
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
///
|
||||
private void TimerUpHourProd()
|
||||
{
|
||||
try
|
||||
{
|
||||
if (isEnabled)
|
||||
{
|
||||
List<Chart24HourData> chart24Hours = new List<Chart24HourData>();
|
||||
DateTime dtTime = DateTime.Now;
|
||||
string strDate = dtTime.ToString("yyyy-MM-dd");
|
||||
int Hour = dtTime.Hour;
|
||||
var listTotal = dbHelper.GetProdTotal(strDate, 0);// 查询稼动率表中total数据
|
||||
|
||||
if (listTotal != null && listTotal.Count > 0)
|
||||
{
|
||||
for (int i = 1; i <= 12; i++)
|
||||
{
|
||||
if (!isEnabled)
|
||||
{
|
||||
break;
|
||||
}
|
||||
int j = i * 2;
|
||||
int m = j - 2;
|
||||
int n = j - 1;
|
||||
//当前时段第一个小时
|
||||
var hour1 = listTotal.Where(p => p.FHour == m).FirstOrDefault();
|
||||
//当前时段第二个小时
|
||||
var hour2 = listTotal.Where(p => p.FHour == n).FirstOrDefault();
|
||||
int ProdALLQty = 0;
|
||||
int ProdOKQty = 0;
|
||||
int ProdNGQty = 0;
|
||||
string strOkRatio = "0";
|
||||
|
||||
if (hour1 != null)
|
||||
{
|
||||
ProdALLQty += hour1.ProdIn;
|
||||
ProdOKQty += hour1.ProdOut;
|
||||
}
|
||||
if (hour2 != null)
|
||||
{
|
||||
ProdALLQty += hour2.ProdIn;
|
||||
ProdOKQty += hour2.ProdOut;
|
||||
}
|
||||
ProdNGQty = ProdALLQty - ProdOKQty;
|
||||
if (ProdNGQty > 0)
|
||||
{
|
||||
strOkRatio = Math.Round((ProdOKQty * 1.0 / ProdALLQty) * 100, 2) + "%";
|
||||
}
|
||||
|
||||
chart24Hours.Add(new Chart24HourData()
|
||||
{
|
||||
DisplayTime = m + ":00~" + n + ":59",
|
||||
ProdIn = ProdALLQty,
|
||||
ProdOut = ProdOKQty,
|
||||
ProdNg = ProdNGQty,
|
||||
OKRatio = strOkRatio
|
||||
});
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Random rand = new Random();
|
||||
for (int i = 1; i < 13; i++)
|
||||
{
|
||||
if (!isEnabled)
|
||||
{
|
||||
break;
|
||||
}
|
||||
int j = i * 2;
|
||||
int m = j - 2;
|
||||
int n = j - 1;
|
||||
|
||||
int ranOK = rand.Next(1000, 3000);
|
||||
int ranNG = rand.Next(400, 1200);
|
||||
int total = ranOK + ranNG;
|
||||
|
||||
chart24Hours.Add(new Chart24HourData()
|
||||
{
|
||||
DisplayTime = m + ":00~" + n + ":59",
|
||||
ProdIn = ranOK + ranNG,
|
||||
ProdOut = ranOK,
|
||||
ProdNg = ranNG,
|
||||
OKRatio = Math.Round((ranOK * 1.0 / total) * 100, 2) + "%"
|
||||
});
|
||||
}
|
||||
}
|
||||
if (!isEnabled)
|
||||
{
|
||||
return;
|
||||
}
|
||||
UpdateGV(chart24Hours);
|
||||
BindChart(chart24Hours);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
LogHelper.Error(ex.Message, new Exception("异常信息"));
|
||||
MessageBox.Show(ex.Message, "系统异常", MessageBoxButtons.OK, MessageBoxIcon.Hand);
|
||||
timer_HourProd.Enabled = false;
|
||||
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// 更新24小时产能
|
||||
/// </summary>
|
||||
/// <param name="dt"></param>
|
||||
private void UpdateGV(List<Chart24HourData> list)
|
||||
{
|
||||
if (this.InvokeRequired)
|
||||
{
|
||||
this.BeginInvoke(new EventHandler(delegate
|
||||
{
|
||||
DataTable dtsShow = new DataTable();
|
||||
for (int i = 1; i <= 13; i++)
|
||||
{
|
||||
dtsShow.Columns.Add("Col" + i);
|
||||
}
|
||||
dtsShow.Rows.Add(new object[] { "优率", list[0].OKRatio, list[1].OKRatio, list[2].OKRatio, list[3].OKRatio, list[4].OKRatio, list[5].OKRatio
|
||||
,list[6].OKRatio, list[7].OKRatio, list[8].OKRatio, list[9].OKRatio, list[10].OKRatio, list[11].OKRatio });
|
||||
dtsShow.Rows.Add(new object[] { "产出" , list[0].ProdOut, list[1].ProdOut, list[2].ProdOut, list[3].ProdOut, list[4].ProdOut, list[5].ProdOut
|
||||
,list[6].ProdOut, list[7].ProdOut, list[8].ProdOut, list[9].ProdOut, list[10].ProdOut, list[11].ProdOut });
|
||||
dtsShow.Rows.Add(new object[] { "投入", list[0].ProdIn, list[1].ProdIn, list[2].ProdIn, list[3].ProdIn, list[4].ProdIn, list[5].ProdIn
|
||||
,list[6].ProdIn, list[7].ProdIn, list[8].ProdIn, list[9].ProdIn, list[10].ProdIn, list[11].ProdIn});
|
||||
dtsShow.Rows.Add(new object[] { "时间" , list[0].DisplayTime, list[1].DisplayTime, list[2].DisplayTime, list[3].DisplayTime, list[4].DisplayTime, list[5].DisplayTime
|
||||
,list[6].DisplayTime, list[7].DisplayTime, list[8].DisplayTime, list[9].DisplayTime, list[10].DisplayTime, list[11].DisplayTime });
|
||||
dgvHShow.DataSource = dtsShow;
|
||||
dgvHShow.Refresh();
|
||||
}));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 更新24小时产能Chart柱状图显示
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public void BindChart(List<Chart24HourData> list)
|
||||
{
|
||||
if (this.InvokeRequired)
|
||||
{
|
||||
this.BeginInvoke(new EventHandler(delegate
|
||||
{
|
||||
var x1 = list.Select(c => c.DisplayTime).ToList();
|
||||
var y1 = list.Select(c => c.ProdIn).ToList();
|
||||
var y2 = list.Select(c => c.ProdOut).ToList();
|
||||
|
||||
chart1.Series[0].Points.DataBindXY(x1, y1);
|
||||
chart1.Series[1].Points.DataBindXY(x1, y2);
|
||||
chart1.Series[2].Points.DataBindXY(x1, y2);
|
||||
}));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 窗口渐变透明
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void timerOpacity_Tick(object sender, EventArgs e)
|
||||
{
|
||||
this.Opacity += 0.1;
|
||||
if (this.Opacity == 1.0)
|
||||
{
|
||||
timerOpacity.Stop();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 关闭界面
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
public void FrmStatistics_FormClosing(object sender, FormClosingEventArgs e)
|
||||
{
|
||||
this.Visible = false;
|
||||
e.Cancel = true;
|
||||
}
|
||||
|
||||
public void timerStatistics_Tick(object sender, EventArgs e)
|
||||
{
|
||||
TimerUpGetData();
|
||||
}
|
||||
|
||||
public void timer_HourProd2_Tick(object sender, EventArgs e)
|
||||
{
|
||||
TimerUpHourProd();
|
||||
}
|
||||
}
|
||||
}
|
||||
+319
@@ -0,0 +1,319 @@
|
||||
|
||||
namespace JY.Inspection.Frm
|
||||
{
|
||||
partial class FrmStatistics
|
||||
{
|
||||
/// <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();
|
||||
System.Windows.Forms.DataVisualization.Charting.ChartArea chartArea7 = new System.Windows.Forms.DataVisualization.Charting.ChartArea();
|
||||
System.Windows.Forms.DataVisualization.Charting.Legend legend7 = new System.Windows.Forms.DataVisualization.Charting.Legend();
|
||||
System.Windows.Forms.DataVisualization.Charting.Series series7 = new System.Windows.Forms.DataVisualization.Charting.Series();
|
||||
System.Windows.Forms.DataVisualization.Charting.ChartArea chartArea8 = new System.Windows.Forms.DataVisualization.Charting.ChartArea();
|
||||
System.Windows.Forms.DataVisualization.Charting.Legend legend8 = new System.Windows.Forms.DataVisualization.Charting.Legend();
|
||||
System.Windows.Forms.DataVisualization.Charting.Series series8 = new System.Windows.Forms.DataVisualization.Charting.Series();
|
||||
System.Windows.Forms.DataVisualization.Charting.ChartArea chartArea9 = new System.Windows.Forms.DataVisualization.Charting.ChartArea();
|
||||
System.Windows.Forms.DataVisualization.Charting.Legend legend9 = new System.Windows.Forms.DataVisualization.Charting.Legend();
|
||||
System.Windows.Forms.DataVisualization.Charting.Series series9 = new System.Windows.Forms.DataVisualization.Charting.Series();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle7 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle8 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle9 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmStatistics));
|
||||
this.chartToalShow = new System.Windows.Forms.DataVisualization.Charting.Chart();
|
||||
this.chartNgShow = new System.Windows.Forms.DataVisualization.Charting.Chart();
|
||||
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
|
||||
this.splitContainer2 = new System.Windows.Forms.SplitContainer();
|
||||
this.splitContainer3 = new System.Windows.Forms.SplitContainer();
|
||||
this.chart1 = new System.Windows.Forms.DataVisualization.Charting.Chart();
|
||||
this.groupBox1 = new System.Windows.Forms.GroupBox();
|
||||
this.dgvHShow = new MetroFramework.Controls.MetroGrid();
|
||||
this.timerOpacity = new System.Windows.Forms.Timer(this.components);
|
||||
this.timerStatistics = new System.Windows.Forms.Timer(this.components);
|
||||
this.timer_HourProd2 = new System.Windows.Forms.Timer(this.components);
|
||||
((System.ComponentModel.ISupportInitialize)(this.chartToalShow)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.chartNgShow)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
|
||||
this.splitContainer1.Panel1.SuspendLayout();
|
||||
this.splitContainer1.Panel2.SuspendLayout();
|
||||
this.splitContainer1.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).BeginInit();
|
||||
this.splitContainer2.Panel1.SuspendLayout();
|
||||
this.splitContainer2.Panel2.SuspendLayout();
|
||||
this.splitContainer2.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.splitContainer3)).BeginInit();
|
||||
this.splitContainer3.Panel1.SuspendLayout();
|
||||
this.splitContainer3.Panel2.SuspendLayout();
|
||||
this.splitContainer3.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.chart1)).BeginInit();
|
||||
this.groupBox1.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.dgvHShow)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// chartToalShow
|
||||
//
|
||||
chartArea7.Name = "ChartArea1";
|
||||
this.chartToalShow.ChartAreas.Add(chartArea7);
|
||||
this.chartToalShow.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
legend7.Font = new System.Drawing.Font("Microsoft Sans Serif", 14F);
|
||||
legend7.IsTextAutoFit = false;
|
||||
legend7.Name = "Legend1";
|
||||
this.chartToalShow.Legends.Add(legend7);
|
||||
this.chartToalShow.Location = new System.Drawing.Point(0, 0);
|
||||
this.chartToalShow.Name = "chartToalShow";
|
||||
series7.ChartArea = "ChartArea1";
|
||||
series7.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Doughnut;
|
||||
series7.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F);
|
||||
series7.IsValueShownAsLabel = true;
|
||||
series7.Label = "#VALX:#VAL";
|
||||
series7.Legend = "Legend1";
|
||||
series7.Name = "Series1";
|
||||
this.chartToalShow.Series.Add(series7);
|
||||
this.chartToalShow.Size = new System.Drawing.Size(618, 299);
|
||||
this.chartToalShow.TabIndex = 4;
|
||||
this.chartToalShow.Text = "chart1";
|
||||
//
|
||||
// chartNgShow
|
||||
//
|
||||
chartArea8.Name = "ChartArea1";
|
||||
this.chartNgShow.ChartAreas.Add(chartArea8);
|
||||
this.chartNgShow.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
legend8.Font = new System.Drawing.Font("Microsoft Sans Serif", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
legend8.IsTextAutoFit = false;
|
||||
legend8.Name = "Legend1";
|
||||
this.chartNgShow.Legends.Add(legend8);
|
||||
this.chartNgShow.Location = new System.Drawing.Point(0, 0);
|
||||
this.chartNgShow.Name = "chartNgShow";
|
||||
series8.ChartArea = "ChartArea1";
|
||||
series8.Legend = "Legend1";
|
||||
series8.Name = "Series1";
|
||||
this.chartNgShow.Series.Add(series8);
|
||||
this.chartNgShow.Size = new System.Drawing.Size(746, 299);
|
||||
this.chartNgShow.TabIndex = 5;
|
||||
this.chartNgShow.Text = "chart2";
|
||||
//
|
||||
// splitContainer1
|
||||
//
|
||||
this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.splitContainer1.Location = new System.Drawing.Point(20, 60);
|
||||
this.splitContainer1.Name = "splitContainer1";
|
||||
this.splitContainer1.Orientation = System.Windows.Forms.Orientation.Horizontal;
|
||||
//
|
||||
// splitContainer1.Panel1
|
||||
//
|
||||
this.splitContainer1.Panel1.Controls.Add(this.splitContainer2);
|
||||
//
|
||||
// splitContainer1.Panel2
|
||||
//
|
||||
this.splitContainer1.Panel2.Controls.Add(this.splitContainer3);
|
||||
this.splitContainer1.Size = new System.Drawing.Size(1368, 745);
|
||||
this.splitContainer1.SplitterDistance = 299;
|
||||
this.splitContainer1.TabIndex = 6;
|
||||
//
|
||||
// splitContainer2
|
||||
//
|
||||
this.splitContainer2.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.splitContainer2.Location = new System.Drawing.Point(0, 0);
|
||||
this.splitContainer2.Name = "splitContainer2";
|
||||
//
|
||||
// splitContainer2.Panel1
|
||||
//
|
||||
this.splitContainer2.Panel1.Controls.Add(this.chartToalShow);
|
||||
//
|
||||
// splitContainer2.Panel2
|
||||
//
|
||||
this.splitContainer2.Panel2.Controls.Add(this.chartNgShow);
|
||||
this.splitContainer2.Size = new System.Drawing.Size(1368, 299);
|
||||
this.splitContainer2.SplitterDistance = 618;
|
||||
this.splitContainer2.TabIndex = 0;
|
||||
//
|
||||
// splitContainer3
|
||||
//
|
||||
this.splitContainer3.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.splitContainer3.FixedPanel = System.Windows.Forms.FixedPanel.Panel2;
|
||||
this.splitContainer3.Location = new System.Drawing.Point(0, 0);
|
||||
this.splitContainer3.Name = "splitContainer3";
|
||||
this.splitContainer3.Orientation = System.Windows.Forms.Orientation.Horizontal;
|
||||
//
|
||||
// splitContainer3.Panel1
|
||||
//
|
||||
this.splitContainer3.Panel1.Controls.Add(this.chart1);
|
||||
//
|
||||
// splitContainer3.Panel2
|
||||
//
|
||||
this.splitContainer3.Panel2.Controls.Add(this.groupBox1);
|
||||
this.splitContainer3.Panel2MinSize = 50;
|
||||
this.splitContainer3.Size = new System.Drawing.Size(1368, 442);
|
||||
this.splitContainer3.SplitterDistance = 300;
|
||||
this.splitContainer3.TabIndex = 0;
|
||||
//
|
||||
// chart1
|
||||
//
|
||||
chartArea9.Name = "ChartArea1";
|
||||
this.chart1.ChartAreas.Add(chartArea9);
|
||||
this.chart1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
legend9.Font = new System.Drawing.Font("Microsoft Sans Serif", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
legend9.IsTextAutoFit = false;
|
||||
legend9.Name = "Legend1";
|
||||
this.chart1.Legends.Add(legend9);
|
||||
this.chart1.Location = new System.Drawing.Point(0, 0);
|
||||
this.chart1.Name = "chart1";
|
||||
series9.ChartArea = "ChartArea1";
|
||||
series9.Font = new System.Drawing.Font("Microsoft Sans Serif", 22F);
|
||||
series9.IsValueShownAsLabel = true;
|
||||
series9.Legend = "Legend1";
|
||||
series9.Name = "Series1";
|
||||
this.chart1.Series.Add(series9);
|
||||
this.chart1.Size = new System.Drawing.Size(1368, 300);
|
||||
this.chart1.TabIndex = 7;
|
||||
this.chart1.Text = "chart1";
|
||||
//
|
||||
// groupBox1
|
||||
//
|
||||
this.groupBox1.Controls.Add(this.dgvHShow);
|
||||
this.groupBox1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.groupBox1.Font = new System.Drawing.Font("宋体", 9F);
|
||||
this.groupBox1.Location = new System.Drawing.Point(0, 0);
|
||||
this.groupBox1.Name = "groupBox1";
|
||||
this.groupBox1.Size = new System.Drawing.Size(1368, 138);
|
||||
this.groupBox1.TabIndex = 0;
|
||||
this.groupBox1.TabStop = false;
|
||||
this.groupBox1.Text = "每2小时产能";
|
||||
//
|
||||
// dgvHShow
|
||||
//
|
||||
this.dgvHShow.AllowUserToAddRows = false;
|
||||
this.dgvHShow.AllowUserToDeleteRows = false;
|
||||
this.dgvHShow.AllowUserToResizeColumns = false;
|
||||
this.dgvHShow.AllowUserToResizeRows = false;
|
||||
this.dgvHShow.BackgroundColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
|
||||
this.dgvHShow.BorderStyle = System.Windows.Forms.BorderStyle.None;
|
||||
this.dgvHShow.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.None;
|
||||
this.dgvHShow.ColumnHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.None;
|
||||
dataGridViewCellStyle7.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
|
||||
dataGridViewCellStyle7.BackColor = System.Drawing.Color.SkyBlue;
|
||||
dataGridViewCellStyle7.Font = new System.Drawing.Font("Segoe UI", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel);
|
||||
dataGridViewCellStyle7.ForeColor = System.Drawing.Color.Black;
|
||||
dataGridViewCellStyle7.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(198)))), ((int)(((byte)(247)))));
|
||||
dataGridViewCellStyle7.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(17)))), ((int)(((byte)(17)))), ((int)(((byte)(17)))));
|
||||
dataGridViewCellStyle7.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
|
||||
this.dgvHShow.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle7;
|
||||
this.dgvHShow.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
||||
this.dgvHShow.ColumnHeadersVisible = false;
|
||||
dataGridViewCellStyle8.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
|
||||
dataGridViewCellStyle8.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
|
||||
dataGridViewCellStyle8.Font = new System.Drawing.Font("Segoe UI", 11F);
|
||||
dataGridViewCellStyle8.ForeColor = System.Drawing.Color.Black;
|
||||
dataGridViewCellStyle8.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(198)))), ((int)(((byte)(247)))));
|
||||
dataGridViewCellStyle8.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(17)))), ((int)(((byte)(17)))), ((int)(((byte)(17)))));
|
||||
dataGridViewCellStyle8.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
|
||||
this.dgvHShow.DefaultCellStyle = dataGridViewCellStyle8;
|
||||
this.dgvHShow.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.dgvHShow.EnableHeadersVisualStyles = false;
|
||||
this.dgvHShow.Font = new System.Drawing.Font("Segoe UI", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel);
|
||||
this.dgvHShow.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
|
||||
this.dgvHShow.Location = new System.Drawing.Point(3, 17);
|
||||
this.dgvHShow.Name = "dgvHShow";
|
||||
this.dgvHShow.RowHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.None;
|
||||
dataGridViewCellStyle9.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
|
||||
dataGridViewCellStyle9.BackColor = System.Drawing.Color.White;
|
||||
dataGridViewCellStyle9.Font = new System.Drawing.Font("Segoe UI", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel);
|
||||
dataGridViewCellStyle9.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
|
||||
dataGridViewCellStyle9.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(198)))), ((int)(((byte)(247)))));
|
||||
dataGridViewCellStyle9.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(17)))), ((int)(((byte)(17)))), ((int)(((byte)(17)))));
|
||||
dataGridViewCellStyle9.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
|
||||
this.dgvHShow.RowHeadersDefaultCellStyle = dataGridViewCellStyle9;
|
||||
this.dgvHShow.RowHeadersWidth = 51;
|
||||
this.dgvHShow.RowHeadersWidthSizeMode = System.Windows.Forms.DataGridViewRowHeadersWidthSizeMode.DisableResizing;
|
||||
this.dgvHShow.RowTemplate.Height = 23;
|
||||
this.dgvHShow.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
|
||||
this.dgvHShow.Size = new System.Drawing.Size(1362, 118);
|
||||
this.dgvHShow.TabIndex = 14;
|
||||
//
|
||||
// timerOpacity
|
||||
//
|
||||
this.timerOpacity.Tick += new System.EventHandler(this.timerOpacity_Tick);
|
||||
//
|
||||
// timerStatistics
|
||||
//
|
||||
this.timerStatistics.Tick += new System.EventHandler(this.timerStatistics_Tick);
|
||||
//
|
||||
// timer_HourProd2
|
||||
//
|
||||
this.timer_HourProd2.Tick += new System.EventHandler(this.timer_HourProd2_Tick);
|
||||
//
|
||||
// FrmStatistics
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(1408, 825);
|
||||
this.Controls.Add(this.splitContainer1);
|
||||
this.Font = new System.Drawing.Font("宋体", 9F);
|
||||
this.ForeColor = System.Drawing.SystemColors.ControlLight;
|
||||
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||||
this.MaximizeBox = false;
|
||||
this.MinimizeBox = false;
|
||||
this.Name = "FrmStatistics";
|
||||
this.Resizable = false;
|
||||
this.ShowInTaskbar = false;
|
||||
this.Text = "数据统计";
|
||||
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.FrmStatistics_FormClosing);
|
||||
this.Load += new System.EventHandler(this.FrmStatistics_Load);
|
||||
((System.ComponentModel.ISupportInitialize)(this.chartToalShow)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.chartNgShow)).EndInit();
|
||||
this.splitContainer1.Panel1.ResumeLayout(false);
|
||||
this.splitContainer1.Panel2.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit();
|
||||
this.splitContainer1.ResumeLayout(false);
|
||||
this.splitContainer2.Panel1.ResumeLayout(false);
|
||||
this.splitContainer2.Panel2.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).EndInit();
|
||||
this.splitContainer2.ResumeLayout(false);
|
||||
this.splitContainer3.Panel1.ResumeLayout(false);
|
||||
this.splitContainer3.Panel2.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.splitContainer3)).EndInit();
|
||||
this.splitContainer3.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.chart1)).EndInit();
|
||||
this.groupBox1.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.dgvHShow)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
private System.Windows.Forms.SplitContainer splitContainer1;
|
||||
private System.Windows.Forms.SplitContainer splitContainer2;
|
||||
private System.Windows.Forms.GroupBox groupBox1;
|
||||
private System.Windows.Forms.Timer timerOpacity;
|
||||
private System.Windows.Forms.SplitContainer splitContainer3;
|
||||
internal System.Windows.Forms.DataVisualization.Charting.Chart chartToalShow;
|
||||
internal System.Windows.Forms.DataVisualization.Charting.Chart chartNgShow;
|
||||
internal System.Windows.Forms.DataVisualization.Charting.Chart chart1;
|
||||
internal MetroFramework.Controls.MetroGrid dgvHShow;
|
||||
internal System.Windows.Forms.Timer timerStatistics;
|
||||
internal System.Windows.Forms.Timer timer_HourProd2;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,209 @@
|
||||
<?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="timerOpacity.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
<metadata name="timerStatistics.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>145, 17</value>
|
||||
</metadata>
|
||||
<metadata name="timer_HourProd2.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>282, 11</value>
|
||||
</metadata>
|
||||
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>48</value>
|
||||
</metadata>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
AAABAAEAICAAAAEAIACoEAAAFgAAACgAAAAgAAAAQAAAAAEAIAAAAAAAABAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAFlNUABZTVAAWU1QAFlNUABZTVAAWU1QAFlNUABZTVAAWU1QAFlN
|
||||
UABZTVAAWU1QAFlNUABZTVAAWU1QAFlNUABZTVAAWU1QAFlNUABZT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AAAAAVklRAFlNUABZTVA7WU1QwlhMT+BYTE/gWExP4FhM
|
||||
T+BYTE/gWExP4FlNUMJZTVA7WU1QAFZKUgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABYTFEAWE1QAFlNUABZTVAPWU1QH1lN
|
||||
UB9ZTVAfWU1QH1lNUB9ZTVAfWU1QD1lNUABYTFEAWExRAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABZTVAAWE1QAFlN
|
||||
UABZTVAAWU1QAFlNUABZTVAAWU1QAFlNUABZTVAAWU1QAFlNUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAA+AAAH/AAAA/gAAAH4AAAB+AAAAfgAAAH4AAAB+AAAAfgAAAH4AAAB+AA
|
||||
AAfgAAAH4AAAB+AAAAfgAAAH4AAAB+AAAAfgAAAH4AAAB+AAAAfgAAAH4AAAB+AAAAfgAAAH4AAAB+AA
|
||||
AAfgAAAH8AAAD/gAAB//gAH//4AB///AA/8=
|
||||
</value>
|
||||
</data>
|
||||
</root>
|
||||
Generated
+86
@@ -0,0 +1,86 @@
|
||||
namespace JY.Inspection.Frm
|
||||
{
|
||||
partial class FrmTest
|
||||
{
|
||||
/// <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.btn_readCollectItemCfg = new MetroFramework.Controls.MetroButton();
|
||||
this.btn_stationExit = new MetroFramework.Controls.MetroButton();
|
||||
this.btn_stationArrival = new MetroFramework.Controls.MetroButton();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// btn_readCollectItemCfg
|
||||
//
|
||||
this.btn_readCollectItemCfg.Location = new System.Drawing.Point(87, 127);
|
||||
this.btn_readCollectItemCfg.Name = "btn_readCollectItemCfg";
|
||||
this.btn_readCollectItemCfg.Size = new System.Drawing.Size(125, 53);
|
||||
this.btn_readCollectItemCfg.TabIndex = 0;
|
||||
this.btn_readCollectItemCfg.Text = "读取采集项配置";
|
||||
this.btn_readCollectItemCfg.UseSelectable = true;
|
||||
this.btn_readCollectItemCfg.Click += new System.EventHandler(this.btn_readCollectItemCfg_Click);
|
||||
//
|
||||
// btn_stationExit
|
||||
//
|
||||
this.btn_stationExit.Location = new System.Drawing.Point(426, 127);
|
||||
this.btn_stationExit.Name = "btn_stationExit";
|
||||
this.btn_stationExit.Size = new System.Drawing.Size(125, 53);
|
||||
this.btn_stationExit.TabIndex = 1;
|
||||
this.btn_stationExit.Text = "电池出站";
|
||||
this.btn_stationExit.UseSelectable = true;
|
||||
this.btn_stationExit.Click += new System.EventHandler(this.btn_stationArrival_Click);
|
||||
//
|
||||
// btn_stationArrival
|
||||
//
|
||||
this.btn_stationArrival.Location = new System.Drawing.Point(263, 127);
|
||||
this.btn_stationArrival.Name = "btn_stationArrival";
|
||||
this.btn_stationArrival.Size = new System.Drawing.Size(125, 53);
|
||||
this.btn_stationArrival.TabIndex = 2;
|
||||
this.btn_stationArrival.Text = "电池进站";
|
||||
this.btn_stationArrival.UseSelectable = true;
|
||||
this.btn_stationArrival.Click += new System.EventHandler(this.btn_stationArrival_Click_1);
|
||||
//
|
||||
// FrmTest
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(998, 586);
|
||||
this.Controls.Add(this.btn_stationArrival);
|
||||
this.Controls.Add(this.btn_stationExit);
|
||||
this.Controls.Add(this.btn_readCollectItemCfg);
|
||||
this.Name = "FrmTest";
|
||||
this.Text = "FrmTest";
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private MetroFramework.Controls.MetroButton btn_readCollectItemCfg;
|
||||
private MetroFramework.Controls.MetroButton btn_stationExit;
|
||||
private MetroFramework.Controls.MetroButton btn_stationArrival;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
using JY.Model.Excel;
|
||||
using JY.Utility;
|
||||
using MetroFramework.Forms;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace JY.Inspection.Frm
|
||||
{
|
||||
public partial class FrmTest : MetroForm
|
||||
{
|
||||
public FrmTest()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void btn_readCollectItemCfg_Click(object sender, EventArgs e)
|
||||
{
|
||||
string fileName = @"Config/采集项参照表.xlsx";
|
||||
//string fileName = @"Config/Device.xlsx";
|
||||
List<CollectItemCfg> list = ExcelImporter.Import<CollectItemCfg>(fileName);
|
||||
}
|
||||
|
||||
private void btn_stationArrival_Click(object sender, EventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
MessageBox.Show(ex.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
private void btn_stationArrival_Click_1(object sender, EventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
MessageBox.Show(ex.ToString());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,120 @@
|
||||
<?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>
|
||||
</root>
|
||||
@@ -0,0 +1,36 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace JY.Inspection
|
||||
{
|
||||
class ListViewBuff: MetroFramework.Controls.MetroListView
|
||||
{
|
||||
public ListViewBuff()
|
||||
{
|
||||
this.SetStyle( //设置控件的样式和行为
|
||||
ControlStyles.DoubleBuffer | //绘制在缓冲区中进行,完成后将结果输出到屏幕上。双重缓冲区可防止由控件重绘引起的闪烁
|
||||
ControlStyles.OptimizedDoubleBuffer | //控件首先在缓冲区中绘制,而不是直接绘制到屏幕上,这样可以减少闪烁
|
||||
ControlStyles.AllPaintingInWmPaint, true); //控件将忽略WM_ERASEBKGND(当窗口背景必须被擦除时 例如窗口改变大小时)窗口消息以减少闪烁
|
||||
UpdateStyles(); //更新控件的样式和行为
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// GridView
|
||||
/// </summary>
|
||||
class GridViewBuff : MetroFramework.Controls.MetroGrid
|
||||
{
|
||||
public GridViewBuff()
|
||||
{
|
||||
this.SetStyle( //设置控件的样式和行为
|
||||
ControlStyles.DoubleBuffer | //绘制在缓冲区中进行,完成后将结果输出到屏幕上。双重缓冲区可防止由控件重绘引起的闪烁
|
||||
ControlStyles.OptimizedDoubleBuffer | //控件首先在缓冲区中绘制,而不是直接绘制到屏幕上,这样可以减少闪烁
|
||||
ControlStyles.AllPaintingInWmPaint, true); //控件将忽略WM_ERASEBKGND(当窗口背景必须被擦除时 例如窗口改变大小时)窗口消息以减少闪烁
|
||||
UpdateStyles(); //更新控件的样式和行为
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,131 @@
|
||||
using System;
|
||||
using System.Windows.Forms;
|
||||
using JY.Inspection.Common;
|
||||
using JY.Utility;
|
||||
using MetroFramework.Forms;
|
||||
|
||||
namespace JY.Inspection.Frm
|
||||
{
|
||||
public delegate void SendLoginIN(User user);
|
||||
public partial class LoginForm : MetroForm
|
||||
{
|
||||
public SendLoginIN sendLogin;
|
||||
|
||||
private int loginFailedCount = 0;
|
||||
public LoginForm()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
pLogin_card.Location = new System.Drawing.Point(81, 282);
|
||||
|
||||
chkIsSK.CheckedChanged += chkIsSK_CheckedChanged;
|
||||
txtPassword2.KeyUp += txtPassWord_KeyUp;
|
||||
txtPassword2.KeyDown += txtPassword2_KeyDown;
|
||||
btLogin.Click += btLogin_Click;
|
||||
}
|
||||
|
||||
private void LoginForm_Load(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
chkIsSK.Checked = IniFileHelper.ReadIniData("SYSTEM_CONFIGURE", "IsSK") == "1" ? true : false;
|
||||
chkIsSK_CheckedChanged(null, null);
|
||||
//loginFailedCount = 0;
|
||||
//txtPassWord.Focus();
|
||||
//txtPassWord.Text = null;
|
||||
//lblICCard.Visible = txtPassword2.Visible = true;
|
||||
//btLogin.Visible = pLogin_pwd.Visible = false;
|
||||
}
|
||||
|
||||
private void txtPassWord_KeyUp(object sender, KeyEventArgs e)
|
||||
{
|
||||
|
||||
DateTime _tempDt = DateTime.Now;
|
||||
TimeSpan ts = _tempDt.Subtract(_dt);
|
||||
if (ts.Milliseconds > 100)
|
||||
{
|
||||
|
||||
txtPassword2.Text = "";//清空
|
||||
}
|
||||
else
|
||||
{
|
||||
if (e.KeyCode == Keys.Enter)
|
||||
{
|
||||
|
||||
if (txtPassword2.Text == string.Empty)
|
||||
{
|
||||
txtPassword2.Focus();
|
||||
MessageBox.Show("IC卡号为空", "系统提示");
|
||||
return;
|
||||
}
|
||||
UserHelper helper = new UserHelper("");
|
||||
string strErr = "";
|
||||
var res = helper.CheckUserLogin("user.pt", "", txtPassword2.Text.Trim(), ref strErr);
|
||||
if (res == null)
|
||||
{
|
||||
txtPassword2.Text = "";
|
||||
txtPassword2.Focus();
|
||||
MessageBox.Show("IC卡号不正确" + strErr, "系统提示");
|
||||
return;
|
||||
}
|
||||
sendLogin(res);
|
||||
|
||||
this.Close();
|
||||
}
|
||||
}
|
||||
}
|
||||
private void btLogin_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
if (string.IsNullOrEmpty(txtUserID.Text) | string.IsNullOrEmpty(txtPassWord.Text))
|
||||
{
|
||||
txtUserID.Focus();
|
||||
MessageBox.Show("用户名或密码为空", "系统提示");
|
||||
return;
|
||||
}
|
||||
UserHelper helper = new UserHelper("");
|
||||
string strErr = "";
|
||||
var res = helper.CheckUserLogin("user.pt", txtUserID.Text.Trim(), txtPassWord.Text.Trim(), ref strErr);
|
||||
if (res == null)
|
||||
{
|
||||
txtPassWord.Focus();
|
||||
loginFailedCount++;
|
||||
MessageBox.Show($"用户名或密码不正确,登录失败({loginFailedCount})次!", "系统提示");
|
||||
return;
|
||||
}
|
||||
|
||||
sendLogin(res);
|
||||
this.Close();
|
||||
}
|
||||
|
||||
private void btExit_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.Close();
|
||||
}
|
||||
|
||||
|
||||
private void chkIsSK_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
//IniFileHelper.WriteIniData("SYSTEM_CONFIGURE", "IsSK", chkIsSK.Checked ? "1" : "0");
|
||||
//lblICCard.Visible = txtPassword2.Visible = chkIsSK.Checked;
|
||||
//btLogin.Visible = pLogin_pwd.Visible = !chkIsSK.Checked;
|
||||
//lblICCard.Visible = txtPassword2.Visible = true;
|
||||
//btLogin.Visible = pLogin.Visible = false;
|
||||
if (chkIsSK.Checked)
|
||||
{
|
||||
pLogin_card.Visible = true;
|
||||
pLogin_pwd.Visible = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
pLogin_pwd.Visible = true;
|
||||
pLogin_card.Visible = false;
|
||||
}
|
||||
|
||||
}
|
||||
//定义输入时间变量
|
||||
private DateTime _dt;
|
||||
private void txtPassword2_KeyDown(object sender, KeyEventArgs e)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
Generated
+294
@@ -0,0 +1,294 @@
|
||||
|
||||
namespace JY.Inspection.Frm
|
||||
{
|
||||
partial class LoginForm
|
||||
{
|
||||
/// <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()
|
||||
{
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(LoginForm));
|
||||
this.chkIsSK = new MetroFramework.Controls.MetroCheckBox();
|
||||
this.btExit = new MetroFramework.Controls.MetroButton();
|
||||
this.btLogin = new MetroFramework.Controls.MetroButton();
|
||||
this.pictureBox1 = new System.Windows.Forms.PictureBox();
|
||||
this.txtUserID = new MetroFramework.Controls.MetroTextBox();
|
||||
this.txtPassWord = new MetroFramework.Controls.MetroTextBox();
|
||||
this.metroLabel1 = new MetroFramework.Controls.MetroLabel();
|
||||
this.metroLabel3 = new MetroFramework.Controls.MetroLabel();
|
||||
this.pLogin_pwd = new System.Windows.Forms.Panel();
|
||||
this.pLogin_card = new System.Windows.Forms.Panel();
|
||||
this.lblICCard = new MetroFramework.Controls.MetroLabel();
|
||||
this.txtPassword2 = new MetroFramework.Controls.MetroTextBox();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
|
||||
this.pLogin_pwd.SuspendLayout();
|
||||
this.pLogin_card.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// chkIsSK
|
||||
//
|
||||
this.chkIsSK.AutoSize = true;
|
||||
this.chkIsSK.Location = new System.Drawing.Point(237, 390);
|
||||
this.chkIsSK.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
|
||||
this.chkIsSK.Name = "chkIsSK";
|
||||
this.chkIsSK.Size = new System.Drawing.Size(168, 17);
|
||||
this.chkIsSK.TabIndex = 20;
|
||||
this.chkIsSK.Text = "是否启用刷卡模式?";
|
||||
this.chkIsSK.UseSelectable = true;
|
||||
//
|
||||
// btExit
|
||||
//
|
||||
this.btExit.Location = new System.Drawing.Point(279, 428);
|
||||
this.btExit.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
|
||||
this.btExit.Name = "btExit";
|
||||
this.btExit.Size = new System.Drawing.Size(127, 46);
|
||||
this.btExit.TabIndex = 22;
|
||||
this.btExit.Text = "退 出";
|
||||
this.btExit.UseSelectable = true;
|
||||
this.btExit.Click += new System.EventHandler(this.btExit_Click);
|
||||
//
|
||||
// btLogin
|
||||
//
|
||||
this.btLogin.Location = new System.Drawing.Point(81, 428);
|
||||
this.btLogin.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
|
||||
this.btLogin.Name = "btLogin";
|
||||
this.btLogin.Size = new System.Drawing.Size(127, 46);
|
||||
this.btLogin.TabIndex = 21;
|
||||
this.btLogin.Text = "登 录";
|
||||
this.btLogin.UseSelectable = true;
|
||||
//
|
||||
// pictureBox1
|
||||
//
|
||||
this.pictureBox1.Image = global::JY.Inspection.Properties.Resources.登录;
|
||||
this.pictureBox1.Location = new System.Drawing.Point(153, 55);
|
||||
this.pictureBox1.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
|
||||
this.pictureBox1.Name = "pictureBox1";
|
||||
this.pictureBox1.Size = new System.Drawing.Size(168, 165);
|
||||
this.pictureBox1.TabIndex = 18;
|
||||
this.pictureBox1.TabStop = false;
|
||||
//
|
||||
// txtUserID
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
this.txtUserID.CustomButton.Image = null;
|
||||
this.txtUserID.CustomButton.Location = new System.Drawing.Point(236, 1);
|
||||
this.txtUserID.CustomButton.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
|
||||
this.txtUserID.CustomButton.Name = "";
|
||||
this.txtUserID.CustomButton.Size = new System.Drawing.Size(36, 34);
|
||||
this.txtUserID.CustomButton.Style = MetroFramework.MetroColorStyle.Blue;
|
||||
this.txtUserID.CustomButton.TabIndex = 1;
|
||||
this.txtUserID.CustomButton.Theme = MetroFramework.MetroThemeStyle.Light;
|
||||
this.txtUserID.CustomButton.UseSelectable = true;
|
||||
this.txtUserID.CustomButton.Visible = false;
|
||||
this.txtUserID.Lines = new string[] {
|
||||
"Admin"};
|
||||
this.txtUserID.Location = new System.Drawing.Point(108, 16);
|
||||
this.txtUserID.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
|
||||
this.txtUserID.MaxLength = 32767;
|
||||
this.txtUserID.Name = "txtUserID";
|
||||
this.txtUserID.PasswordChar = '\0';
|
||||
this.txtUserID.PromptText = "请输入员工号";
|
||||
this.txtUserID.ScrollBars = System.Windows.Forms.ScrollBars.None;
|
||||
this.txtUserID.SelectedText = "";
|
||||
this.txtUserID.SelectionLength = 0;
|
||||
this.txtUserID.SelectionStart = 0;
|
||||
this.txtUserID.ShortcutsEnabled = true;
|
||||
this.txtUserID.Size = new System.Drawing.Size(205, 29);
|
||||
this.txtUserID.TabIndex = 0;
|
||||
this.txtUserID.Text = "Admin";
|
||||
this.txtUserID.UseSelectable = true;
|
||||
this.txtUserID.WaterMark = "请输入员工号";
|
||||
this.txtUserID.WaterMarkColor = System.Drawing.Color.FromArgb(((int)(((byte)(109)))), ((int)(((byte)(109)))), ((int)(((byte)(109)))));
|
||||
this.txtUserID.WaterMarkFont = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Pixel);
|
||||
//
|
||||
// txtPassWord
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
this.txtPassWord.CustomButton.Image = null;
|
||||
this.txtPassWord.CustomButton.Location = new System.Drawing.Point(236, 1);
|
||||
this.txtPassWord.CustomButton.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
|
||||
this.txtPassWord.CustomButton.Name = "";
|
||||
this.txtPassWord.CustomButton.Size = new System.Drawing.Size(36, 34);
|
||||
this.txtPassWord.CustomButton.Style = MetroFramework.MetroColorStyle.Blue;
|
||||
this.txtPassWord.CustomButton.TabIndex = 1;
|
||||
this.txtPassWord.CustomButton.Theme = MetroFramework.MetroThemeStyle.Light;
|
||||
this.txtPassWord.CustomButton.UseSelectable = true;
|
||||
this.txtPassWord.CustomButton.Visible = false;
|
||||
this.txtPassWord.Lines = new string[] {
|
||||
"Admin"};
|
||||
this.txtPassWord.Location = new System.Drawing.Point(108, 60);
|
||||
this.txtPassWord.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
|
||||
this.txtPassWord.MaxLength = 32767;
|
||||
this.txtPassWord.Name = "txtPassWord";
|
||||
this.txtPassWord.PasswordChar = '*';
|
||||
this.txtPassWord.PromptText = "请输入密码";
|
||||
this.txtPassWord.ScrollBars = System.Windows.Forms.ScrollBars.None;
|
||||
this.txtPassWord.SelectedText = "";
|
||||
this.txtPassWord.SelectionLength = 0;
|
||||
this.txtPassWord.SelectionStart = 0;
|
||||
this.txtPassWord.ShortcutsEnabled = true;
|
||||
this.txtPassWord.Size = new System.Drawing.Size(205, 29);
|
||||
this.txtPassWord.TabIndex = 1;
|
||||
this.txtPassWord.Text = "Admin";
|
||||
this.txtPassWord.UseSelectable = true;
|
||||
this.txtPassWord.WaterMark = "请输入密码";
|
||||
this.txtPassWord.WaterMarkColor = System.Drawing.Color.FromArgb(((int)(((byte)(109)))), ((int)(((byte)(109)))), ((int)(((byte)(109)))));
|
||||
this.txtPassWord.WaterMarkFont = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Pixel);
|
||||
//
|
||||
// metroLabel1
|
||||
//
|
||||
this.metroLabel1.AutoSize = true;
|
||||
this.metroLabel1.Location = new System.Drawing.Point(12, 66);
|
||||
this.metroLabel1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
|
||||
this.metroLabel1.Name = "metroLabel1";
|
||||
this.metroLabel1.Size = new System.Drawing.Size(54, 20);
|
||||
this.metroLabel1.TabIndex = 11;
|
||||
this.metroLabel1.Text = "密码:";
|
||||
//
|
||||
// metroLabel3
|
||||
//
|
||||
this.metroLabel3.AutoSize = true;
|
||||
this.metroLabel3.Location = new System.Drawing.Point(12, 22);
|
||||
this.metroLabel3.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
|
||||
this.metroLabel3.Name = "metroLabel3";
|
||||
this.metroLabel3.Size = new System.Drawing.Size(69, 20);
|
||||
this.metroLabel3.TabIndex = 10;
|
||||
this.metroLabel3.Text = "员工号:";
|
||||
//
|
||||
// pLogin_pwd
|
||||
//
|
||||
this.pLogin_pwd.Controls.Add(this.txtUserID);
|
||||
this.pLogin_pwd.Controls.Add(this.txtPassWord);
|
||||
this.pLogin_pwd.Controls.Add(this.metroLabel1);
|
||||
this.pLogin_pwd.Controls.Add(this.metroLabel3);
|
||||
this.pLogin_pwd.Location = new System.Drawing.Point(81, 278);
|
||||
this.pLogin_pwd.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
|
||||
this.pLogin_pwd.Name = "pLogin_pwd";
|
||||
this.pLogin_pwd.Size = new System.Drawing.Size(333, 94);
|
||||
this.pLogin_pwd.TabIndex = 26;
|
||||
//
|
||||
// pLogin_card
|
||||
//
|
||||
this.pLogin_card.Controls.Add(this.lblICCard);
|
||||
this.pLogin_card.Controls.Add(this.txtPassword2);
|
||||
this.pLogin_card.Location = new System.Drawing.Point(81, 207);
|
||||
this.pLogin_card.Name = "pLogin_card";
|
||||
this.pLogin_card.Size = new System.Drawing.Size(333, 50);
|
||||
this.pLogin_card.TabIndex = 27;
|
||||
//
|
||||
// lblICCard
|
||||
//
|
||||
this.lblICCard.AutoSize = true;
|
||||
this.lblICCard.Location = new System.Drawing.Point(12, 24);
|
||||
this.lblICCard.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
|
||||
this.lblICCard.Name = "lblICCard";
|
||||
this.lblICCard.Size = new System.Drawing.Size(51, 20);
|
||||
this.lblICCard.TabIndex = 25;
|
||||
this.lblICCard.Text = "IC卡:";
|
||||
//
|
||||
// txtPassword2
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
this.txtPassword2.CustomButton.Image = null;
|
||||
this.txtPassword2.CustomButton.Location = new System.Drawing.Point(177, 1);
|
||||
this.txtPassword2.CustomButton.Margin = new System.Windows.Forms.Padding(4);
|
||||
this.txtPassword2.CustomButton.Name = "";
|
||||
this.txtPassword2.CustomButton.Size = new System.Drawing.Size(27, 27);
|
||||
this.txtPassword2.CustomButton.Style = MetroFramework.MetroColorStyle.Blue;
|
||||
this.txtPassword2.CustomButton.TabIndex = 1;
|
||||
this.txtPassword2.CustomButton.Theme = MetroFramework.MetroThemeStyle.Light;
|
||||
this.txtPassword2.CustomButton.UseSelectable = true;
|
||||
this.txtPassword2.CustomButton.Visible = false;
|
||||
this.txtPassword2.Lines = new string[0];
|
||||
this.txtPassword2.Location = new System.Drawing.Point(105, 17);
|
||||
this.txtPassword2.Margin = new System.Windows.Forms.Padding(4);
|
||||
this.txtPassword2.MaxLength = 32767;
|
||||
this.txtPassword2.Name = "txtPassword2";
|
||||
this.txtPassword2.PasswordChar = '*';
|
||||
this.txtPassword2.PromptText = "请刷卡";
|
||||
this.txtPassword2.ScrollBars = System.Windows.Forms.ScrollBars.None;
|
||||
this.txtPassword2.SelectedText = "";
|
||||
this.txtPassword2.SelectionLength = 0;
|
||||
this.txtPassword2.SelectionStart = 0;
|
||||
this.txtPassword2.ShortcutsEnabled = true;
|
||||
this.txtPassword2.Size = new System.Drawing.Size(205, 29);
|
||||
this.txtPassword2.TabIndex = 24;
|
||||
this.txtPassword2.UseSelectable = true;
|
||||
this.txtPassword2.WaterMark = "请刷卡";
|
||||
this.txtPassword2.WaterMarkColor = System.Drawing.Color.FromArgb(((int)(((byte)(109)))), ((int)(((byte)(109)))), ((int)(((byte)(109)))));
|
||||
this.txtPassword2.WaterMarkFont = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Pixel);
|
||||
//
|
||||
// LoginForm
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(472, 529);
|
||||
this.Controls.Add(this.pLogin_pwd);
|
||||
this.Controls.Add(this.pLogin_card);
|
||||
this.Controls.Add(this.chkIsSK);
|
||||
this.Controls.Add(this.btExit);
|
||||
this.Controls.Add(this.btLogin);
|
||||
this.Controls.Add(this.pictureBox1);
|
||||
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||||
this.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
|
||||
this.MaximizeBox = false;
|
||||
this.MinimizeBox = false;
|
||||
this.Name = "LoginForm";
|
||||
this.Padding = new System.Windows.Forms.Padding(27, 75, 27, 25);
|
||||
this.Resizable = false;
|
||||
this.Text = "登录";
|
||||
this.Load += new System.EventHandler(this.LoginForm_Load);
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
|
||||
this.pLogin_pwd.ResumeLayout(false);
|
||||
this.pLogin_pwd.PerformLayout();
|
||||
this.pLogin_card.ResumeLayout(false);
|
||||
this.pLogin_card.PerformLayout();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private MetroFramework.Controls.MetroCheckBox chkIsSK;
|
||||
private MetroFramework.Controls.MetroButton btExit;
|
||||
private MetroFramework.Controls.MetroButton btLogin;
|
||||
private System.Windows.Forms.PictureBox pictureBox1;
|
||||
private MetroFramework.Controls.MetroTextBox txtUserID;
|
||||
private MetroFramework.Controls.MetroTextBox txtPassWord;
|
||||
private MetroFramework.Controls.MetroLabel metroLabel1;
|
||||
private MetroFramework.Controls.MetroLabel metroLabel3;
|
||||
private System.Windows.Forms.Panel pLogin_pwd;
|
||||
private System.Windows.Forms.Panel pLogin_card;
|
||||
private MetroFramework.Controls.MetroLabel lblICCard;
|
||||
private MetroFramework.Controls.MetroTextBox txtPassword2;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,197 @@
|
||||
<?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.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
AAABAAEAICAAAAEAIACoEAAAFgAAACgAAAAgAAAAQAAAAAEAIAAAAAAAABAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAFlNUABZTVAAWU1QAFlNUABZTVAAWU1QAFlNUABZTVAAWU1QAFlN
|
||||
UABZTVAAWU1QAFlNUABZTVAAWU1QAFlNUABZTVAAWU1QAFlNUABZTVAAWU1QAFlNUAAAA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VA7WU1QwlhMT+BYTE/gWExP4FhM
|
||||
T+BYTE/gWExP4FlNUMJZTVA7WU1QAFZKUgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABYTFEAWE1QAFlNUABZTVAPWU1QH1lN
|
||||
UB9ZTVAfWU1QH1lNUB9ZTVAfWU1QD1lNUABYTFEAWExRAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABZTVAAWE1QAFlN
|
||||
UABZTVAAWU1QAFlNUABZTVAAWU1QAFlNUABZTVAAWU1QAFlNUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAA+AAAH/AAAA/gAAAH4AAAB+AAAAfgAAAH4AAAB+AAAAfgAAAH4AAAB+AA
|
||||
AAfgAAAH4AAAB+AAAAfgAAAH4AAAB+AAAAfgAAAH4AAAB+AAAAfgAAAH4AAAB+AAAAfgAAAH4AAAB+AA
|
||||
AAfgAAAH8AAAD/gAAB//gAH//4AB///AA/8=
|
||||
</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -0,0 +1,207 @@
|
||||
using JY.Inspection.Common;
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace JY.Inspection.Frm
|
||||
{
|
||||
public partial class SetForm : MetroFramework.Forms.MetroForm
|
||||
{
|
||||
UserHelper helper = new UserHelper("");
|
||||
List<User> ListUser = new List<User>();
|
||||
DataTable dt = new DataTable();
|
||||
public SetForm()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
if (File.Exists("user.pt"))
|
||||
{
|
||||
ListUser = helper.DeSerializedUser("user.pt");
|
||||
ShowUserList(ListUser);
|
||||
}
|
||||
}
|
||||
|
||||
private void SetForm_Load(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public void ShowUserList(List<User> List)
|
||||
{
|
||||
|
||||
List<User> UpList = new List<User>();
|
||||
for (int i = 0; i < List.Count; i++)
|
||||
{
|
||||
if (i>0)
|
||||
{
|
||||
UpList.Add(List[i]);
|
||||
}
|
||||
}
|
||||
dgvManger.DataSource = null;
|
||||
dgvManger.DataSource = UpList;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <typeparam name="T"></typeparam>
|
||||
/// <param name="collection"></param>
|
||||
/// <returns></returns>
|
||||
public static DataTable ToDataTable<T>(IEnumerable<T> collection)
|
||||
{
|
||||
var props = typeof(T).GetProperties();
|
||||
var dt = new DataTable();
|
||||
dt.Columns.AddRange(props.Select(p => new DataColumn(p.Name, p.PropertyType)).ToArray());
|
||||
if (collection.Count() > 0)
|
||||
{
|
||||
for (int i = 0; i < collection.Count(); i++)
|
||||
{
|
||||
ArrayList tempList = new ArrayList();
|
||||
foreach (PropertyInfo pi in props)
|
||||
{
|
||||
object obj = pi.GetValue(collection.ElementAt(i), null);
|
||||
tempList.Add(obj);
|
||||
}
|
||||
object[] array = tempList.ToArray();
|
||||
dt.LoadDataRow(array, true);
|
||||
}
|
||||
}
|
||||
return dt;
|
||||
}
|
||||
|
||||
private User GetUser(List<User> list)
|
||||
{
|
||||
if (txtUser.Text == string.Empty | txtPassWord.Text == string.Empty)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
User user = new User();
|
||||
user.Index = list[list.Count - 1].Index + 1;
|
||||
user.UserName = txtUser.Text;
|
||||
user.PassWord = txtPassWord.Text;
|
||||
switch (cmbLevel.SelectedIndex)
|
||||
{
|
||||
case 0:
|
||||
user.Level = Autuority.管理员;
|
||||
break;
|
||||
case 1:
|
||||
user.Level = Autuority.工程师;
|
||||
break;
|
||||
case 2:
|
||||
user.Level = Autuority.操作员;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return user;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取表格选中行单元格数据
|
||||
/// </summary>
|
||||
private void SetUser()
|
||||
{
|
||||
DataGridViewSelectedRowCollection rowCollection = dgvManger.SelectedRows;
|
||||
if (rowCollection.Count == 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
DataGridViewRow row = rowCollection[0];
|
||||
txtUser.Text = row.Cells[1].Value.ToString();
|
||||
txtPassWord.Text = row.Cells[2].Value.ToString();
|
||||
switch (row.Cells[3].Value.ToString())
|
||||
{
|
||||
case "管理员":
|
||||
cmbLevel.SelectedIndex = 0;
|
||||
break;
|
||||
case "工程师":
|
||||
cmbLevel.SelectedIndex = 1;
|
||||
break;
|
||||
case "操作员":
|
||||
cmbLevel.SelectedIndex = 2;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加用户
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void btAdd_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
|
||||
User user = GetUser(ListUser);
|
||||
var res = helper.AddUser("user.pt", ListUser, user);
|
||||
if (res)
|
||||
{
|
||||
MessageBox.Show("添加成功");
|
||||
ShowUserList(ListUser);
|
||||
}
|
||||
else if (user == null)
|
||||
{
|
||||
MessageBox.Show("添加内容为空");
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
MessageBox.Show("添加失败");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 删除用户
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void btDelete_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
var res = helper.DeleteUser("user.pt", ListUser, txtUser.Text);
|
||||
if (res)
|
||||
{
|
||||
MessageBox.Show("删除成功");
|
||||
ShowUserList(ListUser);
|
||||
}
|
||||
else
|
||||
{
|
||||
MessageBox.Show("删除失败");
|
||||
}
|
||||
}
|
||||
|
||||
private void dgvManger_SelectionChanged(object sender, EventArgs e)
|
||||
{
|
||||
SetUser();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 编辑用户
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void btEdit_Click(object sender, EventArgs e)
|
||||
{
|
||||
User user = GetUser(ListUser);
|
||||
var res = helper.EditUser("user.pt", ListUser, user);
|
||||
if (res)
|
||||
{
|
||||
MessageBox.Show("修改成功");
|
||||
ShowUserList(ListUser);
|
||||
}
|
||||
else
|
||||
{
|
||||
MessageBox.Show("修改失败");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
Generated
+270
@@ -0,0 +1,270 @@
|
||||
|
||||
namespace JY.Inspection.Frm
|
||||
{
|
||||
partial class SetForm
|
||||
{
|
||||
/// <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()
|
||||
{
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(SetForm));
|
||||
this.dgvManger = new System.Windows.Forms.DataGridView();
|
||||
this.txtUser = new MetroFramework.Controls.MetroTextBox();
|
||||
this.txtPassWord = new MetroFramework.Controls.MetroTextBox();
|
||||
this.cmbLevel = new MetroFramework.Controls.MetroComboBox();
|
||||
this.metroLabel1 = new MetroFramework.Controls.MetroLabel();
|
||||
this.metroLabel2 = new MetroFramework.Controls.MetroLabel();
|
||||
this.metroLabel3 = new MetroFramework.Controls.MetroLabel();
|
||||
this.btAdd = new MetroFramework.Controls.MetroButton();
|
||||
this.btDelete = new MetroFramework.Controls.MetroButton();
|
||||
this.btEdit = new MetroFramework.Controls.MetroButton();
|
||||
this.metroTabControl1 = new MetroFramework.Controls.MetroTabControl();
|
||||
this.metroTabPage1 = new MetroFramework.Controls.MetroTabPage();
|
||||
((System.ComponentModel.ISupportInitialize)(this.dgvManger)).BeginInit();
|
||||
this.metroTabControl1.SuspendLayout();
|
||||
this.metroTabPage1.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// dgvManger
|
||||
//
|
||||
this.dgvManger.AllowUserToAddRows = false;
|
||||
this.dgvManger.AllowUserToDeleteRows = false;
|
||||
this.dgvManger.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill;
|
||||
this.dgvManger.BackgroundColor = System.Drawing.Color.White;
|
||||
this.dgvManger.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
||||
this.dgvManger.Location = new System.Drawing.Point(3, 12);
|
||||
this.dgvManger.Name = "dgvManger";
|
||||
this.dgvManger.ReadOnly = true;
|
||||
this.dgvManger.RowHeadersWidth = 51;
|
||||
this.dgvManger.RowTemplate.Height = 23;
|
||||
this.dgvManger.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
|
||||
this.dgvManger.Size = new System.Drawing.Size(472, 469);
|
||||
this.dgvManger.TabIndex = 0;
|
||||
this.dgvManger.SelectionChanged += new System.EventHandler(this.dgvManger_SelectionChanged);
|
||||
//
|
||||
// txtUser
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
this.txtUser.CustomButton.Image = null;
|
||||
this.txtUser.CustomButton.Location = new System.Drawing.Point(107, 1);
|
||||
this.txtUser.CustomButton.Name = "";
|
||||
this.txtUser.CustomButton.Size = new System.Drawing.Size(16, 17);
|
||||
this.txtUser.CustomButton.Style = MetroFramework.MetroColorStyle.Blue;
|
||||
this.txtUser.CustomButton.TabIndex = 1;
|
||||
this.txtUser.CustomButton.Theme = MetroFramework.MetroThemeStyle.Light;
|
||||
this.txtUser.CustomButton.UseSelectable = true;
|
||||
this.txtUser.CustomButton.Visible = false;
|
||||
this.txtUser.Lines = new string[0];
|
||||
this.txtUser.Location = new System.Drawing.Point(566, 31);
|
||||
this.txtUser.MaxLength = 32767;
|
||||
this.txtUser.Name = "txtUser";
|
||||
this.txtUser.PasswordChar = '\0';
|
||||
this.txtUser.ScrollBars = System.Windows.Forms.ScrollBars.None;
|
||||
this.txtUser.SelectedText = "";
|
||||
this.txtUser.SelectionLength = 0;
|
||||
this.txtUser.SelectionStart = 0;
|
||||
this.txtUser.ShortcutsEnabled = true;
|
||||
this.txtUser.Size = new System.Drawing.Size(165, 23);
|
||||
this.txtUser.TabIndex = 1;
|
||||
this.txtUser.UseSelectable = true;
|
||||
this.txtUser.WaterMarkColor = System.Drawing.Color.FromArgb(((int)(((byte)(109)))), ((int)(((byte)(109)))), ((int)(((byte)(109)))));
|
||||
this.txtUser.WaterMarkFont = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Pixel);
|
||||
//
|
||||
// txtPassWord
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
this.txtPassWord.CustomButton.Image = null;
|
||||
this.txtPassWord.CustomButton.Location = new System.Drawing.Point(107, 1);
|
||||
this.txtPassWord.CustomButton.Name = "";
|
||||
this.txtPassWord.CustomButton.Size = new System.Drawing.Size(16, 17);
|
||||
this.txtPassWord.CustomButton.Style = MetroFramework.MetroColorStyle.Blue;
|
||||
this.txtPassWord.CustomButton.TabIndex = 1;
|
||||
this.txtPassWord.CustomButton.Theme = MetroFramework.MetroThemeStyle.Light;
|
||||
this.txtPassWord.CustomButton.UseSelectable = true;
|
||||
this.txtPassWord.CustomButton.Visible = false;
|
||||
this.txtPassWord.Lines = new string[0];
|
||||
this.txtPassWord.Location = new System.Drawing.Point(566, 89);
|
||||
this.txtPassWord.MaxLength = 32767;
|
||||
this.txtPassWord.Name = "txtPassWord";
|
||||
this.txtPassWord.PasswordChar = '\0';
|
||||
this.txtPassWord.ScrollBars = System.Windows.Forms.ScrollBars.None;
|
||||
this.txtPassWord.SelectedText = "";
|
||||
this.txtPassWord.SelectionLength = 0;
|
||||
this.txtPassWord.SelectionStart = 0;
|
||||
this.txtPassWord.ShortcutsEnabled = true;
|
||||
this.txtPassWord.Size = new System.Drawing.Size(165, 23);
|
||||
this.txtPassWord.TabIndex = 2;
|
||||
this.txtPassWord.UseSelectable = true;
|
||||
this.txtPassWord.WaterMarkColor = System.Drawing.Color.FromArgb(((int)(((byte)(109)))), ((int)(((byte)(109)))), ((int)(((byte)(109)))));
|
||||
this.txtPassWord.WaterMarkFont = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Pixel);
|
||||
//
|
||||
// cmbLevel
|
||||
//
|
||||
this.cmbLevel.FormattingEnabled = true;
|
||||
this.cmbLevel.ItemHeight = 23;
|
||||
this.cmbLevel.Items.AddRange(new object[] {
|
||||
"管理员",
|
||||
"工程师",
|
||||
"操作员"});
|
||||
this.cmbLevel.Location = new System.Drawing.Point(566, 147);
|
||||
this.cmbLevel.Name = "cmbLevel";
|
||||
this.cmbLevel.Size = new System.Drawing.Size(165, 29);
|
||||
this.cmbLevel.TabIndex = 3;
|
||||
this.cmbLevel.UseSelectable = true;
|
||||
//
|
||||
// metroLabel1
|
||||
//
|
||||
this.metroLabel1.AutoSize = true;
|
||||
this.metroLabel1.Location = new System.Drawing.Point(501, 31);
|
||||
this.metroLabel1.Name = "metroLabel1";
|
||||
this.metroLabel1.Size = new System.Drawing.Size(65, 19);
|
||||
this.metroLabel1.TabIndex = 4;
|
||||
this.metroLabel1.Text = "用户名:";
|
||||
//
|
||||
// metroLabel2
|
||||
//
|
||||
this.metroLabel2.AutoSize = true;
|
||||
this.metroLabel2.Location = new System.Drawing.Point(501, 92);
|
||||
this.metroLabel2.Name = "metroLabel2";
|
||||
this.metroLabel2.Size = new System.Drawing.Size(51, 19);
|
||||
this.metroLabel2.TabIndex = 5;
|
||||
this.metroLabel2.Text = "密码:";
|
||||
//
|
||||
// metroLabel3
|
||||
//
|
||||
this.metroLabel3.AutoSize = true;
|
||||
this.metroLabel3.Location = new System.Drawing.Point(501, 153);
|
||||
this.metroLabel3.Name = "metroLabel3";
|
||||
this.metroLabel3.Size = new System.Drawing.Size(51, 19);
|
||||
this.metroLabel3.TabIndex = 6;
|
||||
this.metroLabel3.Text = "权限:";
|
||||
//
|
||||
// btAdd
|
||||
//
|
||||
this.btAdd.Location = new System.Drawing.Point(491, 213);
|
||||
this.btAdd.Name = "btAdd";
|
||||
this.btAdd.Size = new System.Drawing.Size(75, 23);
|
||||
this.btAdd.TabIndex = 7;
|
||||
this.btAdd.Text = "添加";
|
||||
this.btAdd.UseSelectable = true;
|
||||
this.btAdd.Click += new System.EventHandler(this.btAdd_Click);
|
||||
//
|
||||
// btDelete
|
||||
//
|
||||
this.btDelete.Location = new System.Drawing.Point(580, 213);
|
||||
this.btDelete.Name = "btDelete";
|
||||
this.btDelete.Size = new System.Drawing.Size(75, 23);
|
||||
this.btDelete.TabIndex = 8;
|
||||
this.btDelete.Text = "删除";
|
||||
this.btDelete.UseSelectable = true;
|
||||
this.btDelete.Click += new System.EventHandler(this.btDelete_Click);
|
||||
//
|
||||
// btEdit
|
||||
//
|
||||
this.btEdit.Location = new System.Drawing.Point(669, 213);
|
||||
this.btEdit.Name = "btEdit";
|
||||
this.btEdit.Size = new System.Drawing.Size(75, 23);
|
||||
this.btEdit.TabIndex = 9;
|
||||
this.btEdit.Text = "编辑";
|
||||
this.btEdit.UseSelectable = true;
|
||||
this.btEdit.Click += new System.EventHandler(this.btEdit_Click);
|
||||
//
|
||||
// metroTabControl1
|
||||
//
|
||||
this.metroTabControl1.Controls.Add(this.metroTabPage1);
|
||||
this.metroTabControl1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.metroTabControl1.Location = new System.Drawing.Point(0, 30);
|
||||
this.metroTabControl1.Name = "metroTabControl1";
|
||||
this.metroTabControl1.SelectedIndex = 0;
|
||||
this.metroTabControl1.Size = new System.Drawing.Size(773, 535);
|
||||
this.metroTabControl1.TabIndex = 10;
|
||||
this.metroTabControl1.UseSelectable = true;
|
||||
//
|
||||
// metroTabPage1
|
||||
//
|
||||
this.metroTabPage1.Controls.Add(this.btEdit);
|
||||
this.metroTabPage1.Controls.Add(this.btDelete);
|
||||
this.metroTabPage1.Controls.Add(this.btAdd);
|
||||
this.metroTabPage1.Controls.Add(this.dgvManger);
|
||||
this.metroTabPage1.Controls.Add(this.metroLabel3);
|
||||
this.metroTabPage1.Controls.Add(this.txtUser);
|
||||
this.metroTabPage1.Controls.Add(this.metroLabel2);
|
||||
this.metroTabPage1.Controls.Add(this.txtPassWord);
|
||||
this.metroTabPage1.Controls.Add(this.metroLabel1);
|
||||
this.metroTabPage1.Controls.Add(this.cmbLevel);
|
||||
this.metroTabPage1.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.metroTabPage1.HorizontalScrollbarBarColor = true;
|
||||
this.metroTabPage1.HorizontalScrollbarHighlightOnWheel = false;
|
||||
this.metroTabPage1.HorizontalScrollbarSize = 10;
|
||||
this.metroTabPage1.Location = new System.Drawing.Point(4, 38);
|
||||
this.metroTabPage1.Name = "metroTabPage1";
|
||||
this.metroTabPage1.Size = new System.Drawing.Size(765, 493);
|
||||
this.metroTabPage1.TabIndex = 0;
|
||||
this.metroTabPage1.Text = "用户管理";
|
||||
this.metroTabPage1.VerticalScrollbarBarColor = true;
|
||||
this.metroTabPage1.VerticalScrollbarHighlightOnWheel = false;
|
||||
this.metroTabPage1.VerticalScrollbarSize = 10;
|
||||
//
|
||||
// SetForm
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(773, 565);
|
||||
this.Controls.Add(this.metroTabControl1);
|
||||
this.DisplayHeader = false;
|
||||
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||||
this.MaximizeBox = false;
|
||||
this.Name = "SetForm";
|
||||
this.Padding = new System.Windows.Forms.Padding(0, 30, 0, 0);
|
||||
this.Text = "用户管理";
|
||||
this.Load += new System.EventHandler(this.SetForm_Load);
|
||||
((System.ComponentModel.ISupportInitialize)(this.dgvManger)).EndInit();
|
||||
this.metroTabControl1.ResumeLayout(false);
|
||||
this.metroTabPage1.ResumeLayout(false);
|
||||
this.metroTabPage1.PerformLayout();
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.DataGridView dgvManger;
|
||||
private MetroFramework.Controls.MetroTextBox txtUser;
|
||||
private MetroFramework.Controls.MetroTextBox txtPassWord;
|
||||
private MetroFramework.Controls.MetroComboBox cmbLevel;
|
||||
private MetroFramework.Controls.MetroLabel metroLabel1;
|
||||
private MetroFramework.Controls.MetroLabel metroLabel2;
|
||||
private MetroFramework.Controls.MetroLabel metroLabel3;
|
||||
private MetroFramework.Controls.MetroButton btAdd;
|
||||
private MetroFramework.Controls.MetroButton btDelete;
|
||||
private MetroFramework.Controls.MetroButton btEdit;
|
||||
private MetroFramework.Controls.MetroTabControl metroTabControl1;
|
||||
private MetroFramework.Controls.MetroTabPage metroTabPage1;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,197 @@
|
||||
<?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.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
AAABAAEAICAAAAEAIACoEAAAFgAAACgAAAAgAAAAQAAAAAEAIAAAAAAAABAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAFlNUABZTVAAWU1QAFlNUABZTVAAWU1QAFlNUABZTVAAWU1QAFlN
|
||||
UABZTVAAWU1QAFlNUABZTVAAWU1QAFlNUABZTVAAWU1QAFlNUABZTVAAWU1QAFlNUAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABZTVAAWU1QAFpN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gAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABYTFEAWE1QAFlNUABZTVAPWU1QH1lN
|
||||
UB9ZTVAfWU1QH1lNUB9ZTVAfWU1QD1lNUABYTFEAWExRAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABZTVAAWE1QAFlN
|
||||
UABZTVAAWU1QAFlNUABZTVAAWU1QAFlNUABZTVAAWU1QAFlNUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAA+AAAH/AAAA/gAAAH4AAAB+AAAAfgAAAH4AAAB+AAAAfgAAAH4AAAB+AA
|
||||
AAfgAAAH4AAAB+AAAAfgAAAH4AAAB+AAAAfgAAAH4AAAB+AAAAfgAAAH4AAAB+AAAAfgAAAH4AAAB+AA
|
||||
AAfgAAAH8AAAD/gAAB//gAH//4AB///AA/8=
|
||||
</value>
|
||||
</data>
|
||||
</root>
|
||||
File diff suppressed because it is too large
Load Diff
Generated
+2453
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,492 @@
|
||||
<?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>{607AF967-65F7-483E-8BD9-2D92AD17D151}</ProjectGuid>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<RootNamespace>JY.Inspection</RootNamespace>
|
||||
<AssemblyName>JY.Inspection</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||
<Deterministic>true</Deterministic>
|
||||
<NuGetPackageImportStamp>
|
||||
</NuGetPackageImportStamp>
|
||||
<TargetFrameworkProfile />
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>..\..\..\..\JY.Inspection\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<StartupObject>JY.Inspection.Program</StartupObject>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup />
|
||||
<PropertyGroup>
|
||||
<ApplicationIcon>外观检测.ico</ApplicationIcon>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup />
|
||||
<PropertyGroup>
|
||||
<ApplicationManifest>appini.manifest</ApplicationManifest>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="BouncyCastle.Crypto, Version=1.8.9.0, Culture=neutral, PublicKeyToken=0e99375e54769942, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Portable.BouncyCastle.1.8.9\lib\net40\BouncyCastle.Crypto.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="CsvHelper, Version=30.0.0.0, Culture=neutral, PublicKeyToken=8c4959082be5c823, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\CsvHelper.30.0.1\lib\net45\CsvHelper.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="EPPlus, Version=8.0.8.0, Culture=neutral, PublicKeyToken=ea159fdaa78159a1, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\EPPlus.8.0.8\lib\net462\EPPlus.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="EPPlus.Interfaces, Version=8.0.0.0, Culture=neutral, PublicKeyToken=a694d7f3b0907a61, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\EPPlus.Interfaces.8.0.0\lib\net462\EPPlus.Interfaces.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="HslCommunication, Version=9.6.2.0, Culture=neutral, PublicKeyToken=cdb2261fa039ed67, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>Lib\HslCommunication.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="ICSharpCode.SharpZipLib, Version=1.4.2.13, Culture=neutral, PublicKeyToken=1b03e6acf1164f73, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\SharpZipLib.1.4.2\lib\netstandard2.0\ICSharpCode.SharpZipLib.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="log4net, Version=2.0.13.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\log4net.2.0.13\lib\net45\log4net.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="MetroFramework, Version=1.4.0.0, Culture=neutral, PublicKeyToken=5f91a84759bf584a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\MetroModernUI.1.4.0.0\lib\net\MetroFramework.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="MetroFramework.Design, Version=1.4.0.0, Culture=neutral, PublicKeyToken=5f91a84759bf584a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\MetroModernUI.1.4.0.0\lib\net\MetroFramework.Design.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="MetroFramework.Fonts, Version=1.4.0.0, Culture=neutral, PublicKeyToken=5f91a84759bf584a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\MetroModernUI.1.4.0.0\lib\net\MetroFramework.Fonts.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Bcl.AsyncInterfaces, Version=10.0.0.9, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.Bcl.AsyncInterfaces.10.0.9\lib\net462\Microsoft.Bcl.AsyncInterfaces.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Extensions.DependencyInjection, Version=10.0.0.9, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.Extensions.DependencyInjection.10.0.9\lib\net462\Microsoft.Extensions.DependencyInjection.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Extensions.DependencyInjection.Abstractions, Version=10.0.0.9, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.Extensions.DependencyInjection.Abstractions.10.0.9\lib\net462\Microsoft.Extensions.DependencyInjection.Abstractions.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.IO.RecyclableMemoryStream, Version=3.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.IO.RecyclableMemoryStream.3.0.1\lib\netstandard2.0\Microsoft.IO.RecyclableMemoryStream.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="MiniExcel, Version=1.36.1.0, Culture=neutral, PublicKeyToken=e7310002a53eac39, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\MiniExcel.1.36.1\lib\net45\MiniExcel.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Newtonsoft.Json.13.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="NModbus4, Version=2.1.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\NModbus4.2.1.0\lib\net40\NModbus4.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="NPOI, Version=2.5.5.0, Culture=neutral, PublicKeyToken=0df73ec7942b34e1, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\NPOI.2.5.5\lib\net45\NPOI.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="NPOI.OOXML, Version=2.5.5.0, Culture=neutral, PublicKeyToken=0df73ec7942b34e1, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\NPOI.2.5.5\lib\net45\NPOI.OOXML.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="NPOI.OpenXml4Net, Version=2.5.5.0, Culture=neutral, PublicKeyToken=0df73ec7942b34e1, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\NPOI.2.5.5\lib\net45\NPOI.OpenXml4Net.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="NPOI.OpenXmlFormats, Version=2.5.5.0, Culture=neutral, PublicKeyToken=0df73ec7942b34e1, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\NPOI.2.5.5\lib\net45\NPOI.OpenXmlFormats.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="PresentationCore" />
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Buffers, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Buffers.4.5.1\lib\net461\System.Buffers.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.ComponentModel.Annotations, Version=4.2.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.ComponentModel.Annotations.5.0.0\lib\net461\System.ComponentModel.Annotations.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.ComponentModel.DataAnnotations" />
|
||||
<Reference Include="System.Configuration" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Design" />
|
||||
<Reference Include="System.Drawing.Design" />
|
||||
<Reference Include="System.IO.Compression" />
|
||||
<Reference Include="System.Management" />
|
||||
<Reference Include="System.Memory, Version=4.0.1.2, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Memory.4.5.5\lib\net461\System.Memory.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Numerics" />
|
||||
<Reference Include="System.Numerics.Vectors, Version=4.1.4.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Numerics.Vectors.4.5.0\lib\net46\System.Numerics.Vectors.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Runtime.CompilerServices.Unsafe, Version=6.0.3.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Runtime.CompilerServices.Unsafe.6.1.2\lib\net462\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Security" />
|
||||
<Reference Include="System.Security.Cryptography.Xml, Version=8.0.0.2, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Security.Cryptography.Xml.8.0.2\lib\net462\System.Security.Cryptography.Xml.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Speech" />
|
||||
<Reference Include="System.Threading.Tasks.Extensions, Version=4.2.4.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Threading.Tasks.Extensions.4.6.3\lib\net462\System.Threading.Tasks.Extensions.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.ValueTuple, Version=4.0.1.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.ValueTuple.4.3.0\lib\netstandard1.0\System.ValueTuple.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Web" />
|
||||
<Reference Include="System.Windows.Forms.DataVisualization" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Deployment" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Net.Http" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
<Reference Include="System.Xml" />
|
||||
<Reference Include="WcleAnimationLibrary, Version=5.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>Lib\WcleAnimationLibrary.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="WinformControlLibraryExtension">
|
||||
<HintPath>..\..\..\..\..\14J大圆柱\908项目大圆柱\908-9 封口机\HBG_SealMachine\HBG_SealMachine\Lib\WinformControlLibraryExtension.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="WinformControlLibraryExtension.ComplexityPropertys, Version=5.4.2.1, Culture=neutral, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>Lib\WinformControlLibraryExtension.ComplexityPropertys.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Common\ByteUtil.cs" />
|
||||
<Compile Include="Common\CollectionUtil.cs" />
|
||||
<Compile Include="Common\CSVHelper.cs" />
|
||||
<Compile Include="Common\MessageTip.cs" />
|
||||
<Compile Include="Common\MessageBoxTimeOut.cs" />
|
||||
<Compile Include="Common\AlarmForm.cs" />
|
||||
<Compile Include="Common\DeleteLog.cs" />
|
||||
<Compile Include="Common\PLCAlarmParse.cs" />
|
||||
<Compile Include="Common\Global.cs" />
|
||||
<Compile Include="Common\StrUtil.cs" />
|
||||
<Compile Include="Common\TxtHelper.cs" />
|
||||
<Compile Include="Common\UserHelper.cs" />
|
||||
<Compile Include="Common\ConnectionClient.cs" />
|
||||
<Compile Include="Common\DGShowMsg.cs" />
|
||||
<Compile Include="Common\DateTimeSynchronization.cs" />
|
||||
<Compile Include="Entity\AlarmStatus.cs" />
|
||||
<Compile Include="Frm\FormMesGradingSet.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Frm\FormMesGradingSet.Designer.cs">
|
||||
<DependentUpon>FormMesGradingSet.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Frm\FrmAbnormalVoice.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Frm\FrmAbnormalVoice.Designer.cs">
|
||||
<DependentUpon>FrmAbnormalVoice.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Frm\FrmAlert.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Frm\FrmAlert.Designer.cs">
|
||||
<DependentUpon>FrmAlert.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Frm\FrmCCDQuery.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Frm\FrmCCDQuery.designer.cs">
|
||||
<DependentUpon>FrmCCDQuery.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Frm\FormMesDataSet.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Frm\FormMesDataSet.designer.cs">
|
||||
<DependentUpon>FormMesDataSet.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Frm\FrmAlamQuery.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Frm\FrmAlamQuery.designer.cs">
|
||||
<DependentUpon>FrmAlamQuery.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Frm\FrmChangeModel.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Frm\FrmChangeModel.designer.cs">
|
||||
<DependentUpon>FrmChangeModel.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Frm\FrmConfigBaseSet.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Frm\FrmConfigBaseSet.designer.cs">
|
||||
<DependentUpon>FrmConfigBaseSet.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Frm\FrmDBbaseSet.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Frm\FrmDBbaseSet.designer.cs">
|
||||
<DependentUpon>FrmDBbaseSet.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Frm\FrmHelper.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Frm\FrmHelper.designer.cs">
|
||||
<DependentUpon>FrmHelper.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Frm\FrmHistoricalDataQuery.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Frm\FrmHistoricalDataQuery.designer.cs">
|
||||
<DependentUpon>FrmHistoricalDataQuery.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Frm\FrmParaConfig.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Frm\FrmParaConfig.designer.cs">
|
||||
<DependentUpon>FrmParaConfig.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Frm\FrmPwd.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Frm\FrmPwd.Designer.cs">
|
||||
<DependentUpon>FrmPwd.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Frm\FrmStatistics.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Frm\FrmStatistics.designer.cs">
|
||||
<DependentUpon>FrmStatistics.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Frm\FrmTest.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Frm\FrmTest.Designer.cs">
|
||||
<DependentUpon>FrmTest.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Frm\LoginForm.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Frm\LoginForm.designer.cs">
|
||||
<DependentUpon>LoginForm.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Frm\SetForm.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Frm\SetForm.designer.cs">
|
||||
<DependentUpon>SetForm.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="HomeForm.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="HomeForm.designer.cs">
|
||||
<DependentUpon>HomeForm.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Common\Log4Helper.cs" />
|
||||
<Compile Include="Frm\ListViewBuff.cs">
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Mes\MESDataCombin.cs" />
|
||||
<Compile Include="Mes\MesLog.cs" />
|
||||
<Compile Include="Program.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="ViewModel\FrmMesSettingVM.cs" />
|
||||
<EmbeddedResource Include="Frm\FormMesGradingSet.resx">
|
||||
<DependentUpon>FormMesGradingSet.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Frm\FrmAbnormalVoice.resx">
|
||||
<DependentUpon>FrmAbnormalVoice.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Frm\FrmAlert.resx">
|
||||
<DependentUpon>FrmAlert.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Frm\FrmCCDQuery.resx">
|
||||
<DependentUpon>FrmCCDQuery.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Frm\FormMesDataSet.resx">
|
||||
<DependentUpon>FormMesDataSet.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Frm\FrmAlamQuery.resx">
|
||||
<DependentUpon>FrmAlamQuery.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Frm\FrmChangeModel.resx">
|
||||
<DependentUpon>FrmChangeModel.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Frm\FrmConfigBaseSet.resx">
|
||||
<DependentUpon>FrmConfigBaseSet.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Frm\FrmDBbaseSet.resx">
|
||||
<DependentUpon>FrmDBbaseSet.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Frm\FrmHelper.resx">
|
||||
<DependentUpon>FrmHelper.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Frm\FrmHistoricalDataQuery.resx">
|
||||
<DependentUpon>FrmHistoricalDataQuery.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Frm\FrmParaConfig.resx">
|
||||
<DependentUpon>FrmParaConfig.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Frm\FrmPwd.resx">
|
||||
<DependentUpon>FrmPwd.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Frm\FrmStatistics.resx">
|
||||
<DependentUpon>FrmStatistics.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Frm\FrmTest.resx">
|
||||
<DependentUpon>FrmTest.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Frm\LoginForm.resx">
|
||||
<DependentUpon>LoginForm.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Frm\SetForm.resx">
|
||||
<DependentUpon>SetForm.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="HomeForm.resx">
|
||||
<DependentUpon>HomeForm.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Properties\Resources.resx">
|
||||
<Generator>ResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<Compile Include="Properties\Resources.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Resources.resx</DependentUpon>
|
||||
<DesignTime>True</DesignTime>
|
||||
</Compile>
|
||||
<None Include="appini.manifest">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="Config\ComConfig.ini">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="Config\Configure.ini">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="Config\PlcConfig.ini">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="Config\采集项参照表.xlsx">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="EmailTemplate\Model.xls">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="packages.config" />
|
||||
<None Include="Properties\Settings.settings">
|
||||
<Generator>SettingsSingleFileGenerator</Generator>
|
||||
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
|
||||
</None>
|
||||
<Compile Include="Properties\Settings.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Settings.settings</DependentUpon>
|
||||
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="App.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\JY.Control\JY.Control.csproj">
|
||||
<Project>{01a2aa2c-9b80-41aa-9f47-3cb67e60af24}</Project>
|
||||
<Name>JY.Control</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\JY.DAL\JY.DAL.csproj">
|
||||
<Project>{d5889580-58f9-467e-87d3-efa37a300e67}</Project>
|
||||
<Name>JY.DAL</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\JY.MES\JY.MES.csproj">
|
||||
<Project>{168C8644-3975-450D-94D2-29D21C135C16}</Project>
|
||||
<Name>JY.MES</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\JY.Model\JY.Model.csproj">
|
||||
<Project>{f7db3a93-fca2-479b-8b2e-380116aae9fc}</Project>
|
||||
<Name>JY.Model</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\JY.Utility\JY.Utility.csproj">
|
||||
<Project>{76de07e0-9e97-44ab-8148-01b44c5c1add}</Project>
|
||||
<Name>JY.Utility</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\PLCCommunication\PLCCommunication.csproj">
|
||||
<Project>{796c9dfe-1d66-4921-b998-c5fcf15c2983}</Project>
|
||||
<Name>PLCCommunication</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\SimpleServer\SimpleCommunication.csproj">
|
||||
<Project>{d73fae32-aaa3-4a51-bb0a-f1a5dc5a7260}</Project>
|
||||
<Name>SimpleCommunication</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\SocketHelper\SocketHelper.csproj">
|
||||
<Project>{2E9AC112-75CC-4FB6-B058-F9C7424514EF}</Project>
|
||||
<Name>SocketHelper</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Lib\HslCommunication.dll" />
|
||||
<Content Include="Lib\MetroFramework.Design.dll" />
|
||||
<Content Include="Lib\MetroFramework.dll" />
|
||||
<Content Include="Lib\MetroFramework.Fonts.dll" />
|
||||
<Content Include="Lib\WcleAnimationLibrary.dll" />
|
||||
<Content Include="Lib\WinformControlLibraryExtension.ComplexityPropertys.dll" />
|
||||
<Content Include="Lib\WinformControlLibraryExtension.dll" />
|
||||
<Content Include="log4net.xml">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="MetroFramework.txt" />
|
||||
<Content Include="Resouces\LFLog.png" />
|
||||
<Content Include="Resouces\logo1.png" />
|
||||
<Content Include="Resouces\save.png" />
|
||||
<Content Include="Resouces\串口.png" />
|
||||
<Content Include="Resouces\主页.png" />
|
||||
<Content Include="Resouces\云上传.png" />
|
||||
<Content Include="Resouces\停止.png" />
|
||||
<Content Include="Resouces\关于.png" />
|
||||
<Content Include="Resouces\切换.png" />
|
||||
<Content Include="Resouces\切换1.png" />
|
||||
<Content Include="Resouces\图表.png" />
|
||||
<Content Include="Resouces\存储设备.png" />
|
||||
<Content Include="Resouces\数据查询.png" />
|
||||
<Content Include="Resouces\查询.png" />
|
||||
<Content Include="Resouces\模块.png" />
|
||||
<Content Include="Resouces\清空 %281%29.png" />
|
||||
<Content Include="Resouces\用户.png" />
|
||||
<Content Include="Resouces\用户管理.png" />
|
||||
<Content Include="Resouces\登录.png" />
|
||||
<Content Include="Resouces\系统构建.png" />
|
||||
<Content Include="Resouces\系统设置.png" />
|
||||
<Content Include="Resouces\维修.png" />
|
||||
<Content Include="Resouces\设置.png" />
|
||||
<Content Include="Resouces\运行.png" />
|
||||
<Content Include="Resouces\运行中.png" />
|
||||
<None Include="Resources\yiweidongli.png" />
|
||||
<Content Include="外观检测.ico" />
|
||||
<None Include="Resources\三角感叹号32.png" />
|
||||
<None Include="Resources\错误提示图标32.png" />
|
||||
<None Include="Resources\白色勾48.png" />
|
||||
<None Include="Resources\白色感叹号32.png" />
|
||||
<None Include="Resources\白色X32.png" />
|
||||
<None Include="Resources\导入数据_操作_jurassic.png" />
|
||||
<None Include="Resources\数据导入.png" />
|
||||
<None Include="Resources\inlogo.png" />
|
||||
<None Include="Resources\设备报警.png" />
|
||||
<None Include="Resources\报警记录.png" />
|
||||
</ItemGroup>
|
||||
<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>
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,314 @@
|
||||
using JY.MES;
|
||||
using JY.MES.MES;
|
||||
using JY.Model;
|
||||
using JY.Utility;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Linq;
|
||||
|
||||
namespace JY.Inspection.Mes
|
||||
{
|
||||
public interface IMes
|
||||
{
|
||||
/// <summary>
|
||||
/// 分档查询
|
||||
/// </summary>
|
||||
/// <param name="code"></param>
|
||||
/// <param name="code2"></param>
|
||||
/// <returns></returns>
|
||||
MesResponse GetMesIn(string code, string code2);
|
||||
|
||||
/// <summary>
|
||||
/// 结果加工参数
|
||||
/// </summary>
|
||||
/// <param name="m"></param>
|
||||
/// <returns></returns>
|
||||
MesResponse ProductResultParameters(BlankingData m);
|
||||
|
||||
/// <summary>
|
||||
/// 产品进站(包装)
|
||||
/// </summary>
|
||||
/// <param name="req"></param>
|
||||
/// <returns></returns>
|
||||
RespArrivalStation PostProductArrivalStationData(ReqArrivalStation req);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 产品出站(包装)
|
||||
/// </summary>
|
||||
/// <param name="req"></param>
|
||||
/// <returns></returns>
|
||||
RespExitStation PostProductExitStationData(ReqExitStation req);
|
||||
}
|
||||
|
||||
public class MESDataCombin : IMes
|
||||
{
|
||||
#region 1、 分档查询
|
||||
public MesResponse GetMesIn(string code, string code2)
|
||||
{
|
||||
MesResponse mesResponse = new MesResponse();
|
||||
DateTime nowTime = DateTime.Now;
|
||||
string josnTxtMsg = string.Empty;
|
||||
string BarCode = "";
|
||||
try
|
||||
{
|
||||
if (code.Contains("ERROR"))
|
||||
{
|
||||
BarCode = code2;
|
||||
}
|
||||
else
|
||||
{
|
||||
BarCode = code;
|
||||
}
|
||||
GradingParam gradingParam = new GradingParam
|
||||
{
|
||||
siteCode = Global.systemConfig.siteCode,
|
||||
lineCode = Global.systemConfig.lineCode,
|
||||
userName = "admin",
|
||||
equipCode = Global.systemConfig.equipCode,
|
||||
recordDate = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"),
|
||||
qty = 1,
|
||||
containerCode = "",
|
||||
materialCode = Global.systemConfig.materialCode,
|
||||
|
||||
|
||||
materiallotCodeList = new List<string>() { BarCode }
|
||||
};
|
||||
|
||||
string p = JsonConvert.SerializeObject(gradingParam);
|
||||
|
||||
var sw = new Stopwatch();
|
||||
sw.Start();
|
||||
string mesRes = MESApiHelper.HttpPostJsonAPI(Global.systemConfig.GradingMesUrl, p, Global.systemConfig.MesRequestTime);
|
||||
sw.Stop();
|
||||
|
||||
var res = JsonConvert.DeserializeObject<MesResponse>(mesRes);
|
||||
josnTxtMsg = $"{nowTime.ToString("yyyy-MM-dd HH:mm:ss.fff")}:调用电芯分档查询接口:{Global.systemConfig.GradingMesUrl},请求数据为:{p},\n{nowTime.AddMilliseconds(sw.ElapsedMilliseconds).ToString("yyyy-MM-dd HH:mm:ss.fff")}:接口耗时:{sw.ElapsedMilliseconds}ms,返回结果:{mesRes}";
|
||||
TxtHelper.WriteTxt($@"D:\APILog\MesLogs\{nowTime.ToString("yyyyMMdd")}\调用电芯分档查询接口\{nowTime.ToString("HH")}.txt", josnTxtMsg);//前面是路径,后面是数据
|
||||
|
||||
mesResponse.success = res.success;
|
||||
mesResponse.message = res.message;
|
||||
mesResponse.error = res.error;
|
||||
if (!res.success)
|
||||
{
|
||||
mesResponse.message = res.message;
|
||||
mesResponse.error = res.error;
|
||||
}
|
||||
else
|
||||
{
|
||||
try
|
||||
{
|
||||
if (res.rows != null && res.rows.Count > 0)
|
||||
{
|
||||
List<MesResponse.rowsListItem> rowsls = new List<MesResponse.rowsListItem>();
|
||||
MesResponse.rowsListItem rows = new MesResponse.rowsListItem();
|
||||
rows.identification = res.rows[0].identification;
|
||||
rows.level = res.rows[0].level;
|
||||
rows.passage = res.rows[0].passage;
|
||||
rows.rank = res.rows[0].rank;
|
||||
rows.message = res.rows[0].message;
|
||||
rowsls.Add(rows);
|
||||
mesResponse.rows = rowsls;
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
mesResponse.success = false;
|
||||
mesResponse.error = 9;
|
||||
mesResponse.message = "电芯分档查询异常:" + ex.Message;
|
||||
|
||||
}
|
||||
|
||||
return mesResponse;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 2、结果加工参数
|
||||
public MesResponse ProductResultParameters(BlankingData m)
|
||||
{
|
||||
MesResponse mesResponse = new MesResponse();
|
||||
DateTime nowTime = DateTime.Now;
|
||||
string josnTxtMsg = string.Empty;
|
||||
try
|
||||
{
|
||||
ProductResultParameters prp = new ProductResultParameters();
|
||||
prp.equipNum = Global.systemConfig.equipCode;
|
||||
prp.type = "DD";
|
||||
|
||||
Payload pl = new Payload();
|
||||
pl.siteCode = Global.systemConfig.siteCode;
|
||||
pl.lineCode = Global.systemConfig.lineCode;
|
||||
pl.userName = "admin";
|
||||
pl.materialCode = Global.systemConfig.materialCode;
|
||||
pl.carCode = "";
|
||||
pl.collection = "JS";
|
||||
pl.recordDate = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
|
||||
pl.qty = 1;
|
||||
pl.containerCode = "";
|
||||
IdentificationItem iil = new IdentificationItem();
|
||||
if (m.DepartureBarCode.Contains("ERROR"))
|
||||
iil.identification = m.ArrivalBarCode;
|
||||
else
|
||||
iil.identification = m.DepartureBarCode;
|
||||
iil.qualityStatus = m.Result == "OK" ? "Y" : "N";
|
||||
pl.identification = iil;
|
||||
|
||||
List<TagDataVOListItem> tdvls = new List<TagDataVOListItem>();
|
||||
TagDataVOListItem tag1;
|
||||
|
||||
// 结果采集项
|
||||
|
||||
|
||||
tag1 = new TagDataVOListItem() { tagCode = "WGJA001", tagValue = m.ArrivalBarCode, tagTime = m.OutTime, tagCalculateResult = "Y", tagRemark = "入站条码" }; tdvls.Add(tag1);
|
||||
tag1 = new TagDataVOListItem() { tagCode = "WGJA002", tagValue = m.DepartureBarCode, tagTime = m.OutTime, tagCalculateResult = "Y", tagRemark = "出站条码" }; tdvls.Add(tag1);
|
||||
tag1 = new TagDataVOListItem() { tagCode = "WGJA003", tagValue = m.WorkShift, tagTime = m.OutTime, tagCalculateResult = "Y", tagRemark = "班次" }; tdvls.Add(tag1);
|
||||
tag1 = new TagDataVOListItem() { tagCode = "WGJA004", tagValue = m.OutTime, tagTime = m.OutTime, tagCalculateResult = "Y", tagRemark = "出站时间" }; tdvls.Add(tag1);
|
||||
|
||||
foreach (var item in m.PLCValDic)
|
||||
{
|
||||
// TODO 获取采集项配置
|
||||
var cfgItem = Global.systemConfig.CollectItemCfgList
|
||||
.Where(it => it.IsEnable && it.PLCRelAddress == item.Key)
|
||||
.FirstOrDefault();
|
||||
|
||||
if (cfgItem == null)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
// 生成TagDataVoListItem
|
||||
tdvls.Add(new TagDataVOListItem() {
|
||||
tagCode = cfgItem.MesItemCode,
|
||||
tagValue = item.Value,
|
||||
tagTime = m.OutTime,
|
||||
tagCalculateResult = "Y",
|
||||
tagRemark = cfgItem.MesItemName
|
||||
});
|
||||
}
|
||||
|
||||
tdvls.Add(new TagDataVOListItem()
|
||||
{
|
||||
tagCode = "WGJA021",
|
||||
tagValue = m.Result,
|
||||
tagTime = m.OutTime,
|
||||
tagCalculateResult = "Y",
|
||||
tagRemark = "电池总结果"
|
||||
});
|
||||
//多个
|
||||
|
||||
pl.tagDataVOList = tdvls;
|
||||
prp.payload = JsonConvert.SerializeObject(pl);
|
||||
string p = JsonConvert.SerializeObject(prp);
|
||||
|
||||
var sw = new Stopwatch();
|
||||
sw.Start();
|
||||
string mesRes = MESApiHelper.HttpPostJsonAPI(Global.systemConfig.ResultProcessMesUrl, p, Global.systemConfig.MesRequestTime);
|
||||
sw.Stop();
|
||||
|
||||
var res = JsonConvert.DeserializeObject<dynamic>(mesRes);
|
||||
mesResponse.success = res.success.Value;
|
||||
if (!res.success.Value)
|
||||
{
|
||||
mesResponse.code = res.code.Value;
|
||||
mesResponse.message = res.message.Value;
|
||||
if (mesRes.Contains("category"))
|
||||
mesResponse.category = res.category.Value;
|
||||
if (res.error != null)
|
||||
mesResponse.error = (int)res.error.Value;
|
||||
}
|
||||
|
||||
new MesLog().LogProductResult(nowTime, p, mesRes, sw.ElapsedMilliseconds);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
mesResponse.success = false;
|
||||
mesResponse.error = 9;
|
||||
mesResponse.message = "结果加工参数上传异常:" + ex.Message;
|
||||
}
|
||||
return mesResponse;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 登录
|
||||
#endregion
|
||||
|
||||
public RespArrivalStation PostProductArrivalStationData(ReqArrivalStation req)
|
||||
{
|
||||
if (req == null)
|
||||
{
|
||||
throw new ArgumentNullException("入站数据为空");
|
||||
}
|
||||
|
||||
DateTime currentTime = DateTime.Now;
|
||||
string reqUrl = Global.systemConfig.StationArrivalUrl;
|
||||
RespArrivalStation resp = new RespArrivalStation();
|
||||
|
||||
try
|
||||
{
|
||||
string reqJsonStr = JsonConvert.SerializeObject(req);
|
||||
var sw = new Stopwatch();
|
||||
sw.Start();
|
||||
string mesRes = MESApiHelper.HttpPostJsonAPI(
|
||||
reqUrl,
|
||||
reqJsonStr,
|
||||
Global.systemConfig.MesRequestTime
|
||||
);
|
||||
sw.Stop();
|
||||
|
||||
resp = JsonConvert.DeserializeObject<RespArrivalStation>(mesRes);
|
||||
|
||||
new MesLog().LogArrivalStation(currentTime, reqJsonStr, mesRes, sw.ElapsedMilliseconds);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
resp.Success = false;
|
||||
resp.Message = "入站数据上传异常:" + ex.Message;
|
||||
}
|
||||
|
||||
return resp;
|
||||
}
|
||||
|
||||
public RespExitStation PostProductExitStationData(ReqExitStation req)
|
||||
{
|
||||
if (req == null)
|
||||
{
|
||||
throw new ArgumentNullException("出站请求数据为空");
|
||||
}
|
||||
|
||||
DateTime currentTime = DateTime.Now;
|
||||
string reqUrl = Global.systemConfig.StationExitUrl;
|
||||
RespExitStation resp = new RespExitStation();
|
||||
|
||||
try
|
||||
{
|
||||
string reqJsonStr = JsonConvert.SerializeObject(req);
|
||||
var sw = new Stopwatch();
|
||||
sw.Start();
|
||||
string mesRes = MESApiHelper.HttpPostJsonAPI(
|
||||
reqUrl,
|
||||
reqJsonStr,
|
||||
Global.systemConfig.MesRequestTime
|
||||
);
|
||||
sw.Stop();
|
||||
|
||||
resp = JsonConvert.DeserializeObject<RespExitStation>(mesRes);
|
||||
|
||||
new MesLog().LogArrivalStation(currentTime, reqJsonStr, mesRes, sw.ElapsedMilliseconds);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
resp.Success = false;
|
||||
resp.Message = "出站数据上传异常:" + ex.Message;
|
||||
}
|
||||
|
||||
return resp;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,66 @@
|
||||
using JY.Utility;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Web.UI.WebControls;
|
||||
|
||||
namespace JY.Inspection.Mes
|
||||
{
|
||||
public interface IMesLog
|
||||
{
|
||||
void LogProductResult(DateTime curTime, string reqJsonStr, string respMes, long costTime);
|
||||
void LogArrivalStation(DateTime curTime, string reqJsonStr, string respMes, long costTime);
|
||||
|
||||
void LogExitStation(DateTime curTime, string reqJsonStr, string respMes, long costTime);
|
||||
}
|
||||
|
||||
public class MesLog : IMesLog
|
||||
{
|
||||
private void LogoutAction(string actionName, DateTime curTime, string reqJsonStr, string respMes, long costTime)
|
||||
{
|
||||
// 构建日志目录和文件路径
|
||||
string mesLogPath = @"D:\APILog\MesLogs";
|
||||
string logDate = curTime.ToString("yyyyMMdd");
|
||||
string logHour = curTime.ToString("HH");
|
||||
string logDirectory = Path.Combine(mesLogPath, logDate, actionName);
|
||||
string logFilePath = Path.Combine(logDirectory, $"{logHour}.txt");
|
||||
|
||||
// 确保目录存在
|
||||
Directory.CreateDirectory(logDirectory);
|
||||
|
||||
// 使用StringBuilder构建日志消息
|
||||
var logBuilder = new StringBuilder();
|
||||
logBuilder.AppendLine($"{curTime.ToString("yyyy-MM-dd HH:mm:ss.fff")}:{actionName}接口:{Global.systemConfig.ResultProcessMesUrl}");
|
||||
logBuilder.AppendLine($"请求数据为:{reqJsonStr}");
|
||||
logBuilder.AppendLine($"{curTime.AddMilliseconds(costTime).ToString("yyyy-MM-dd HH:mm:ss.fff")}:接口耗时:{costTime}ms");
|
||||
logBuilder.AppendLine($"返回结果:{respMes}");
|
||||
|
||||
// 写入日志文件
|
||||
TxtHelper.WriteTxt(logFilePath, logBuilder.ToString());
|
||||
}
|
||||
|
||||
public void LogArrivalStation(DateTime curTime, string reqJsonStr, string respMes, long costTime)
|
||||
{
|
||||
string actionName = "产品入站";
|
||||
|
||||
LogoutAction(actionName, curTime, reqJsonStr, respMes, costTime);
|
||||
}
|
||||
|
||||
public void LogExitStation(DateTime curTime, string reqJsonStr, string respMes, long costTime)
|
||||
{
|
||||
string actionName = "产品出站";
|
||||
|
||||
LogoutAction(actionName, curTime, reqJsonStr, respMes, costTime);
|
||||
}
|
||||
|
||||
public void LogProductResult(DateTime curTime, string reqJsonStr, string respMes, long costTime)
|
||||
{
|
||||
string actionName = "产品结果加工参数";
|
||||
|
||||
LogoutAction(actionName, curTime, reqJsonStr, respMes, costTime);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
MetroFramework - Modern UI for WinForms
|
||||
|
||||
Copyright (c) 2013 Jens Thiel, http://thielj.github.io/MetroFramework
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
this software and associated documentation files (the "Software"), to deal in the
|
||||
Software without restriction, including without limitation the rights to use, copy,
|
||||
modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
|
||||
and to permit persons to whom the Software is furnished to do so, subject to the
|
||||
following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
|
||||
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
||||
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
|
||||
CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
|
||||
OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
|
||||
Portions of this software are:
|
||||
|
||||
Copyright (c) 2011 Sven Walter, http://github.com/viperneo
|
||||
@@ -0,0 +1,67 @@
|
||||
using HslCommunication;
|
||||
using JY.Utility;
|
||||
using System;
|
||||
using System.Reflection;
|
||||
using System.Threading;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace JY.Inspection
|
||||
{
|
||||
static class Program
|
||||
{
|
||||
|
||||
public delegate void RunWorkHandler();
|
||||
private static HomeForm mFrmMain;
|
||||
|
||||
/// <summary>
|
||||
/// 应用程序的主入口点。
|
||||
/// </summary>
|
||||
[STAThread]
|
||||
static void Main()
|
||||
{
|
||||
if (Authorization.SetAuthorizationCode("b5f8f9f7-c075-4913-ae6e-d7d2cc6f2de1"))
|
||||
{
|
||||
Console.WriteLine("注册成功");
|
||||
}
|
||||
try
|
||||
{
|
||||
Application.SetUnhandledExceptionMode(UnhandledExceptionMode.CatchException);
|
||||
Application.ThreadException += Application_ThreadException;
|
||||
AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException;
|
||||
Application.EnableVisualStyles();
|
||||
Application.SetCompatibleTextRenderingDefault(false);
|
||||
IniFileHelper.CreateIniFile(Application.StartupPath + "\\Config\\", "Configure.ini");
|
||||
string mutexName = Assembly.GetEntryAssembly().FullName;
|
||||
string title = IniFileHelper.ReadIniData("SYSTEM_CONFIGURE", "Project_Name");
|
||||
mFrmMain = new HomeForm();
|
||||
bool isFirst;
|
||||
using (new Mutex(false, mutexName, out isFirst))
|
||||
{
|
||||
if (!isFirst)
|
||||
{
|
||||
MessageBox.Show(title + " 已运行,请勿重复启动!", "信息", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
Application.Run(mFrmMain);
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
LogHelper.WriteException(ex, string.Empty);
|
||||
}
|
||||
}
|
||||
|
||||
private static void Application_ThreadException(object sender, ThreadExceptionEventArgs e)
|
||||
{
|
||||
LogHelper.WriteException(e.Exception, string.Empty);
|
||||
}
|
||||
|
||||
private static void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e)
|
||||
{
|
||||
LogHelper.WriteException(e.ExceptionObject as Exception, e.ToString());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// 有关程序集的一般信息由以下
|
||||
// 控制。更改这些特性值可修改
|
||||
// 与程序集关联的信息。
|
||||
[assembly: AssemblyTitle("JY-Inspection")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("JY-Inspection")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2021")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// 将 ComVisible 设置为 false 会使此程序集中的类型
|
||||
//对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型
|
||||
//请将此类型的 ComVisible 特性设置为 true。
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
|
||||
[assembly: Guid("607af967-65f7-483e-8bd9-2d92ad17d151")]
|
||||
|
||||
// 程序集的版本信息由下列四个值组成:
|
||||
//
|
||||
// 主版本
|
||||
// 次版本
|
||||
// 生成号
|
||||
// 修订号
|
||||
//
|
||||
//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
|
||||
//通过使用 "*",如下所示:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
+413
@@ -0,0 +1,413 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// 此代码由工具生成。
|
||||
// 运行时版本:4.0.30319.42000
|
||||
//
|
||||
// 对此文件的更改可能会导致不正确的行为,并且如果
|
||||
// 重新生成代码,这些更改将会丢失。
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace JY.Inspection.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("JY.Inspection.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 error {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("error", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap info {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("info", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap inlogo {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("inlogo", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap logo1 {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("logo1", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap save {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("save", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap success {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("success", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap warning {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("warning", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap yiweidongli {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("yiweidongli", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap 串口 {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("串口", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap 主页 {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("主页", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap 云上传 {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("云上传", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap 停止 {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("停止", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap 关于 {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("关于", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap 切换 {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("切换", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap 切换1 {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("切换1", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap 图表 {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("图表", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap 存储设备 {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("存储设备", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap 导入数据_操作_jurassic {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("导入数据_操作_jurassic", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap 报警记录 {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("报警记录", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap 数据导入 {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("数据导入", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap 数据查询 {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("数据查询", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap 查询 {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("查询", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap 模块 {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("模块", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap 清空__1_ {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("清空__1_", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap 用户 {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("用户", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap 用户管理 {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("用户管理", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap 登录 {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("登录", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap 白色X32 {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("白色X32", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap 系统构建 {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("系统构建", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap 系统设置 {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("系统设置", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap 维修 {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("维修", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap 设备报警 {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("设备报警", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap 设置 {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("设置", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap 运行 {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("运行", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap 运行中 {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("运行中", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,226 @@
|
||||
<?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="导入数据_操作_jurassic" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\导入数据_操作_jurassic.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<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>
|
||||
<data name="模块" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resouces\模块.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="用户" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resouces\用户.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="主页" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resouces\主页.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="数据查询" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resouces\数据查询.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="error" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\错误提示图标32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="系统设置" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resouces\系统设置.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="停止" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resouces\停止.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="success" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\白色勾48.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="设置" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resouces\设置.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="图表" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resouces\图表.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="warning" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\三角感叹号32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="关于" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resouces\关于.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="系统构建" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resouces\系统构建.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="白色X32" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\白色X32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="用户管理" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resouces\用户管理.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="清空__1_" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resouces\清空 (1).png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="存储设备" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resouces\存储设备.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<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>
|
||||
<data name="切换" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resouces\切换.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="维修" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resouces\维修.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="查询" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resouces\查询.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="云上传" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resouces\云上传.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="logo1" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resouces\logo1.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="inlogo" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\inlogo.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="save" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resouces\save.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="运行" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resouces\运行.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="info" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\白色感叹号32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="串口" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resouces\串口.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<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>
|
||||
<data name="登录" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resouces\登录.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="运行中" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resouces\运行中.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="切换1" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resouces\切换1.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="yiweidongli" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\yiweidongli.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
</root>
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// 此代码由工具生成。
|
||||
// 运行时版本:4.0.30319.42000
|
||||
//
|
||||
// 对此文件的更改可能会导致不正确的行为,并且如果
|
||||
// 重新生成代码,这些更改将会丢失。
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace JY.Inspection.Properties {
|
||||
|
||||
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.11.0.0")]
|
||||
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
|
||||
|
||||
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
|
||||
|
||||
public static Settings Default {
|
||||
get {
|
||||
return defaultInstance;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">
|
||||
<Profiles>
|
||||
<Profile Name="(Default)" />
|
||||
</Profiles>
|
||||
<Settings />
|
||||
</SettingsFile>
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 16 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 5.8 KiB |
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user