You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
114 lines
3.4 KiB
C#
114 lines
3.4 KiB
C#
|
|
using DB.Entity;
|
|
using DB;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Windows.Forms;
|
|
using Chloe.PostgreSQL.DDL;
|
|
using Chloe.RDBMS.DDL;
|
|
using Tool;
|
|
using DB.Service;
|
|
using Tool.Model;
|
|
using HslCommunication;
|
|
using NewLife;
|
|
|
|
namespace RfidWeb
|
|
{
|
|
public partial class FromSQl : Form
|
|
{
|
|
public FromSQl()
|
|
{
|
|
InitializeComponent();
|
|
|
|
|
|
}
|
|
|
|
private void ucBtnExt1_BtnClick(object sender, EventArgs e)
|
|
{
|
|
//DbInfo.Init(typeof(RoleMapper).Assembly);
|
|
DbInfo.Init(typeof(UserInfo).Assembly);
|
|
var rfidSetting = RfidSetting.Current;
|
|
var dbContext = DbFactory.GetContext;
|
|
|
|
// new PostgreSQLTableGenerator(dbContext).CreateTables(TableCreateMode.CreateIfNotExists);
|
|
|
|
//for (int i = 0; i < 31; i++)
|
|
//{
|
|
// AlarmData data = new AlarmData();
|
|
// data.PlcAb = "B";
|
|
// data.No = i;
|
|
// data.Msg = "";
|
|
// data.Address = "FJ_alarm";
|
|
// data.ID = GetId;
|
|
// // dbContext.Insert(data);
|
|
//}
|
|
|
|
|
|
OperateResult<ushort, byte[]> read = PlcConnect.Instance.ReadTag("READ_CHIP2.BUF", ushort.Parse("25"));
|
|
if (read.IsSuccess)
|
|
{
|
|
var hexString = read.Content2.ToHexString();
|
|
}
|
|
|
|
var a = HmiPointInfo.GetBufA();
|
|
var b = HmiPointInfo.GetBufB();
|
|
var c = HmiPointInfo.GetBufC();
|
|
|
|
|
|
//Dictionary<string, string> dic = new Dictionary<string, string>
|
|
//{
|
|
// ["CUTTING_SET_TEMPERATURE1_1"] = "裁刀1温度设定1",
|
|
// ["CUTTING_SET_TEMPERATURE1_2"] = "裁刀1温度设定2",
|
|
// ["CUTTING_SET_TEMPERATURE1_3"] = "裁刀1温度设定3",
|
|
// ["CUTTING_SET_TEMPERATURE1_4"] = "裁刀1温度设定4",
|
|
|
|
// ["CUTTING_SET_TEMPERATURE2_1"] = "裁刀2温度设定1",
|
|
// ["CUTTING_SET_TEMPERATURE2_2"] = "裁刀2温度设定2",
|
|
// ["CUTTING_SET_TEMPERATURE2_3"] = "裁刀2温度设定3",
|
|
// ["CUTTING_SET_TEMPERATURE2_4"] = "裁刀2温度设定4",
|
|
|
|
|
|
|
|
// ["CUTTING_SET_TIME1_1"] = "裁刀1时间设定1",
|
|
// ["CUTTING_SET_TIME1_2"] = "裁刀1时间设定2",
|
|
// ["CUTTING_SET_TIME1_3"] = "裁刀1时间设定3",
|
|
// ["CUTTING_SET_TIME1_4"] = "裁刀1时间设定4",
|
|
|
|
|
|
|
|
// ["CUTTING_SET_TIME2_1"] = "裁刀2时间设定1",
|
|
// ["CUTTING_SET_TIME2_2"] = "裁刀2时间设定2",
|
|
// ["CUTTING_SET_TIME2_3"] = "裁刀2时间设定3",
|
|
// ["CUTTING_SET_TIME2_4"] = "裁刀2时间设定4",
|
|
//};
|
|
//foreach (KeyValuePair<string, string> k in dic)
|
|
//{
|
|
// Point point = new Point();
|
|
// point.ID = SnowflakeFactory.NewId;
|
|
// point.DataType = "Uint32";
|
|
// point.FromType = "参数";
|
|
// point.PointAddress = k.Key;
|
|
// point.PointName = k.Value;
|
|
|
|
|
|
//}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
private long GetId=> SnowflakeFactory.NewId;
|
|
|
|
private void ucBtnExt2_BtnClick(object sender, EventArgs e)
|
|
{
|
|
var data = DateTime.Now.ToString("yyyy-MM-dd 00:00:00");
|
|
var sss= Convert.ToDateTime(data);
|
|
ucDatePickerExt21.CurrentTime = sss;
|
|
|
|
}
|
|
}
|
|
}
|