WFormSynchronizeData_SMR.sln
New file @@ -0,0 +1,25 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Version 16 VisualStudioVersion = 16.0.32602.291 MinimumVisualStudioVersion = 10.0.40219.1 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WFormSynchronizeData_SMR", "WFormSynchronizeData_SMR\WFormSynchronizeData_SMR.csproj", "{7D884B31-A12C-48D4-AA79-EAF174D3FEA8}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {7D884B31-A12C-48D4-AA79-EAF174D3FEA8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {7D884B31-A12C-48D4-AA79-EAF174D3FEA8}.Debug|Any CPU.Build.0 = Debug|Any CPU {7D884B31-A12C-48D4-AA79-EAF174D3FEA8}.Release|Any CPU.ActiveCfg = Release|Any CPU {7D884B31-A12C-48D4-AA79-EAF174D3FEA8}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {435664D8-38D8-4068-8348-3805C3B68835} EndGlobalSection EndGlobal WFormSynchronizeData_SMR/App.config
New file @@ -0,0 +1,6 @@ <?xml version="1.0" encoding="utf-8" ?> <configuration> <startup> <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" /> </startup> </configuration> WFormSynchronizeData_SMR/DBHelper.cs
New file @@ -0,0 +1,257 @@ using System; using System.Collections.Generic; using System.Data; using System.Data.SqlClient; using System.Linq; using System.Text; using System.Threading.Tasks; namespace WFormSynchronizeData_SMR { public class DBHelper { private SqlConnection MainCn;//创建连接对象 SqlTransaction MainTran; public string sServer; public string sDataBase; public string sUser; public string sPassword; //开始事务 public void BeginTran() { if (!this.CnOpen()) return; MainTran = MainCn.BeginTransaction(); } //结束事务 public void Commit() { MainTran.Commit(); CnClose(); } //回滚事务 public void RollBack() { MainTran.Rollback(); CnClose(); } public DBHelper() { //sServer = "47.96.97.237,15127"; //sDataBase = "HX_LMESsys"; //sUser = "HX_USER"; //sPassword = "lc@841022"; //斯莫尔 sServer = "10.11.18.195"; sDataBase = "HX_LMESsys_test"; sUser = "HX_USER"; sPassword = "lc@841022"; } private bool CnOpen()//OPEN数据库连接 { if (sServer == "" || sServer == "没有找到!") { throw new Exception("错误的服务器名!" + System.Environment.CurrentDirectory); } if (sDataBase == "" || sDataBase == "没有找到!") { throw new Exception("错误的数据库名!"); } if (MainCn == null) { MainCn = new SqlConnection("Data Source=" + sServer + ";DataBase=" + sDataBase + ";User ID=" + sUser + ";PWD=" + sPassword + ";max pool size=32767"); } if (MainCn.State == System.Data.ConnectionState.Closed) { try { MainCn.Open(); return true; } catch (Exception e) { throw new Exception(e.Message + "," + sServer + "," + sDataBase); } } else return true; } public void CnClose()//关闭数据库连接 { if (MainCn != null) MainCn.Close(); } public void CnDispose()//释放资源 { if (MainCn != null) { MainCn.Dispose(); MainCn = null; } } /// <summary> /// 执行SQL无返回值 /// </summary> /// <param name="procName"></param> /// <param name="sErrMessage"></param> /// <returns></returns> public void RunProc(string procName) { if (!this.CnOpen()) { return; //sErrMessage = "连接数据库失败!"; } try { SqlCommand cmd = new SqlCommand(procName, MainCn); cmd.CommandTimeout = 600; cmd.Transaction = MainTran; cmd.ExecuteNonQuery(); return; } catch (Exception e) { throw (e); //return; } } /// <summary> /// 执行 /// </summary> /// <param name="procName"></param> /// <param name="sErrMessage"></param> /// <returns></returns> public void RunProc(string procName, ref string sErr) { if (!this.CnOpen()) { sErr = "连接数据库失败!"; return; } try { //ClsPub.sSQLInfo = procName; SqlCommand cmd = new SqlCommand(procName, MainCn); cmd.CommandTimeout = 600; cmd.Transaction = MainTran; cmd.ExecuteNonQuery(); return; } catch (Exception e) { sErr = e.Message; //ClsPub.sErrInfo = e.Message; throw (e); //return; } } /// <summary> /// 递入参数执行SQL并返回DATASET /// </summary> /// <param name="procName">执行语句</param> /// <param name="prams">参数</param> /// <param name="tbName">表名</param> /// <param name="sErrMessage">异常信息</param> /// <returns></returns> public DataSet RunProcReturn(string procName, SqlParameter[] prams, string tbName) { SqlDataAdapter dap = CreateDataAdaper(procName, prams); if (dap == null) return null; DataSet ds = new DataSet(); try { //ClsPub.sSQLInfo = procName; dap.Fill(ds, tbName); return ds; } catch (Exception e) { //ClsPub.sErrInfo = e.Message; throw (e); return null; } } /// <summary> /// 执行SQL并返回DATASET /// </summary> /// <param name="procName">执行语句</param> /// <param name="tbName">表名</param> /// <param name="sErrMessage">异常信息</param> /// <returns></returns> public DataSet RunProcReturn(string procName, string tbName) { SqlDataAdapter dap = CreateDataAdaper(procName, null); DataSet ds = new DataSet(); try { //ClsPub.sSQLInfo = procName; dap.Fill(ds, tbName); return ds; } catch (Exception e) { //ClsPub.sErrInfo = e.Message; throw (e); return null; } } /// <summary> /// 执行SQL并返回DATASET和错误信息 /// </summary> /// <param name="procName">执行语句</param> /// <param name="tbName">表名</param> /// <param name="sErrMessage">异常信息</param> /// <returns></returns> public DataSet RunProcReturn(string procName, string tbName, ref string sErr) { SqlDataAdapter dap = CreateDataAdaper(procName, null); DataSet ds = new DataSet(); try { //ClsPub.sSQLInfo = procName; dap.Fill(ds, tbName); return ds; } catch (Exception e) { sErr = e.Message; //ClsPub.sErrInfo = e.Message; return null; } } private SqlDataAdapter CreateDataAdaper(string procName, SqlParameter[] prams) { if (this.CnOpen()) { SqlDataAdapter dap = new SqlDataAdapter(procName, MainCn); dap.SelectCommand.CommandType = CommandType.Text; dap.SelectCommand.CommandTimeout = 600; dap.SelectCommand.Transaction = MainTran; if (prams != null) { foreach (SqlParameter parameter in prams) dap.SelectCommand.Parameters.Add(parameter); } dap.SelectCommand.Parameters.Add(new SqlParameter("ReturnValue", SqlDbType.Int, 4, ParameterDirection.ReturnValue, false, 0, 0, string.Empty, DataRowVersion.Default, null)); return dap; } else { return null; } } } } WFormSynchronizeData_SMR/Form1.Designer.cs
New file @@ -0,0 +1,71 @@ namespace WFormSynchronizeData_SMR { partial class Form1 { /// <summary> /// 必需的设计器变量。 /// </summary> private System.ComponentModel.IContainer components = null; /// <summary> /// 清理所有正在使用的资源。 /// </summary> /// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param> protected override void Dispose(bool disposing) { if (disposing && (components != null)) { components.Dispose(); } base.Dispose(disposing); } #region Windows 窗体设计器生成的代码 /// <summary> /// 设计器支持所需的方法 - 不要修改 /// 使用代码编辑器修改此方法的内容。 /// </summary> private void InitializeComponent() { this.components = new System.ComponentModel.Container(); this.btnReadData = new System.Windows.Forms.Button(); this.timer1 = new System.Windows.Forms.Timer(this.components); this.SuspendLayout(); // // btnReadData // this.btnReadData.Location = new System.Drawing.Point(77, 49); this.btnReadData.Name = "btnReadData"; this.btnReadData.Size = new System.Drawing.Size(114, 35); this.btnReadData.TabIndex = 0; this.btnReadData.Text = "读取数据"; this.btnReadData.UseVisualStyleBackColor = true; this.btnReadData.Click += new System.EventHandler(this.btnReadData_Click); // // timer1 // this.timer1.Enabled = true; this.timer1.Interval = 60000; this.timer1.Tick += new System.EventHandler(this.timer1_Tick); // // Form1 // this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 18F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.ClientSize = new System.Drawing.Size(283, 136); this.Controls.Add(this.btnReadData); this.Name = "Form1"; this.Text = "Form1"; this.ResumeLayout(false); } #endregion private System.Windows.Forms.Button btnReadData; private System.Windows.Forms.Timer timer1; } } WFormSynchronizeData_SMR/Form1.cs
New file @@ -0,0 +1,736 @@ using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.IO; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; using Newtonsoft.Json; using Newtonsoft.Json.Linq; namespace WFormSynchronizeData_SMR { public partial class Form1 : Form { public DBHelper oCN = new DBHelper(); public Form1() { InitializeComponent(); } //读取数据 private void btnReadData_Click(object sender, EventArgs e) { int year = DateTime.Now.Year; string month = DateTime.Now.Month.ToString(); string day = DateTime.Now.Day.ToString(); //if (month.Length < 2) { // month = "0" + month; //} //if (day.Length < 2) //{ // day = "0" + day; //} string dataTime = DateTime.Now.ToString("yyyyMMdd"); //CustomWriteLog("1:" + dataTime, DateTime.Now.ToString("yyyy-MM-dd")); ////判断是否有这个文件 bool flag = File.Exists($@"D:\{year}\{month}\{day}\{dataTime}.txt"); //bool flag = File.Exists($@"C:\Users\admin\Desktop\新建文件夹 (2)\20231123.txt"); //CustomWriteLog("2:" + flag, DateTime.Now.ToString("yyyy-MM-dd")); if (flag) { StreamReader stream = new StreamReader($@"D:\{year}\{month}\{day}\{dataTime}.txt", Encoding.GetEncoding("gb2312")); //CustomWriteLog("3:"+ $@"D:\{year}\{month}\{day}\{dataTime}.txt", DateTime.Now.ToString("yyyy-MM-dd")); //StreamReader stream = new StreamReader($@"C:\Users\admin\Desktop\新建文件夹 (2)\20231123.txt",Encoding.GetEncoding("gb2312")); string FileData = stream.ReadToEnd(); stream.Close(); FileData = FileData.Substring(0, FileData.Length - 1); FileData = "[" + FileData + "]"; //CustomWriteLog("4:" + FileData, DateTime.Now.ToString("yyyy-MM-dd")); //JSON序列化转换字典集合 List<Dictionary<string, string>> list = new List<Dictionary<string, string>>(); List<object> DataList = JsonConvert.DeserializeObject<List<object>>(FileData); foreach (JObject item in DataList) { Dictionary<string, string> dic = new Dictionary<string, string>(); foreach (var itm in item.Properties()) { dic.Add(itm.Name, itm.Value.ToString()); } list.Add(dic); } //CustomWriteLog("5:" + list.Count, DateTime.Now.ToString("yyyy-MM-dd")); //获取当前时间 DateTime ActionTime = DateTime.Parse(DateTime.Now.AddMinutes(-1).ToString("yyyy-MM-dd HH:mm:ss")); DateTime EndTime = DateTime.Parse(DateTime.Now.AddMinutes(1).ToString("yyyy-MM-dd HH:mm:00")); //循环集合 for (int i = 0; i < list.Count; i++) { DateTime NowTime = DateTime.Parse(list[i]["HDate"].ToString()); if (NowTime >= ActionTime && NowTime < EndTime) { string HResult = list[i]["HResult"].ToString(); //CustomWriteLog("6:" + HResult, DateTime.Now.ToString("yyyy-MM-dd")); if (HResult == "OK") { HResultOK(list[i]); } else if (HResult == "NG") { HResultNG(list[i]); } } else { //CustomWriteLog("时间不在保存范围内", DateTime.Now.ToString("yyyy-MM-dd")); } } } } public void HResultOK(Dictionary<string, string> dic) { try { string HBadCodeSN = dic["HBadCodeSN"].ToString(); HBadCodeSN = TM_ZH(HBadCodeSN); bool flag = SNHBardCodeList(HBadCodeSN); if (flag) { getAdd(dic, HBadCodeSN, "OK"); } } catch (Exception e) { oCN.RollBack(); //objJsonResult.code = "0"; //objJsonResult.count = 0; //objJsonResult.Message = "没有返回任何记录!" + e.ToString(); //objJsonResult.data = null; //return objJsonResult; } } public void HResultNG(Dictionary<string, string> dic) { try { string HBadCodeSN = dic["HBadCodeSN"].ToString(); HBadCodeSN = TM_ZH(HBadCodeSN); bool flag = SNHBardCodeList(HBadCodeSN); if (flag) { getAdd(dic, HBadCodeSN, "NG"); //开始事务 oCN.BeginTran(); //反写条码状态 oCN.RunProc("update Gy_BarCodeBill set HStatus='不良',HRemark='"+dic["HBadReason"].ToString()+"' where HBarCode='" + HBadCodeSN + "'"); //结束事务 oCN.Commit(); } } catch (Exception e) { //回滚事务 oCN.RollBack(); //objJsonResult.code = "0"; //objJsonResult.count = 0; //objJsonResult.Message = "没有返回任何记录!" + e.ToString(); //objJsonResult.data = null; //return objJsonResult; } } public bool getAdd(Dictionary<string, string> dic,string HBadCodeSN,string HResult) { try { //获取绑定流转卡 DataSet ds = oCN.RunProcReturn(@"select * from Gy_BarCodeBill where HBarCode='" + HBadCodeSN + "'", "Gy_BarCodeBill"); string HProcExchBillNo = ds.Tables[0].Rows[0]["HSourceBillNo"].ToString(); string HProcNumber = dic["HProcNumber"].ToString(); ds = oCN.RunProcReturn("select * from Gy_Source where HNumber='" + dic["HSouceNumber"].ToString() + "' ", "Gy_Source"); long HSourceID = 0; if (ds.Tables[0].Rows.Count != 0) { HSourceID = long.Parse(ds.Tables[0].Rows[0]["HItemID"].ToString());//生产资源ID } ds = oCN.RunProcReturn("select * from Gy_Department where HNumber='" + dic["HDeptNumber"].ToString() + "' ", "Gy_Department"); long HDeptID = 0; if (ds.Tables[0].Rows.Count != 0) { HDeptID = long.Parse(ds.Tables[0].Rows[0]["HItemID"].ToString());//生产部门 } ds = oCN.RunProcReturn(@"select b.HProcNo,b.HProcID,a.HMaterID,a.HQty,a.HInterID,HEntryID,a.HICMOInterID,a.HICMOEntryID,a.HICMOBillNo from Sc_ProcessExchangeBillMain a inner join Sc_ProcessExchangeBillSub b on a.HInterID=b.HInterID left join Gy_Process p on b.HProcID=p.HItemID where a.HBillNo='" + HProcExchBillNo + "' and p.HNumber='" + HProcNumber + "'", "Sc_ProcessExchangeBillMain"); string sExeReturnInfo = ""; long HMainInterID = 0; string BillType = "3791"; string HBillSubType = "3791"; int HBillStatus = 1; string HMaker = "";//制单人 string HMouldNum = "";//模穴号 int HYear = DateTime.Now.Year; double HPeriod = DateTime.Now.Month; string HRemark = "";//备注 string HSourceName = "";//生产资源名称 double HPieceQty = double.Parse(ds.Tables[0].Rows[0]["HQty"].ToString());//进站PCS数 double HWasterQty = 0;//报废数量 double HPlanPieceQty = 0;//进站PNL数 double HBadPNL = 0;//报废PNL数 long HICMOInterID = long.Parse(ds.Tables[0].Rows[0]["HICMOInterID"].ToString());//任务单ID long HICMOEntryID = long.Parse(ds.Tables[0].Rows[0]["HICMOEntryID"].ToString());//任务单ID string HICMOBillNo = ds.Tables[0].Rows[0]["HICMOBillNo"].ToString();//任务单 int HProcPlanInterID = 0; int HProcPlanEntryID = 0; string HProcPlanBillNo = ""; long HProcExchInterID = long.Parse(ds.Tables[0].Rows[0]["HInterID"].ToString()); long HProcExchEntryID = long.Parse(ds.Tables[0].Rows[0]["HEntryID"].ToString()); long HMaterID = long.Parse(ds.Tables[0].Rows[0]["HMaterID"].ToString());//产品ID long HProcID = long.Parse(ds.Tables[0].Rows[0]["HProcID"].ToString());//当前工序ID double HICMOQty = double.Parse(ds.Tables[0].Rows[0]["HQty"].ToString());//任务单数量 double HPlanQty = double.Parse(ds.Tables[0].Rows[0]["HQty"].ToString());//移交PNL数 DateTime HStationOutTime = DateTime.Now;//汇报时间 long HPayProcID = 0;//核算工序ID long HGroupID = 22;//班组ID 白班 long HEmpID = 0;//操作员ID long HEmpID2 = 0;////操作员2ID string HBarCode = HProcExchBillNo;//条形码 string HAddr = ""; string HBarCodeMaker = ""; long HSourceID2 = 0;//生产资源2ID long HSourceID3 = 0;//生产资源3ID long HSourceID4 = 0;//生产资源4ID long HSourceID5 = 0;//生产资源5ID long HSupID = 0; double HQty = 0;//合格数量 double HPrice = 0; double HMoney = 0; double HBadCount = 0;//不良数量 long HCenterID = 0;//工作中心ID string HProcNo = ds.Tables[0].Rows[0]["HProcNo"].ToString();//流水号 string HOrderProcNO = "";//订单跟踪号 string HSourceNameList = "";//设备清单 string HMainSourceBillType = "3790"; bool HLastSubProc = false;//转下工序 long HEmpID3 = 0;//操作员3ID long HEmpID4 = 0;//操作员4ID long HEmpID5 = 0;//操作员5ID double HDSQty = 0;//折弯刀数 double HChongQty = 0;//NCT冲次数 double HPriceRate = 0;//系数 double HWorkTimes = 0;//工时 long HQCCheckID = 0;//检验员ID long HPRDOrgID = 100199;//组织ID double HmaterOutqty = 0;//白坯发布 double HProcPriceRate = 0;//工价系数 int HTemporaryAreaID = 0;//暂放区 long HInterID = 0; string HBillNo = ""; oCN.BeginTran(); //判断当前流转卡的出站单 是否有数据 ds = oCN.RunProcReturn(@"select * from Sc_StationOutBillMain a left join Gy_Process p on a.HProcID=p.HItemID where HProcExchBillNo='" + HProcExchBillNo + "' and p.HNumber='" + HProcNumber + "'", "Sc_StationOutBillMain"); if (ds.Tables[0].Rows.Count != 0) { HInterID = long.Parse(ds.Tables[0].Rows[0]["HInterID"].ToString()); HBillNo = ds.Tables[0].Rows[0]["HBillNo"].ToString();//递入type得到的单据号 } if (ds.Tables[0].Rows.Count == 0) { HInterID = CreateBillID("3791", ref sExeReturnInfo);//递入type得到的单据ID HBillNo = CreateBillCode_Prod("3791", ref sExeReturnInfo, true);//递入type得到的单据号 long HMainSourceInterID = HInterID;//递入type得到的单据ID string HMainSourceBillNo = HBillNo;//递入type得到的单据号 oCN.RunProc("Insert Into Sc_StationOutBillMain " + "(HBillType,HBillSubType,HInterID,HBillNo,HBillStatus,HDate,HMaker,HMakeDate,HMouldNum" + ",HYear,HPeriod,HRemark,HSourceName,HPieceQty,HWasterQty,HPlanPieceQty,HBadPNL" + ",HICMOInterID,HICMOBillNo,HProcPlanInterID,HProcPlanEntryID,HProcPlanBillNo,HProcExchInterID,HProcExchEntryID" + ",HProcExchBillNo,HMaterID,HProcID,HICMOQty,HPlanQty,HStationOutTime,HSourceID,HPayProcID" + ",HGroupID,HDeptID,HEmpID,HBarCode,HAddr,HBarCodeMaker,HBarCodeMakeDate,HSourceID2,HSourceID3,HSourceID4,HSourceID5" + ",HSupID,HQty,HPrice,HMoney,HBadCount,HCenterID,HProcNo,HOrderProcNO,HSourceNameList" + ",HMainSourceInterID,HMainSourceBillNo,HMainSourceBillType,HLastSubProc" + ",HEmpID2,HEmpID3,HEmpID4,HEmpID5,HDSQty,HChongQty,HPriceRate,HWorkTimes,HQCCheckID,HMainInterID,HPRDOrgID" + ",HmaterOutqty,HProcPriceRate,HTemporaryAreaID" + ") " + " values('" + BillType + "','" + HBillSubType + "'," + HInterID + ",'" + HBillNo + "'," + HBillStatus + ",getdate(),'" + HMaker + "',getdate(),'" + HMouldNum + "'" + "," + HYear + "," + HPeriod + ",'" + HRemark + "','" + HSourceName + "'," + HPieceQty + "," + HWasterQty + "," + HPlanPieceQty + "," + HBadPNL + "," + HICMOInterID + ",'" + HICMOBillNo + "'," + HProcPlanInterID + "," + HProcPlanEntryID + ",'" + HProcPlanBillNo + "'," + HProcExchInterID + "," + HProcExchEntryID + ",'" + HProcExchBillNo + "'," + HMaterID + "," + HProcID + "," + HICMOQty + "," + HPlanQty + ",getdate()," + HSourceID + "," + HPayProcID + "," + HGroupID + "," + HDeptID + "," + HEmpID + ",'" + HBarCode + "','" + HAddr + "','" + HBarCodeMaker + "',getdate()" + "," + HSourceID2 + "," + HSourceID3 + "," + HSourceID4 + "," + HSourceID5 + "," + HSupID + "," + HQty + "," + HPrice + "," + HMoney + "," + HBadCount + "," + HCenterID + "," + HProcNo + ",'" + HOrderProcNO + "'" + ",'" + HSourceNameList + "'" + "," + HMainSourceInterID + ",'" + HMainSourceBillNo + "','" + HMainSourceBillType + "'," + Convert.ToString(HLastSubProc ? 1 : 0) + "," + HEmpID2 + "," + HEmpID3 + "," + HEmpID4 + "," + HEmpID5 + "," + HDSQty + "," + HChongQty + "," + HPriceRate + "," + HWorkTimes + "," + HQCCheckID + "," + HMainInterID + "," + HPRDOrgID + "," + HmaterOutqty + "," + HProcPriceRate + "," + HTemporaryAreaID + ") "); } if (HResult == "OK") { ds = oCN.RunProcReturn("select * from Sc_StationOutBillSub_SN where HInterID='" + HInterID + "' order by HEntryID desc", "Sc_StationOutBillSub_SN"); oCN.RunProc($@"insert into Sc_StationOutBillSub_SN(HInterID,HBillNo_bak,HEntryID,HBarCode,HBarCodeQty,HMakeTime,HRemark,HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney) values({ HInterID}, '{ HBillNo}', {(ds.Tables[0].Rows.Count == 0 ? 1 : int.Parse(ds.Tables[0].Rows[0]["HEntryID"].ToString()) + 1)}, '{HBadCodeSN}', 1, GETDATE(), '', " + HProcExchInterID + "," + HProcExchEntryID + ", '" + HProcExchBillNo + "', '', 0, 0)"); //反写工序出站单的合格数量 oCN.RunProc("update Sc_StationOutBillMain set HQty+=1 where HProcExchInterID='" + HProcExchInterID + "' and HProcExchEntryID=" + HProcExchEntryID); } else if (HResult == "NG") { //反写工序出站单的不良数量 oCN.RunProc("update Sc_StationOutBillMain set HBadCount+=1 where HProcExchInterID='" + HProcExchInterID + "' and HProcExchEntryID=" + HProcExchEntryID); } else { CustomWriteLog("结果不为OK或NG!", DateTime.Now.ToString("yyyy-MM-dd")); return false; } oCN.Commit(); return true; } catch (Exception e) { CustomWriteLog(e.Message, DateTime.Now.ToString("yyyy-MM-dd")); return false; } } //条码解析 public bool SNHBardCodeList(string HBadCodeSN) { try { DataSet ds = oCN.RunProcReturn(@"select * from Gy_BarCodeBill where HBarCode='" + HBadCodeSN + "'", "Gy_BarCodeBill"); //判断条码是否在数据库里 if (ds.Tables[0].Rows.Count == 0) { //判断长度是否为29位 if (HBadCodeSN.Length == 29) { string str1 = HBadCodeSN.Substring(23, 3); ds = oCN.RunProcReturn("select * from Sc_ProcessExchangeBillMain where HProjectNum like'" + str1 + "-1%'", "Sc_ProcessExchangeBillMain"); //判断是否能找到对应的流转卡 if (ds.Tables[0].Rows.Count > 0) { string HProcExchBillNo = ds.Tables[0].Rows[0]["HBillNo"].ToString(); get_HBardBillSave(HBadCodeSN, HProcExchBillNo); } else { CustomWriteLog("条码:"+ HBadCodeSN + ",流转卡不存在!", DateTime.Now.ToString("yyyy-MM-dd")); return false; } } else { CustomWriteLog("条码:" + HBadCodeSN + ",长度不等于29位!", DateTime.Now.ToString("yyyy-MM-dd")); return false; } } else { CustomWriteLog("条码:" + HBadCodeSN + ",条码已存在数据库!", DateTime.Now.ToString("yyyy-MM-dd")); return false; } return true; } catch (Exception e) { CustomWriteLog("条码:" + HBadCodeSN + "," + e.Message, DateTime.Now.ToString("yyyy-MM-dd")); return false; } } //保存条码数据 public void get_HBardBillSave(string HBarCode, string HProcExchBillNo) { try { //查询流转卡数据 DataSet dataSet = oCN.RunProcReturn(@"select a.HPRDORGID, m.HModel 物料规格,m.HName 名物料称,a.HBillNo,a.HInterID,a.HMaterID,m.HNumber 物料代码,o.HNumber 组织代码,a.HUnitID,u.HNumber 单位代码 from Sc_ProcessExchangeBillMain a left join Gy_Material m on a.HMaterID=m.HItemID left join Xt_ORGANIZATIONS o on a.HPRDORGID=o.HItemID left join Gy_Unit u on a.HUnitID=u.HItemID where HBillNo='" + HProcExchBillNo + "'", "Sc_ProcessExchangeBillMain"); string HMaterNumber = dataSet.Tables[0].Rows[0]["物料代码"].ToString(); string HOrgNumber = dataSet.Tables[0].Rows[0]["组织代码"].ToString(); //判断流转卡不能为空 if (HBarCode.Trim() == "") { CustomWriteLog("条码:" + HBarCode + ",流转卡不能为空!", DateTime.Now.ToString("yyyy-MM-dd")); //objJsonResult.code = "0"; //objJsonResult.count = 0; //objJsonResult.Message = "条形码不能为空,不能生成条码!"; //return objJsonResult; } oCN.BeginTran(); //日期获取方式 string sDate = DateTime.Now.ToString(); string HWei = "0"; //尾数 string HBarCodeType = "唯一条码"; Int64 HMaterID = int.Parse(dataSet.Tables[0].Rows[0]["HMaterID"].ToString()); Int64 HAuxPropID = 0; Int64 HUnitID = int.Parse(dataSet.Tables[0].Rows[0]["HUnitID"].ToString()); double HQty2 = 1; string HBatchNo2 = ""; Int64 HSupID = 0; Int64 HGroupID = 0; int HPrintQty = 0; Int64 HSourceInterID = int.Parse(dataSet.Tables[0].Rows[0]["HInterID"].ToString()); Int64 HSourceEntryID = 1; string HSourceBillNo = dataSet.Tables[0].Rows[0]["HBillNo"].ToString(); string HSourceBillType = "3772"; Int64 HBarcodeNo = 0; //托号 Int64 HBarcodeQtys = 0; //总托数 Int64 HDeptID = 0; Int64 HWhID = 0; Int64 HSPID = 0; string HRemark = ""; string HMaterName = dataSet.Tables[0].Rows[0]["名物料称"].ToString(); string HMaterModel = dataSet.Tables[0].Rows[0]["物料规格"].ToString(); string HPinfan = ""; string HMTONo = ""; Int64 HCusID = 0; string HCusType = ""; DateTime HEndDate = DateTime.Now; string HWorkLineName = ""; string HSeOrderBillNo = ""; string HInnerBillNo = ""; bool HGiveAwayFlag = false; Int64 HEntryID = 1; string sExeReturnInfo = ""; Int64 HInterID = CreateBillID_Prod("85", ref sExeReturnInfo); int HOrgID = int.Parse(dataSet.Tables[0].Rows[0]["HPRDORGID"].ToString()); string HCoilNO2 = ""; string HFurnaceNO2 = ""; string HFactory2 = ""; decimal HAuxQty2 = 0; string HheatNO2 = ""; oCN.RunProc("insert into Gy_BarCodeBill (HBarCode,HBarCodeType,HMaterID,HUnitID,HQty" + ",HBatchNo,HSupID,HGroupID,HMaker,HMakeDate,HPrintQty,HinitQty" + ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HEndQty " + ",HBarcodeQtys,HBarcodeNo,HDeptID,HWhID,HSPID,HRemark " + ",HCusID,HCusType,HEndDate,HWorkLineName,HBarCodeDate " + ",HSTOCKORGID,HOWNERID,HSeOrderBillNo,HInterID,HEntryID " + ",HGiveAwayFlag " + ",HMaterName,HMaterModel,HPinfan,HAuxPropID,HMTONo,HInnerBillNo" + ",HProduceDate,HExpiryDate " + ") values (" + "'" + HBarCode + "','" + HBarCodeType + "'," + HMaterID.ToString() + "," + HUnitID.ToString() + "," + HQty2.ToString() + ",'" + HBatchNo2 + "'," + HSupID.ToString() + "," + HGroupID.ToString() + ",'',getdate()," + HPrintQty.ToString() + "," + HQty2.ToString() + ", " + HSourceInterID.ToString() + "," + HSourceEntryID.ToString() + ",'" + HSourceBillNo + "','" + HSourceBillType + "','" + HWei + "'" + ", " + HBarcodeQtys.ToString() + "," + HBarcodeNo.ToString() + "," + HDeptID.ToString() + "," + HWhID.ToString() + "," + HSPID.ToString() + ",'" + HRemark + "'" + ", " + HCusID.ToString() + ",'" + HCusType + "','" + HEndDate.ToShortDateString() + "','" + HWorkLineName + "','" + sDate + "'" + ", " + HOrgID.ToString() + "," + HOrgID.ToString() + ",'" + HSeOrderBillNo + "'," + HInterID.ToString() + "," + HEntryID.ToString() + "" + ", " + BoolToString(HGiveAwayFlag) + ",'" + HMaterName + "','" + HMaterModel + "','" + HPinfan + "'," + HAuxPropID.ToString() + ",'" + HMTONo + "','" + HInnerBillNo + "','','')"); oCN.Commit(); } catch (Exception e) { CustomWriteLog("条码:" + HBarCode + "," + e.Message, DateTime.Now.ToString("yyyy-MM-dd")); oCN.RollBack(); } } public static Int64 CreateBillID_Prod(string BillCode, ref string sReturn) { try { string BillType = ""; DataSet Ds; DBHelper oCn = new DBHelper(); Int64 lID; Ds = oCn.RunProcReturn("exec h_p_Xt_GetMaxBillID '" + BillCode + "'", "h_p_Xt_GetMaxBillID"); if (Ds == null || Ds.Tables[0].Rows.Count == 0) { lID = -1; } else { lID = isLong(Ds.Tables[0].Rows[0]["HBillNo"]); } oCn.CnClose(); oCn.CnDispose(); oCn = null; Ds = null; return lID; } catch (Exception e) { return -2; } } //条码补充 public string TM_ZH(string HBadCodeSN) { try { //HBadCodeSN = "P1" + HBadCodeSN; //HBadCodeSN = HBadCodeSN.Substring(0, 13) + ":" + HBadCodeSN.Substring(13, 15); return HBadCodeSN; } catch (Exception e) { CustomWriteLog("条码:" + HBadCodeSN + "," + e.Message, DateTime.Now.ToString("yyyy-MM-dd")); return ""; } } //判断是否是INT64 public static Int64 isLong(object message) { try { return Convert.ToInt64(message); } catch (Exception e) { return 0; } } //布尔转为字符 public static string BoolToString(object b) { try { if (Convert.ToBoolean(b)) return "1"; else return "0"; } catch (Exception e) { return "0"; } } public static Int64 CreateBillID(string BillCode, ref string sReturn) { string BillType = ""; DataSet Ds; DBHelper oCn = new DBHelper(); Int64 lID; Ds = oCn.RunProcReturn("select * from Gy_BillNumber with (nolock) where BillCode='" + BillCode.Trim() + "'", "Gy_BillNumber"); if (Ds.Tables[0].Rows.Count != 0) { lID = isLong(Ds.Tables[0].Rows[0]["IDNow"].ToString()); BillType = Ds.Tables[0].Rows[0]["BillType"].ToString().Trim(); } else { lID = 0; } //同类型单据 自增1 if (BillType.Trim() != "") { oCn.RunProc("update Gy_BillNumber set IDNow=IDNow+1 where BillType='" + BillType.Trim() + "'"); } oCn.CnClose(); oCn.CnDispose(); oCn = null; Ds = null; return lID; } //得到最大单据号 //得到最大单据号 存储过程 public static string CreateBillCode_Prod(string BillCode, ref string sReturn, bool Add) { try { string BillType = ""; DataSet Ds; DBHelper oCn = new DBHelper(); string sBIllNO; Ds = oCn.RunProcReturn("exec h_p_Xt_GetMaxBillNo '" + BillCode + "'", "h_p_Xt_GetMaxBillNo"); if (Ds == null || Ds.Tables[0].Rows.Count == 0) { sBIllNO = "ERROR"; } else { sBIllNO = isStrNull(Ds.Tables[0].Rows[0]["HBillNo"]); } oCn.CnClose(); oCn.CnDispose(); oCn = null; Ds = null; return sBIllNO; } catch (Exception e) { return "ERROR"; } } //判断是否NULL public static string isStrNull(object message) { try { if (message == null) { return ""; } else { return message.ToString().Trim(); } } catch (Exception e) { return ""; } } private static readonly object lockObj = new object(); //写日志 public static void CustomWriteLog(object obj, string FileName, string filePath = "Vlog", bool isAppend = true) { try { lock (lockObj) { filePath = $@"{filePath}\{FileName}.txt"; filePath = AppDomain.CurrentDomain.BaseDirectory + filePath; if (!System.IO.Directory.Exists(Path.GetDirectoryName(filePath))) { System.IO.Directory.CreateDirectory(Path.GetDirectoryName(filePath)); } bool fileExists = System.IO.File.Exists(filePath); //不存在 则创建该文件 if (!fileExists) { System.IO.File.Create(filePath).Close(); } using (StreamWriter writer = new StreamWriter(filePath, isAppend)) { //存在的时候才写一行 if (fileExists && isAppend) { writer.WriteLine(); } var content = obj is string ? obj : JsonConvert.SerializeObject(obj); writer.WriteLine($"{DateTime.Now} {content}"); } } } catch (Exception ex) { } } //定时读取数据 private void timer1_Tick(object sender, EventArgs e) { int year = DateTime.Now.Year; string month = DateTime.Now.Month.ToString(); string day = DateTime.Now.Day.ToString(); //if (month.Length < 2) { // month = "0" + month; //} //if (day.Length < 2) //{ // day = "0" + day; //} string dataTime = DateTime.Now.ToString("yyyyMMdd"); //CustomWriteLog("1:" + dataTime, DateTime.Now.ToString("yyyy-MM-dd")); ////判断是否有这个文件 bool flag = File.Exists($@"D:\{year}\{month}\{day}\{dataTime}.txt"); //bool flag = File.Exists($@"C:\Users\admin\Desktop\新建文件夹 (2)\20231123.txt"); //CustomWriteLog("2:" + flag, DateTime.Now.ToString("yyyy-MM-dd")); if (flag) { StreamReader stream = new StreamReader($@"D:\{year}\{month}\{day}\{dataTime}.txt", Encoding.GetEncoding("gb2312")); //CustomWriteLog("3:"+ $@"D:\{year}\{month}\{day}\{dataTime}.txt", DateTime.Now.ToString("yyyy-MM-dd")); //StreamReader stream = new StreamReader($@"C:\Users\admin\Desktop\新建文件夹 (2)\20231123.txt",Encoding.GetEncoding("gb2312")); string FileData = stream.ReadToEnd(); stream.Close(); FileData = FileData.Substring(0, FileData.Length - 1); FileData = "[" + FileData + "]"; //CustomWriteLog("4:" + FileData, DateTime.Now.ToString("yyyy-MM-dd")); //JSON序列化转换字典集合 List<Dictionary<string, string>> list = new List<Dictionary<string, string>>(); List<object> DataList = JsonConvert.DeserializeObject<List<object>>(FileData); foreach (JObject item in DataList) { Dictionary<string, string> dic = new Dictionary<string, string>(); foreach (var itm in item.Properties()) { dic.Add(itm.Name, itm.Value.ToString()); } list.Add(dic); } //CustomWriteLog("5:" + list.Count, DateTime.Now.ToString("yyyy-MM-dd")); //获取当前时间 DateTime ActionTime = DateTime.Parse(DateTime.Now.AddMinutes(-1).ToString("yyyy-MM-dd HH:mm:ss")); DateTime EndTime = DateTime.Parse(DateTime.Now.AddMinutes(1).ToString("yyyy-MM-dd HH:mm:00")); //循环集合 for (int i = 0; i < list.Count; i++) { DateTime NowTime = DateTime.Parse(list[i]["HDate"].ToString()); if (NowTime >= ActionTime && NowTime < EndTime) { string HResult = list[i]["HResult"].ToString(); //CustomWriteLog("6:" + HResult, DateTime.Now.ToString("yyyy-MM-dd")); if (HResult == "OK") { HResultOK(list[i]); } else if (HResult == "NG") { HResultNG(list[i]); } } else { //CustomWriteLog("时间不在保存范围内", DateTime.Now.ToString("yyyy-MM-dd")); } } } } } } WFormSynchronizeData_SMR/Form1.resx
New file @@ -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> WFormSynchronizeData_SMR/Program.cs
New file @@ -0,0 +1,22 @@ using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using System.Windows.Forms; namespace WFormSynchronizeData_SMR { static class Program { /// <summary> /// 应用程序的主入口点。 /// </summary> [STAThread] static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Application.Run(new Form1()); } } } WFormSynchronizeData_SMR/Properties/AssemblyInfo.cs
New file @@ -0,0 +1,36 @@ using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; // 有关程序集的一般信息由以下 // 控制。更改这些特性值可修改 // 与程序集关联的信息。 [assembly: AssemblyTitle("WFormSynchronizeData_SMR")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("WFormSynchronizeData_SMR")] [assembly: AssemblyCopyright("Copyright © 2023")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] // 将 ComVisible 设置为 false 会使此程序集中的类型 //对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型 //请将此类型的 ComVisible 特性设置为 true。 [assembly: ComVisible(false)] // 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID [assembly: Guid("7d884b31-a12c-48d4-aa79-eaf174d3fea8")] // 程序集的版本信息由下列四个值组成: // // 主版本 // 次版本 // 生成号 // 修订号 // //可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值 //通过使用 "*",如下所示: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")] WFormSynchronizeData_SMR/Properties/Resources.Designer.cs
New file @@ -0,0 +1,70 @@ //------------------------------------------------------------------------------ // <auto-generated> // 此代码由工具生成。 // 运行时版本: 4.0.30319.42000 // // 对此文件的更改可能导致不正确的行为,如果 // 重新生成代码,则所做更改将丢失。 // </auto-generated> //------------------------------------------------------------------------------ namespace WFormSynchronizeData_SMR.Properties { /// <summary> /// 强类型资源类,用于查找本地化字符串等。 /// </summary> // 此类是由 StronglyTypedResourceBuilder // 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。 // 若要添加或删除成员,请编辑 .ResX 文件,然后重新运行 ResGen // (以 /str 作为命令选项),或重新生成 VS 项目。 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.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 ((resourceMan == null)) { global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("WFormSynchronizeData_SMR.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; } } } } WFormSynchronizeData_SMR/Properties/Resources.resx
New file @@ -0,0 +1,117 @@ <?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.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: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" type="xsd:string" /> <xsd:attribute name="type" type="xsd:string" /> <xsd:attribute name="mimetype" type="xsd:string" /> </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" msdata:Ordinal="1" /> <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> </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=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> </resheader> <resheader name="writer"> <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> </resheader> </root> WFormSynchronizeData_SMR/Properties/Settings.Designer.cs
New file @@ -0,0 +1,29 @@ //------------------------------------------------------------------------------ // <auto-generated> // This code was generated by a tool. // Runtime Version:4.0.30319.42000 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. // </auto-generated> //------------------------------------------------------------------------------ namespace WFormSynchronizeData_SMR.Properties { [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.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; } } } } WFormSynchronizeData_SMR/Properties/Settings.settings
New file @@ -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> WFormSynchronizeData_SMR/WFormSynchronizeData_SMR.csproj
New file @@ -0,0 +1,123 @@ <?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>{7D884B31-A12C-48D4-AA79-EAF174D3FEA8}</ProjectGuid> <OutputType>WinExe</OutputType> <RootNamespace>WFormSynchronizeData_SMR</RootNamespace> <AssemblyName>WFormSynchronizeData_SMR</AssemblyName> <TargetFrameworkVersion>v4.5</TargetFrameworkVersion> <FileAlignment>512</FileAlignment> <Deterministic>true</Deterministic> <IsWebBootstrapper>false</IsWebBootstrapper> <PublishUrl>D:\网站发布\智云MESWMS\SMRDataTimeRead\</PublishUrl> <Install>true</Install> <InstallFrom>Disk</InstallFrom> <UpdateEnabled>false</UpdateEnabled> <UpdateMode>Foreground</UpdateMode> <UpdateInterval>7</UpdateInterval> <UpdateIntervalUnits>Days</UpdateIntervalUnits> <UpdatePeriodically>false</UpdatePeriodically> <UpdateRequired>false</UpdateRequired> <MapFileExtensions>true</MapFileExtensions> <ApplicationRevision>1</ApplicationRevision> <ApplicationVersion>1.0.0.%2a</ApplicationVersion> <UseApplicationTrust>false</UseApplicationTrust> <PublishWizardCompleted>true</PublishWizardCompleted> <BootstrapperEnabled>true</BootstrapperEnabled> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <PlatformTarget>AnyCPU</PlatformTarget> <DebugSymbols>true</DebugSymbols> <DebugType>full</DebugType> <Optimize>false</Optimize> <OutputPath>bin\Debug\</OutputPath> <DefineConstants>DEBUG;TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <PlatformTarget>AnyCPU</PlatformTarget> <DebugType>pdbonly</DebugType> <Optimize>true</Optimize> <OutputPath>bin\Release\</OutputPath> <DefineConstants>TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> </PropertyGroup> <PropertyGroup> <ManifestCertificateThumbprint>6E6D991B28C37D624ACD5AE839D17D56FECC7FD9</ManifestCertificateThumbprint> </PropertyGroup> <PropertyGroup> <ManifestKeyFile>WFormSynchronizeData_SMR_TemporaryKey.pfx</ManifestKeyFile> </PropertyGroup> <PropertyGroup> <GenerateManifests>true</GenerateManifests> </PropertyGroup> <PropertyGroup> <SignManifests>true</SignManifests> </PropertyGroup> <ItemGroup> <Reference Include="Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL"> <HintPath>..\packages\Newtonsoft.Json.6.0.4\lib\net45\Newtonsoft.Json.dll</HintPath> </Reference> <Reference Include="System" /> <Reference Include="System.Core" /> <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" /> </ItemGroup> <ItemGroup> <Compile Include="DBHelper.cs" /> <Compile Include="Form1.cs"> <SubType>Form</SubType> </Compile> <Compile Include="Form1.Designer.cs"> <DependentUpon>Form1.cs</DependentUpon> </Compile> <Compile Include="Program.cs" /> <Compile Include="Properties\AssemblyInfo.cs" /> <EmbeddedResource Include="Form1.resx"> <DependentUpon>Form1.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> </Compile> <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> <None Include="WFormSynchronizeData_SMR_TemporaryKey.pfx" /> </ItemGroup> <ItemGroup> <None Include="App.config" /> </ItemGroup> <ItemGroup> <BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1"> <Visible>False</Visible> <ProductName>.NET Framework 3.5 SP1</ProductName> <Install>false</Install> </BootstrapperPackage> </ItemGroup> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> </Project> WFormSynchronizeData_SMR/WFormSynchronizeData_SMR.csproj.user
New file @@ -0,0 +1,17 @@ <?xml version="1.0" encoding="utf-8"?> <Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <PropertyGroup> <PublishUrlHistory /> <InstallUrlHistory /> <SupportUrlHistory /> <UpdateUrlHistory /> <BootstrapperUrlHistory /> <ErrorReportUrlHistory /> <FallbackCulture>zh-CN</FallbackCulture> <VerifyUploadedFiles>false</VerifyUploadedFiles> <ProjectView>ProjectFiles</ProjectView> </PropertyGroup> <PropertyGroup> <EnableSecurityDebugging>false</EnableSecurityDebugging> </PropertyGroup> </Project> WFormSynchronizeData_SMR/WFormSynchronizeData_SMR_TemporaryKey.pfxBinary files differ
WFormSynchronizeData_SMR/bin/Debug.rarBinary files differ
WFormSynchronizeData_SMR/bin/Debug/Newtonsoft.Json.dllBinary files differ
WFormSynchronizeData_SMR/bin/Debug/Newtonsoft.Json.xml
New file Diff too large WFormSynchronizeData_SMR/bin/Debug/WFormSynchronizeData_SMR.application
New file @@ -0,0 +1,21 @@ <?xml version="1.0" encoding="utf-8"?> <asmv1:assembly xsi:schemaLocation="urn:schemas-microsoft-com:asm.v1 assembly.adaptive.xsd" manifestVersion="1.0" xmlns:asmv1="urn:schemas-microsoft-com:asm.v1" xmlns="urn:schemas-microsoft-com:asm.v2" xmlns:asmv2="urn:schemas-microsoft-com:asm.v2" xmlns:xrml="urn:mpeg:mpeg21:2003:01-REL-R-NS" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:asmv3="urn:schemas-microsoft-com:asm.v3" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" xmlns:co.v1="urn:schemas-microsoft-com:clickonce.v1" xmlns:co.v2="urn:schemas-microsoft-com:clickonce.v2"> <assemblyIdentity name="WFormSynchronizeData_SMR.application" version="1.0.0.1" publicKeyToken="0000000000000000" language="neutral" processorArchitecture="msil" xmlns="urn:schemas-microsoft-com:asm.v1" /> <description asmv2:publisher="WFormSynchronizeData_SMR" asmv2:product="WFormSynchronizeData_SMR" xmlns="urn:schemas-microsoft-com:asm.v1" /> <deployment install="true" mapFileExtensions="true" /> <compatibleFrameworks xmlns="urn:schemas-microsoft-com:clickonce.v2"> <framework targetVersion="4.5" profile="Full" supportedRuntime="4.0.30319" /> </compatibleFrameworks> <dependency> <dependentAssembly dependencyType="install" codebase="WFormSynchronizeData_SMR.exe.manifest" size="4202"> <assemblyIdentity name="WFormSynchronizeData_SMR.exe" version="1.0.0.1" publicKeyToken="0000000000000000" language="neutral" processorArchitecture="msil" type="win32" /> <hash> <dsig:Transforms> <dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" /> </dsig:Transforms> <dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" /> <dsig:DigestValue>uf0WiSBwT/9DUkKa2nmM7sw9fCt6MVa+eUVdhlMR5p8=</dsig:DigestValue> </hash> </dependentAssembly> </dependency> </asmv1:assembly> WFormSynchronizeData_SMR/bin/Debug/WFormSynchronizeData_SMR.exeBinary files differ
WFormSynchronizeData_SMR/bin/Debug/WFormSynchronizeData_SMR.exe.config
New file @@ -0,0 +1,6 @@ <?xml version="1.0" encoding="utf-8" ?> <configuration> <startup> <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" /> </startup> </configuration> WFormSynchronizeData_SMR/bin/Debug/WFormSynchronizeData_SMR.exe.manifest
New file @@ -0,0 +1,77 @@ <?xml version="1.0" encoding="utf-8"?> <asmv1:assembly xsi:schemaLocation="urn:schemas-microsoft-com:asm.v1 assembly.adaptive.xsd" manifestVersion="1.0" xmlns:asmv1="urn:schemas-microsoft-com:asm.v1" xmlns="urn:schemas-microsoft-com:asm.v2" xmlns:asmv2="urn:schemas-microsoft-com:asm.v2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:co.v1="urn:schemas-microsoft-com:clickonce.v1" xmlns:asmv3="urn:schemas-microsoft-com:asm.v3" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" xmlns:co.v2="urn:schemas-microsoft-com:clickonce.v2"> <asmv1:assemblyIdentity name="WFormSynchronizeData_SMR.exe" version="1.0.0.1" publicKeyToken="0000000000000000" language="neutral" processorArchitecture="msil" type="win32" /> <application /> <entryPoint> <assemblyIdentity name="WFormSynchronizeData_SMR" version="1.0.0.0" language="neutral" processorArchitecture="msil" /> <commandLine file="WFormSynchronizeData_SMR.exe" parameters="" /> </entryPoint> <trustInfo> <security> <applicationRequestMinimum> <PermissionSet Unrestricted="true" ID="Custom" SameSite="site" /> <defaultAssemblyRequest permissionSetReference="Custom" /> </applicationRequestMinimum> <requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3"> <!-- UAC 清单选项 如果要更改 Windows 用户帐户控制级别,请用以下节点之一替换 requestedExecutionLevel 节点。 <requestedExecutionLevel level="asInvoker" uiAccess="false" /> <requestedExecutionLevel level="requireAdministrator" uiAccess="false" /> <requestedExecutionLevel level="highestAvailable" uiAccess="false" /> 如果要利用文件和注册表虚拟化提供 向后兼容性,请删除 requestedExecutionLevel 节点。 --> <requestedExecutionLevel level="asInvoker" uiAccess="false" /> </requestedPrivileges> </security> </trustInfo> <dependency> <dependentOS> <osVersionInfo> <os majorVersion="5" minorVersion="1" buildNumber="2600" servicePackMajor="0" /> </osVersionInfo> </dependentOS> </dependency> <dependency> <dependentAssembly dependencyType="preRequisite" allowDelayedBinding="true"> <assemblyIdentity name="Microsoft.Windows.CommonLanguageRuntime" version="4.0.30319.0" /> </dependentAssembly> </dependency> <dependency> <dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="Newtonsoft.Json.dll" size="502272"> <assemblyIdentity name="Newtonsoft.Json" version="6.0.0.0" publicKeyToken="30AD4FE6B2A6AEED" language="neutral" processorArchitecture="msil" /> <hash> <dsig:Transforms> <dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" /> </dsig:Transforms> <dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" /> <dsig:DigestValue>Dt+sa+EXMt3ZnbZoIe5HQIwtwem+1o5e+ajhMMVlt5s=</dsig:DigestValue> </hash> </dependentAssembly> </dependency> <dependency> <dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="WFormSynchronizeData_SMR.exe" size="30640"> <assemblyIdentity name="WFormSynchronizeData_SMR" version="1.0.0.0" language="neutral" processorArchitecture="msil" /> <hash> <dsig:Transforms> <dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" /> </dsig:Transforms> <dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" /> <dsig:DigestValue>98DYzgSmfH8AHD9uUMg4KAbOtn019mEMUQ2YBbrkfi4=</dsig:DigestValue> </hash> </dependentAssembly> </dependency> <file name="WFormSynchronizeData_SMR.exe.config" size="187"> <hash> <dsig:Transforms> <dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" /> </dsig:Transforms> <dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" /> <dsig:DigestValue>xm4bo26HQ0LNVwz1vdPYtzhkpMnp2AI5i+f0b+OahTI=</dsig:DigestValue> </hash> </file> </asmv1:assembly> WFormSynchronizeData_SMR/bin/Debug/WFormSynchronizeData_SMR.pdbBinary files differ
WFormSynchronizeData_SMR/bin/Debug/app.publish/WFormSynchronizeData_SMR.exeBinary files differ
WFormSynchronizeData_SMR/obj/Debug/.NETFramework,Version=v4.5.AssemblyAttributes.cs
New file @@ -0,0 +1,4 @@ // <autogenerated /> using System; using System.Reflection; [assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.5", FrameworkDisplayName = ".NET Framework 4.5")] WFormSynchronizeData_SMR/obj/Debug/DesignTimeResolveAssemblyReferences.cacheBinary files differ
WFormSynchronizeData_SMR/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cacheBinary files differ
WFormSynchronizeData_SMR/obj/Debug/WFormSynchronizeData_SMR.Form1.resourcesBinary files differ
WFormSynchronizeData_SMR/obj/Debug/WFormSynchronizeData_SMR.Properties.Resources.resourcesBinary files differ
WFormSynchronizeData_SMR/obj/Debug/WFormSynchronizeData_SMR.application
New file @@ -0,0 +1,21 @@ <?xml version="1.0" encoding="utf-8"?> <asmv1:assembly xsi:schemaLocation="urn:schemas-microsoft-com:asm.v1 assembly.adaptive.xsd" manifestVersion="1.0" xmlns:asmv1="urn:schemas-microsoft-com:asm.v1" xmlns="urn:schemas-microsoft-com:asm.v2" xmlns:asmv2="urn:schemas-microsoft-com:asm.v2" xmlns:xrml="urn:mpeg:mpeg21:2003:01-REL-R-NS" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:asmv3="urn:schemas-microsoft-com:asm.v3" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" xmlns:co.v1="urn:schemas-microsoft-com:clickonce.v1" xmlns:co.v2="urn:schemas-microsoft-com:clickonce.v2"> <assemblyIdentity name="WFormSynchronizeData_SMR.application" version="1.0.0.1" publicKeyToken="0000000000000000" language="neutral" processorArchitecture="msil" xmlns="urn:schemas-microsoft-com:asm.v1" /> <description asmv2:publisher="WFormSynchronizeData_SMR" asmv2:product="WFormSynchronizeData_SMR" xmlns="urn:schemas-microsoft-com:asm.v1" /> <deployment install="true" mapFileExtensions="true" /> <compatibleFrameworks xmlns="urn:schemas-microsoft-com:clickonce.v2"> <framework targetVersion="4.5" profile="Full" supportedRuntime="4.0.30319" /> </compatibleFrameworks> <dependency> <dependentAssembly dependencyType="install" codebase="WFormSynchronizeData_SMR.exe.manifest" size="4202"> <assemblyIdentity name="WFormSynchronizeData_SMR.exe" version="1.0.0.1" publicKeyToken="0000000000000000" language="neutral" processorArchitecture="msil" type="win32" /> <hash> <dsig:Transforms> <dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" /> </dsig:Transforms> <dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" /> <dsig:DigestValue>uf0WiSBwT/9DUkKa2nmM7sw9fCt6MVa+eUVdhlMR5p8=</dsig:DigestValue> </hash> </dependentAssembly> </dependency> </asmv1:assembly> WFormSynchronizeData_SMR/obj/Debug/WFormSynchronizeData_SMR.csproj.AssemblyReference.cacheBinary files differ
WFormSynchronizeData_SMR/obj/Debug/WFormSynchronizeData_SMR.csproj.CopyComplete
WFormSynchronizeData_SMR/obj/Debug/WFormSynchronizeData_SMR.csproj.CoreCompileInputs.cache
New file @@ -0,0 +1 @@ d3ffa99fd02ef05cffd327784f4d2dee5086fd11 WFormSynchronizeData_SMR/obj/Debug/WFormSynchronizeData_SMR.csproj.FileListAbsolute.txt
New file @@ -0,0 +1,16 @@ C:\Users\admin\Desktop\WFormSynchronizeData_SMR\WFormSynchronizeData_SMR\bin\Debug\WFormSynchronizeData_SMR.exe.config C:\Users\admin\Desktop\WFormSynchronizeData_SMR\WFormSynchronizeData_SMR\bin\Debug\WFormSynchronizeData_SMR.exe.manifest C:\Users\admin\Desktop\WFormSynchronizeData_SMR\WFormSynchronizeData_SMR\bin\Debug\WFormSynchronizeData_SMR.application C:\Users\admin\Desktop\WFormSynchronizeData_SMR\WFormSynchronizeData_SMR\bin\Debug\WFormSynchronizeData_SMR.exe C:\Users\admin\Desktop\WFormSynchronizeData_SMR\WFormSynchronizeData_SMR\bin\Debug\WFormSynchronizeData_SMR.pdb C:\Users\admin\Desktop\WFormSynchronizeData_SMR\WFormSynchronizeData_SMR\bin\Debug\Newtonsoft.Json.dll C:\Users\admin\Desktop\WFormSynchronizeData_SMR\WFormSynchronizeData_SMR\bin\Debug\Newtonsoft.Json.xml C:\Users\admin\Desktop\WFormSynchronizeData_SMR\WFormSynchronizeData_SMR\obj\Debug\WFormSynchronizeData_SMR.Form1.resources C:\Users\admin\Desktop\WFormSynchronizeData_SMR\WFormSynchronizeData_SMR\obj\Debug\WFormSynchronizeData_SMR.Properties.Resources.resources C:\Users\admin\Desktop\WFormSynchronizeData_SMR\WFormSynchronizeData_SMR\obj\Debug\WFormSynchronizeData_SMR.csproj.GenerateResource.cache C:\Users\admin\Desktop\WFormSynchronizeData_SMR\WFormSynchronizeData_SMR\obj\Debug\WFormSynchronizeData_SMR.csproj.CoreCompileInputs.cache C:\Users\admin\Desktop\WFormSynchronizeData_SMR\WFormSynchronizeData_SMR\obj\Debug\WFormSynchronizeData_SMR.exe.manifest C:\Users\admin\Desktop\WFormSynchronizeData_SMR\WFormSynchronizeData_SMR\obj\Debug\WFormSynchronizeData_SMR.application C:\Users\admin\Desktop\WFormSynchronizeData_SMR\WFormSynchronizeData_SMR\obj\Debug\WFormSynchronizeData_SMR.csproj.CopyComplete C:\Users\admin\Desktop\WFormSynchronizeData_SMR\WFormSynchronizeData_SMR\obj\Debug\WFormSynchronizeData_SMR.exe C:\Users\admin\Desktop\WFormSynchronizeData_SMR\WFormSynchronizeData_SMR\obj\Debug\WFormSynchronizeData_SMR.pdb WFormSynchronizeData_SMR/obj/Debug/WFormSynchronizeData_SMR.csproj.GenerateResource.cacheBinary files differ
WFormSynchronizeData_SMR/obj/Debug/WFormSynchronizeData_SMR.exeBinary files differ
WFormSynchronizeData_SMR/obj/Debug/WFormSynchronizeData_SMR.exe.manifest
New file @@ -0,0 +1,77 @@ <?xml version="1.0" encoding="utf-8"?> <asmv1:assembly xsi:schemaLocation="urn:schemas-microsoft-com:asm.v1 assembly.adaptive.xsd" manifestVersion="1.0" xmlns:asmv1="urn:schemas-microsoft-com:asm.v1" xmlns="urn:schemas-microsoft-com:asm.v2" xmlns:asmv2="urn:schemas-microsoft-com:asm.v2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:co.v1="urn:schemas-microsoft-com:clickonce.v1" xmlns:asmv3="urn:schemas-microsoft-com:asm.v3" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" xmlns:co.v2="urn:schemas-microsoft-com:clickonce.v2"> <asmv1:assemblyIdentity name="WFormSynchronizeData_SMR.exe" version="1.0.0.1" publicKeyToken="0000000000000000" language="neutral" processorArchitecture="msil" type="win32" /> <application /> <entryPoint> <assemblyIdentity name="WFormSynchronizeData_SMR" version="1.0.0.0" language="neutral" processorArchitecture="msil" /> <commandLine file="WFormSynchronizeData_SMR.exe" parameters="" /> </entryPoint> <trustInfo> <security> <applicationRequestMinimum> <PermissionSet Unrestricted="true" ID="Custom" SameSite="site" /> <defaultAssemblyRequest permissionSetReference="Custom" /> </applicationRequestMinimum> <requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3"> <!-- UAC 清单选项 如果要更改 Windows 用户帐户控制级别,请用以下节点之一替换 requestedExecutionLevel 节点。 <requestedExecutionLevel level="asInvoker" uiAccess="false" /> <requestedExecutionLevel level="requireAdministrator" uiAccess="false" /> <requestedExecutionLevel level="highestAvailable" uiAccess="false" /> 如果要利用文件和注册表虚拟化提供 向后兼容性,请删除 requestedExecutionLevel 节点。 --> <requestedExecutionLevel level="asInvoker" uiAccess="false" /> </requestedPrivileges> </security> </trustInfo> <dependency> <dependentOS> <osVersionInfo> <os majorVersion="5" minorVersion="1" buildNumber="2600" servicePackMajor="0" /> </osVersionInfo> </dependentOS> </dependency> <dependency> <dependentAssembly dependencyType="preRequisite" allowDelayedBinding="true"> <assemblyIdentity name="Microsoft.Windows.CommonLanguageRuntime" version="4.0.30319.0" /> </dependentAssembly> </dependency> <dependency> <dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="Newtonsoft.Json.dll" size="502272"> <assemblyIdentity name="Newtonsoft.Json" version="6.0.0.0" publicKeyToken="30AD4FE6B2A6AEED" language="neutral" processorArchitecture="msil" /> <hash> <dsig:Transforms> <dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" /> </dsig:Transforms> <dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" /> <dsig:DigestValue>Dt+sa+EXMt3ZnbZoIe5HQIwtwem+1o5e+ajhMMVlt5s=</dsig:DigestValue> </hash> </dependentAssembly> </dependency> <dependency> <dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="WFormSynchronizeData_SMR.exe" size="30640"> <assemblyIdentity name="WFormSynchronizeData_SMR" version="1.0.0.0" language="neutral" processorArchitecture="msil" /> <hash> <dsig:Transforms> <dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" /> </dsig:Transforms> <dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" /> <dsig:DigestValue>98DYzgSmfH8AHD9uUMg4KAbOtn019mEMUQ2YBbrkfi4=</dsig:DigestValue> </hash> </dependentAssembly> </dependency> <file name="WFormSynchronizeData_SMR.exe.config" size="187"> <hash> <dsig:Transforms> <dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" /> </dsig:Transforms> <dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" /> <dsig:DigestValue>xm4bo26HQ0LNVwz1vdPYtzhkpMnp2AI5i+f0b+OahTI=</dsig:DigestValue> </hash> </file> </asmv1:assembly> WFormSynchronizeData_SMR/obj/Debug/WFormSynchronizeData_SMR.pdbBinary files differ
WFormSynchronizeData_SMR/packages.config
New file @@ -0,0 +1,4 @@ <?xml version="1.0" encoding="utf-8"?> <packages> <package id="Newtonsoft.Json" version="6.0.4" targetFramework="net45" /> </packages> packages/Newtonsoft.Json.6.0.4/.signature.p7sBinary files differ
packages/Newtonsoft.Json.6.0.4/Newtonsoft.Json.6.0.4.nupkgBinary files differ
packages/Newtonsoft.Json.6.0.4/lib/net20/Newtonsoft.Json.dllBinary files differ
packages/Newtonsoft.Json.6.0.4/lib/net20/Newtonsoft.Json.xml
New file Diff too large packages/Newtonsoft.Json.6.0.4/lib/net35/Newtonsoft.Json.dllBinary files differ
packages/Newtonsoft.Json.6.0.4/lib/net35/Newtonsoft.Json.xml
New file Diff too large packages/Newtonsoft.Json.6.0.4/lib/net40/Newtonsoft.Json.dllBinary files differ
packages/Newtonsoft.Json.6.0.4/lib/net40/Newtonsoft.Json.xml
New file Diff too large packages/Newtonsoft.Json.6.0.4/lib/net45/Newtonsoft.Json.dllBinary files differ
packages/Newtonsoft.Json.6.0.4/lib/net45/Newtonsoft.Json.xml
New file Diff too large packages/Newtonsoft.Json.6.0.4/lib/netcore45/Newtonsoft.Json.dllBinary files differ
packages/Newtonsoft.Json.6.0.4/lib/netcore45/Newtonsoft.Json.xml
New file Diff too large packages/Newtonsoft.Json.6.0.4/lib/portable-net40+sl5+wp80+win8+wpa81/Newtonsoft.Json.dllBinary files differ
packages/Newtonsoft.Json.6.0.4/lib/portable-net40+sl5+wp80+win8+wpa81/Newtonsoft.Json.xml
New file Diff too large packages/Newtonsoft.Json.6.0.4/lib/portable-net45+wp80+win8+wpa81/Newtonsoft.Json.dllBinary files differ
packages/Newtonsoft.Json.6.0.4/lib/portable-net45+wp80+win8+wpa81/Newtonsoft.Json.xml
New file Diff too large packages/Newtonsoft.Json.6.0.4/tools/install.ps1
New file @@ -0,0 +1,93 @@ param($installPath, $toolsPath, $package, $project) # open json.net splash page on package install # don't open if json.net is installed as a dependency try { $url = "http://james.newtonking.com/json" $dte2 = Get-Interface $dte ([EnvDTE80.DTE2]) if ($dte2.ActiveWindow.Caption -eq "Package Manager Console") { # user is installing from VS NuGet console # get reference to the window, the console host and the input history # show webpage if "install-package newtonsoft.json" was last input $consoleWindow = $(Get-VSComponentModel).GetService([NuGetConsole.IPowerConsoleWindow]) $props = $consoleWindow.GetType().GetProperties([System.Reflection.BindingFlags]::Instance -bor ` [System.Reflection.BindingFlags]::NonPublic) $prop = $props | ? { $_.Name -eq "ActiveHostInfo" } | select -first 1 if ($prop -eq $null) { return } $hostInfo = $prop.GetValue($consoleWindow) if ($hostInfo -eq $null) { return } $history = $hostInfo.WpfConsole.InputHistory.History $lastCommand = $history | select -last 1 if ($lastCommand) { $lastCommand = $lastCommand.Trim().ToLower() if ($lastCommand.StartsWith("install-package") -and $lastCommand.Contains("newtonsoft.json")) { $dte2.ItemOperations.Navigate($url) | Out-Null } } } else { # user is installing from VS NuGet dialog # get reference to the window, then smart output console provider # show webpage if messages in buffered console contains "installing...newtonsoft.json" in last operation $instanceField = [NuGet.Dialog.PackageManagerWindow].GetField("CurrentInstance", [System.Reflection.BindingFlags]::Static -bor ` [System.Reflection.BindingFlags]::NonPublic) $consoleField = [NuGet.Dialog.PackageManagerWindow].GetField("_smartOutputConsoleProvider", [System.Reflection.BindingFlags]::Instance -bor ` [System.Reflection.BindingFlags]::NonPublic) if ($instanceField -eq $null -or $consoleField -eq $null) { return } $instance = $instanceField.GetValue($null) if ($instance -eq $null) { return } $consoleProvider = $consoleField.GetValue($instance) if ($consoleProvider -eq $null) { return } $console = $consoleProvider.CreateOutputConsole($false) $messagesField = $console.GetType().GetField("_messages", [System.Reflection.BindingFlags]::Instance -bor ` [System.Reflection.BindingFlags]::NonPublic) if ($messagesField -eq $null) { return } $messages = $messagesField.GetValue($console) if ($messages -eq $null) { return } $operations = $messages -split "==============================" $lastOperation = $operations | select -last 1 if ($lastOperation) { $lastOperation = $lastOperation.ToLower() $lines = $lastOperation -split "`r`n" $installMatch = $lines | ? { $_.StartsWith("------- installing...newtonsoft.json ") } | select -first 1 if ($installMatch) { $dte2.ItemOperations.Navigate($url) | Out-Null } } } } catch { # stop potential errors from bubbling up # worst case the splash page won't open } # yolo