master
CaesarBao 2 months ago
parent 06384e1c60
commit 2251d3dc1d

@ -14,6 +14,7 @@ namespace Mesnac.Action.Compressor
{
public class ChangeType : BaseAction, IAction
{
private RuntimeParameter _runtime;
private IBaseControl _lineName = null; //班次
private IBaseControl _productName = null; //物料名称
string ProductType = "ProductType";
@ -34,10 +35,10 @@ namespace Mesnac.Action.Compressor
public void Run(RuntimeParameter runtime)
{
try
{
base.RunIni(runtime); //必须调用
this._runtime = runtime;
ICSharpCode.Core.LoggingService.Debug("开始更换机型..");
//查询产线名称
//ComboBox comboBox1 = base.GetControlById("MCCombobox1") as ComboBox;
@ -48,86 +49,88 @@ namespace Mesnac.Action.Compressor
//string shiftNO = comboBox3.SelectedValue.ToString();
//string linname = comboBox1.SelectedValue.ToString();
string productID = comboBox2.SelectedValue.ToString();
string productName = comboBox2.Text.ToString();
//切换班次
ICSharpCode.Core.LoggingService.Debug("开始查询产线机型..");
//根据产线查询工位所属PLC
List<TBdSubstation> bdSubstations = SubStationHelper.GetSubstationList("A");
if (bdSubstations == null || bdSubstations.Count == 0)
{
ICSharpCode.Core.LoggingService.ErrorFormatted("未查询到产线工位信息..");
MessageBox.Show("未查询到该产线工位信息!", Mesnac.Basic.LanguageHelper.Caption, MessageBoxButtons.OK, MessageBoxIcon.Information);
return;
}
else
{
ICSharpCode.Core.LoggingService.Debug("开始查询产线类别..");
//List<TBdSubstation> bdSubstations = SubStationHelper.GetSubstationList("A");
//if (bdSubstations == null || bdSubstations.Count == 0)
//{
// ICSharpCode.Core.LoggingService.ErrorFormatted("未查询到产线工位信息..");
// MessageBox.Show("未查询到该产线工位信息!", Mesnac.Basic.LanguageHelper.Caption, MessageBoxButtons.OK, MessageBoxIcon.Information);
// return;
//}
//else
//{
//根据机型查询类别
string ProductType = SubStationHelper.GetProductTypeInfoByProductID(productID);
if (string.IsNullOrEmpty(ProductType))
//}
//ICSharpCode.Core.LoggingService.Debug("开始查询产线类别..");
//根据机型查询类别
//string ProductType = SubStationHelper.GetProductTypeInfoByProductID(productID);
//if (string.IsNullOrEmpty(ProductType))
//{
// ICSharpCode.Core.LoggingService.ErrorFormatted("未查询到机种编号{0}对应的机型信息..", productID);
// MessageBox.Show("未查询到该机种对应的机型信息!", Mesnac.Basic.LanguageHelper.Caption, MessageBoxButtons.OK, MessageBoxIcon.Information);
// return;
//}
//object[] data = new object[1];
//data[0] = ProductType;//对照与PLC定义的点位信息
//提示是否开始一键换型
//for (int i = 0; i < bdSubstations.Count; i++)
//{
// //ICSharpCode.Core.LoggingService.Debug("开始查找设备类型.." + bdSubstations[i].PLCName);
// FindPLC(bdSubstations[i].PLCName);
// //if (_equip.Group.Count > 1)
// //{
// foreach (var item in _equip.Group)
// {
// bool iflag = _equip.Write(int.Parse(item.Value.Block.ToString()), 5, data);
// if (iflag)
// {
// ICSharpCode.Core.LoggingService.DebugFormatted("{0}地址下发成功,{1}工位,{2}型号切换成功!}", item.Value.Block.ToString(), bdSubstations[i].StationName, comboBox2.SelectedText.ToString());
// }
// else
// {
// ICSharpCode.Core.LoggingService.ErrorFormatted("{0}工位换型失败!", bdSubstations[i].StationName);
// }
// }
// //}
// i = i + 1;
//}
//机种更换信息插库
TRpProductchangeinfo rpProductchangeinfo = SubStationHelper.GetProductChangeInfoList("A");
if (rpProductchangeinfo != null && rpProductchangeinfo.ProductId != null)
{
//如果存在则更新
rpProductchangeinfo.ProductId = int.Parse(productID);
rpProductchangeinfo.LineName = "A";
rpProductchangeinfo.BeginTime = DateTime.Now;
rpProductchangeinfo.EndTime = DateTime.Now;
if (SubStationHelper.UpdateBaseT_RP_ProductChangeInfo(rpProductchangeinfo))
{
ICSharpCode.Core.LoggingService.ErrorFormatted("未查询到机种编号{0}对应的机型信息..", productID);
MessageBox.Show("未查询到该机种对应的机型信息!", Mesnac.Basic.LanguageHelper.Caption, MessageBoxButtons.OK, MessageBoxIcon.Information);
return;
}
object[] data = new object[1];
data[0] = ProductType;//对照与PLC定义的点位信息
//提示是否开始一键换型
for (int i = 0; i < bdSubstations.Count; i++)
{
//ICSharpCode.Core.LoggingService.Debug("开始查找设备类型.." + bdSubstations[i].PLCName);
FindPLC(bdSubstations[i].PLCName);
//if (_equip.Group.Count > 1)
//{
foreach (var item in _equip.Group)
{
bool iflag = _equip.Write(int.Parse(item.Value.Block.ToString()), 5, data);
if (iflag)
{
ICSharpCode.Core.LoggingService.DebugFormatted("{0}地址下发成功,{1}工位,{2}型号切换成功!}", item.Value.Block.ToString(), bdSubstations[i].StationName, comboBox2.SelectedText.ToString());
}
else
{
ICSharpCode.Core.LoggingService.ErrorFormatted("{0}工位换型失败!", bdSubstations[i].StationName);
}
}
//}
i = i + 1;
}
//机种更换信息插库
TRpProductchangeinfo rpProductchangeinfo = SubStationHelper.GetProductChangeInfoList("A");
if (rpProductchangeinfo != null && rpProductchangeinfo.ProductId != null)
{
//如果存在则更新
rpProductchangeinfo.ProductId = int.Parse(productID);
rpProductchangeinfo.LineName = "A";
rpProductchangeinfo.BeginTime = DateTime.Now;
rpProductchangeinfo.EndTime = DateTime.Now;
if (SubStationHelper.UpdateBaseT_RP_ProductChangeInfo(rpProductchangeinfo))
{
ICSharpCode.Core.LoggingService.Debug("一键换型记录更新成功!");
}
else
{
ICSharpCode.Core.LoggingService.ErrorFormatted("一键换型记录更新失败!");
}
ICSharpCode.Core.LoggingService.Debug("一键换型记录更新成功!" + productName);
}
else
{
//不存在则插入
//TRpProductchangeinfo rpProductchangeinfo = new TRpProductchangeinfo();
rpProductchangeinfo.ProductId = int.Parse(productID);
rpProductchangeinfo.LineName = "A";
rpProductchangeinfo.InsertTime = DateTime.Now;
rpProductchangeinfo.Operator = "1";
rpProductchangeinfo.BeginTime = DateTime.Now;
rpProductchangeinfo.EndTime = DateTime.Now;
rpProductchangeinfo.PersonInCharge = "管理员";
SubStationHelper.InsertProductChangeInfo(rpProductchangeinfo);
ICSharpCode.Core.LoggingService.ErrorFormatted("一键换型记录更新失败!");
}
}
else
{
//不存在则插入
//TRpProductchangeinfo rpProductchangeinfo = new TRpProductchangeinfo();
rpProductchangeinfo.ProductId = int.Parse(productID);
rpProductchangeinfo.LineName = "A";
rpProductchangeinfo.InsertTime = DateTime.Now;
rpProductchangeinfo.Operator = "1";
rpProductchangeinfo.BeginTime = DateTime.Now;
rpProductchangeinfo.EndTime = DateTime.Now;
rpProductchangeinfo.PersonInCharge = "管理员";
SubStationHelper.InsertProductChangeInfo(rpProductchangeinfo);
}
}
catch (Exception ex)

@ -9,8 +9,9 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Mesnac.Action.Compressor</RootNamespace>
<AssemblyName>Mesnac.Action.Compressor</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
@ -20,6 +21,7 @@
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
@ -28,6 +30,7 @@
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
<Reference Include="Mesnac.Gui">
@ -101,6 +104,7 @@
<Compile Include="Product\ProductHelper.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="SubStation\ControlOffLineScan.cs" />
<Compile Include="SubStation\MaterialBinding.cs" />
<Compile Include="SubStation\LeakageScanBarCode.cs" />
<Compile Include="SubStation\SubStationHelper.cs" />
<Compile Include="Sys\BasePlcHelper.cs" />

@ -75,7 +75,7 @@ namespace AUCMA_Air.Business
BarScanPort = new SerialPort();
//AGVPort.PortName = BaseSystemInfo.SerialPortName;//设置串口名 默认COM1
BarScanPort.PortName = m_ComPort;
BarScanPort.BaudRate = 9600;//设置串口的波特率
BarScanPort.BaudRate = 115200;//设置串口的波特率
BarScanPort.StopBits = StopBits.One;
BarScanPort.DataBits = 8;//设置数据位
BarScanPort.Parity = Parity.None;

@ -40,7 +40,7 @@ namespace Mesnac.Action.Compressor
_isFirstRun = false;
}
//查询PLC
FindPLC("A20");
FindPLC("A23");
//WritePLCData();
//初始化串口
InitPort();
@ -91,88 +91,43 @@ namespace Mesnac.Action.Compressor
{
try
{
//if(code.Length == 20 || code.Length== 10)
//{
// ProductCode = code;
// IsScanProductCodeFlag = true;
// if (IsScanStationCodeFlag && IsScanProductCodeFlag)
// {
// if (StationCode == 5010)
// {
// base.LogDebug("发送工位1扫码条码:" + ProductCode);
// }
// else if (StationCode == 5510)
// {
// base.LogDebug("发送工位2扫码条码:" + ProductCode);
// }
// //发送条码给PLC
// WritePLCBarCode(ProductCode, StationCode);
// IsScanStationCodeFlag = false;
// IsScanProductCodeFlag = false;
// ProductCode = "";
// }
//}
//判断条码位数
if (code.Trim() == "LeakTestST1")
ProductCode = code;
IsScanProductCodeFlag = true;
base.LogDebug("扫码条码:" + ProductCode);
#region 20240728修改兼容20位以下条码
//20240728修改兼容20位以下条码
if (ProductCode.Length < 20)
{
StationCode = 5010;
IsScanStationCodeFlag = true;
base.LogDebug("完成扫描工位1工位码!");
}
else if (code.Trim() == "LeakTestST2")
{
StationCode = 5510;
IsScanStationCodeFlag = true;
base.LogDebug("完成扫描工位2工位码!");
ProductCode = ProductCode.ToString().PadRight(20, ' ');
}
else
{
ProductCode = code;
IsScanProductCodeFlag = true;
base.LogDebug("扫码条码:" + ProductCode);
//if (IsScanStationCodeFlag && IsScanProductCodeFlag)
//{
// if (StationCode == 5010)
// {
// base.LogDebug("发送工位1扫码条码:" + ProductCode);
// }
// else if (StationCode == 5510)
// {
// base.LogDebug("发送工位2扫码条码:" + ProductCode);
// }
// //发送条码给PLC
// WritePLCBarCode(ProductCode, StationCode);
// IsScanStationCodeFlag = false;
// IsScanProductCodeFlag = false;
// ProductCode = "";
//}
ProductCode = ProductCode.Substring(0, 20);
}
//发送条码给PLC
//20240728修改兼容20位以下条码
int stationcode = int.Parse(_equip.Group["B1"].Block);
WriteString(ProductCode, stationcode);
if (IsScanStationCodeFlag && IsScanProductCodeFlag)
{
if (StationCode == 5010)
{
base.LogDebug("发送工位1扫码条码:" + ProductCode);
}
else
{
base.LogDebug("发送工位2扫码条码:" + ProductCode);
}
//发送条码给PLC
WritePLCBarCode(ProductCode, StationCode);
IsScanStationCodeFlag = false;
IsScanProductCodeFlag = false;
ProductCode = "";
}
#endregion
//if (IsScanStationCodeFlag && IsScanProductCodeFlag)
//{
// if (StationCode == 5010)
// {
// base.LogDebug("发送工位1扫码条码:" + ProductCode);
// }
// else
// {
// base.LogDebug("发送工位2扫码条码:" + ProductCode);
// }
// IsScanStationCodeFlag = false;
// IsScanProductCodeFlag = false;
// ProductCode = "";
//}
}
catch (Exception ex)
{
@ -188,33 +143,26 @@ namespace Mesnac.Action.Compressor
/// </summary>
/// <param name="station"></param>
/// <returns></returns>
public bool WritePLCBarCode(string code,int StationCode)
public bool WriteString(string code, int StationCode)
{
//主线条码第10位
byte[] buffer = new byte[code.Length];
string strCode = "";
buffer = System.Text.ASCIIEncoding.Default.GetBytes(code);
for (int i = 0; i < buffer.Length; i++)
try
{
string Trim = ",";
if (i == buffer.Length - 2)
byte[] tempByte = System.Text.Encoding.ASCII.GetBytes(code);
object[] temp = new object[tempByte.Length / 2];
for (int i = 0; i < temp.Length; i++)
{
Trim = "";
temp[i] = BitConverter.ToInt16(tempByte, 2 * i);
}
strCode += buffer[i+1].ToString("X") + buffer[i].ToString("X") + Trim;
i = i + 1;
}
string[] message = strCode.Trim().Split(',');
object[] bytes = new object[message.Length];
bool result1 = _equip.Write(StationCode, 10, temp);
ICSharpCode.Core.LoggingService.Debug(StationCode + " 偏移量 " + 10 + "写入结果:" + result1);
for (int i = 0; i < message.Length; i++)
{
bytes[i] = Convert.ToInt32(message[i],16);
return true;
}
catch (Exception ex)
{
ICSharpCode.Core.LoggingService.Error(string.Format(ex.ToString()));
return false;
}
bool result1 = _equip.Write(StationCode, 10, bytes);
ICSharpCode.Core.LoggingService.Debug(StationCode + " 偏移量 " + 10 + "写入结果:" + result1);
return true;
}
}
}

@ -0,0 +1,164 @@

using AUCMA_Air.Business;
using Mesnac.Action.Base;
using Mesnac.Compressor.Entity;
using Mesnac.Compressor.Station;
using Mesnac.Equips;
using Mesnac.Equips.BaseInfo;
using Mesnac.Gui.Workbench;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace Mesnac.Action.Compressor
{
public class MaterialBinding : BaseAction, IAction
{
private RuntimeParameter _runtime;
ControlOffLineScan ControlOffLineScan = new ControlOffLineScan();
BaseEquip _equip;
private static bool _isFirstRun = true;
int StationCode = 5010;
string ProductCode = "";
public void Run(RuntimeParameter runtime)
{
base.RunIni(runtime); //必须调用
this._runtime = runtime;
if (_isFirstRun == true)
{
//开启串口
//textBox.Text = "***";
WorkbenchSingleton.Workbench.ShutDown += new EventHandler(Workbench_ShutDown);
_isFirstRun = false;
}
//查询PLC
FindPLC("A23");
//初始化串口
InitPort();
ControlOffLineScan.RecAutoDataAction += Receive;
}
private void Workbench_ShutDown(object sender, EventArgs e)
{
ControlOffLineScan.Dispose();
}
public void FindPLC(string plcname)
{
try
{
foreach (BaseEquip equip in Factory.Instance.AllEquips.Values)
{
if (equip.Name == plcname)
{
ICSharpCode.Core.LoggingService.Debug("找到设备类型:" + equip.Name);
_equip = equip;
break;
}
}
}
catch (Exception ex)
{
ICSharpCode.Core.LoggingService.Error(string.Format(ex.ToString()));
}
}
public void InitPort()
{
try
{
ControlOffLineScan.SystemInitialization();
Task task = new Task(() =>
{
// 打开串口
if (ControlOffLineScan.Open())
ICSharpCode.Core.LoggingService.Debug("条码枪连接成功!");
});
task.Start();
}
catch (Exception ex)
{
ICSharpCode.Core.LoggingService.Error(string.Format(ex.ToString()));
}
}
private void InitForm()
{
try
{
var lblReqSerialName = base.GetControlById("MCLabel217") as System.Windows.Forms.Label;//计划数
}
catch (Exception ex)
{
ICSharpCode.Core.LoggingService.Error(string.Format(ex.ToString()));
}
}
public void Receive(string code)
{
try
{
ProductCode = code;
base.LogDebug("扫码条码:" + ProductCode);
#region 20240728修改兼容20位以下条码
//20240728修改兼容20位以下条码
if (ProductCode.Length < 20)
{
ProductCode = ProductCode.ToString().PadRight(20, ' ');
}
else
{
ProductCode = ProductCode.Substring(0, 20);
}
//发送条码给PLC
//20240728修改兼容20位以下条码
int stationcode = int.Parse(_equip.Group["B1"].Block);
WriteString(ProductCode, stationcode);
#endregion
}
catch (Exception ex)
{
ProductCode = "";
base.LogError(ex.ToString());
}
//发送PLC条码
}
/// <summary>
/// 条码写入PLC
/// </summary>
/// <param name="station"></param>
/// <returns></returns>
public bool WriteString(string code, int StationCode)
{
try
{
byte[] tempByte = System.Text.Encoding.ASCII.GetBytes(code);
object[] temp = new object[tempByte.Length / 2];
for (int i = 0; i < temp.Length; i++)
{
temp[i] = BitConverter.ToInt16(tempByte, 2 * i);
}
bool result1 = _equip.Write(StationCode, 10, temp);
ICSharpCode.Core.LoggingService.Debug(StationCode + " 偏移量 " + 10 + "写入结果:" + result1);
return true;
}
catch (Exception ex)
{
ICSharpCode.Core.LoggingService.Error(string.Format(ex.ToString()));
return false;
}
}
}
}

@ -92,8 +92,8 @@ namespace Mesnac.Action.Compressor.Sys
lock (String.Empty)
{
//定时读取OEE任务
ReadDeviceOeeData();
ReadDevcieState();
//ReadDeviceOeeData();
//ReadDevcieState();
}
}

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project ToolsVersion="12.0" DefaultTargets="Build" 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>
@ -9,7 +9,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Mesnac.Action.Base</RootNamespace>
<AssemblyName>Mesnac.Action.Base</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<SccProjectName>
</SccProjectName>
@ -29,6 +29,7 @@
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
@ -37,6 +38,7 @@
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
<Reference Include="MySql.Data">

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project ToolsVersion="12.0" DefaultTargets="Build" 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>
@ -9,7 +9,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Mesnac.Action.Default</RootNamespace>
<AssemblyName>Mesnac.Action.Default</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<SccProjectName>
</SccProjectName>
@ -29,6 +29,7 @@
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
@ -37,6 +38,7 @@
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project ToolsVersion="12.0" DefaultTargets="Build" 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>
@ -9,7 +9,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Mesnac.ActionService</RootNamespace>
<AssemblyName>Mesnac.ActionService</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<SccProjectName>
</SccProjectName>
@ -19,6 +19,7 @@
</SccAuxPath>
<SccProvider>
</SccProvider>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
@ -28,6 +29,7 @@
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
@ -36,6 +38,7 @@
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />

@ -17,7 +17,37 @@ namespace Mesnac.Compressor.Data
initDB();
}
public string GetABarCode(string barcode)
{
string iflag = "";
try
{
StringBuilder sb = new StringBuilder();
if (barcode != "")
{
sb.Append(" SELECT TOP(1) SemiBarcode FROM T_RP_BarcodeRelationShip WHERE ProductBarcode='").Append(barcode).Append("' order by InsertTime desc");
}
DbHandler db = new DbHandler();
db.dbHelper.ClearParameter();
db.dbHelper.CommandType = CommandType.Text;
db.dbHelper.CommandText = "";
//ICSharpCode.Core.LoggingService.InfoFormatted("查询上工位信息:{0},{1}", sb.ToString(), barcode);
db.dbHelper.CommandText = sb.ToString();
var obj = db.dbHelper.ToScalar();
if (obj != null)
{
return obj.ToString();
}
else
{
return "";
}
}
catch (Exception ex)
{
return iflag;
}
}
public void initDB()
{
DbSession dbsession = new DbSession(SqlClientFactory.Instance, constr);

@ -18,11 +18,42 @@ namespace BusinessTest
{
InitializeComponent();
}
public string GetABarCode(string barcode)
{
string iflag = "";
try
{
StringBuilder sb = new StringBuilder();
if (barcode != "")
{
sb.Append(" SELECT TOP(1) SemiBarcode FROM T_RP_BarcodeRelationShip WHERE ProductBarcode='").Append(barcode).Append("' order by InsertTime desc");
}
DbHandler db = new DbHandler();
db.dbHelper.ClearParameter();
db.dbHelper.CommandType = CommandType.Text;
db.dbHelper.CommandText = "";
//ICSharpCode.Core.LoggingService.InfoFormatted("查询上工位信息:{0},{1}", sb.ToString(), barcode);
db.dbHelper.CommandText = sb.ToString();
var obj = db.dbHelper.ToScalar();
if (obj != null)
{
return obj.ToString();
}
else
{
return "";
}
}
catch (Exception ex)
{
return iflag;
}
}
private void button1_Click(object sender, EventArgs e)
{
DbHandler db = new DbHandler();
string aaaa = GetABarCode("E26A00MBB24080609109");
//string LastWorkInfo = LastWorkProductionInfo("E26A00MBB24041215513", "T_RP_StationPara_B140", "ScanBarcode");
//TEST();
@ -73,7 +104,7 @@ namespace BusinessTest
}
string ss = getSemiBarcodeAByDongPanCode("E26A00MBB2");
//string ss = getSemiBarcodeAByDongPanCode("E26A00MBB2");
string ISDis = db.getChongTouStateByBarCode("2403150139");
@ -207,37 +238,6 @@ namespace BusinessTest
return tmp;
}
public string getSemiBarcodeAByDongPanCode(string productbarcode)
{
StringBuilder sb = new StringBuilder();
try
{
if (productbarcode != "")
{
sb.Append(" SELECT TOP(1) SemiBarcode FROM T_RP_BarcodeRelationShip WHERE ProductBarcode='").Append(productbarcode).Append("' order by InsertTime desc");
}
DbHandler db = new DbHandler();
db.dbHelper.ClearParameter();
db.dbHelper.CommandType = CommandType.Text;
db.dbHelper.CommandText = "";
db.dbHelper.CommandText = sb.ToString();
var obj = db.dbHelper.ToScalar();
if (obj != null)
{
return obj.ToString();
}
else
{
return "";
}
}
catch (Exception e)
{
return "";
}
}
}

@ -9,8 +9,9 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Mesnac.Compressor.Data</RootNamespace>
<AssemblyName>Mesnac.Compressor.Data</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
@ -20,6 +21,7 @@
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
@ -28,6 +30,7 @@
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
<Reference Include="ICSharpCode.Core">

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8" ?>
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<section name="log4net" type="System.Configuration.IgnoreSectionHandler"/>
@ -6,11 +6,11 @@
<appSettings>
<!--控件属性列表文件-->
<!--<add key="Type" value="Com" />-->
<add key="Type" value="Com" />
<add key="para" value="3" />
<add key="SqlString" value="Persist Security Info=True;Password=123456;User ID=sa;Initial Catalog=ATJ_HS_DB;Data Source=192.168.0.254;Connection Timeout=5" />
<!--<add key="SqlString" value="Persist Security Info=True;Password=123456;User ID=sa;Initial Catalog=ATJ_HS_DB;Data Source=127.0.0.1;Connection Timeout=5" />-->
<add key="LimitUp" value="3" />
<add key="Type" value="Com"/>
<add key="para" value="1"/>
<!--<add key="SqlString" value="Persist Security Info=True;Password=123456;User ID=sa;Initial Catalog=ATJ_HS_DB;Data Source=192.168.0.254;Connection Timeout=5" />-->
<add key="SqlString" value="Persist Security Info=True;Password=123456;User ID=sa;Initial Catalog=ATJ_581_DB;Data Source=192.168.1.120;Connection Timeout=5"/>
<add key="LimitUp" value="3"/>
</appSettings>
<log4net>
<appender name="ColoredConsoleAppender" type="log4net.Appender.ColoredConsoleAppender">
@ -56,4 +56,4 @@
<appender-ref ref="FileAppender"/>
</root>
</log4net>
</configuration>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2"/></startup></configuration>

@ -7,6 +7,7 @@ using System.Data;
using System.Data.SqlClient;
using Mesnac.Compressor.Entity;
using Mesnac.Log;
using System.Web.Security;
namespace Mesnac.Compressor.Data
{
@ -48,7 +49,7 @@ namespace Mesnac.Compressor.Data
return dt;
}
public DataTable GetReStartStationList()
public DataTable GetReStartStationList(string station)
{
if (dbHelper == null)
{
@ -58,13 +59,56 @@ namespace Mesnac.Compressor.Data
dbHelper.CommandType = CommandType.Text;
dbHelper.CommandText = "";
StringBuilder sb = new StringBuilder();
sb.Append("SELECT StationID,StationCode,StationName FROM dbo.T_BD_SubStation where StationID in ('4','10','18','24','27' ) ORDER BY StationID");
//sb.Append("SELECT StationID,StationCode,StationName FROM dbo.T_BD_SubStation where LineID < 5 ORDER BY StationID");
sb.Append("SELECT StationID,StationCode,StationName,TableName FROM dbo.T_BD_SubStation where 1= 1");
sb.Append("and StationID<=");
sb.Append(station);
sb.Append(" ORDER BY StationID");
dbHelper.CommandText = sb.ToString();
Console.WriteLine(sb.ToString());
DataTable dt = dbHelper.ToDataTable();
return dt;
}
public DataTable GetDeleteReStartStationList(string station)
{
if (dbHelper == null)
{
return null;
}
dbHelper.ClearParameter();
dbHelper.CommandType = CommandType.Text;
dbHelper.CommandText = "";
StringBuilder sb = new StringBuilder();
sb.Append("SELECT StationID,StationCode,StationName,TableName FROM dbo.T_BD_SubStation where 1=1");
sb.Append("and StationID>=");
sb.Append(station);
sb.Append(" ORDER BY StationID");
dbHelper.CommandText = sb.ToString();
Console.WriteLine(sb.ToString());
DataTable dt = dbHelper.ToDataTable();
return dt;
}
public void DeleteStationData(string tablename,string ProductBarCode)
{
try
{
if (dbHelper == null)
{
return;
}
dbHelper.ClearParameter();
dbHelper.CommandType = CommandType.Text;
dbHelper.CommandText = "DELETE FROM "+ tablename + " WHERE ScanBarcode=@ProductBarCode ";
dbHelper.AddParameter("@ProductBarCode", ProductBarCode);
dbHelper.ExecuteNonQuery();
}
catch (Exception ex)
{
}
}
public bool IsHaveTraceState(string ProductBarCode)
{
bool iflag = false;
@ -125,15 +169,47 @@ namespace Mesnac.Compressor.Data
// ICSharpCode.Core.LoggingService.Info(string.Format(ex.ToString()));
}
}
public bool DeletePrintInfo(string ProductBarcode)
{
StringBuilder sb = new StringBuilder();
try
{
sb.Append(" delete from base_Barcode_PrintInfo").Append(" WHERE ProductBarcode = '").Append(ProductBarcode).Append("' ");
DbHandler db = new DbHandler();
db.dbHelper.ClearParameter();
db.dbHelper.CommandType = CommandType.Text;
db.dbHelper.CommandText = sb.ToString();
db.dbHelper.ExecuteNonQuery();
return true;
}
catch (Exception ex)
{
LogService.Instance.Error("异常:" + ex.Message);
return false;
}
}
public bool UpdateTraceReStartStation(string ISDis,string RestartStation,string ProductBarcode)
{
StringBuilder sb = new StringBuilder();
try
{
sb.Append(" UPDATE dbo.T_SY_TraceState SET ISDis='").Append(ISDis);
sb.Append("' , RestartStation='").Append(RestartStation).Append("' WHERE ProductBarcode='").Append(ProductBarcode).Append("' ");
//整机拆解,清空组件码
sb.Append(" UPDATE dbo.T_SY_TraceState SET ISDis='").Append(ISDis).Append("',CurrentStationID ='").Append(RestartStation);
sb.Append("' , RestartStation='").Append(RestartStation);
if (RestartStation == "11")
{
sb.Append("' ,SemiBarcode_A = '' ,SemiBarcode_B = '',SemiBarcode_C = '',SemiBarcode2 = '");
}
//控制器拆解,清控制器码
else
{
sb.Append("' ,SemiBarcode2 = '");
}
sb.Append("' WHERE ProductBarcode='").Append(ProductBarcode).Append("' ");
DbHandler db = new DbHandler();
db.dbHelper.ClearParameter();
db.dbHelper.CommandType = CommandType.Text;

@ -28,26 +28,35 @@
/// </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(Disassembly));
this.label1 = new System.Windows.Forms.Label();
this.textBox1 = new System.Windows.Forms.TextBox();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.panel4 = new System.Windows.Forms.Panel();
this.radioButton5 = new System.Windows.Forms.RadioButton();
this.radioButton4 = new System.Windows.Forms.RadioButton();
this.radioButton3 = new System.Windows.Forms.RadioButton();
this.radioButton2 = new System.Windows.Forms.RadioButton();
this.radioButton1 = new System.Windows.Forms.RadioButton();
this.dataGridView1 = new System.Windows.Forms.DataGridView();
this.button1 = new System.Windows.Forms.Button();
this.panel1 = new System.Windows.Forms.Panel();
this.tb_ngstation = new System.Windows.Forms.TextBox();
this.label3 = new System.Windows.Forms.Label();
this.panel2 = new System.Windows.Forms.Panel();
this.panel3 = new System.Windows.Forms.Panel();
this.groupBox2 = new System.Windows.Forms.GroupBox();
this.radioButton2 = new System.Windows.Forms.RadioButton();
this.radioButton1 = new System.Windows.Forms.RadioButton();
this.label2 = new System.Windows.Forms.Label();
this.cbReStartStation = new System.Windows.Forms.ComboBox();
this.button2 = new System.Windows.Forms.Button();
this.groupBox1.SuspendLayout();
this.panel4.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit();
this.panel1.SuspendLayout();
this.panel2.SuspendLayout();
this.panel3.SuspendLayout();
this.groupBox2.SuspendLayout();
this.SuspendLayout();
//
// label1
@ -79,76 +88,76 @@
this.groupBox1.Margin = new System.Windows.Forms.Padding(4);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Padding = new System.Windows.Forms.Padding(4);
this.groupBox1.Size = new System.Drawing.Size(1114, 462);
this.groupBox1.Size = new System.Drawing.Size(1747, 768);
this.groupBox1.TabIndex = 10;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "不合格工位分析";
//
// panel4
//
this.panel4.Controls.Add(this.radioButton5);
this.panel4.Controls.Add(this.radioButton4);
this.panel4.Controls.Add(this.radioButton3);
this.panel4.Controls.Add(this.radioButton2);
this.panel4.Controls.Add(this.radioButton1);
this.panel4.Controls.Add(this.dataGridView1);
this.panel4.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel4.Location = new System.Drawing.Point(4, 40);
this.panel4.Margin = new System.Windows.Forms.Padding(4);
this.panel4.Name = "panel4";
this.panel4.Size = new System.Drawing.Size(1106, 418);
this.panel4.Size = new System.Drawing.Size(1739, 724);
this.panel4.TabIndex = 14;
//
// radioButton5
// dataGridView1
//
this.radioButton5.AutoSize = true;
this.radioButton5.Location = new System.Drawing.Point(897, 33);
this.radioButton5.Name = "radioButton5";
this.radioButton5.Size = new System.Drawing.Size(106, 37);
this.radioButton5.TabIndex = 4;
this.radioButton5.Text = "其他";
this.radioButton5.UseVisualStyleBackColor = true;
//
// radioButton4
//
this.radioButton4.AutoSize = true;
this.radioButton4.Location = new System.Drawing.Point(719, 33);
this.radioButton4.Name = "radioButton4";
this.radioButton4.Size = new System.Drawing.Size(172, 37);
this.radioButton4.TabIndex = 3;
this.radioButton4.Text = "拆解报废";
this.radioButton4.UseVisualStyleBackColor = true;
//
// radioButton3
//
this.radioButton3.AutoSize = true;
this.radioButton3.Location = new System.Drawing.Point(489, 33);
this.radioButton3.Name = "radioButton3";
this.radioButton3.Size = new System.Drawing.Size(206, 37);
this.radioButton3.TabIndex = 2;
this.radioButton3.Text = "壳体加热NG";
this.radioButton3.UseVisualStyleBackColor = true;
//
// radioButton2
//
this.radioButton2.AutoSize = true;
this.radioButton2.Location = new System.Drawing.Point(251, 33);
this.radioButton2.Name = "radioButton2";
this.radioButton2.Size = new System.Drawing.Size(206, 37);
this.radioButton2.TabIndex = 1;
this.radioButton2.Text = "前盖组件NG";
this.radioButton2.UseVisualStyleBackColor = true;
//
// radioButton1
//
this.radioButton1.AutoSize = true;
this.radioButton1.Checked = true;
this.radioButton1.Location = new System.Drawing.Point(57, 33);
this.radioButton1.Name = "radioButton1";
this.radioButton1.Size = new System.Drawing.Size(173, 37);
this.radioButton1.TabIndex = 0;
this.radioButton1.TabStop = true;
this.radioButton1.Text = "动静盘NG";
this.radioButton1.UseVisualStyleBackColor = true;
this.dataGridView1.AllowUserToAddRows = false;
dataGridViewCellStyle1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(3)))), ((int)(((byte)(27)))), ((int)(((byte)(61)))));
dataGridViewCellStyle1.Font = new System.Drawing.Font("宋体", 21.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(106)))), ((int)(((byte)(203)))), ((int)(((byte)(254)))));
dataGridViewCellStyle1.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(3)))), ((int)(((byte)(27)))), ((int)(((byte)(61)))));
dataGridViewCellStyle1.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(106)))), ((int)(((byte)(203)))), ((int)(((byte)(254)))));
this.dataGridView1.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1;
this.dataGridView1.BackgroundColor = System.Drawing.Color.FromArgb(((int)(((byte)(3)))), ((int)(((byte)(27)))), ((int)(((byte)(61)))));
this.dataGridView1.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.dataGridView1.ColumnHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.Single;
dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
dataGridViewCellStyle2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(3)))), ((int)(((byte)(27)))), ((int)(((byte)(61)))));
dataGridViewCellStyle2.Font = new System.Drawing.Font("宋体", 15.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle2.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(106)))), ((int)(((byte)(203)))), ((int)(((byte)(254)))));
dataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.dataGridView1.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2;
this.dataGridView1.ColumnHeadersHeight = 50;
this.dataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing;
this.dataGridView1.Dock = System.Windows.Forms.DockStyle.Top;
this.dataGridView1.EnableHeadersVisualStyles = false;
this.dataGridView1.Location = new System.Drawing.Point(0, 0);
this.dataGridView1.Margin = new System.Windows.Forms.Padding(4);
this.dataGridView1.MultiSelect = false;
this.dataGridView1.Name = "dataGridView1";
this.dataGridView1.ReadOnly = true;
this.dataGridView1.RowHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.Single;
dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle3.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
dataGridViewCellStyle3.Font = new System.Drawing.Font("宋体", 15.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle3.ForeColor = System.Drawing.Color.Aqua;
dataGridViewCellStyle3.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
dataGridViewCellStyle3.SelectionForeColor = System.Drawing.Color.Aqua;
dataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.dataGridView1.RowHeadersDefaultCellStyle = dataGridViewCellStyle3;
this.dataGridView1.RowHeadersVisible = false;
this.dataGridView1.RowHeadersWidthSizeMode = System.Windows.Forms.DataGridViewRowHeadersWidthSizeMode.AutoSizeToAllHeaders;
dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
dataGridViewCellStyle4.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(3)))), ((int)(((byte)(27)))), ((int)(((byte)(61)))));
dataGridViewCellStyle4.Font = new System.Drawing.Font("微软雅黑", 21.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle4.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(106)))), ((int)(((byte)(203)))), ((int)(((byte)(254)))));
dataGridViewCellStyle4.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(3)))), ((int)(((byte)(27)))), ((int)(((byte)(61)))));
dataGridViewCellStyle4.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(106)))), ((int)(((byte)(203)))), ((int)(((byte)(254)))));
this.dataGridView1.RowsDefaultCellStyle = dataGridViewCellStyle4;
this.dataGridView1.RowTemplate.DefaultCellStyle.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
this.dataGridView1.RowTemplate.DefaultCellStyle.Font = new System.Drawing.Font("微软雅黑", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.dataGridView1.RowTemplate.Height = 61;
this.dataGridView1.RowTemplate.Resizable = System.Windows.Forms.DataGridViewTriState.False;
this.dataGridView1.ScrollBars = System.Windows.Forms.ScrollBars.Horizontal;
this.dataGridView1.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.CellSelect;
this.dataGridView1.Size = new System.Drawing.Size(1739, 194);
this.dataGridView1.TabIndex = 430;
//
// button1
//
@ -165,6 +174,8 @@
//
// panel1
//
this.panel1.Controls.Add(this.tb_ngstation);
this.panel1.Controls.Add(this.label3);
this.panel1.Controls.Add(this.button1);
this.panel1.Controls.Add(this.label1);
this.panel1.Controls.Add(this.textBox1);
@ -172,9 +183,30 @@
this.panel1.Location = new System.Drawing.Point(0, 0);
this.panel1.Margin = new System.Windows.Forms.Padding(4);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(1114, 159);
this.panel1.Size = new System.Drawing.Size(1747, 159);
this.panel1.TabIndex = 11;
//
// tb_ngstation
//
this.tb_ngstation.Font = new System.Drawing.Font("宋体", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.tb_ngstation.Location = new System.Drawing.Point(232, 81);
this.tb_ngstation.Margin = new System.Windows.Forms.Padding(4);
this.tb_ngstation.Multiline = true;
this.tb_ngstation.Name = "tb_ngstation";
this.tb_ngstation.Size = new System.Drawing.Size(622, 42);
this.tb_ngstation.TabIndex = 13;
//
// label3
//
this.label3.AutoSize = true;
this.label3.Font = new System.Drawing.Font("宋体", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label3.Location = new System.Drawing.Point(56, 93);
this.label3.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(163, 29);
this.label3.TabIndex = 12;
this.label3.Text = "不合格工位";
//
// panel2
//
this.panel2.Controls.Add(this.groupBox1);
@ -182,29 +214,89 @@
this.panel2.Location = new System.Drawing.Point(0, 159);
this.panel2.Margin = new System.Windows.Forms.Padding(4);
this.panel2.Name = "panel2";
this.panel2.Size = new System.Drawing.Size(1114, 462);
this.panel2.Size = new System.Drawing.Size(1747, 768);
this.panel2.TabIndex = 12;
//
// panel3
//
this.panel3.Controls.Add(this.button2);
this.panel3.Controls.Add(this.groupBox2);
this.panel3.Dock = System.Windows.Forms.DockStyle.Bottom;
this.panel3.Location = new System.Drawing.Point(0, 402);
this.panel3.Location = new System.Drawing.Point(0, 609);
this.panel3.Margin = new System.Windows.Forms.Padding(4);
this.panel3.Name = "panel3";
this.panel3.Size = new System.Drawing.Size(1114, 219);
this.panel3.Size = new System.Drawing.Size(1747, 318);
this.panel3.TabIndex = 13;
//
// groupBox2
//
this.groupBox2.Controls.Add(this.radioButton2);
this.groupBox2.Controls.Add(this.radioButton1);
this.groupBox2.Controls.Add(this.label2);
this.groupBox2.Controls.Add(this.cbReStartStation);
this.groupBox2.Controls.Add(this.button2);
this.groupBox2.Dock = System.Windows.Forms.DockStyle.Fill;
this.groupBox2.Font = new System.Drawing.Font("宋体", 15.75F, System.Drawing.FontStyle.Bold);
this.groupBox2.Location = new System.Drawing.Point(0, 0);
this.groupBox2.Name = "groupBox2";
this.groupBox2.Size = new System.Drawing.Size(1747, 318);
this.groupBox2.TabIndex = 13;
this.groupBox2.TabStop = false;
this.groupBox2.Text = "返修";
//
// radioButton2
//
this.radioButton2.AutoSize = true;
this.radioButton2.Font = new System.Drawing.Font("宋体", 26F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.radioButton2.Location = new System.Drawing.Point(407, 151);
this.radioButton2.Name = "radioButton2";
this.radioButton2.Size = new System.Drawing.Size(312, 56);
this.radioButton2.TabIndex = 18;
this.radioButton2.Text = "控制器拆解";
this.radioButton2.UseVisualStyleBackColor = true;
//
// radioButton1
//
this.radioButton1.AutoSize = true;
this.radioButton1.Font = new System.Drawing.Font("宋体", 26F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.radioButton1.Location = new System.Drawing.Point(62, 151);
this.radioButton1.Name = "radioButton1";
this.radioButton1.Size = new System.Drawing.Size(259, 56);
this.radioButton1.TabIndex = 17;
this.radioButton1.Text = "整机拆解";
this.radioButton1.UseVisualStyleBackColor = true;
//
// label2
//
this.label2.AutoSize = true;
this.label2.Font = new System.Drawing.Font("宋体", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label2.Location = new System.Drawing.Point(916, 49);
this.label2.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(133, 29);
this.label2.TabIndex = 14;
this.label2.Text = "返修工位";
this.label2.Visible = false;
//
// cbReStartStation
//
this.cbReStartStation.FormattingEnabled = true;
this.cbReStartStation.Location = new System.Drawing.Point(1068, 43);
this.cbReStartStation.Margin = new System.Windows.Forms.Padding(4);
this.cbReStartStation.Name = "cbReStartStation";
this.cbReStartStation.Size = new System.Drawing.Size(626, 41);
this.cbReStartStation.TabIndex = 13;
this.cbReStartStation.Visible = false;
//
// button2
//
this.button2.Location = new System.Drawing.Point(921, 107);
this.button2.Font = new System.Drawing.Font("宋体", 15.75F, System.Drawing.FontStyle.Bold);
this.button2.Location = new System.Drawing.Point(847, 156);
this.button2.Margin = new System.Windows.Forms.Padding(4);
this.button2.Name = "button2";
this.button2.Size = new System.Drawing.Size(147, 51);
this.button2.TabIndex = 12;
this.button2.Text = "确认";
this.button2.UseVisualStyleBackColor = true;
this.button2.Visible = false;
this.button2.Click += new System.EventHandler(this.button2_Click);
//
// Disassembly
@ -212,7 +304,7 @@
this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 18F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.SystemColors.ActiveCaption;
this.ClientSize = new System.Drawing.Size(1114, 621);
this.ClientSize = new System.Drawing.Size(1747, 927);
this.Controls.Add(this.panel3);
this.Controls.Add(this.panel2);
this.Controls.Add(this.panel1);
@ -221,15 +313,18 @@
this.Name = "Disassembly";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "拆解台";
this.WindowState = System.Windows.Forms.FormWindowState.Maximized;
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.Disassembly_FormClosing);
this.Load += new System.EventHandler(this.Disassembly_Load);
this.groupBox1.ResumeLayout(false);
this.panel4.ResumeLayout(false);
this.panel4.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).EndInit();
this.panel1.ResumeLayout(false);
this.panel1.PerformLayout();
this.panel2.ResumeLayout(false);
this.panel3.ResumeLayout(false);
this.groupBox2.ResumeLayout(false);
this.groupBox2.PerformLayout();
this.ResumeLayout(false);
}
@ -243,12 +338,15 @@
private System.Windows.Forms.Button button1;
private System.Windows.Forms.Panel panel4;
private System.Windows.Forms.Panel panel3;
private System.Windows.Forms.RadioButton radioButton4;
private System.Windows.Forms.RadioButton radioButton3;
private System.Windows.Forms.Button button2;
private System.Windows.Forms.GroupBox groupBox2;
private System.Windows.Forms.TextBox tb_ngstation;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.DataGridView dataGridView1;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.ComboBox cbReStartStation;
private System.Windows.Forms.RadioButton radioButton2;
private System.Windows.Forms.RadioButton radioButton1;
private System.Windows.Forms.RadioButton radioButton5;
private System.Windows.Forms.Button button2;
}
}

@ -24,15 +24,15 @@ namespace DisassemblyTable
string connType= System.Configuration.ConfigurationManager.AppSettings["Type"];
public delegate void Transit(string data);
public string NGStationID = "";
private ScanerHook_V2 listener;
//private ScanerHook_V2 listener;
public Disassembly()
{
InitializeComponent();
InitPort();
//initCombox();
//USB扫码枪
initUsbScanBarCode();
listener.Start();
//initUsbScanBarCode();
//listener.Start();
InitializeInputLanguage("en-US");
}
@ -40,8 +40,8 @@ namespace DisassemblyTable
{
try
{
listener = new ScanerHook_V2();
listener.ScanerEvent += Listener_ScanerEvent;
//listener = new ScanerHook_V2();
//listener.ScanerEvent += Listener_ScanerEvent;
}
catch (Exception ex)
@ -123,12 +123,9 @@ namespace DisassemblyTable
{
Receive(barcode);
}
public void Receive(string Data)
{
if (this.InvokeRequired)
if (this.InvokeRequired)
{
this.Invoke(new Transit(Receive), Data);
return;
@ -141,126 +138,83 @@ namespace DisassemblyTable
{
return;
}
textBox1.Text = Data.Trim();
//判断条码内容为什么组件(动静盘,前盖,壳体)
if (Data.Trim().Contains("M"))
{
DbHandler db = new DbHandler();
DataSet ds = db.Select(Data.Trim());
DataTable dt1 = ds.Tables[0];
if (dt1 != null && dt1.Rows.Count > 0)
{
DataRow dr = dt1.Rows[0];
string NGstation = dr["StationName"].ToString();
this.tb_ngstation.Text = NGstation;
NGStationID = dr["OrderID"].ToString();
//BindReStartStationInfo();
}
else
{
//MessageBox.Show("未查询到当前条码生产NG信息");
this.tb_ngstation.Text = "未查询到当前条码生产NG信息";
//DataTable dt = GetNewDatatable();
//dataGridView1.DataSource = dt;
NGStationID = "";
//BindReStartStationInfo();
return;
}
if (ds.Tables.Count > 1)
{
dataGridView1.DataSource = ds.Tables[1];
}
//解绑
//通过条码查询是什么组件
DbHandler dbHandler = new DbHandler();
string remark = "";
if (radioButton1.Checked)
{
remark = radioButton1.Text;
}
else if (radioButton2.Checked)
{
remark = radioButton2.Text;
}
else if (radioButton3.Checked)
{
remark = radioButton3.Text;
}
else if (radioButton4.Checked)
{
remark = radioButton4.Text;
}
else if (radioButton5.Checked)
{
remark = radioButton5.Text;
}
dbHandler.InsertRepairInfo(Data, Data, "2", remark);
LogService.Instance.Error("》》》重投成功,产品码:" + textBox1.Text.Trim() + ",重投工位2");
//DbHandler dbHandler = new DbHandler();
//string remark = "";
//if (radioButton1.Checked)
//{
// remark = radioButton1.Text;
//}
//else if (radioButton2.Checked)
//{
// remark = radioButton2.Text;
//}
//else if (radioButton3.Checked)
//{
// remark = radioButton3.Text;
//}
//else if (radioButton4.Checked)
//{
// remark = radioButton4.Text;
//}
//else if (radioButton5.Checked)
//{
// remark = radioButton5.Text;
//}
//dbHandler.InsertRepairInfo("", Data, "2", remark);
//LogService.Instance.Error("》》》重投成功,产品码:" + textBox1.Text.Trim() + ",重投工位2");
}
textBox1.Text = Data.Trim();
}
catch
catch(Exception ex)
{
Console.WriteLine(ex.ToString());
}
} //cb_qiangai.Enabled = false; cb_zhuanzi.Enabled = false; cb_allRestart.Enabled = false;
//private void button1_Click(object sender, EventArgs e)
//{
// try
// {
// if (string.IsNullOrEmpty(textBox1.Text))
// {
// MessageBox.Show("条码为空!", "提示!");
// return;
// }
// DbHandler db = new DbHandler();
// int state1 = 0, state2 = 0, state3 = 0, state4 = 0;
// string RestartStation = "";
// string checker = UserInfo.Instance.UserName;
// if (cb_qiangai.Enabled == true)
// {
// if (cb_qiangai.CheckState == CheckState.Checked)
// {
// state1 = 1;
// }
// else
// {
// state1 = 0;
// }
// }
// if (cb_zhuanzi.Enabled == true)
// {
// if (cb_zhuanzi.CheckState == CheckState.Checked)
// {
// state2 = 1;
// }
// else
// {
// state2 = 0;
// }
// }
// if (cb_allRestart.Enabled == true)
// {
// if (cb_allRestart.CheckState == CheckState.Checked)
// {
// state3 = 1;
// RestartStation = comboBox1.SelectedValue.ToString();
// //RestartStation = NGStationID;
// }
// else
// {
// state3 = 0;
// }
// }
// if (cb_AllScrapped.Checked)
// {
// state4 = 1;
// }
// if (db.Test(textBox1.Text, state1, state2, state3, state4, RestartStation, checker))
// {
// MessageBox.Show("拆解成功!", "提示!");
// ClearAllControl();
// }
// else
// {
// MessageBox.Show("拆解失败!", "提示!");
// }
// }
// catch(Exception ex)
// {
// //MessageBox.Show(ex.ToString());
// }
//}
}
private void ClearAllControl()
{
this.textBox1.Text = "";
dataGridView1.DataSource = null;
this.tb_ngstation.Text = "";
}
private void Disassembly_FormClosing(object sender, FormClosingEventArgs e)
{
try
{
listener.Stop();
// listener.Stop();
if (connType.ToLower() == "socket")
{
//socket.StopService();
@ -366,81 +320,72 @@ namespace DisassemblyTable
{
try
{
if (string.IsNullOrEmpty(NGStationID))
{
NGStationID = "20";
}
DbHandler db = new DbHandler();
//cbReStartStation.DisplayMember = "StationName";
//cbReStartStation.ValueMember = "StationID";
//cbReStartStation.DataSource = db.GetReStartStationList();
cbReStartStation.DisplayMember = "StationName";
cbReStartStation.ValueMember = "StationID";
cbReStartStation.DataSource = db.GetReStartStationList(NGStationID);
}
catch (Exception ex)
{
MessageBox.Show("工位绑定失败");
}
}
private void button2_Click(object sender, EventArgs e)
{
try
{
if (textBox1.Text.Trim() == "")
{
MessageBox.Show("条码为空!", "提示");
MessageBox.Show("条码为空!", "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
return;
}
string REMARK = "";
DbHandler dbHandler = new DbHandler();
string RestarStation = "11";
if (!radioButton1.Checked && !radioButton2.Checked)
{
MessageBox.Show("请选择拆解类型!", "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
return;
}
if (radioButton1.Checked)
{
REMARK = radioButton1.Text;
}else if (radioButton2.Checked)
RestarStation = "11";
}
else if (radioButton2.Checked)
{
REMARK = radioButton2.Text;
}else if (radioButton3.Checked)
{
REMARK = radioButton3.Text;
}else if (radioButton4.Checked)
{
REMARK = radioButton4.Text;
RestarStation = "24";
}
else if (radioButton5.Checked)
DbHandler dbHandler = new DbHandler();
dbHandler.InsertRepairInfo(textBox1.Text, textBox1.Text.Trim(), RestarStation, REMARK);
LogService.Instance.Error("》》》返修成功,产品码:" + textBox1.Text.Trim());
//清空返修后的数据
bool iflag = dbHandler.UpdateTraceReStartStation("1", RestarStation, textBox1.Text.Trim());
if (iflag)
{
REMARK = radioButton5.Text;
//根据NG工位删除之后的数据
SelectStationData(textBox1.Text.Trim());
}
dbHandler.InsertRepairInfo(textBox1.Text, textBox1.Text.Trim(),"2", REMARK);
//这里要判断下是否存在条码
//bool isHaveData = dbHandler.IsHaveTraceState(textBox1.Text.Trim());
//数据库里不存在该记录,有可能转盘上线工位没绑定
//string MBarCode = "";
//if (!isHaveData)
//{
// //手动插入一条记录
// //tb_ngstation.Text = "未查询到当前条码生产信息!";
// //生成M码A码
// string Asemibacode = dbHandler.CreatNewSemibarcode();
// MBarCode = dbHandler.GetLastMainBarcode("M");
// string machineID = dbHandler.GetNowProductionInfo();
// dbHandler.InsertTrace(MBarCode, Asemibacode, textBox1.Text.Trim(), machineID);
//}
//修改重投字段为2
//更新重投工位字段
//bool iflag = dbHandler.UpdateTraceReStartStation("2", cbReStartStation.SelectedValue.ToString(), textBox1.Text.Trim());
//if (iflag)
//{
// //插入返修记录
// dbHandler.InsertRepairInfo(MBarCode, textBox1.Text.Trim(), cbReStartStation.SelectedValue.ToString());
// LogService.Instance.Error("》》》重投成功,产品码:"+ textBox1.Text.Trim() + ",重投工位:"+ cbReStartStation.SelectedValue.ToString());
// //修改重投状态T_RP_SemiProInfo
// textBox1.Text = "";
// MessageBox.Show("重投工位设定成功!", "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
//}
//else
//{
// MessageBox.Show("重投工位设定失败!", "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
// LogService.Instance.Error("重投工位设定失败");
//}
bool iflag1 = dbHandler.DeletePrintInfo(textBox1.Text.Trim());
if (iflag1)
{
LogService.Instance.Error("》》》打印记录清除成功,产品码:" + textBox1.Text.Trim());
}
//修改重投状态T_RP_SemiProInfo
textBox1.Text = "";
radioButton1.Checked = false;
radioButton2.Checked = false;
MessageBox.Show("返修记录成功!", "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
catch (Exception ex)
{
@ -448,6 +393,55 @@ namespace DisassemblyTable
}
}
private void SelectStationData(string Barcode)
{
try
{
DbHandler dbHandler = new DbHandler();
string cbReStartStation = "";
if (radioButton1.Checked)
{
cbReStartStation = "22";
}
else
{
cbReStartStation = "25";
}
DataTable dt1 = dbHandler.GetDeleteReStartStationList(cbReStartStation);
if (dt1 != null && dt1.Rows.Count > 0)
{
foreach (DataRow VARIABLE in dt1.Rows)
{
//删除工位数据
DeleteStationData(VARIABLE["TableName"].ToString(), Barcode);
}
}
}
catch (Exception ex)
{
LogService.Instance.Error("空间名:" + ex.Source + "" + '\n' +
"方法名:" + ex.TargetSite + '\n' +
"故障点:" + ex.StackTrace.Substring(ex.StackTrace.LastIndexOf("\\") + 1, ex.StackTrace.Length - ex.StackTrace.LastIndexOf("\\") - 1) + '\n' +
"错误提示:" + ex.Message);
}
}
private void DeleteStationData(string TableName,string BarCode)
{
try
{
DbHandler dbHandler = new DbHandler();
dbHandler.DeleteStationData(TableName, BarCode);
}
catch (Exception ex)
{
LogService.Instance.Error("空间名:" + ex.Source + "" + '\n' +
"方法名:" + ex.TargetSite + '\n' +
"故障点:" + ex.StackTrace.Substring(ex.StackTrace.LastIndexOf("\\") + 1, ex.StackTrace.Length - ex.StackTrace.LastIndexOf("\\") - 1) + '\n' +
"错误提示:" + ex.Message);
}
}
private void Disassembly_Load(object sender, EventArgs e)
{
//BindReStartStationInfo();

@ -9,8 +9,9 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>DisassemblyTable</RootNamespace>
<AssemblyName>DisassemblyTable</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
@ -21,6 +22,7 @@
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
@ -30,6 +32,7 @@
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup>
<StartupObject />
@ -108,6 +111,7 @@
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon>
<DesignTime>True</DesignTime>
</Compile>
<None Include="App.config">
<SubType>Designer</SubType>
@ -131,10 +135,6 @@
<Project>{7088C4AE-8DD9-4537-83BA-FB465507C095}</Project>
<Name>Mesnac.Compressor.Entity</Name>
</ProjectReference>
<ProjectReference Include="..\Mesnac.Compressor.ScanGun\Mesnac.Compressor.ScanGun.csproj">
<Project>{cbbe0897-7b21-4cba-a77f-ec9772ba1b7a}</Project>
<Name>Mesnac.Compressor.ScanGun</Name>
</ProjectReference>
<ProjectReference Include="..\SocketProcess\SocketProcess.csproj">
<Project>{2571ef4a-1682-4fac-bc32-db98510bcb0c}</Project>
<Name>SocketProcess</Name>

@ -1,17 +1,17 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
// 运行时版本: 4.0.30319.34209
// 运行时版本:4.0.30319.42000
//
// 对此文件的更改可能会导致不正确的行为,并且如果
// 重新生成代码,这些更改将丢失。
// 重新生成代码,这些更改将丢失。
// </auto-generated>
//------------------------------------------------------------------------------
namespace DisassemblyTable.Properties
{
namespace DisassemblyTable.Properties {
using System;
/// <summary>
/// 一个强类型的资源类,用于查找本地化的字符串等。
/// </summary>
@ -19,51 +19,43 @@ namespace DisassemblyTable.Properties
// 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
// 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen
// (以 /str 作为命令选项),或重新生成 VS 项目。
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
[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
{
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()
{
internal Resources() {
}
/// <summary>
/// 返回此类使用的缓存的 ResourceManager 实例。
/// 返回此类使用的缓存的 ResourceManager 实例。
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager
{
get
{
if ((resourceMan == null))
{
internal static global::System.Resources.ResourceManager ResourceManager {
get {
if (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("DisassemblyTable.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// 为所有资源查找重写当前线程的 CurrentUICulture 属性,
/// 方法是使用此强类型资源类。
/// 重写当前线程的 CurrentUICulture 属性,
/// 使用此强类型资源类的所有资源查找执行重写
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture
{
get
{
internal static global::System.Globalization.CultureInfo Culture {
get {
return resourceCulture;
}
set
{
set {
resourceCulture = value;
}
}

@ -1,28 +1,24 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.34209
// 此代码由工具生成。
// 运行时版本:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// 对此文件的更改可能会导致不正确的行为,并且如果
// 重新生成代码,这些更改将会丢失。
// </auto-generated>
//------------------------------------------------------------------------------
namespace DisassemblyTable.Properties
{
namespace DisassemblyTable.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
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.9.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
{
public static Settings Default {
get {
return defaultInstance;
}
}

@ -28,7 +28,7 @@ namespace DisassemblyTable
//string EquipCom = "COM3";
Comm.serialPort.PortName = EquipCom;
//波特率
Comm.serialPort.BaudRate = 9600;
Comm.serialPort.BaudRate = 115200;
//数据位
Comm.serialPort.DataBits = 8;
//两个停止位

@ -9,8 +9,9 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Mesnac.Compressor.Entity</RootNamespace>
<AssemblyName>Mesnac.Compressor.Entity</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
@ -20,6 +21,7 @@
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
@ -28,6 +30,7 @@
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />

@ -5,10 +5,15 @@
</configSections>
<appSettings>
<!--控件属性列表文件-->
<add key="Com" value="Com2" />
<!-- <add key="SqlString" value="Persist Security Info=True;Password=123456;User ID=sa;Initial Catalog=JYD_shengjie;Data Source=127.0.0.1;Connection Timeout=5" /> -->
<add key="SqlString" value="Persist Security Info=True;Password=123456;User ID=sa;Initial Catalog=ATJ_HS_DB;Data Source=192.168.0.254;Connection Timeout=5" />
<!--<add key="SqlString" value="Persist Security Info=True;Password=123456;User ID=sa;Initial Catalog=JYD_shengjie;Data Source=192.168.3.109;Connection Timeout=5" />-->
<!-- 豪森条码枪串口 -->
<add key="Com" value="Com1" />
<!-- 卓樱条码枪串口 -->
<!--<add key="Com" value="Com1" />-->
<!--<add key="SqlString" value="Persist Security Info=True;Password=haiwei@123;User ID=sa;Initial Catalog=ATJ_581_DB;Data Source=119.45.202.115;Connection Timeout=5" />-->
<add key="SqlString" value="Persist Security Info=True;Password=123456;User ID=sa;Initial Catalog=ATJ_581_DB;Data Source=192.168.1.120;Connection Timeout=5" />
<!-- <add key="SqlString" value="Persist Security Info=True;Password=123456;User ID=sa;Initial Catalog=JYD_shengjie;Data Source=127.0.0.1;Connection Timeout=5" /> -->
<!-- <add key="SqlString" value="Persist Security Info=True;Password=123456;User ID=sa;Initial Catalog=ATJ_HS_DB;Data Source=192.168.0.254;Connection Timeout=5" /> -->
<!-- <add key="SqlString" value="Persist Security Info=True;Password=123456;User ID=sa;Initial Catalog=JYD_shengjie;Data Source=192.168.3.109;Connection Timeout=5" /> -->
<!--权限注销时间S-->
<add key="LogOutTime" value="60" />
<add key="Bigprint" value="D:\\22\\printBig.btw" />

@ -8,6 +8,18 @@ namespace FrmPrint
{
[SugarColumn(ColumnName = "ProductBarcode")]
public string ProductBarcode { get; set; }
[SugarColumn(ColumnName = "SemiBarcode_A")]
public string SemiBarcode_A { get; set; }
[SugarColumn(ColumnName = "SemiBarcode_B")]
public string SemiBarcode_B { get; set; }
[SugarColumn(ColumnName = "SemiBarcode_C")]
public string SemiBarcode_C { get; set; }
[SugarColumn(ColumnName = "SemiBarcode2")]
public string SemiBarcode2 { get; set; }
[SugarColumn(ColumnName = "CurrentStationID")]
public string CurrentStationID { get; set; }

@ -47,24 +47,29 @@
this.panel1 = new System.Windows.Forms.Panel();
this.panel2 = new System.Windows.Forms.Panel();
this.panel10 = new System.Windows.Forms.Panel();
this.lst_OperInfo = new System.Windows.Forms.ListBox();
this.time4 = new System.Windows.Forms.Label();
this.panel3 = new System.Windows.Forms.Panel();
this.comboBox3 = new System.Windows.Forms.ComboBox();
this.time2 = new System.Windows.Forms.Label();
this.cb_machine = new System.Windows.Forms.ComboBox();
this.btn_print = new System.Windows.Forms.Button();
this.label7 = new System.Windows.Forms.Label();
this.time3 = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label();
this.label1 = new System.Windows.Forms.Label();
this.txt_barcode = new System.Windows.Forms.Label();
this.time1 = new System.Windows.Forms.Label();
this.label5 = new System.Windows.Forms.Label();
this.panel5 = new System.Windows.Forms.Panel();
this.lb_UserName = new System.Windows.Forms.Label();
this.cb_shift = new System.Windows.Forms.ComboBox();
this.time4 = new System.Windows.Forms.Label();
this.time2 = new System.Windows.Forms.Label();
this.comboBox1 = new System.Windows.Forms.ComboBox();
this.dateTimePicker2 = new System.Windows.Forms.DateTimePicker();
this.comboBox2 = new System.Windows.Forms.ComboBox();
this.dateTimePicker1 = new System.Windows.Forms.DateTimePicker();
this.label8 = new System.Windows.Forms.Label();
this.time3 = new System.Windows.Forms.Label();
this.time1 = new System.Windows.Forms.Label();
this.btn_close = new System.Windows.Forms.Button();
this.lb_UserName = new System.Windows.Forms.Label();
this.label4 = new System.Windows.Forms.Label();
this.lst_OperInfo = new System.Windows.Forms.ListBox();
this.btn_close = new System.Windows.Forms.Button();
this.columnHeader1 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.columnHeader5 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.columnHeader2 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
@ -84,14 +89,12 @@
this.timer1 = new System.Windows.Forms.Timer(this.components);
this.panel9 = new System.Windows.Forms.Panel();
this.timer2 = new System.Windows.Forms.Timer(this.components);
this.panel3 = new System.Windows.Forms.Panel();
this.radioButton2 = new System.Windows.Forms.RadioButton();
this.radioButton1 = new System.Windows.Forms.RadioButton();
this.panel1.SuspendLayout();
this.panel2.SuspendLayout();
this.panel10.SuspendLayout();
this.panel5.SuspendLayout();
this.panel3.SuspendLayout();
this.panel5.SuspendLayout();
this.panel9.SuspendLayout();
this.SuspendLayout();
//
// columnHeader30
@ -204,14 +207,17 @@
//
this.panel10.BackColor = System.Drawing.Color.Transparent;
this.panel10.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.panel10.Controls.Add(this.time4);
this.panel10.Controls.Add(this.panel3);
this.panel10.Controls.Add(this.lst_OperInfo);
this.panel10.Controls.Add(this.time2);
this.panel10.Controls.Add(this.cb_machine);
this.panel10.Controls.Add(this.btn_print);
this.panel10.Controls.Add(this.label7);
this.panel10.Controls.Add(this.time3);
this.panel10.Controls.Add(this.label3);
this.panel10.Controls.Add(this.label1);
this.panel10.Controls.Add(this.txt_barcode);
this.panel10.Controls.Add(this.time1);
this.panel10.Controls.Add(this.label5);
this.panel10.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel10.Location = new System.Drawing.Point(0, 66);
@ -220,31 +226,89 @@
this.panel10.Size = new System.Drawing.Size(1740, 480);
this.panel10.TabIndex = 72;
//
// lst_OperInfo
// time4
//
this.lst_OperInfo.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(3)))), ((int)(((byte)(27)))), ((int)(((byte)(61)))));
this.lst_OperInfo.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.lst_OperInfo.Font = new System.Drawing.Font("微软雅黑", 14F);
this.lst_OperInfo.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(106)))), ((int)(((byte)(203)))), ((int)(((byte)(254)))));
this.lst_OperInfo.FormattingEnabled = true;
this.lst_OperInfo.ItemHeight = 36;
this.lst_OperInfo.Location = new System.Drawing.Point(186, 253);
this.lst_OperInfo.Margin = new System.Windows.Forms.Padding(4);
this.lst_OperInfo.Name = "lst_OperInfo";
this.lst_OperInfo.Size = new System.Drawing.Size(1525, 182);
this.lst_OperInfo.TabIndex = 74;
this.time4.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(3)))), ((int)(((byte)(27)))), ((int)(((byte)(61)))));
this.time4.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.time4.ForeColor = System.Drawing.Color.LightGreen;
this.time4.Location = new System.Drawing.Point(1615, 18);
this.time4.Name = "time4";
this.time4.Size = new System.Drawing.Size(116, 34);
this.time4.TabIndex = 450;
this.time4.Text = "08:00:00";
this.time4.TextAlign = System.Drawing.ContentAlignment.TopCenter;
this.time4.Visible = false;
//
// panel3
//
this.panel3.BackColor = System.Drawing.Color.Transparent;
this.panel3.Controls.Add(this.comboBox3);
this.panel3.Location = new System.Drawing.Point(186, 3);
this.panel3.Name = "panel3";
this.panel3.Size = new System.Drawing.Size(447, 72);
this.panel3.TabIndex = 1002;
//
// comboBox3
//
this.comboBox3.Font = new System.Drawing.Font("微软雅黑", 12F);
this.comboBox3.FormattingEnabled = true;
this.comboBox3.Items.AddRange(new object[] {
"A",
"B",
"C",
"D",
"E",
"F",
"G",
"H",
"I",
"J",
"K",
"L",
"M",
"N",
"O",
"P",
"Q",
"R",
"S",
"T",
"U",
"V",
"W",
"X",
"Y",
"Z"});
this.comboBox3.Location = new System.Drawing.Point(0, 15);
this.comboBox3.Name = "comboBox3";
this.comboBox3.Size = new System.Drawing.Size(122, 39);
this.comboBox3.TabIndex = 1010;
//
// time2
//
this.time2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(3)))), ((int)(((byte)(27)))), ((int)(((byte)(61)))));
this.time2.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.time2.ForeColor = System.Drawing.Color.LightGreen;
this.time2.Location = new System.Drawing.Point(1449, 18);
this.time2.Name = "time2";
this.time2.Size = new System.Drawing.Size(184, 34);
this.time2.TabIndex = 449;
this.time2.Text = "2021-10-22";
this.time2.TextAlign = System.Drawing.ContentAlignment.TopCenter;
this.time2.Visible = false;
//
// cb_machine
//
this.cb_machine.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(3)))), ((int)(((byte)(27)))), ((int)(((byte)(61)))));
this.cb_machine.Font = new System.Drawing.Font("宋体", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.cb_machine.Font = new System.Drawing.Font("微软雅黑", 14F);
this.cb_machine.ForeColor = System.Drawing.Color.Aqua;
this.cb_machine.FormattingEnabled = true;
this.cb_machine.Location = new System.Drawing.Point(186, 94);
this.cb_machine.Location = new System.Drawing.Point(186, 153);
this.cb_machine.Margin = new System.Windows.Forms.Padding(4);
this.cb_machine.Name = "cb_machine";
this.cb_machine.Size = new System.Drawing.Size(447, 37);
this.cb_machine.Size = new System.Drawing.Size(447, 44);
this.cb_machine.TabIndex = 4;
this.cb_machine.SelectedIndexChanged += new System.EventHandler(this.cb_machine_SelectedIndexChanged);
this.cb_machine.TextUpdate += new System.EventHandler(this.cb_machine_TextUpdate);
//
// btn_print
@ -265,19 +329,32 @@
this.label7.AutoSize = true;
this.label7.Font = new System.Drawing.Font("宋体", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label7.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(106)))), ((int)(((byte)(203)))), ((int)(((byte)(254)))));
this.label7.Location = new System.Drawing.Point(29, 97);
this.label7.Location = new System.Drawing.Point(29, 156);
this.label7.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(71, 29);
this.label7.TabIndex = 3;
this.label7.Text = "机种";
//
// time3
//
this.time3.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(3)))), ((int)(((byte)(27)))), ((int)(((byte)(61)))));
this.time3.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.time3.ForeColor = System.Drawing.Color.LightGreen;
this.time3.Location = new System.Drawing.Point(1259, 18);
this.time3.Name = "time3";
this.time3.Size = new System.Drawing.Size(116, 34);
this.time3.TabIndex = 447;
this.time3.Text = "08:00:00";
this.time3.TextAlign = System.Drawing.ContentAlignment.TopCenter;
this.time3.Visible = false;
//
// label3
//
this.label3.AutoSize = true;
this.label3.Font = new System.Drawing.Font("宋体", 18F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label3.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(106)))), ((int)(((byte)(203)))), ((int)(((byte)(254)))));
this.label3.Location = new System.Drawing.Point(20, 244);
this.label3.Location = new System.Drawing.Point(9, 425);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(159, 36);
this.label3.TabIndex = 73;
@ -288,7 +365,7 @@
this.label1.AutoSize = true;
this.label1.Font = new System.Drawing.Font("宋体", 18F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(106)))), ((int)(((byte)(203)))), ((int)(((byte)(254)))));
this.label1.Location = new System.Drawing.Point(20, 171);
this.label1.Location = new System.Drawing.Point(20, 300);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(159, 36);
this.label1.TabIndex = 71;
@ -299,14 +376,27 @@
this.txt_barcode.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.txt_barcode.Font = new System.Drawing.Font("微软雅黑", 14F);
this.txt_barcode.ForeColor = System.Drawing.Color.Aqua;
this.txt_barcode.Location = new System.Drawing.Point(186, 161);
this.txt_barcode.Location = new System.Drawing.Point(186, 290);
this.txt_barcode.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.txt_barcode.Name = "txt_barcode";
this.txt_barcode.Size = new System.Drawing.Size(520, 60);
this.txt_barcode.Size = new System.Drawing.Size(447, 60);
this.txt_barcode.TabIndex = 999;
this.txt_barcode.Text = " ";
this.txt_barcode.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// time1
//
this.time1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(3)))), ((int)(((byte)(27)))), ((int)(((byte)(61)))));
this.time1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.time1.ForeColor = System.Drawing.Color.LightGreen;
this.time1.Location = new System.Drawing.Point(1093, 18);
this.time1.Name = "time1";
this.time1.Size = new System.Drawing.Size(184, 34);
this.time1.TabIndex = 446;
this.time1.Text = "2021-10-22";
this.time1.TextAlign = System.Drawing.ContentAlignment.TopCenter;
this.time1.Visible = false;
//
// label5
//
this.label5.AutoSize = true;
@ -321,14 +411,12 @@
//
// panel5
//
this.panel5.Controls.Add(this.lb_UserName);
this.panel5.Controls.Add(this.cb_shift);
this.panel5.Controls.Add(this.time4);
this.panel5.Controls.Add(this.time2);
this.panel5.Controls.Add(this.comboBox1);
this.panel5.Controls.Add(this.dateTimePicker2);
this.panel5.Controls.Add(this.comboBox2);
this.panel5.Controls.Add(this.dateTimePicker1);
this.panel5.Controls.Add(this.label8);
this.panel5.Controls.Add(this.time3);
this.panel5.Controls.Add(this.time1);
this.panel5.Controls.Add(this.btn_close);
this.panel5.Controls.Add(this.lb_UserName);
this.panel5.Controls.Add(this.label4);
this.panel5.Dock = System.Windows.Forms.DockStyle.Top;
this.panel5.Location = new System.Drawing.Point(0, 0);
@ -337,6 +425,59 @@
this.panel5.Size = new System.Drawing.Size(1740, 66);
this.panel5.TabIndex = 71;
//
// comboBox1
//
this.comboBox1.Font = new System.Drawing.Font("微软雅黑", 12F);
this.comboBox1.FormattingEnabled = true;
this.comboBox1.Location = new System.Drawing.Point(192, 10);
this.comboBox1.Name = "comboBox1";
this.comboBox1.Size = new System.Drawing.Size(145, 39);
this.comboBox1.TabIndex = 1014;
//
// dateTimePicker2
//
this.dateTimePicker2.CalendarFont = new System.Drawing.Font("微软雅黑", 12F);
this.dateTimePicker2.CustomFormat = "yyyy-MM-dd";
this.dateTimePicker2.Font = new System.Drawing.Font("微软雅黑", 12F);
this.dateTimePicker2.Format = System.Windows.Forms.DateTimePickerFormat.Custom;
this.dateTimePicker2.Location = new System.Drawing.Point(387, 7);
this.dateTimePicker2.Name = "dateTimePicker2";
this.dateTimePicker2.Size = new System.Drawing.Size(187, 39);
this.dateTimePicker2.TabIndex = 1013;
//
// comboBox2
//
this.comboBox2.Font = new System.Drawing.Font("微软雅黑", 12F);
this.comboBox2.FormattingEnabled = true;
this.comboBox2.Location = new System.Drawing.Point(576, 7);
this.comboBox2.Name = "comboBox2";
this.comboBox2.Size = new System.Drawing.Size(145, 39);
this.comboBox2.TabIndex = 1012;
//
// dateTimePicker1
//
this.dateTimePicker1.CalendarFont = new System.Drawing.Font("微软雅黑", 12F);
this.dateTimePicker1.CustomFormat = "yyyy-MM-dd";
this.dateTimePicker1.Font = new System.Drawing.Font("微软雅黑", 12F);
this.dateTimePicker1.Format = System.Windows.Forms.DateTimePickerFormat.Custom;
this.dateTimePicker1.Location = new System.Drawing.Point(3, 10);
this.dateTimePicker1.Name = "dateTimePicker1";
this.dateTimePicker1.Size = new System.Drawing.Size(187, 39);
this.dateTimePicker1.TabIndex = 1011;
this.dateTimePicker1.ValueChanged += new System.EventHandler(this.dateTimePicker1_ValueChanged);
//
// label8
//
this.label8.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(3)))), ((int)(((byte)(27)))), ((int)(((byte)(61)))));
this.label8.Font = new System.Drawing.Font("微软雅黑", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label8.ForeColor = System.Drawing.Color.LightGreen;
this.label8.Location = new System.Drawing.Point(343, 11);
this.label8.Name = "label8";
this.label8.Size = new System.Drawing.Size(38, 36);
this.label8.TabIndex = 1010;
this.label8.Text = "至";
this.label8.TextAlign = System.Drawing.ContentAlignment.TopCenter;
//
// lb_UserName
//
this.lb_UserName.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
@ -350,94 +491,6 @@
this.lb_UserName.Text = "用户名";
this.lb_UserName.TextAlign = System.Drawing.ContentAlignment.TopCenter;
//
// cb_shift
//
this.cb_shift.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(3)))), ((int)(((byte)(27)))), ((int)(((byte)(61)))));
this.cb_shift.Font = new System.Drawing.Font("宋体", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.cb_shift.ForeColor = System.Drawing.Color.Aqua;
this.cb_shift.FormattingEnabled = true;
this.cb_shift.Location = new System.Drawing.Point(1463, 11);
this.cb_shift.Margin = new System.Windows.Forms.Padding(4);
this.cb_shift.Name = "cb_shift";
this.cb_shift.Size = new System.Drawing.Size(134, 37);
this.cb_shift.TabIndex = 2;
this.cb_shift.Visible = false;
this.cb_shift.SelectedIndexChanged += new System.EventHandler(this.cb_shift_SelectedIndexChanged);
//
// time4
//
this.time4.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(3)))), ((int)(((byte)(27)))), ((int)(((byte)(61)))));
this.time4.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.time4.ForeColor = System.Drawing.Color.LightGreen;
this.time4.Location = new System.Drawing.Point(518, 0);
this.time4.Name = "time4";
this.time4.Size = new System.Drawing.Size(116, 34);
this.time4.TabIndex = 450;
this.time4.Text = "08:00:00";
this.time4.TextAlign = System.Drawing.ContentAlignment.TopCenter;
//
// time2
//
this.time2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(3)))), ((int)(((byte)(27)))), ((int)(((byte)(61)))));
this.time2.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.time2.ForeColor = System.Drawing.Color.LightGreen;
this.time2.Location = new System.Drawing.Point(352, 0);
this.time2.Name = "time2";
this.time2.Size = new System.Drawing.Size(184, 34);
this.time2.TabIndex = 449;
this.time2.Text = "2021-10-22";
this.time2.TextAlign = System.Drawing.ContentAlignment.TopCenter;
//
// label8
//
this.label8.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(3)))), ((int)(((byte)(27)))), ((int)(((byte)(61)))));
this.label8.Font = new System.Drawing.Font("微软雅黑", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label8.ForeColor = System.Drawing.Color.LightGreen;
this.label8.Location = new System.Drawing.Point(284, -2);
this.label8.Name = "label8";
this.label8.Size = new System.Drawing.Size(61, 34);
this.label8.TabIndex = 448;
this.label8.Text = "至";
this.label8.TextAlign = System.Drawing.ContentAlignment.TopCenter;
//
// time3
//
this.time3.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(3)))), ((int)(((byte)(27)))), ((int)(((byte)(61)))));
this.time3.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.time3.ForeColor = System.Drawing.Color.LightGreen;
this.time3.Location = new System.Drawing.Point(162, 0);
this.time3.Name = "time3";
this.time3.Size = new System.Drawing.Size(116, 34);
this.time3.TabIndex = 447;
this.time3.Text = "08:00:00";
this.time3.TextAlign = System.Drawing.ContentAlignment.TopCenter;
//
// time1
//
this.time1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(3)))), ((int)(((byte)(27)))), ((int)(((byte)(61)))));
this.time1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.time1.ForeColor = System.Drawing.Color.LightGreen;
this.time1.Location = new System.Drawing.Point(-4, 0);
this.time1.Name = "time1";
this.time1.Size = new System.Drawing.Size(184, 34);
this.time1.TabIndex = 446;
this.time1.Text = "2021-10-22";
this.time1.TextAlign = System.Drawing.ContentAlignment.TopCenter;
//
// btn_close
//
this.btn_close.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))));
this.btn_close.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btn_close.Location = new System.Drawing.Point(1308, 8);
this.btn_close.Margin = new System.Windows.Forms.Padding(4);
this.btn_close.Name = "btn_close";
this.btn_close.Size = new System.Drawing.Size(135, 54);
this.btn_close.TabIndex = 7;
this.btn_close.Text = "关 闭";
this.btn_close.UseVisualStyleBackColor = false;
this.btn_close.Visible = false;
this.btn_close.Click += new System.EventHandler(this.btn_close_Click);
//
// label4
//
this.label4.BackColor = System.Drawing.Color.Transparent;
@ -453,6 +506,35 @@
this.label4.Text = "奥特佳条码打印系统";
this.label4.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// lst_OperInfo
//
this.lst_OperInfo.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(3)))), ((int)(((byte)(27)))), ((int)(((byte)(61)))));
this.lst_OperInfo.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.lst_OperInfo.Dock = System.Windows.Forms.DockStyle.Fill;
this.lst_OperInfo.Font = new System.Drawing.Font("微软雅黑", 14F);
this.lst_OperInfo.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(106)))), ((int)(((byte)(203)))), ((int)(((byte)(254)))));
this.lst_OperInfo.FormattingEnabled = true;
this.lst_OperInfo.ItemHeight = 36;
this.lst_OperInfo.Location = new System.Drawing.Point(0, 0);
this.lst_OperInfo.Margin = new System.Windows.Forms.Padding(4);
this.lst_OperInfo.Name = "lst_OperInfo";
this.lst_OperInfo.Size = new System.Drawing.Size(1744, 414);
this.lst_OperInfo.TabIndex = 74;
//
// btn_close
//
this.btn_close.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))));
this.btn_close.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btn_close.Location = new System.Drawing.Point(1596, 347);
this.btn_close.Margin = new System.Windows.Forms.Padding(4);
this.btn_close.Name = "btn_close";
this.btn_close.Size = new System.Drawing.Size(135, 54);
this.btn_close.TabIndex = 7;
this.btn_close.Text = "关 闭";
this.btn_close.UseVisualStyleBackColor = false;
this.btn_close.Visible = false;
this.btn_close.Click += new System.EventHandler(this.btn_close_Click);
//
// columnHeader1
//
this.columnHeader1.Text = "编号";
@ -552,6 +634,8 @@
//
// panel9
//
this.panel9.Controls.Add(this.btn_close);
this.panel9.Controls.Add(this.lst_OperInfo);
this.panel9.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel9.Location = new System.Drawing.Point(0, 550);
this.panel9.Margin = new System.Windows.Forms.Padding(4);
@ -562,47 +646,9 @@
// timer2
//
this.timer2.Enabled = true;
this.timer2.Interval = 50;
this.timer2.Interval = 1000;
this.timer2.Tick += new System.EventHandler(this.timer2_Tick);
//
// panel3
//
this.panel3.BackColor = System.Drawing.Color.Transparent;
this.panel3.Controls.Add(this.radioButton2);
this.panel3.Controls.Add(this.radioButton1);
this.panel3.Location = new System.Drawing.Point(186, 3);
this.panel3.Name = "panel3";
this.panel3.Size = new System.Drawing.Size(447, 72);
this.panel3.TabIndex = 1002;
//
// radioButton2
//
this.radioButton2.AutoSize = true;
this.radioButton2.Font = new System.Drawing.Font("微软雅黑", 14F);
this.radioButton2.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(106)))), ((int)(((byte)(203)))), ((int)(((byte)(254)))));
this.radioButton2.Location = new System.Drawing.Point(327, 15);
this.radioButton2.Name = "radioButton2";
this.radioButton2.Size = new System.Drawing.Size(96, 40);
this.radioButton2.TabIndex = 1003;
this.radioButton2.TabStop = true;
this.radioButton2.Text = "夜班";
this.radioButton2.UseVisualStyleBackColor = true;
this.radioButton2.CheckedChanged += new System.EventHandler(this.radioButton2_CheckedChanged);
//
// radioButton1
//
this.radioButton1.AutoSize = true;
this.radioButton1.Font = new System.Drawing.Font("微软雅黑", 14F);
this.radioButton1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(106)))), ((int)(((byte)(203)))), ((int)(((byte)(254)))));
this.radioButton1.Location = new System.Drawing.Point(18, 15);
this.radioButton1.Name = "radioButton1";
this.radioButton1.Size = new System.Drawing.Size(96, 40);
this.radioButton1.TabIndex = 1002;
this.radioButton1.TabStop = true;
this.radioButton1.Text = "白班";
this.radioButton1.UseVisualStyleBackColor = true;
this.radioButton1.CheckedChanged += new System.EventHandler(this.radioButton1_CheckedChanged);
//
// Form1
//
this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 18F);
@ -614,16 +660,16 @@
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Margin = new System.Windows.Forms.Padding(4);
this.Name = "Form1";
this.Text = "条码打印系统";
this.Text = "条码打印系统V1.7";
this.FormClosed += new System.Windows.Forms.FormClosedEventHandler(this.Form1_FormClosed);
this.Load += new System.EventHandler(this.Form1_Load);
this.panel1.ResumeLayout(false);
this.panel2.ResumeLayout(false);
this.panel10.ResumeLayout(false);
this.panel10.PerformLayout();
this.panel5.ResumeLayout(false);
this.panel3.ResumeLayout(false);
this.panel3.PerformLayout();
this.panel5.ResumeLayout(false);
this.panel9.ResumeLayout(false);
this.ResumeLayout(false);
}
@ -668,13 +714,10 @@
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label txt_barcode;
private System.Windows.Forms.ComboBox cb_shift;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.Panel panel5;
private System.Windows.Forms.Button btn_close;
private System.Windows.Forms.Button btn_print;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.Label label8;
private System.Windows.Forms.Label time3;
private System.Windows.Forms.Label time1;
private System.Windows.Forms.Label time4;
@ -684,8 +727,13 @@
private System.Windows.Forms.Label lb_UserName;
private System.Windows.Forms.Timer timer2;
private System.Windows.Forms.Panel panel3;
private System.Windows.Forms.RadioButton radioButton2;
private System.Windows.Forms.RadioButton radioButton1;
private System.Windows.Forms.ComboBox comboBox3;
private System.Windows.Forms.ComboBox comboBox1;
private System.Windows.Forms.DateTimePicker dateTimePicker2;
private System.Windows.Forms.ComboBox comboBox2;
private System.Windows.Forms.DateTimePicker dateTimePicker1;
private System.Windows.Forms.Label label8;
public System.Windows.Forms.Button btn_print;
}
}

@ -25,11 +25,15 @@ using static log4net.Appender.RollingFileAppender;
using static System.Windows.Forms.VisualStyles.VisualStyleElement;
using static System.Windows.Forms.VisualStyles.VisualStyleElement.Button;
using System.Collections;
using System.Runtime.InteropServices;
using System.Reflection.Emit;
namespace FrmPrint
{
public partial class Form1 : Form
{
[DllImport("kernel32.dll", EntryPoint = "SetProcessWorkingSetSize")]
public static extern int SetProcessWorkingSetSize(IntPtr process, int minSize, int maxSize);
protected DbHandler db = new DbHandler();
DbHelper dbHelper = null;
SerialEquip Com;
@ -53,34 +57,32 @@ namespace FrmPrint
}
CheckForIllegalCrossThreadCalls = false;
printManager.RefreshShowMessageEvent += ShowMessage;
BindClass();
//BindClass();
//bindMachine();
getMachine();
//initUsbScanBarCode();
InitPort();
}
private void SetRadiobutton()
{
try
{
radioButton1.ForeColor = Color.FromArgb(106, 203, 254);
radioButton2.ForeColor = Color.FromArgb(106, 203, 254);
//radioButton1.BackColor = Color.FromArgb(3, 27, 61);
//radioButton2.BackColor = Color.FromArgb(3, 27, 61);
}
catch (Exception ex)
{
}
}
private void Form1_Load(object sender, EventArgs e)
{
this.WindowState = FormWindowState.Maximized;
cb_machine.DropDownStyle = ComboBoxStyle.DropDown;
DateTime startTime = DateTime.Today.AddHours(1);
// 结束时间设置为 23:00:00
DateTime endTime = DateTime.Today.AddHours(23);
// 从开始时间开始,每次增加 1 小时,直到达到结束时间
for (DateTime currentTime = startTime; currentTime <= endTime; currentTime = currentTime.AddHours(1))
{
// 将当前时间格式化为 HH:mm:ss 并添加到 ComboBox 中
comboBox1.Items.Add(currentTime.ToString("HH:mm:ss"));
comboBox2.Items.Add(currentTime.ToString("HH:mm:ss"));
}
for (char i = 'A'; i <= 'Z'; i++)
{
comboBox3.Items.Add(i);
}
if (iNIFile.IniReadValue("SystemConfig", "UserName") != "用户名")
{
iNIFile.IniWriteValue("SystemConfig", "UserName", "用户名");
@ -89,18 +91,27 @@ namespace FrmPrint
{
iNIFile.IniWriteValue("SystemConfig", "PrintState", "2");
}
ShowMessage("系统启动成功!");
//listener.Start();
//加载默认时间
lb_UserName.Text = UserName;
lb_UserName.ForeColor = Color.Red;
LoadTime();
//timer1.Enabled = true;
//dateTimePicker1.Visible = false;
//dateTimePicker1.Visible = true;
//dateTimePicker2.Visible = false;
//dateTimePicker2.Visible = true;
//comboBox1.Visible = false;
//comboBox1.Visible = true;
//comboBox2.Visible = false;
//comboBox2.Visible = true;
}
public void ShowMessage(string strMessage)
{
try
{
LogHelper.Info(strMessage);
if (this.lst_OperInfo.Items.Count > 100)
{
this.lst_OperInfo.Items.Clear();
@ -136,8 +147,7 @@ namespace FrmPrint
try
{
ShowMessage(" "+ Data+"条码扫描成功!");
LogHelper.Info(Data + "条码扫描成功!");
//Thread.Sleep(5000);
Thread.Sleep(1000);
PrintPrepare(Data.Trim());
}
catch(Exception ex)
@ -154,19 +164,25 @@ namespace FrmPrint
{
if (string.IsNullOrEmpty(Data))
{
ShowMessage("请确认条码是否正确!");
return;
}
if (Data.Length != 20)
{
ShowMessage("请确认条码是否正确!");
return;
if (Data.Length != 11 && Data.Length != 19)
{
ShowMessage("请确认条码是否正确!");
return;
}
}
//提示换班
//var date = DateTime.Now;
//DateTime dt1 = DateTime.Parse(time2.Text + " "+ time4.Text);
//DateTime dt2 = DateTime.Parse(time1.Text + " " + time3.Text);
if (comboBox3.Text == "")
{
ShowMessage("请选择班组!");
return;
}
if (cb_machine.Text == "")
{
ShowMessage("请选择机种!");
@ -203,16 +219,40 @@ namespace FrmPrint
#region 打印代码暂时屏蔽
//根据条码查询是否到当前工位
//ShowMessage("正在查询产品是否到达条码打印工位...");
//bool iFlag = await SelectPrintStation(Data.Replace("\r", ""));
//if (!iFlag)
bool iFlag = false;
//豪森工位合格查询
//if (System.Configuration.ConfigurationManager.AppSettings["SqlString"].ToString().Contains("HS"))
//{
// return;
// iFlag = GetStationNGBySemiBarCode(Data.Replace("\r", ""));
//}
//else
////卓樱工位合格查询
//if (System.Configuration.ConfigurationManager.AppSettings["SqlString"].ToString().Contains("JYD_shengjie"))
//{
// ShowMessage("查询产品结果合格!");
// iFlag = await SelectPrintStation(Data.Replace("\r", ""));
//}
//581工位合格查询
if (System.Configuration.ConfigurationManager.AppSettings["SqlString"].ToString().Contains("581"))
{
//新增查询是否存在绑定信息
bool _bindFlag = await SelectBindInfo(Data.Replace("\r", ""));
if (_bindFlag)
{
return;
}
//ShowMessage("正在查询产品是否合格...");
iFlag = GetStationNGByProductCode(Data.Replace("\r", ""));
}
if (!iFlag)
{
ShowMessage("查询产品结果合格.");
}
else
{
return;
}
//ShowMessage("正在查询产品结果是否合格...");
//查询结果是否合格
@ -224,17 +264,54 @@ namespace FrmPrint
List<TBDProductInfo> TBDProductInfo = await geTbdProductInfos(cb_machine.Text);
pt.Machine =int.Parse(TBDProductInfo[0].ProductID);
if (radioButton1.Checked)
{
pt.Shift = "A";
int num = 4;
if (!string.IsNullOrEmpty(TBDProductInfo[0].ToolCarNo.Trim()))
{
num = int.Parse(TBDProductInfo[0].ToolCarNo.Trim());
}
else
{
pt.Shift = "B";
ShowMessage("序列号位数有误,请检查机种信息...");
}
//add by 2024-09-02 新增手动切换班次业务逻辑
pt.Shift = comboBox3.Text;
//if (radioButton1.Checked)
//{
// pt.Shift = "A";
//pt.starttime = time1.Text + " " + time3.Text;
//int datetime = Convert.ToInt32(DateTime.Now.Hour.ToString());
//if (datetime >= 8 && datetime < 20)
//{
// pt.endtime = time2.Text + " " + DateTime.Now.ToString("HH:mm:ss");
//}
//else
//{
// pt.endtime = DateTime.Now.ToString("yyyy-MM-dd") + " " + DateTime.Now.ToString("HH:mm:ss");
pt.starttime = time1.Text + " " + time3.Text;
pt.endtime = time2.Text + " " + time4.Text;
//}
//}
//else if (radioButton2.Checked)
//{
//pt.Shift = "B";
//pt.starttime = time1.Text + " " + time3.Text;
//int datetime = Convert.ToInt32(DateTime.Now.Hour.ToString());
//if (datetime >= 0 && datetime < 8)
//{
// pt.endtime = time2.Text + " " + DateTime.Now.ToString("HH:mm:ss");
//}
//else
//{
// pt.endtime = DateTime.Now.ToString("yyyy-MM-dd") + " " + DateTime.Now.ToString("HH:mm:ss");
//}
//}
//else
//{
// pt.Shift = "C";
//}
pt.starttime = dateTimePicker1.Text + " " + comboBox1.Text;
pt.endtime = dateTimePicker2.Text + " " + comboBox2.Text;
if (iNIFile.IniReadValue("SystemConfig", "UserName") != "管理员")
{
LogHelper.Info("查询" + Data + "产品序列号是否存在相同记录!");
@ -247,42 +324,58 @@ namespace FrmPrint
else
{
//先根据班次时间查询最大序列号,如果不存在则从0001生成
List<baseBarcodePrintInfo> baseBarcodePrintInfo = await printManager.SelectPrintInfoAsync("",pt.Shift, pt.Machine.ToString(), pt.starttime, pt.endtime);
if (baseBarcodePrintInfo != null && baseBarcodePrintInfo.Count > 0)
//List<baseBarcodePrintInfo> baseBarcodePrintInfo = await printManager.SelectPrintInfoAsync("",pt.Shift, pt.Machine.ToString(), pt.starttime, pt.endtime);
//改为存储过程查询
var max = SelectSerialNo(pt.Shift,pt.Machine.ToString(), pt.starttime, pt.endtime);
if (!string.IsNullOrEmpty(max))
{
//查询最大序列号生成
var max = baseBarcodePrintInfo.Max(x => x.SerialNo);
ShowMessage("查询当前最大序列号" + max);
pt.Serialnum = Convert.ToInt32(Convert.ToInt32(max.Substring(max.Length - 4, 4)) + 1).ToString().PadLeft(4, '0');
pt.Serialnum = Convert.ToInt32(Convert.ToInt32(max.Substring(max.Length - num, num)) + 1).ToString().PadLeft(num, '0');
ShowMessage("生成新序列号" + pt.Serialnum);
}
else
{
//序列号0001
pt.Serialnum = "0001";
pt.Serialnum = "1".PadLeft(num, '0');
ShowMessage("生成新序列号" + pt.Serialnum);
}
//if (baseBarcodePrintInfo != null && baseBarcodePrintInfo.Count > 0)
//{
// //查询最大序列号生成
// var max = baseBarcodePrintInfo.Max(x => x.SerialNo);
// ShowMessage("查询当前最大序列号" + max);
// pt.Serialnum = Convert.ToInt32(Convert.ToInt32(max.Substring(max.Length - num, num)) + 1).ToString().PadLeft(num, '0');
// ShowMessage("生成新序列号" + pt.Serialnum);
//}
//else
//{
// //序列号0001
// pt.Serialnum = "1".PadLeft(num, '0');
// ShowMessage("生成新序列号" + pt.Serialnum);
//}
}
}
//管理员补码
else
{
ShowMessage("补码功能开启,查询到当前用户名管理员");
List<baseBarcodePrintInfo> baseBarcodePrintInfo =await printManager.SelectPrintInfoAsync("", pt.Shift, pt.Machine.ToString(), pt.starttime,
List<baseBarcodePrintInfo> baseBarcodePrintInfo = await printManager.SelectPrintInfoAsync("", pt.Shift, pt.Machine.ToString(), pt.starttime,
pt.endtime);
if (baseBarcodePrintInfo != null && baseBarcodePrintInfo.Count > 0)
{
//查询最大序列号生成
var max = baseBarcodePrintInfo.Max(x => x.SerialNo);
ShowMessage("查询当前最大序列号" + max);
pt.Serialnum = Convert.ToInt32(Convert.ToInt32(max.Substring(max.Length - 4, 4)) + 1).ToString().PadLeft(4, '0');
pt.Serialnum = Convert.ToInt32(Convert.ToInt32(max.Substring(max.Length - num, num)) + 1).ToString().PadLeft(num, '0');
pt.isRestart = 1;
ShowMessage("生成新序列号" + pt.Serialnum);
}
else
{
//序列号0001
pt.Serialnum = "0001";
pt.Serialnum = "1".PadLeft(num, '0');
pt.isRestart = 1;
ShowMessage("生成新序列号" + pt.Serialnum);
}
@ -300,7 +393,53 @@ namespace FrmPrint
#endregion
}
private async Task<bool> SelectBindInfo(string ProductBarcode)
{
bool iFlag = false;
try
{
Expression<Func<TSYTraceState, bool>> exp = s1 => true;
exp = exp.And(s1 => s1.ProductBarcode == ProductBarcode);
Expression<Func<TSYTraceState, object>> order = (x) => x.BeginTime;
List<TSYTraceState> MaterialInfoList = await new BaseServices<TSYTraceState>().Query(exp, order, true);
if (MaterialInfoList != null && MaterialInfoList.Count > 0)
{
if (string.IsNullOrEmpty(MaterialInfoList[0].SemiBarcode2))
{
ShowMessage(ProductBarcode + "未绑定控制器码!");
iFlag = true;
return iFlag;
}
if (string.IsNullOrEmpty(MaterialInfoList[0].SemiBarcode_A))
{
ShowMessage(ProductBarcode + "未绑定前盖码!");
iFlag = true;
return iFlag;
}
if (string.IsNullOrEmpty(MaterialInfoList[0].SemiBarcode_B))
{
ShowMessage(ProductBarcode + "未绑定静盘码!");
iFlag = true;
return iFlag;
}
if (string.IsNullOrEmpty(MaterialInfoList[0].SemiBarcode_C))
{
ShowMessage(ProductBarcode + "未绑定后盖码!");
iFlag = true;
return iFlag;
}
}
return iFlag;
}
catch (Exception ex)
{
LogHelper.Error("空间名:" + ex.Source + "" + '\n' +
"方法名:" + ex.TargetSite + '\n' +
"故障点:" + ex.StackTrace.Substring(ex.StackTrace.LastIndexOf("\\") + 1, ex.StackTrace.Length - ex.StackTrace.LastIndexOf("\\") - 1) + '\n' +
"错误提示:" + ex.Message);
return iFlag;
}
}
private async Task<bool> SelectPrintStation(string ProductBarcode)
{
bool iFlag = false;
@ -315,13 +454,13 @@ namespace FrmPrint
var TSYTraceState = MaterialInfoList.OrderByDescending(x => x.BeginTime).FirstOrDefault();
if (TSYTraceState.CurrentStationID == "33")
{
iFlag = true;
iFlag = false;
return iFlag;
}
else
{
ShowMessage(ProductBarcode + "上工位未完成,查询产品未到达条码打印工位!");
iFlag = false;
iFlag = true;
return iFlag;
}
@ -329,7 +468,7 @@ namespace FrmPrint
else
{
ShowMessage(ProductBarcode + "上工位未完成,查询产品未到达条码打印工位!");
iFlag = false;
iFlag = true;
return iFlag;
}
}
@ -373,23 +512,28 @@ namespace FrmPrint
bool iFlag = false;
try
{
List<StationQualityInfo> selectAllStation = SaveBarCode(ProductBarcode);
foreach (var VARIABLE in selectAllStation)
{
if (VARIABLE.TableName == "T_RP_StationPara_B130_1" && VARIABLE.State == "1")
{
selectAllStation.RemoveAll(x => x.TableName == "T_RP_StationPara_B130_2");
break;
}
else if (VARIABLE.TableName == "T_RP_StationPara_B130_2" && VARIABLE.State == "1")
{
selectAllStation.RemoveAll(x => x.TableName == "T_RP_StationPara_B130_1");
break;
}
}
if (selectAllStation != null || selectAllStation.Count > 0)
{
for (int i = 0; i < selectAllStation.Count; i++)
{
if (selectAllStation[i].TableName == "T_RP_StationPara_B130_1" && selectAllStation[i].State =="1")
if (selectAllStation[i].State != "1")
{
selectAllStation.RemoveAll(x => x.TableName == "T_RP_StationPara_B130_2");
}
else if(selectAllStation[i].TableName == "T_RP_StationPara_B130_2" && selectAllStation[i].State == "1")
{
selectAllStation.RemoveAll(x => x.TableName == "T_RP_StationPara_B130_1");
}
if (selectAllStation[i].State == "2" || selectAllStation[i].State == "")
{
iFlag = false;
iFlag = true;
ShowMessage(selectAllStation[i].StationName + "数据NG");
return iFlag;
}
@ -405,13 +549,68 @@ namespace FrmPrint
}
public bool GetStationNGByProductCode(string ProductBarcode)
{
bool iFlag = false;
try
{
List<StationQualityInfo> selectAllStation = SaveBarCode(ProductBarcode,"270");
if (selectAllStation != null || selectAllStation.Count > 0)
{
for (int i = 0; i < selectAllStation.Count; i++)
{
if (selectAllStation[i].State != "1")
{
iFlag = true;
ShowMessage(selectAllStation[i].StationName + "数据NG");
return iFlag;
}
}
}
return iFlag;
}
catch (Exception ex)
{
return iFlag;
}
}
public string SelectSerialNo(string ShiftID, string MachineID,string starttime,string endtime)
{
try
{
string SerialNo = "";
SugarParameter[] pars = new BaseServices<StationQualityInfo>().GetParameters(new { ShiftID = ShiftID, MachineID = MachineID, starttime= starttime,endtime = endtime });
var dt2 = new BaseServices<StationQualityInfo>().UseStoredProcedure("SP_Pro_GetNewSerialNO ", pars);
if (dt2 != null && dt2.Rows.Count > 0)
{
SerialNo = RowValue(dt2.Rows[0], "SerialNo", String.Empty);
}
return SerialNo;
}
catch (Exception ex)
{
LogHelper.Error("空间名:" + ex.Source + "" + '\n' +
"方法名:" + ex.TargetSite + '\n' +
"故障点:" + ex.StackTrace.Substring(ex.StackTrace.LastIndexOf("\\") + 1, ex.StackTrace.Length - ex.StackTrace.LastIndexOf("\\") - 1) + '\n' +
"错误提示:" + ex.Message);
return null;
}
}
public List<StationQualityInfo> SaveBarCode(string P_Bar_Code)
{
List<StationQualityInfo> stationQualityList = null;
try
{
SugarParameter[] pars = new BaseServices<StationQualityInfo>().GetParameters(new { BarCode = P_Bar_Code });
var dt2 = new BaseServices<StationQualityInfo>().UseStoredProcedure("pro_AllProductionQualityInfocopy ", pars);
var dt2 = new BaseServices<StationQualityInfo>().UseStoredProcedure("pro_AllProductionQualityInfocopy", pars);
if (dt2 != null && dt2.Rows.Count > 0)
{
stationQualityList = new List<StationQualityInfo>();
@ -437,7 +636,37 @@ namespace FrmPrint
}
}
public List<StationQualityInfo> SaveBarCode(string P_Bar_Code,string StationCode)
{
List<StationQualityInfo> stationQualityList = null;
try
{
SugarParameter[] pars = new BaseServices<StationQualityInfo>().GetParameters(new { BarCode = P_Bar_Code, StationCode = StationCode });
var dt2 = new BaseServices<StationQualityInfo>().UseStoredProcedure("pro_AllProductionQualityInfo", pars);
if (dt2 != null && dt2.Rows.Count > 0)
{
stationQualityList = new List<StationQualityInfo>();
StationQualityInfo stationQualityInfo = null;
foreach (DataRow row in dt2.Rows)
{
stationQualityInfo = new StationQualityInfo();
stationQualityInfo.StationName = RowValue(row, "StationName", String.Empty);
stationQualityInfo.TableName = RowValue(row, "TableName", String.Empty);
stationQualityInfo.State = RowValue(row, "State", String.Empty);
stationQualityList.Add(stationQualityInfo);
}
}
return stationQualityList;
}
catch (Exception ex)
{
LogHelper.Error("空间名:" + ex.Source + "" + '\n' +
"方法名:" + ex.TargetSite + '\n' +
"故障点:" + ex.StackTrace.Substring(ex.StackTrace.LastIndexOf("\\") + 1, ex.StackTrace.Length - ex.StackTrace.LastIndexOf("\\") - 1) + '\n' +
"错误提示:" + ex.Message);
return stationQualityList;
}
}
public static string RowValue(DataRow dr, string field, string defaultValue)
{
@ -486,23 +715,7 @@ namespace FrmPrint
}
}
/// <summary>
/// 机种绑定
/// </summary>
private void bindMachine()
{
try
{
cb_machine.DisplayMember = "ProductName";
cb_machine.ValueMember = "ProductID";
cb_machine.DataSource = GetProductList("");
}
catch
{
MessageBox.Show("机种绑定失败");
}
}
private async Task<List<TBDProductInfo>> geTbdProductInfos(string ProductName)
{
@ -626,51 +839,12 @@ namespace FrmPrint
dr3[1] = "晚班";
dt.Rows.Add(dr3);
this.cb_shift.DataSource = dt;
this.cb_shift.DisplayMember = "value";
this.cb_shift.ValueMember = "key";
//this.cb_shift.DataSource = dt;
//this.cb_shift.DisplayMember = "value";
//this.cb_shift.ValueMember = "key";
}
private string getShift(string shift)
{
string shiftA = "A";
switch (shift)
{
case "01":
shiftA = "A";
break;
case "02":
shiftA = "B";
break;
case "03":
shiftA = "C";
break;
default:
break;
}
return shiftA;
}
private string getDateString(string semiBarcode)
{
string datestring = "20";
if (string.IsNullOrEmpty(semiBarcode))
{
datestring = DateTime.Now.ToString();
}
else
{
string year = semiBarcode.Substring(1, 2);
string month = semiBarcode.Substring(3, 2);
string date = semiBarcode.Substring(5, 2);
datestring += year + "-" + month + "-" + date;
}
return datestring;
}
private void btn_close_Click(object sender, EventArgs e)
{
@ -681,11 +855,20 @@ namespace FrmPrint
private void btn_print_Click(object sender, EventArgs e)
{
//密码权限
Login login = new Login(this);
login.ChangeText += new ChangeTextHandler(Change_Text);
login.ShowDialog();
if (btn_print.Text == "补 印")
{
Login login = new Login(this);
login.ChangeText += new ChangeTextHandler(Change_Text);
login.ShowDialog();
}
if (btn_print.Text == "取消补印")
{
btn_print.Text = "补 印";
}
}
private void Change_Text(string str)
{
if (iNIFile.IniReadValue("SystemConfig", "UserName") != str)
@ -699,44 +882,48 @@ namespace FrmPrint
private void LoadTime()
{
int datetime = Convert.ToInt32(DateTime.Now.Hour.ToString());
if (datetime >= 8 && datetime < 20)
{
time1.Text = DateTime.Now.ToString("yyyy-MM-dd");
time3.Text = "08:00:00";
time2.Text = DateTime.Now.ToString("yyyy-MM-dd");
time4.Text = "20:00:00";
this.radioButton1.Checked = true;
}
else if (datetime >= 0 && datetime < 8)
{
time1.Text = DateTime.Now.AddDays(-1).ToString("yyyy-MM-dd");
time3.Text = "20:00:00";
time2.Text = DateTime.Now.ToString("yyyy-MM-dd");
time4.Text = "08:00:00";
this.radioButton2.Checked = true;
}
else
{
time1.Text = DateTime.Now.ToString("yyyy-MM-dd");
time3.Text = "20:00:00";
time2.Text = DateTime.Now.AddDays(1).ToString("yyyy-MM-dd");
time4.Text = "08:00:00";
this.radioButton2.Checked = true;
}
//int datetime = Convert.ToInt32(DateTime.Now.Hour.ToString());
//if (datetime >= 8 && datetime < 20)
//{
// time1.Text = DateTime.Now.ToString("yyyy-MM-dd");
// time3.Text = "08:00:00";
// time2.Text = DateTime.Now.ToString("yyyy-MM-dd");
// time4.Text = "20:00:00";
// this.radioButton1.Checked = true;
//}
//else if (datetime >= 0 && datetime < 8)
//{
// time1.Text = DateTime.Now.AddDays(-1).ToString("yyyy-MM-dd");
// time3.Text = "20:00:00";
// time2.Text = DateTime.Now.ToString("yyyy-MM-dd");
// time4.Text = "08:00:00";
// this.radioButton2.Checked = true;
//}
//else
//{
// time1.Text = DateTime.Now.ToString("yyyy-MM-dd");
// time3.Text = "20:00:00";
// time2.Text = DateTime.Now.AddDays(1).ToString("yyyy-MM-dd");
// time4.Text = "08:00:00";
// this.radioButton2.Checked = true;
//}
//this.radioButton1.Checked = true;
// 控件即将获得焦点时将焦点转移到button1
txt_barcode.Focus();
dateTimePicker1.Text = DateTime.Now.ToString("yyyy-MM-dd");
dateTimePicker2.Text = DateTime.Now.ToString("yyyy-MM-dd");
comboBox1.SelectedIndex = 7;
comboBox2.SelectedIndex = 19;
}
private void cb_shift_SelectedIndexChanged(object sender, EventArgs e)
{
cb_shift.Visible = false;
//cb_shift.Visible = true;
}
private void Form1_FormClosed(object sender, FormClosedEventArgs e)
{
try
{
LogHelper.Info("程序退出!");
this.Com.Comm.Close();
//System.Environment.Exit(System.Environment.ExitCode);
}
@ -757,68 +944,80 @@ namespace FrmPrint
private void radioButton2_CheckedChanged(object sender, EventArgs e)
{
//夜班
//time1.Text = DateTime.Now.ToString("yyyy-MM-dd");
//time3.Text = "20:00:00";
//time2.Text = DateTime.Now.AddDays(1).ToString("yyyy-MM-dd");
//time4.Text = "08:00:00";
return;
int datetime = Convert.ToInt32(DateTime.Now.Hour.ToString());
if (datetime >= 8 && datetime < 20)
{
time1.Text = DateTime.Now.ToString("yyyy-MM-dd");
time3.Text = "08:00:00";
time2.Text = DateTime.Now.ToString("yyyy-MM-dd");
time4.Text = "20:00:00";
//this.radioButton1.Checked = true;
}
else if (datetime >= 0 && datetime < 8)
{
time1.Text = DateTime.Now.AddDays(-1).ToString("yyyy-MM-dd");
time3.Text = "08:00:00";
time2.Text = DateTime.Now.ToString("yyyy-MM-dd");
time4.Text = "20:00:00";
//this.radioButton2.Checked = true;
}
else
{
time1.Text = DateTime.Now.ToString("yyyy-MM-dd");
time3.Text = "20:00:00";
time2.Text = DateTime.Now.AddDays(1).ToString("yyyy-MM-dd");
time4.Text = "08:00:00";
//this.radioButton2.Checked = true;
}
//if (radioButton2.Checked == true)
//{
// int datetime = Convert.ToInt32(DateTime.Now.Hour.ToString());
// if (datetime >= 8 && datetime < 20)
// {
// time1.Text = DateTime.Now.ToString("yyyy-MM-dd");
// time3.Text = "08:00:00";
// time2.Text = DateTime.Now.ToString("yyyy-MM-dd");
// time4.Text = "20:00:00";
// }
// else if (datetime >= 0 && datetime < 8)
// {
// time1.Text = DateTime.Now.ToString("yyyy-MM-dd");
// time3.Text = "20:00:00";
// time2.Text = DateTime.Now.AddDays(1).ToString("yyyy-MM-dd");
// time4.Text = "08:00:00";
// }
// else
// {
// time1.Text = DateTime.Now.ToString("yyyy-MM-dd");
// time3.Text = "20:00:00";
// time2.Text = DateTime.Now.AddDays(1).ToString("yyyy-MM-dd");
// time4.Text = "08:00:00";
// }
//}
//ShowMessage("》》》切换夜班班次!" + dateTimePicker1.Text + " " + comboBox1.Text + "至" + dateTimePicker2.Text + " " + comboBox2.Text);
}
private void radioButton1_CheckedChanged(object sender, EventArgs e)
{
//白班
//time1.Text = DateTime.Now.ToString("yyyy-MM-dd");
//time3.Text = "08:00:00";
//time2.Text = DateTime.Now.ToString("yyyy-MM-dd");
//time4.Text = "20:00:00";
return;
int datetime = Convert.ToInt32(DateTime.Now.Hour.ToString());
if (datetime >= 8 && datetime < 20)
//if (radioButton1.Checked == true)
//{
// int datetime = Convert.ToInt32(DateTime.Now.Hour.ToString());
// if (datetime >= 8 && datetime < 20)
// {
// time1.Text = DateTime.Now.ToString("yyyy-MM-dd");
// time3.Text = "08:00:00";
// time2.Text = DateTime.Now.ToString("yyyy-MM-dd");
// time4.Text = "20:00:00";
// }
// else if (datetime >= 0 && datetime < 8)
// {
// time1.Text = DateTime.Now.AddDays(-1).ToString("yyyy-MM-dd");
// time3.Text = "08:00:00";
// time2.Text = DateTime.Now.ToString("yyyy-MM-dd");
// time4.Text = "20:00:00";
// }
// else
// {
// time1.Text = DateTime.Now.ToString("yyyy-MM-dd");
// time3.Text = "20:00:00";
// time2.Text = DateTime.Now.AddDays(1).ToString("yyyy-MM-dd");
// time4.Text = "08:00:00";
// }
//}
//ShowMessage("》》》切换白班班次!" + dateTimePicker1.Text + " " + comboBox1.Text + "至" + dateTimePicker2.Text + " " + comboBox2.Text);
}
private void CollectGC()
{
try
{
time1.Text = DateTime.Now.ToString("yyyy-MM-dd");
time3.Text = "08:00:00";
time2.Text = DateTime.Now.ToString("yyyy-MM-dd");
time4.Text = "20:00:00";
GC.Collect();
GC.WaitForPendingFinalizers();
if (Environment.OSVersion.Platform == PlatformID.Win32NT)
{
SetProcessWorkingSetSize(System.Diagnostics.Process.GetCurrentProcess().Handle, -1, -1);
}
}
else if (datetime >= 0 && datetime < 8)
catch (Exception ex)
{
time1.Text = DateTime.Now.AddDays(-1).ToString("yyyy-MM-dd");
time3.Text = "08:00:00";
time2.Text = DateTime.Now.ToString("yyyy-MM-dd");
time4.Text = "20:00:00";
}
else
{
time1.Text = DateTime.Now.ToString("yyyy-MM-dd");
time3.Text = "20:00:00";
time2.Text = DateTime.Now.AddDays(1).ToString("yyyy-MM-dd");
time4.Text = "08:00:00";
}
}
@ -827,6 +1026,7 @@ namespace FrmPrint
{
try
{
CollectGC();
if (iNIFile.IniReadValue("SystemConfig", "UserName") != "用户名")
{
iNIFile.IniWriteValue("SystemConfig", "UserName", "用户名");
@ -872,9 +1072,45 @@ namespace FrmPrint
private void timer2_Tick(object sender, EventArgs e)
{
LoadTime();
//LoadTime();
//SetRadiobutton();
}
private void cb_machine_SelectedIndexChanged(object sender, EventArgs e)
{
cb_machine.Visible = false;
cb_machine.Visible = true;
}
private void dateTimePicker1_ValueChanged(object sender, EventArgs e)
{
// 控件即将获得焦点时将焦点转移到button1
txt_barcode.Focus();
}
//private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
//{
// comboBox1.Visible = false;
// comboBox1.Visible = true;
//}
//private void dateTimePicker1_ValueChanged(object sender, EventArgs e)
//{
// dateTimePicker1.Visible = false;
// dateTimePicker1.Visible = true;
//}
//private void dateTimePicker2_ValueChanged(object sender, EventArgs e)
//{
// dateTimePicker2.Visible = false;
// dateTimePicker2.Visible = true;
//}
//private void comboBox2_SelectedIndexChanged(object sender, EventArgs e)
//{
// comboBox2.Visible = false;
// comboBox2.Visible = true;
//}
}

@ -12,6 +12,8 @@ namespace FrmPrint
{
public partial class Login : Form
{
public delegate void SetTextValue();
public event SetTextValue SetFormTextValue;
Form1 f1;
public delegate void ChangeTextHandler(string str); //定义委托
public event ChangeTextHandler ChangeText; //定义事件

@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
// 可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值,
// 方法是按如下所示使用“*”:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyVersion("1.7.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

@ -27,7 +27,7 @@ namespace FrmPrint
//string EquipCom = "COM3";
Comm.serialPort.PortName = EquipCom;
//波特率
Comm.serialPort.BaudRate = 9600;
Comm.serialPort.BaudRate = 115200;
//数据位
Comm.serialPort.DataBits = 8;
//两个停止位
@ -43,11 +43,14 @@ namespace FrmPrint
{
string Data = System.Text.Encoding.Default.GetString(readBuffer);
if (SerialData != null)
if (!string.IsNullOrEmpty(Data.Trim()))
{
SerialData(Data);
if (SerialData != null)
{
SerialData(Data.Trim());
}
}
barcode = Data;
//是否需要判断条码的完整性
//绑定内部条码和当前条码
}

@ -78,6 +78,7 @@ namespace FrmPrint
}
}
}
Thread.Sleep(1);
}
}

@ -9,8 +9,9 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Mesnac.Compressor.Unity</RootNamespace>
<AssemblyName>Mesnac.Compressor.Unity</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
@ -20,6 +21,7 @@
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
@ -28,6 +30,7 @@
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />

@ -1,7 +1,7 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
// 运行时版本:4.0.30319.34209
// 运行时版本:4.0.30319.42000
//
// 对此文件的更改可能会导致不正确的行为,并且如果
// 重新生成代码,这些更改将会丢失。
@ -19,7 +19,7 @@ namespace Mesnac.Compressor.Unity.Properties {
// 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
// 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen
// (以 /str 作为命令选项),或重新生成 VS 项目。
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
[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 {
@ -47,8 +47,8 @@ namespace Mesnac.Compressor.Unity.Properties {
}
/// <summary>
/// 使用此强类型资源类,为所有资源查找
/// 重写当前线程的 CurrentUICulture 属性
/// 重写当前线程的 CurrentUICulture 属性,对
/// 使用此强类型资源类的所有资源查找执行重写。
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture {

@ -21,9 +21,12 @@ namespace Mesnac.HighWay.ATC.SqlSugar.serviceImpl
{
_dbBase = new SqlSugarClient(new ConnectionConfig
{
//ConnectionString = "server = 127.0.0.1; uid = sa; pwd = 123456; database = JYD_shengjie",
ConnectionString = "server = 192.168.0.254; uid = sa; pwd = 123456; database = ATJ_HS_DB",
// ConnectionString = "server = 127.0.0.1; uid = sa; pwd = 123456; database = ATJ_HS_DB",
//ConnectionString = "server = 119.45.202.115; uid = sa; pwd = haiwei@123; database = ATJ_581_DB",
ConnectionString = "server = 192.168.1.120; uid = sa; pwd = 123456; database = ATJ_581_DB",
//ConnectionString = "server = 192.168.3.110; uid = sa; pwd = 123456; database = JYD_shengjie",
// ConnectionString = "server = 192.168.0.254; uid = sa; pwd = 123456; database = ATJ_HS_DB",
//ConnectionString = "server = 127.0.0.1; uid = sa; pwd = 123456; database = ATJ_HS_DB",
DbType = DbType.SqlServer,
InitKeyType = InitKeyType.Attribute,
IsAutoCloseConnection = true

@ -9,8 +9,9 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>PLCManager</RootNamespace>
<AssemblyName>PLCManager</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
@ -20,6 +21,7 @@
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
@ -28,6 +30,7 @@
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
<Reference Include="ICSharpCode.Core">

@ -2,7 +2,7 @@
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Mesnac.Equips;
using Mesnac.Compressor.Entity;
namespace PLCManager

@ -9,8 +9,9 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>SocketProcess</RootNamespace>
<AssemblyName>SocketProcess</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
@ -20,6 +21,7 @@
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
@ -28,6 +30,7 @@
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
<Reference Include="ICSharpCode.Core">

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
@ -10,7 +10,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Mesnac.Controls.Base</RootNamespace>
<AssemblyName>Mesnac.Controls.Base</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile />
<SccProjectName>
@ -30,6 +30,7 @@
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
@ -38,6 +39,7 @@
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />

@ -9,8 +9,9 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Mesnac.Controls.Compressor</RootNamespace>
<AssemblyName>Mesnac.Controls.Compressor</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
@ -20,6 +21,7 @@
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
@ -28,8 +30,13 @@
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
<Reference Include="HslCommunication, Version=7.0.0.0, Culture=neutral, PublicKeyToken=cdb2261fa039ed67, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\Libraries\MXComponent\HslCommunication.dll</HintPath>
</Reference>
<Reference Include="ICSharpCode.Core">
<HintPath>..\..\Libraries\ICSharpCode.Core.dll</HintPath>
</Reference>

@ -19,7 +19,7 @@ namespace Mesnac.Controls.Compressor.Properties {
// 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
// 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen
// (以 /str 作为命令选项),或重新生成 VS 项目。
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")]
[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 {

@ -23,6 +23,9 @@ using Mesnac.Controls.Feeding;
using System.Windows.Forms.Design;
using Mesnac.Gui.Edit.Dialog;
using System.Runtime.Serialization.Formatters.Binary;
using HslCommunication.Core;
using System.Linq;
using System.Runtime.Serialization;
namespace Mesnac.Controls.Compressor
{
@ -49,6 +52,7 @@ namespace Mesnac.Controls.Compressor
private int dataIndex = -1;
private bool FirstRead = true;
IByteTransform ByteTransform = new ReverseBytesTransform();
public StationButton()
{
@ -420,8 +424,21 @@ namespace Mesnac.Controls.Compressor
return;
}
_mcValue = value;
StationInfo.Data = ParaFormart(objectarray, StationInfo.ParaCount);
if (StationInfo.StationName.Contains("性能测试"))
{
try
{
StationInfo.Data = SiemensParaFormart(objectarray, StationInfo.ParaCount);
}
catch (Exception ex)
{
ICSharpCode.Core.LoggingService.Debug("接收数据失败" + ex.ToString());
}
}
else
{
StationInfo.Data = ParaFormart(objectarray, StationInfo.ParaCount);
}
SetText();
if (StationInfo.Data.AskWork)
{
@ -501,6 +518,115 @@ namespace Mesnac.Controls.Compressor
}
#region 数据解析
public stationPara SiemensParaFormart(object[] obj, int paraCount)
{
byte[] bytes = obj.Select(o => Convert.ToByte(o)).ToArray();
string str = Convert.ToString(Convert.ToInt32(bytes[2]), 2).PadLeft(8, '0');
string[] items = new string[8];
for (int i = 0; i < items.Length; i++)
{
items[i] = str[i].ToString();
}
Array.Reverse(items);
//byte[] bools = ByteTransform.TransByte(bytes, 2,1);
isConnect = Convert.ToInt32(items[0]) == 1;
State = stateString(Convert.ToInt32(items[1]));
stationPara sinfo = new stationPara();
int index = 0;
//ArrayList array = ConvertToBit(obj, index);
//Array(array);
//sinfo.Restart = Convert.ToInt32(bools[2]) == 1;
//sinfo.QGCT = Convert.ToInt32(bools[5]) == 1;
//NG放行
//sinfo.ReWork = Convert.ToInt32(bools[6]) == 1;
//OK放行
//sinfo.DP_OpenFlag = Convert.ToInt32(bools[7]) == 1;
//是否重投
if (sinfo.Restart)
{
//ICSharpCode.Core.LoggingService.Info(StationInfo.StationCode + ",开始重投");
}
//是否有主线二维码
sinfo.BarcodeUpdate = Convert.ToInt32(items[3]) == 1;
//是否有支线二维码
sinfo.MaterialBarcodeUpdate = Convert.ToInt32(items[4]) == 1;
index++;
//自动模式
//重构,收到作业或放行请求才进行解析
//PLC工作请求信号
sinfo.AskWork = ByteTransform.TransInt16(bytes,5) > 0;
index++;
//放行请求
sinfo.MaskID = ByteTransform.TransInt16(bytes, 7);
//Console.WriteLine(sinfo.BarcodeUpdate);
sinfo.NewFlag = newData(sinfo.MaskID);
index += 3;
//当前机种号
sinfo.machineID = ByteTransform.TransByte(bytes, 13);
NewMachineID = sinfo.machineID.ToString();
index++;
//托盘号
int intNum = ByteTransform.TransByte(bytes, 15);
//支线条码状态
index++;
bool[] bools2 = ByteTransform.TransBool(bytes, 16, 1);
ArrayList array2 = ConvertToList(bools2);
//数据保存区
index++;
sinfo.ProductOkNg = ByteTransform.TransByte(bytes, 19);
index++;
//线体代号ABC'
int gongxu = ByteTransform.TransByte(bytes, 21);
sinfo.RFIDNo = string.Format("{0:X}", gongxu) + intNum.ToString().PadLeft(2, '0');
index += 1;
//sinfo.productDate = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");//这里不用日期了
if (sinfo.BarcodeUpdate || sinfo.MaterialBarcodeUpdate)
{
GetBarcodeList(bytes, index, ref sinfo);
}
index = 180;
for (int i = 0; i < paraCount; i++)
{
dataUnite du = new dataUnite();
du.actValue = ByteTransform.TransSingle(bytes, index).ToString();
du.MaxValue = ByteTransform.TransSingle(bytes, index + 4).ToString();
du.MinValue = ByteTransform.TransSingle(bytes, index + 8).ToString();
du.result = ByteTransform.TransInt32(bytes,index + 12);
du.Remark = ByteTransform.TransInt32(bytes, index + 16).ToString();
index += 20;
sinfo.SavedataList.Add(du);
}
if (sinfo.MaskID == 1)
{
foreach (var row in sinfo.SavedataList)
{
ICSharpCode.Core.LoggingService.Debug("------------------------");
ICSharpCode.Core.LoggingService.Debug("|生产值:" + row.actValue + "|");
ICSharpCode.Core.LoggingService.Debug("------------------------");
}
}
return sinfo;
}
/// <summary>
/// 单工位数据解析
@ -512,7 +638,7 @@ namespace Mesnac.Controls.Compressor
stationPara sinfo = new stationPara();
int index = 0;
ArrayList array = ConvertToBit(obj, index);
Array(array);
Arraylist(array);
sinfo.Restart = Convert.ToInt32(array[2]) == 1;
sinfo.QGCT = Convert.ToInt32(array[5]) == 1;
//NG放行
@ -523,7 +649,7 @@ namespace Mesnac.Controls.Compressor
//是否重投
if (sinfo.Restart)
{
ICSharpCode.Core.LoggingService.Info(StationInfo.StationCode + ",开始重投");
//ICSharpCode.Core.LoggingService.Info(StationInfo.StationCode + ",开始重投");
}
//是否有主线二维码
sinfo.BarcodeUpdate = Convert.ToInt32(array[3]) == 1;
@ -543,8 +669,6 @@ namespace Mesnac.Controls.Compressor
sinfo.MaskID = SingleConvertToInt(obj, index);
sinfo.NewFlag = newData(sinfo.MaskID);
index += 3;
//当前机种号
sinfo.machineID = SingleConvertToInt(obj, index);
@ -598,7 +722,7 @@ namespace Mesnac.Controls.Compressor
sinfo.SavedataList.Add(du);
}
if (sinfo.MaskID == 1)
if (sinfo.MaskID > 0)
{
foreach (var row in sinfo.SavedataList)
{
@ -620,6 +744,7 @@ namespace Mesnac.Controls.Compressor
try
{
//目前只有4个支线
sinfo.subLineList.Clear();
for (int i = 0; i <= 5; i++)
{
subLine sl = new subLine();
@ -631,7 +756,7 @@ namespace Mesnac.Controls.Compressor
int barcodeLegth = 10;//设置单个条码长度
if (sinfo.BarcodeUpdate)
{
sinfo.ProductBarcode = Getbarcode(buffer, index, barcodeLegth);
sinfo.ProductBarcode = Getbarcode(buffer, index, barcodeLegth).Trim();
}
index = index + 10;
@ -645,33 +770,33 @@ namespace Mesnac.Controls.Compressor
if (i == 0)//控制器
{
sinfo.subLineList[i].barcode = Getbarcode(buffer, index, barcodeLegth);
sinfo.MaterialBarcode = sinfo.subLineList[i].barcode;
sinfo.MaterialBarcode = sinfo.subLineList[i].barcode.Trim();
}
if (i == 1)//壳体
{
sinfo.subLineList[i].barcode = Getbarcode(buffer, 30, barcodeLegth);
sinfo.MaterialBarcode = sinfo.subLineList[i].barcode;
sinfo.MaterialBarcode = sinfo.subLineList[i].barcode.Trim();
}
if (i == 2)//前盖
{
sinfo.subLineList[i].barcode = Getbarcode(buffer, 40, barcodeLegth);
sinfo.MaterialBarcode = sinfo.subLineList[i].barcode;
sinfo.MaterialBarcode = sinfo.subLineList[i].barcode.Trim();
}
if (i == 3)//动盘
{
sinfo.subLineList[i].barcode = Getbarcode(buffer, 50, barcodeLegth);
sinfo.MaterialBarcode = sinfo.subLineList[i].barcode;
sinfo.MaterialBarcode = sinfo.subLineList[i].barcode.Trim();
}
if (i == 4)//静盘
{
sinfo.subLineList[i].barcode = Getbarcode(buffer, 60, barcodeLegth);
sinfo.MaterialBarcode = sinfo.subLineList[i].barcode;
sinfo.MaterialBarcode = sinfo.subLineList[i].barcode.Trim();
}
if (i == 5)//后盖
{
sinfo.subLineList[i].barcode = Getbarcode(buffer, 70, barcodeLegth);
sinfo.MaterialBarcode = sinfo.subLineList[i].barcode;
sinfo.MaterialBarcode = sinfo.subLineList[i].barcode.Trim();
}
}
@ -687,34 +812,34 @@ namespace Mesnac.Controls.Compressor
}
private void GetBarcodeList(object[] buffer, int index, ref stationPara sinfo)
private void GetBarcodeList(byte[] buffer, int index, ref stationPara sinfo)
{
try
{
//条码个数
int count = Convert.ToInt32(buffer[index]);
if (count <= 0)
{
return;
}
//支线条码个数
int subcount = count - 1;
//获取条码支线信息
for (int i = 1; i <= subcount; i++)
{
subLine sl = new subLine();
sl.lineID = buffer[index + i].ToString();
sl.barcode = "";
sinfo.subLineList.Add(sl);
}
int barcodeLegth = 10;//设置单个条码长度
//获取主条码
sinfo.ProductBarcode = Getbarcode(buffer, index + 4, barcodeLegth);
//for (int i = 1; i <= 5; i++)
//{
// subLine sl = new subLine();
// sl.lineID = buffer[index + i].ToString();
// sl.barcode = "";
// sinfo.subLineList.Add(sl);
//}
//int barcodeLegth = 10;//设置单个条码长度
for (int i = 1; i <= subcount; i++)
//获取主条码
byte[] bytes = new byte[20];
Array.Copy(buffer,22,bytes,0,20);
//ByteTransform.DataFormat = HslCommunication.Core.DataFormat.DCBA;
//ByteTransform.IsStringReverseByteWord = true;
if (BitConverter.IsLittleEndian)
{
sinfo.subLineList[i - 1].barcode = Getbarcode(buffer, index + 4 + i * barcodeLegth, barcodeLegth);
Array.Reverse(bytes, 0, 4);
Array.Reverse(bytes, 4, 4);
Array.Reverse(bytes, 8, 4);
Array.Reverse(bytes, 12, 4);
Array.Reverse(bytes, 16, 4);
}
sinfo.ProductBarcode = ByteTransform.TransString(bytes, 0, 20, Encoding.ASCII);
}
catch (Exception ex)
{
@ -757,25 +882,12 @@ namespace Mesnac.Controls.Compressor
}
return false;
}
/// <summary>
/// 获取条码号
/// </summary>
/// <param name="obj">数组</param>
/// <param name="index">起始</param>
/// <param name="length">长度</param>
/// <returns></returns>
//private string Getbarcode(object[] obj, int index, int length)
//{
// StringBuilder sb=new StringBuilder();
// for (int i = 0; i < length; i++)
// {
// string code = SingleConvertToInt(obj , index+i).ToString();
// code = "0000"+code;
// code = code.Substring(code.Length-4, 4);
// sb.Append(code);
// }
// return sb.ToString();
//}
public virtual string Getbarcode(object[] buffer, int index)
{
return "";
}
//南京方法
private string Getbarcode(object[] buffer, int index, int len)
@ -833,7 +945,7 @@ namespace Mesnac.Controls.Compressor
/// 将数据里的数据解析出来
/// </summary>
/// <param name="array"></param>
private void Array(ArrayList array)
private void Arraylist(ArrayList array)
{
try
{
@ -877,7 +989,15 @@ namespace Mesnac.Controls.Compressor
return 0;
}
}
public ArrayList ConvertToList(bool[] obj)
{
ArrayList al = new ArrayList();
foreach (bool b in obj)
{
al.Add(Convert.ToInt16(b));
}
return al;
}
public ArrayList ConvertToBit(object[] obj, int index)
{
ArrayList al = new ArrayList();

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project ToolsVersion="12.0" DefaultTargets="Build" 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>
@ -9,7 +9,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Mesnac.Controls.Default</RootNamespace>
<AssemblyName>Mesnac.Controls.Default</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<SccProjectName>
</SccProjectName>
@ -19,6 +19,7 @@
</SccAuxPath>
<SccProvider>
</SccProvider>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
@ -28,6 +29,7 @@
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>none</DebugType>
@ -36,6 +38,7 @@
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
<Reference Include="FastReport">

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
@ -10,9 +10,10 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Mesnac.Controls.Feeding</RootNamespace>
<AssemblyName>Mesnac.Controls.Feeding</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile>Client</TargetFrameworkProfile>
<TargetFrameworkProfile>
</TargetFrameworkProfile>
<SccProjectName>
</SccProjectName>
<SccLocalPath>
@ -30,6 +31,7 @@
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>none</DebugType>
@ -38,6 +40,7 @@
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />

@ -1,7 +1,7 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
// 运行时版本:4.0.30319.34209
// 运行时版本:4.0.30319.42000
//
// 对此文件的更改可能会导致不正确的行为,并且如果
// 重新生成代码,这些更改将会丢失。
@ -19,7 +19,7 @@ namespace Mesnac.Controls.Feeding.Properties {
// 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
// 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen
// (以 /str 作为命令选项),或重新生成 VS 项目。
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
[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 {
@ -47,8 +47,8 @@ namespace Mesnac.Controls.Feeding.Properties {
}
/// <summary>
/// 使用此强类型资源类,为所有资源查找
/// 重写当前线程的 CurrentUICulture 属性
/// 重写当前线程的 CurrentUICulture 属性,对
/// 使用此强类型资源类的所有资源查找执行重写。
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture {

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
@ -10,7 +10,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Mesnac.Controls.Intake</RootNamespace>
<AssemblyName>Mesnac.Controls.Intake</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<SccProjectName>
</SccProjectName>
@ -20,6 +20,7 @@
</SccAuxPath>
<SccProvider>
</SccProvider>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
@ -29,6 +30,7 @@
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
@ -37,6 +39,7 @@
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
@ -10,7 +10,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Mesnac.Controls.Sulf</RootNamespace>
<AssemblyName>Mesnac.Controls.Sulf</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<SccProjectName>
</SccProjectName>
@ -20,6 +20,7 @@
</SccAuxPath>
<SccProvider>
</SccProvider>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
@ -29,6 +30,7 @@
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
@ -37,6 +39,10 @@
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />

@ -1,7 +1,7 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
// 运行时版本:4.0.30319.235
// 运行时版本:4.0.30319.42000
//
// 对此文件的更改可能会导致不正确的行为,并且如果
// 重新生成代码,这些更改将会丢失。
@ -19,7 +19,7 @@ namespace Mesnac.Controls.Sulf.Properties {
// 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
// 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen
// (以 /str 作为命令选项),或重新生成 VS 项目。
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
[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 {
@ -47,8 +47,8 @@ namespace Mesnac.Controls.Sulf.Properties {
}
/// <summary>
/// 使用此强类型资源类,为所有资源查找
/// 重写当前线程的 CurrentUICulture 属性
/// 重写当前线程的 CurrentUICulture 属性,对
/// 使用此强类型资源类的所有资源查找执行重写。
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture {
@ -60,6 +60,9 @@ namespace Mesnac.Controls.Sulf.Properties {
}
}
/// <summary>
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
/// </summary>
internal static System.Drawing.Bitmap valveclose {
get {
object obj = ResourceManager.GetObject("valveclose", resourceCulture);
@ -67,6 +70,9 @@ namespace Mesnac.Controls.Sulf.Properties {
}
}
/// <summary>
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
/// </summary>
internal static System.Drawing.Bitmap valveopen {
get {
object obj = ResourceManager.GetObject("valveopen", resourceCulture);

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project ToolsVersion="12.0" DefaultTargets="Build" 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>
@ -9,7 +9,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Mesnac.Equips.Connection</RootNamespace>
<AssemblyName>Mesnac.Equips.Connection</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<SccProjectName>
</SccProjectName>
@ -19,6 +19,7 @@
</SccAuxPath>
<SccProvider>
</SccProvider>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
@ -28,6 +29,7 @@
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
@ -36,6 +38,7 @@
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project ToolsVersion="12.0" DefaultTargets="Build" 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>
@ -9,7 +9,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Mesnac.Equips</RootNamespace>
<AssemblyName>Mesnac.Equips</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile />
<SccProjectName>
@ -29,6 +29,7 @@
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
@ -37,6 +38,7 @@
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project ToolsVersion="12.0" DefaultTargets="Build" 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>
@ -9,7 +9,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Mesnac.Maths</RootNamespace>
<AssemblyName>Mesnac.Maths</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<SccProjectName>
</SccProjectName>
@ -19,6 +19,7 @@
</SccAuxPath>
<SccProvider>
</SccProvider>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
@ -28,6 +29,7 @@
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
@ -36,6 +38,7 @@
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
@ -10,7 +10,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Host</RootNamespace>
<AssemblyName>Host</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<PublishUrl>publish\</PublishUrl>
<Install>true</Install>
@ -46,6 +46,7 @@
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>none</DebugType>
@ -55,6 +56,7 @@
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
@ -10,7 +10,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Loder</RootNamespace>
<AssemblyName>Loder</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<PublishUrl>publish\</PublishUrl>
<Install>true</Install>
@ -46,6 +46,7 @@
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>none</DebugType>
@ -55,6 +56,7 @@
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project ToolsVersion="12.0" DefaultTargets="Build" 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>
@ -9,7 +9,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Mesnac.Codd</RootNamespace>
<AssemblyName>Mesnac.Codd</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<SccProjectName>
</SccProjectName>
@ -29,6 +29,7 @@
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
@ -37,6 +38,7 @@
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
@ -10,7 +10,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Mesnac.Communication</RootNamespace>
<AssemblyName>Mesnac.Communication</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<SccProjectName>
</SccProjectName>
@ -20,6 +20,7 @@
</SccAuxPath>
<SccProvider>
</SccProvider>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
@ -29,6 +30,7 @@
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
@ -37,6 +39,7 @@
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
@ -10,7 +10,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Mesnac.Docking</RootNamespace>
<AssemblyName>Mesnac.Docking</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile />
<SccProjectName>
@ -30,6 +30,7 @@
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>none</DebugType>
@ -38,6 +39,7 @@
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
@ -10,7 +10,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Mesnac.UI.ToolBox</RootNamespace>
<AssemblyName>Mesnac.UI.ToolBox</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<SccProjectName>
</SccProjectName>
@ -20,6 +20,7 @@
</SccAuxPath>
<SccProvider>
</SccProvider>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
@ -29,6 +30,7 @@
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
@ -37,6 +39,7 @@
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
@ -10,7 +10,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>OpcDaNet</RootNamespace>
<AssemblyName>OpcDaNet</AssemblyName>
<TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<SccProjectName>
</SccProjectName>
@ -20,6 +20,7 @@
</SccAuxPath>
<SccProvider>
</SccProvider>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
@ -29,6 +30,7 @@
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>none</DebugType>
@ -37,6 +39,7 @@
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
@ -10,7 +10,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>PropertyGridEx</RootNamespace>
<AssemblyName>PropertyGridEx</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile />
<SccProjectName>
@ -30,6 +30,7 @@
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>none</DebugType>
@ -38,6 +39,7 @@
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
<Reference Include="Microsoft.VisualBasic" />

@ -1,80 +1,80 @@
<?xml version="1.0" encoding="utf-8" ?>
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<section name="log4net" type="System.Configuration.IgnoreSectionHandler" />
<section name="log4net" type="System.Configuration.IgnoreSectionHandler"/>
</configSections>
<appSettings>
<!--控件属性列表文件-->
<add key="componentsPropertyFile" value="\data\ComponentProperty.xml" />
<add key="componentsPropertyFile" value="\data\ComponentProperty.xml"/>
<!--控件动画列表文件-->
<add key="componentsActionFile" value="\data\ComponentAction.xml" />
<add key="componentsActionFile" value="\data\ComponentAction.xml"/>
<!--控件事件列表文件-->
<add key="componentsEventFile" value="\data\ComponentEvent.xml" />
<add key="componentsEventFile" value="\data\ComponentEvent.xml"/>
<!--自定义插件目录-->
<add key="MesnacPlugInPath" value="Data\MesnacPlugIn" />
<add key="MesnacPlugInPath" value="Data\MesnacPlugIn"/>
<!--组态工程目录-->
<add key="MCProjectPath" value="Data\MCProject" />
<add key="MCProjectPath" value="Data\MCProject"/>
<!--系统工程配置目录-->
<add key="SysConfigPath" value="Data\SysConfig" />
<add key="ClientSettingsProvider.ServiceUri" value="" />
<add key="SysConfigPath" value="Data\SysConfig"/>
<add key="ClientSettingsProvider.ServiceUri" value=""/>
</appSettings>
<log4net>
<appender name="ColoredConsoleAppender" type="log4net.Appender.ColoredConsoleAppender">
<mapping>
<level value="FATAL" />
<foreColor value="Red, HighIntensity" />
<level value="FATAL"/>
<foreColor value="Red, HighIntensity"/>
</mapping>
<mapping>
<level value="ERROR" />
<foreColor value="Red" />
<level value="ERROR"/>
<foreColor value="Red"/>
</mapping>
<mapping>
<level value="WARN" />
<foreColor value="Yellow" />
<level value="WARN"/>
<foreColor value="Yellow"/>
</mapping>
<mapping>
<level value="INFO" />
<foreColor value="White" />
<level value="INFO"/>
<foreColor value="White"/>
</mapping>
<mapping>
<level value="DEBUG" />
<foreColor value="Green" />
<level value="DEBUG"/>
<foreColor value="Green"/>
</mapping>
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%date [%thread] %-5level- %message%newline" />
<conversionPattern value="%date [%thread] %-5level- %message%newline"/>
</layout>
</appender>
<appender name="FileAppender" type="log4net.Appender.FileAppender">
<file value="log\"/>
<appendToFile value="true" />
<rollingStyle value="Date" />
<datePattern value="yyyyMMdd&quot;.txt&quot;" />
<appendToFile value="true"/>
<rollingStyle value="Date"/>
<datePattern value="yyyyMMdd&quot;.txt&quot;"/>
<StaticLogFileName value="false"/>
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%date [%thread] %-5level- %message%newline"/>
</layout>
<!--多线程写入支持-->
<lockingModel type="log4net.Appender.FileAppender+MinimalLock" />
<lockingModel type="log4net.Appender.FileAppender+MinimalLock"/>
</appender>
<root>
<level value="DEBUG" />
<appender-ref ref="ColoredConsoleAppender" />
<level value="DEBUG"/>
<appender-ref ref="ColoredConsoleAppender"/>
<!--<appender-ref ref="FileAppender"/>-->
</root>
</log4net>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0" />
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2"/>
</startup>
<system.web>
<membership defaultProvider="ClientAuthenticationMembershipProvider">
<providers>
<add name="ClientAuthenticationMembershipProvider" type="System.Web.ClientServices.Providers.ClientFormsAuthenticationMembershipProvider, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" serviceUri="" />
<add name="ClientAuthenticationMembershipProvider" type="System.Web.ClientServices.Providers.ClientFormsAuthenticationMembershipProvider, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" serviceUri=""/>
</providers>
</membership>
<roleManager defaultProvider="ClientRoleProvider" enabled="true">
<providers>
<add name="ClientRoleProvider" type="System.Web.ClientServices.Providers.ClientRoleProvider, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" serviceUri="" cacheTimeout="86400" />
<add name="ClientRoleProvider" type="System.Web.ClientServices.Providers.ClientRoleProvider, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" serviceUri="" cacheTimeout="86400"/>
</providers>
</roleManager>
</system.web>
</configuration>
</configuration>

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
@ -10,7 +10,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>MCBackView</RootNamespace>
<AssemblyName>MCBackView</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
<TargetFrameworkProfile>
</TargetFrameworkProfile>
<FileAlignment>512</FileAlignment>
@ -32,6 +32,7 @@
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
<PlatformTarget>x86</PlatformTarget>
@ -41,6 +42,7 @@
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup>
<StartupObject />

@ -1,7 +1,7 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
// 运行时版本:4.0.30319.34014
// 运行时版本:4.0.30319.42000
//
// 对此文件的更改可能会导致不正确的行为,并且如果
// 重新生成代码,这些更改将会丢失。
@ -19,7 +19,7 @@ namespace MCBackView.Properties {
// 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
// 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen
// (以 /str 作为命令选项),或重新生成 VS 项目。
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
[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 {
@ -47,8 +47,8 @@ namespace MCBackView.Properties {
}
/// <summary>
/// 使用此强类型资源类,为所有资源查找
/// 重写当前线程的 CurrentUICulture 属性
/// 重写当前线程的 CurrentUICulture 属性,对
/// 使用此强类型资源类的所有资源查找执行重写。
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture {

@ -1,18 +1,18 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
// 运行时版本:4.0.30319.34014
// 运行时版本:4.0.30319.42000
//
// 对此文件的更改可能会导致不正确的行为,并且如果
// 重新生成代码,这些更改将会丢失。
// </auto-generated>
//------------------------------------------------------------------------------
namespace MCRun.Properties {
namespace MCBackView.Properties {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "10.0.0.0")]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.9.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));

@ -31,13 +31,25 @@
<!--设备时钟类型值包括Thread或Timer-->
<add key="BASE_EQUIP_CLOCKTYPE" value="Thread"/>
<add key="ExcelPath" value="D:/test.xlsx"/>
<add key="ComPort" value="COM5"/>
<add key="ComPort" value="COM8"/>
</appSettings>
<startup useLegacyV2RuntimeActivationPolicy="true">
<supportedRuntime version="v4.0" sku = ".NETFramework,Version=v4.0"/>
<supportedRuntime version="v2.0.50727"/>
</startup>
<log4net>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Newtonsoft.Json"
publicKeyToken="30ad4fe6b2a6aeed"
culture="neutral" />
<bindingRedirect oldVersion="13.0.0.0"
newVersion="6.0.0.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
<log4net>
<appender name="ColoredConsoleAppender" type="log4net.Appender.ColoredConsoleAppender">
<mapping>
<level value="FATAL" />

@ -7,54 +7,30 @@
<Node Name="TEST" Text="TEST" ToolTipText="" Tag="TEST" ImageIndex="3" SelectedImageIndex="3" />
<Node Name="LINE_B" Text="LINE_B" ToolTipText="" Tag="LINE_B" ImageIndex="3" SelectedImageIndex="3" />
<Node Name="LINE_C" Text="LINE_C" ToolTipText="" Tag="LINE_C" ImageIndex="3" SelectedImageIndex="3" />
<Node Name="B10动静盘配对" Text="B10动静盘配对" ToolTipText="" Tag="B10动静盘配对" ImageIndex="3" SelectedImageIndex="3" />
<Node Name="B40前盖组件装配" Text="B40前盖组件装配" ToolTipText="" Tag="B40前盖组件装配" ImageIndex="3" SelectedImageIndex="3" />
<Node Name="120_1动静盘拍照" Text="120_1动静盘拍照" ToolTipText="" Tag="120_1动静盘拍照" ImageIndex="3" SelectedImageIndex="3" />
<Node Name="190_1氦气检漏" Text="190_1氦气检漏" ToolTipText="" Tag="190_1氦气检漏" ImageIndex="3" SelectedImageIndex="3" />
<Node Name="B50曲轴组件装配" Text="B50曲轴组件装配" ToolTipText="" Tag="B50曲轴组件装配" ImageIndex="3" SelectedImageIndex="3" />
<Node Name="B61充磁工位" Text="B61充磁工位" ToolTipText="" Tag="B61充磁工位" ImageIndex="3" SelectedImageIndex="3" />
<Node Name="B70定子热套" Text="B70定子热套" ToolTipText="" Tag="B70定子热套" ImageIndex="3" SelectedImageIndex="3" />
<Node Name="B90机壳轴承压装" Text="B90机壳轴承压装" ToolTipText="" Tag="B90机壳轴承压装" ImageIndex="3" SelectedImageIndex="3" />
<Node Name="B100后盖螺丝机" Text="B100后盖螺丝机" ToolTipText="" Tag="B100后盖螺丝机" ImageIndex="3" SelectedImageIndex="3" />
<Node Name="80_1前盖轴封检漏" Text="80_1前盖轴封检漏" ToolTipText="" Tag="80_1前盖轴封检漏" ImageIndex="3" SelectedImageIndex="3" />
<Node Name="80_2转子充磁" Text="80_2转子充磁" ToolTipText="" Tag="80_2转子充磁" ImageIndex="3" SelectedImageIndex="3" />
<Node Name="80_2转子充磁1" Text="80_2转子充磁1" ToolTipText="" Tag="80_2转子充磁1" ImageIndex="3" SelectedImageIndex="3" />
<Node Name="B110玻璃接线柱螺丝机" Text="B110玻璃接线柱螺丝机" ToolTipText="" Tag="B110玻璃接线柱螺丝机" ImageIndex="3" SelectedImageIndex="3" />
<Node Name="B130氦气检漏" Text="B130氦气检漏" ToolTipText="" Tag="B130氦气检漏" ImageIndex="3" SelectedImageIndex="3" />
<Node Name="B140控制器装配" Text="B140控制器装配" ToolTipText="" Tag="B140控制器装配" ImageIndex="3" SelectedImageIndex="3" />
<Node Name="B150控制器拧紧螺丝机" Text="B150控制器拧紧螺丝机" ToolTipText="" Tag="B150控制器拧紧螺丝机" ImageIndex="3" SelectedImageIndex="3" />
<Node Name="B160性能测试1" Text="B160性能测试1" ToolTipText="" Tag="B160性能测试1" ImageIndex="3" SelectedImageIndex="3" />
<Node Name="B160性能测试2" Text="B160性能测试2" ToolTipText="" Tag="B160性能测试2" ImageIndex="3" SelectedImageIndex="3" />
<Node Name="B170整机补油" Text="B170整机补油" ToolTipText="" Tag="B170整机补油" ImageIndex="3" SelectedImageIndex="3" />
<Node Name="100静盘排气阀片安装" Text="100静盘排气阀片安装" ToolTipText="" Tag="100静盘排气阀片安装" ImageIndex="3" SelectedImageIndex="3" />
<Node Name="160后盖螺栓紧固" Text="160后盖螺栓紧固" ToolTipText="" Tag="160后盖螺栓紧固" ImageIndex="3" SelectedImageIndex="3" />
<Node Name="180接线柱螺栓紧固" Text="180接线柱螺栓紧固" ToolTipText="" Tag="180接线柱螺栓紧固" ImageIndex="3" SelectedImageIndex="3" />
<Node Name="220_1整机称重" Text="220_1整机称重" ToolTipText="" Tag="220_1整机称重" ImageIndex="3" SelectedImageIndex="3" />
<Node Name="20电机壳组件绝缘测试" Text="20电机壳组件绝缘测试" ToolTipText="" Tag="20电机壳组件绝缘测试" ImageIndex="3" SelectedImageIndex="3" />
<Node Name="160导热硅脂喷涂" Text="160导热硅脂喷涂" ToolTipText="" Tag="160导热硅脂喷涂" ImageIndex="3" SelectedImageIndex="3" />
<Node Name="180控制器螺栓禁固" Text="180控制器螺栓禁固" ToolTipText="" Tag="180控制器螺栓禁固" ImageIndex="3" SelectedImageIndex="3" />
<Node Name="190控制器检漏" Text="190控制器检漏" ToolTipText="" Tag="190控制器检漏" ImageIndex="3" SelectedImageIndex="3" />
<Node Name="200整机翻转" Text="200整机翻转" ToolTipText="" Tag="200整机翻转" ImageIndex="3" SelectedImageIndex="3" />
<Node Name="210整机称重、注油" Text="210整机称重、注油" ToolTipText="" Tag="210整机称重、注油" ImageIndex="3" SelectedImageIndex="3" />
<Node Name="220整机绝缘测试和法兰安装" Text="220整机绝缘测试和法兰安装" ToolTipText="" Tag="220整机绝缘测试和法兰安装" ImageIndex="3" SelectedImageIndex="3" />
<Node Name="230性能测试" Text="230性能测试" ToolTipText="" Tag="230性能测试" ImageIndex="3" SelectedImageIndex="3" />
<Node Name="210控制器螺栓禁固" Text="210控制器螺栓禁固" ToolTipText="" Tag="210控制器螺栓禁固" ImageIndex="3" SelectedImageIndex="3" />
<Node Name="220控制器检漏" Text="220控制器检漏" ToolTipText="" Tag="220控制器检漏" ImageIndex="3" SelectedImageIndex="3" />
<Node Name="230_1性能测试1" Text="230_1性能测试1" ToolTipText="" Tag="230_1性能测试1" ImageIndex="3" SelectedImageIndex="3" />
<Node Name="240整机称重、注油" Text="240整机称重、注油" ToolTipText="" Tag="240整机称重、注油" ImageIndex="3" SelectedImageIndex="3" />
<Node Name="250_1螺栓紧固" Text="250_1螺栓紧固" ToolTipText="" Tag="250_1螺栓紧固" ImageIndex="3" SelectedImageIndex="3" />
<Node Name="270绝缘测试" Text="270绝缘测试" ToolTipText="" Tag="270绝缘测试" ImageIndex="3" SelectedImageIndex="3" />
<Node Name="B30排气阀拧紧螺丝机" Text="B30排气阀拧紧螺丝机" ToolTipText="" Tag="B30排气阀拧紧螺丝机" ImageIndex="3" SelectedImageIndex="3" />
</Node>
<Node Name="nodeDevice" Text="设备" ToolTipText="" Tag="nodeDevice" ImageIndex="2" SelectedImageIndex="2">
<Node Name="A1" Text="A1" ToolTipText="" Tag="A1" ImageIndex="5" SelectedImageIndex="5" />
<Node Name="A2" Text="A2" ToolTipText="" Tag="A2" ImageIndex="5" SelectedImageIndex="5" />
<Node Name="A3" Text="A3" ToolTipText="" Tag="A3" ImageIndex="5" SelectedImageIndex="5" />
<Node Name="A4" Text="A4" ToolTipText="" Tag="A4" ImageIndex="5" SelectedImageIndex="5" />
<Node Name="A5" Text="A5" ToolTipText="" Tag="A5" ImageIndex="5" SelectedImageIndex="5" />
<Node Name="A6" Text="A6" ToolTipText="" Tag="A6" ImageIndex="5" SelectedImageIndex="5" />
<Node Name="A7" Text="A7" ToolTipText="" Tag="A7" ImageIndex="5" SelectedImageIndex="5" />
<Node Name="A8" Text="A8" ToolTipText="" Tag="A8" ImageIndex="5" SelectedImageIndex="5" />
<Node Name="A9" Text="A9" ToolTipText="" Tag="A9" ImageIndex="5" SelectedImageIndex="5" />
<Node Name="A10" Text="A10" ToolTipText="" Tag="A10" ImageIndex="5" SelectedImageIndex="5" />
<Node Name="A11" Text="A11" ToolTipText="" Tag="A11" ImageIndex="5" SelectedImageIndex="5" />
<Node Name="A12" Text="A12" ToolTipText="" Tag="A12" ImageIndex="5" SelectedImageIndex="5" />
<Node Name="B20" Text="B20" ToolTipText="" Tag="B20" ImageIndex="5" SelectedImageIndex="5" />
<Node Name="B21" Text="B21" ToolTipText="" Tag="B21" ImageIndex="5" SelectedImageIndex="5" />
<Node Name="B22" Text="B22" ToolTipText="" Tag="B22" ImageIndex="5" SelectedImageIndex="5" />
<Node Name="B23" Text="B23" ToolTipText="" Tag="B23" ImageIndex="5" SelectedImageIndex="5" />
<Node Name="B24" Text="B24" ToolTipText="" Tag="B24" ImageIndex="5" SelectedImageIndex="5" />
<Node Name="B25" Text="B25" ToolTipText="" Tag="B25" ImageIndex="5" SelectedImageIndex="5" />
<Node Name="C30" Text="C30" ToolTipText="" Tag="C30" ImageIndex="5" SelectedImageIndex="5" />
<Node Name="C31" Text="C31" ToolTipText="" Tag="C31" ImageIndex="5" SelectedImageIndex="5" />
<Node Name="C32" Text="C32" ToolTipText="" Tag="C32" ImageIndex="5" SelectedImageIndex="5" />
<Node Name="C33" Text="C33" ToolTipText="" Tag="C33" ImageIndex="5" SelectedImageIndex="5" />
<Node Name="C34" Text="C34" ToolTipText="" Tag="C34" ImageIndex="5" SelectedImageIndex="5" />
<Node Name="C35" Text="C35" ToolTipText="" Tag="C35" ImageIndex="5" SelectedImageIndex="5" />
<Node Name="A25" Text="A25" ToolTipText="" Tag="A25" ImageIndex="5" SelectedImageIndex="5" />
</Node>
<Node Name="nodeDataSource" Text="数据源" ToolTipText="" Tag="nodeDataSource" ImageIndex="6" SelectedImageIndex="6">
<Node Name="DataSource1" Text="DataSource1" ToolTipText="" Tag="DataSource1" ImageIndex="7" SelectedImageIndex="7" />

@ -1,4 +1,4 @@
<DataSources>
<DataSourceItem Name="DataSource1" Driver="MS SQL Server" Server="192.168.0.254" UserName="sa" Password="123456" DataBase="ATJ_HS_DB" ConnectionTimeout="5" DriverAssembly="ICSharpCode.Data.SQLServer, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" DriverClass="ICSharpCode.Data.Core.DatabaseDrivers.SQLServer.SQLServerDatabaseDriver" DataSourceClass="ICSharpCode.Data.Core.DatabaseObjects.Database" />
<DataSourceItem Name="DataSource2" Driver="MS SQL Server" Server="192.168.0.254" UserName="sa" Password="123456" DataBase="ATJ_HS_DB" ConnectionTimeout="5" DriverAssembly="ICSharpCode.Data.SQLServer, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" DriverClass="ICSharpCode.Data.Core.DatabaseDrivers.SQLServer.SQLServerDatabaseDriver" DataSourceClass="ICSharpCode.Data.Core.DatabaseObjects.Database" />
<DataSourceItem Name="DataSource1" Driver="MS SQL Server" Server="192.168.1.120" UserName="sa" Password="123456" DataBase="ATJ_581_DB" ConnectionTimeout="5" DriverAssembly="ICSharpCode.Data.SQLServer, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" DriverClass="ICSharpCode.Data.Core.DatabaseDrivers.SQLServer.SQLServerDatabaseDriver" DataSourceClass="ICSharpCode.Data.Core.DatabaseObjects.Database" />
<DataSourceItem Name="DataSource2" Driver="MS SQL Server" Server="192.168.1.120" UserName="sa" Password="123456" DataBase="ATJ_581_DB" ConnectionTimeout="5" DriverAssembly="ICSharpCode.Data.SQLServer, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" DriverClass="ICSharpCode.Data.Core.DatabaseDrivers.SQLServer.SQLServerDatabaseDriver" DataSourceClass="ICSharpCode.Data.Core.DatabaseObjects.Database" />
</DataSources>

@ -1,20 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<EquipFactory>
<Equip name="A4" project="空项目">
<Equip name="A2" project="空项目">
<Main>
<Brand value="Mitsubishi" />
<Model value="MXComponent" />
<ReadHz value="1000" />
<UnitLen value="8" />
<Connection mode="Default">
<IP value="4" />
<IP value="2" />
</Connection>
</Main>
<Group>
<Group name="B1" block="5010" start="0" len="800" access="ReadWrite" remark="" isautoread="True">
<Data>
<Data name="D1" runname="" start="0" len="300" method="" max="" issave="True" subtractor="" remark="" />
<Data name="D2" runname="" start="500" len="300" method="" max="" issave="True" subtractor="" remark="" />
<Data name="D1" runname="" start="0" len="800" method="" max="" issave="True" subtractor="" remark="" />
</Data>
</Group>
</Group>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -71,7 +71,7 @@
<Property name="Name">MCButton3</Property>
<Property name="Size">125, 44</Property>
</Object>
<Property name="Text">豪森型号切换</Property>
<Property name="Text">型号切换</Property>
<Property name="Dock">Top</Property>
<Property name="Font">宋体, 12pt, style=Bold</Property>
<Property name="Location">0, 0</Property>
@ -90,7 +90,7 @@
<Property name="FormBorderStyle">Sizable</Property>
<Property name="Size">799, 507</Property>
<Property name="StartPosition">WindowsDefaultLocation</Property>
<Property name="Text">豪森线一键换型</Property>
<Property name="Text">一键换型</Property>
<Property name="WindowState">Normal</Property>
<Property name="BackgroundImage" />
<Property name="BackgroundImageLayout">Tile</Property>

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
@ -10,7 +10,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>MCEdit</RootNamespace>
<AssemblyName>MCEdit</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
<TargetFrameworkProfile>
</TargetFrameworkProfile>
<FileAlignment>512</FileAlignment>
@ -32,6 +32,7 @@
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
<PlatformTarget>x86</PlatformTarget>
@ -41,6 +42,7 @@
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup>
<ApplicationIcon>images\designer.ico</ApplicationIcon>

@ -12,7 +12,7 @@ namespace MCEdit.Properties {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "10.0.0.0")]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.9.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
@ -10,7 +10,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>MCRun</RootNamespace>
<AssemblyName>MCRun</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
<TargetFrameworkProfile>
</TargetFrameworkProfile>
<FileAlignment>512</FileAlignment>
@ -47,6 +47,7 @@
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
<PlatformTarget>x86</PlatformTarget>
@ -56,6 +57,7 @@
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup>
<StartupObject />

@ -1,7 +1,7 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
// 运行时版本:4.0.30319.34209
// 运行时版本:4.0.30319.42000
//
// 对此文件的更改可能会导致不正确的行为,并且如果
// 重新生成代码,这些更改将会丢失。
@ -19,7 +19,7 @@ namespace MCRun.Properties {
// 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
// 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen
// (以 /str 作为命令选项),或重新生成 VS 项目。
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
[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 {
@ -47,8 +47,8 @@ namespace MCRun.Properties {
}
/// <summary>
/// 使用此强类型资源类,为所有资源查找
/// 重写当前线程的 CurrentUICulture 属性
/// 重写当前线程的 CurrentUICulture 属性,对
/// 使用此强类型资源类的所有资源查找执行重写。
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture {

@ -12,7 +12,7 @@ namespace MCRun.Properties {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "10.0.0.0")]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.9.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
@ -10,7 +10,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Mesnac.Gui.Run.Global</RootNamespace>
<AssemblyName>Mesnac.Gui.Run.Global</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<SccProjectName>
</SccProjectName>
@ -20,6 +20,7 @@
</SccAuxPath>
<SccProvider>
</SccProvider>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
@ -29,6 +30,7 @@
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
@ -37,6 +39,7 @@
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
@ -10,7 +10,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Mesnac.Basic</RootNamespace>
<AssemblyName>Mesnac.Basic</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile />
<SccProjectName>
@ -30,6 +30,7 @@
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>none</DebugType>
@ -38,6 +39,7 @@
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
<Reference Include="Ionic.Zip">

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
@ -10,7 +10,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Mesnac.Gui.Common</RootNamespace>
<AssemblyName>Mesnac.Gui.Common</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<SccProjectName>
</SccProjectName>
@ -20,6 +20,7 @@
</SccAuxPath>
<SccProvider>
</SccProvider>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
@ -29,6 +30,7 @@
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
@ -37,6 +39,7 @@
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
@ -10,7 +10,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Mesnac.Gui.Edit</RootNamespace>
<AssemblyName>Mesnac.Gui.Edit</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<SccProjectName>
</SccProjectName>
@ -20,6 +20,7 @@
</SccAuxPath>
<SccProvider>
</SccProvider>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
@ -29,6 +30,7 @@
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
@ -37,6 +39,7 @@
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
<Reference Include="FastReport">

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
@ -10,7 +10,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Mesnac.Gui.Run</RootNamespace>
<AssemblyName>Mesnac.Gui.Run</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<SccProjectName>
</SccProjectName>
@ -20,6 +20,7 @@
</SccAuxPath>
<SccProvider>
</SccProvider>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
@ -29,6 +30,7 @@
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
@ -37,6 +39,7 @@
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />

@ -23,7 +23,9 @@ namespace FrmPrint
[SugarColumn(ColumnName = "ProductType")]
public string ProductType { get; set; }
[SugarColumn(ColumnName = "ToolCarNo")]
public string ToolCarNo { get; set; }
[SugarColumn(ColumnName = "ShopID")]
public string ShopID { get; set; }

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save