Commit 773f1289 刘韬

1

1 个父辈 cae06c13
正在显示 57 个修改的文件 包含 83 行增加165 行删除
...@@ -94,6 +94,7 @@ ...@@ -94,6 +94,7 @@
<Compile Include="deviceLibrary\IO\kangnaide\MasterTcpClient.cs" /> <Compile Include="deviceLibrary\IO\kangnaide\MasterTcpClient.cs" />
<Compile Include="deviceLibrary\IO\AIOBOX\AIOBOXManager.cs" /> <Compile Include="deviceLibrary\IO\AIOBOX\AIOBOXManager.cs" />
<Compile Include="deviceLibrary\IO\IOBase.cs" /> <Compile Include="deviceLibrary\IO\IOBase.cs" />
<Compile Include="deviceLibrary\IO\NanjingSDotIO.cs" />
<Compile Include="manager\LedManager.cs" /> <Compile Include="manager\LedManager.cs" />
<Compile Include="manager\LineWidthManager.cs" /> <Compile Include="manager\LineWidthManager.cs" />
<Compile Include="manager\ResourceControl.cs" /> <Compile Include="manager\ResourceControl.cs" />
......
...@@ -16,6 +16,7 @@ namespace TSA_V.DeviceLibrary ...@@ -16,6 +16,7 @@ namespace TSA_V.DeviceLibrary
this.SizeX = sizeX; this.SizeX = sizeX;
this.SizeY = sizeY; this.SizeY = sizeY;
this.PenWidth = lineWidth; this.PenWidth = lineWidth;
this.ShowText = showText;
} }
public int PX = 2; public int PX = 2;
......
...@@ -21,11 +21,15 @@ namespace TSA_V.DeviceLibrary ...@@ -21,11 +21,15 @@ namespace TSA_V.DeviceLibrary
public static void Init() public static void Init()
{ {
bool isAIOBox = ConfigAppSettings.GetIntValue(Setting_Init.UseAIOBOX).Equals(1); int isAIOBox = ConfigAppSettings.GetIntValue(Setting_Init.UseAIOBOX);
if (isAIOBox) if (isAIOBox==1)
{ {
instance = new AIOBOXManager(); instance = new AIOBOXManager();
} }
else if (isAIOBox == 2)
{
instance = new NanjingSDotIO();
}
else else
{ {
instance = new KNDManager(); instance = new KNDManager();
......
...@@ -95,6 +95,8 @@ namespace TSA_V.DeviceLibrary ...@@ -95,6 +95,8 @@ namespace TSA_V.DeviceLibrary
while (true) while (true)
{ {
Thread.Sleep(200); Thread.Sleep(200);
if (!IOManager.ShuddenOK())
break;
if (IsStop) if (IsStop)
{ {
result = ResourceControl.GetString(ResourceControl.UserStop, "用户中止"); result = ResourceControl.GetString(ResourceControl.UserStop, "用户中止");
......
...@@ -281,6 +281,8 @@ namespace TSA_V.DeviceLibrary ...@@ -281,6 +281,8 @@ namespace TSA_V.DeviceLibrary
{ {
foreach (NodeInfo node in map.Values) foreach (NodeInfo node in map.Values)
{ {
if (!IOManager.ShuddenOK())
return;
if (!PUSICANControl.IsHomeEnd(node.NodeId)) if (!PUSICANControl.IsHomeEnd(node.NodeId))
{ {
timeOutMsg = ResourceControl.GetString(ResourceControl.RNodeGoHome, " 旋转轴[{0}]原点返回完成", node.NodeId); timeOutMsg = ResourceControl.GetString(ResourceControl.RNodeGoHome, " 旋转轴[{0}]原点返回完成", node.NodeId);
......
...@@ -179,7 +179,10 @@ namespace TSA_V.DeviceLibrary ...@@ -179,7 +179,10 @@ namespace TSA_V.DeviceLibrary
public static bool GetWaitResult(List<WaitResultInfo> waitList, TimeSpan span,bool oneOkCanEnd, out string waitMsg) public static bool GetWaitResult(List<WaitResultInfo> waitList, TimeSpan span,bool oneOkCanEnd, out string waitMsg)
{ {
waitMsg = ""; waitMsg = "";
if (!IOManager.ShuddenOK())
return false;
try try
{ {
if (waitList.Count <= 0) if (waitList.Count <= 0)
......
...@@ -265,7 +265,7 @@ namespace TSA_V.DeviceLibrary ...@@ -265,7 +265,7 @@ namespace TSA_V.DeviceLibrary
if (TSAVBean.IsValidPosition(currPoint.NodePositionX, currPoint.NodePositionY)) if (TSAVBean.IsValidPosition(currPoint.NodePositionX, currPoint.NodePositionY))
{ {
//LogUtil.info(" 程序【" + currBoard.boardName + "】插件【" + currPoint.pointName + "】,X轴【" + currPoint.NodePositionX + "】,Y轴【" + currPoint.NodePositionY + "】"); //LogUtil.info(" 程序【" + currBoard.boardName + "】插件【" + currPoint.pointName + "】,X轴【" + currPoint.NodePositionX + "】,Y轴【" + currPoint.NodePositionY + "】");
TSAVBean.ShowPoint(currPoint.NodePositionX, currPoint.NodePositionY,currPoint.PointType,currPoint.PointSizeX,currPoint.PointSizeY,currPoint.PenWidth,currPoint.PN); TSAVBean.ShowPoint(currPoint.NodePositionX, currPoint.NodePositionY,currPoint.PointType,currPoint.PointSizeX,currPoint.PointSizeY,currPoint.PenWidth,currPoint.ShowText);
waitList.Add(WaitResultInfo.WaitTime(1000)); waitList.Add(WaitResultInfo.WaitTime(1000));
} }
else else
......
...@@ -853,6 +853,8 @@ namespace PUSICANLibrary ...@@ -853,6 +853,8 @@ namespace PUSICANLibrary
/// </summary> /// </summary>
public static bool IsHomeEnd(uint nodeId) public static bool IsHomeEnd(uint nodeId)
{ {
try
{
//判断忙碌状态=0并且外部停止2=1 //判断忙碌状态=0并且外部停止2=1
int value = 0; int value = 0;
//获取状态 //获取状态
...@@ -863,14 +865,19 @@ namespace PUSICANLibrary ...@@ -863,14 +865,19 @@ namespace PUSICANLibrary
string stop1Str = Convert.ToString(value, 2).PadLeft(5, '0').Substring(4, 1); string stop1Str = Convert.ToString(value, 2).PadLeft(5, '0').Substring(4, 1);
if (busyStr.Equals("0") && (stop2Str.Equals("1") || stop1Str.Equals("1"))) if (busyStr.Equals("0") && (stop2Str.Equals("1") || stop1Str.Equals("1")))
{ {
return true ; return true;
} }
else else
{ {
return false ; return false;
} }
} }
return false ; return false;
}
catch (Exception e) {
LogUtil.error("IsHomeEnd:" + e.ToString());
}
return false;
} }
public static void DefatutPosMove(uint node, int targetDefaultPosition, int movetype = 0,bool isLineSlv=false ) public static void DefatutPosMove(uint node, int targetDefaultPosition, int movetype = 0,bool isLineSlv=false )
{ {
......
...@@ -18,11 +18,11 @@ ...@@ -18,11 +18,11 @@
<DebugType>full</DebugType> <DebugType>full</DebugType>
<Optimize>false</Optimize> <Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath> <OutputPath>bin\Debug\</OutputPath>
<DefineConstants>TRACE;DEBUG;x86</DefineConstants> <DefineConstants>TRACE;DEBUG;x64</DefineConstants>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit> <Prefer32Bit>false</Prefer32Bit>
<PlatformTarget>x86</PlatformTarget> <PlatformTarget>AnyCPU</PlatformTarget>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType> <DebugType>pdbonly</DebugType>
......
...@@ -21,7 +21,8 @@ namespace TSA_V ...@@ -21,7 +21,8 @@ namespace TSA_V
//cmbAoiFile.Items.Clear(); //cmbAoiFile.Items.Clear();
FileList = new List<string>(); FileList = new List<string>();
if (cmbAoiFile!=null)
FileList.Add(ResourceCulture.GetString("不使用AOI"));
string appPath = Application.StartupPath; string appPath = Application.StartupPath;
string pathName = ConfigAppSettings.GetValue(Setting_Init.AOIFileConfig); string pathName = ConfigAppSettings.GetValue(Setting_Init.AOIFileConfig);
string filePath = appPath + pathName; string filePath = appPath + pathName;
...@@ -47,7 +48,7 @@ namespace TSA_V ...@@ -47,7 +48,7 @@ namespace TSA_V
if (String.IsNullOrEmpty(DefaultName).Equals(false)&& FileList.Contains(DefaultName)) if (String.IsNullOrEmpty(DefaultName).Equals(false)&& FileList.Contains(DefaultName))
{ {
FileList.Remove(DefaultName); FileList.Remove(DefaultName);
FileList.Insert(0, DefaultName); FileList.Insert(1, DefaultName);
} }
if (cmbAoiFile != null) if (cmbAoiFile != null)
{ {
......
...@@ -109,11 +109,11 @@ ...@@ -109,11 +109,11 @@
<!--组装工作前,需要输入pcb板条码--> <!--组装工作前,需要输入pcb板条码-->
<add key="NeedPCBCode" value="0" /> <add key="NeedPCBCode" value="0" />
<!--是否调整气缸顺序,配置1时,侧挡气缸前进,底部气缸在上升--> <!--是否调整气缸顺序,配置1时,侧挡气缸前进,底部气缸在上升-->
<add key ="SideCylinderMoveFirst" value ="1"/> <add key="SideCylinderMoveFirst" value="1" />
<!--是否启用工作区信号触发开始工作--> <!--是否启用工作区信号触发开始工作-->
<add key ="WorkSingleStart" value ="0"/> <add key="WorkSingleStart" value="0" />
<!--点位描述显示类型--> <!--点位描述显示类型-->
<add key ="PointDisplayType" value="1"/> <add key="PointDisplayType" value="1" />
</appSettings> </appSettings>
<log4net> <log4net>
<appender name="defaultAppender" type="log4net.Appender.RollingFileAppender"> <appender name="defaultAppender" type="log4net.Appender.RollingFileAppender">
...@@ -146,7 +146,7 @@ ...@@ -146,7 +146,7 @@
</logger> </logger>
</log4net> </log4net>
<startup> <startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" /> <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
</startup> </startup>
<runtime> <runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
......
...@@ -318,10 +318,8 @@ ...@@ -318,10 +318,8 @@
// //
this.groupBox2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) this.groupBox2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right))); | System.Windows.Forms.AnchorStyles.Right)));
this.groupBox2.Controls.Add(this.lblLineW); this.groupBox2.Controls.Add(this.btnConfigAOI);
this.groupBox2.Controls.Add(this.label8); this.groupBox2.Controls.Add(this.label8);
this.groupBox2.Controls.Add(this.txtLineWidth);
this.groupBox2.Controls.Add(this.lbllinews);
this.groupBox2.Controls.Add(this.label122); this.groupBox2.Controls.Add(this.label122);
this.groupBox2.Controls.Add(this.btnUpdate); this.groupBox2.Controls.Add(this.btnUpdate);
this.groupBox2.Controls.Add(this.label9); this.groupBox2.Controls.Add(this.label9);
...@@ -344,9 +342,9 @@ ...@@ -344,9 +342,9 @@
// lblLineW // lblLineW
// //
this.lblLineW.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.lblLineW.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblLineW.Location = new System.Drawing.Point(489, 25); this.lblLineW.Location = new System.Drawing.Point(367, 63);
this.lblLineW.Name = "lblLineW"; this.lblLineW.Name = "lblLineW";
this.lblLineW.Size = new System.Drawing.Size(80, 20); this.lblLineW.Size = new System.Drawing.Size(112, 20);
this.lblLineW.TabIndex = 297; this.lblLineW.TabIndex = 297;
this.lblLineW.Text = "线体宽度:"; this.lblLineW.Text = "线体宽度:";
this.lblLineW.TextAlign = System.Drawing.ContentAlignment.MiddleRight; this.lblLineW.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
...@@ -365,7 +363,7 @@ ...@@ -365,7 +363,7 @@
// txtLineWidth // txtLineWidth
// //
this.txtLineWidth.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.txtLineWidth.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtLineWidth.Location = new System.Drawing.Point(573, 21); this.txtLineWidth.Location = new System.Drawing.Point(483, 59);
this.txtLineWidth.MaxLength = 8; this.txtLineWidth.MaxLength = 8;
this.txtLineWidth.Name = "txtLineWidth"; this.txtLineWidth.Name = "txtLineWidth";
this.txtLineWidth.Size = new System.Drawing.Size(70, 29); this.txtLineWidth.Size = new System.Drawing.Size(70, 29);
...@@ -375,7 +373,7 @@ ...@@ -375,7 +373,7 @@
// //
this.lbllinews.AutoSize = true; this.lbllinews.AutoSize = true;
this.lbllinews.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.lbllinews.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lbllinews.Location = new System.Drawing.Point(646, 27); this.lbllinews.Location = new System.Drawing.Point(556, 65);
this.lbllinews.Name = "lbllinews"; this.lbllinews.Name = "lbllinews";
this.lbllinews.Size = new System.Drawing.Size(30, 17); this.lbllinews.Size = new System.Drawing.Size(30, 17);
this.lbllinews.TabIndex = 296; this.lbllinews.TabIndex = 296;
...@@ -881,10 +879,12 @@ ...@@ -881,10 +879,12 @@
// //
// groupBox1 // groupBox1
// //
this.groupBox1.Controls.Add(this.btnConfigAOI);
this.groupBox1.Controls.Add(this.lblAoi); this.groupBox1.Controls.Add(this.lblAoi);
this.groupBox1.Controls.Add(this.lblLineW);
this.groupBox1.Controls.Add(this.cmbAOIFile); this.groupBox1.Controls.Add(this.cmbAOIFile);
this.groupBox1.Controls.Add(this.txtCode); this.groupBox1.Controls.Add(this.txtCode);
this.groupBox1.Controls.Add(this.txtLineWidth);
this.groupBox1.Controls.Add(this.lbllinews);
this.groupBox1.Controls.Add(this.txtBoardName); this.groupBox1.Controls.Add(this.txtBoardName);
this.groupBox1.Controls.Add(this.label14); this.groupBox1.Controls.Add(this.label14);
this.groupBox1.Controls.Add(this.label2); this.groupBox1.Controls.Add(this.label2);
...@@ -900,7 +900,7 @@ ...@@ -900,7 +900,7 @@
// //
this.btnConfigAOI.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btnConfigAOI.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnConfigAOI.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.btnConfigAOI.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnConfigAOI.Location = new System.Drawing.Point(454, 58); this.btnConfigAOI.Location = new System.Drawing.Point(-47, 15);
this.btnConfigAOI.Name = "btnConfigAOI"; this.btnConfigAOI.Name = "btnConfigAOI";
this.btnConfigAOI.Size = new System.Drawing.Size(100, 30); this.btnConfigAOI.Size = new System.Drawing.Size(100, 30);
this.btnConfigAOI.TabIndex = 284; this.btnConfigAOI.TabIndex = 284;
......
...@@ -554,7 +554,9 @@ namespace TSA_V ...@@ -554,7 +554,9 @@ namespace TSA_V
board.LineWidth = FormUtil.GetIntValue(txtLineWidth); board.LineWidth = FormUtil.GetIntValue(txtLineWidth);
board.boardCode = FormUtil.getValue(txtCode); board.boardCode = FormUtil.getValue(txtCode);
board.orgType = orgType; board.orgType = orgType;
if (cmbAOIFile.SelectedIndex == 0)
board.AOIProName = "";
else
board.AOIProName = cmbAOIFile.Text; board.AOIProName = cmbAOIFile.Text;
if (board.boardName.Equals("")) if (board.boardName.Equals(""))
{ {
...@@ -1030,7 +1032,7 @@ namespace TSA_V ...@@ -1030,7 +1032,7 @@ namespace TSA_V
{ {
if (e.Button == MouseButtons.Right) if (e.Button == MouseButtons.Right)
{ {
if (e.RowIndex >= 0) if (e.RowIndex >= 0 && e.ColumnIndex>=0)
{ {
this.dgvList.ClearSelection(); this.dgvList.ClearSelection();
dgvList.Rows[e.RowIndex].Selected = true; dgvList.Rows[e.RowIndex].Selected = true;
......
...@@ -323,7 +323,7 @@ namespace TSA_V ...@@ -323,7 +323,7 @@ namespace TSA_V
} }
if (BoardManager.getBoardByName(board.boardName) != null) if (BoardManager.getBoardByName(board.boardName) != null)
{ {
MessageBox.Show(ResourceCulture.GetString("导入失败:程序名已存在"), ResourceCulture.GetString("提示"), MessageBoxButtons.OK, MessageBoxIcon.Error); MessageBox.Show(ResourceCulture.GetString("导入失败:程序名已存在")+"["+ board.boardName + "]", ResourceCulture.GetString("提示"), MessageBoxButtons.OK, MessageBoxIcon.Error);
return; return;
} }
BoardManager.ImportBoard(board); BoardManager.ImportBoard(board);
......
...@@ -95,7 +95,7 @@ namespace TSA_V ...@@ -95,7 +95,7 @@ namespace TSA_V
this.btnWork.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btnWork.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnWork.Font = new System.Drawing.Font("微软雅黑", 21.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.btnWork.Font = new System.Drawing.Font("微软雅黑", 21.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnWork.ForeColor = System.Drawing.SystemColors.ButtonHighlight; this.btnWork.ForeColor = System.Drawing.SystemColors.ButtonHighlight;
this.btnWork.Location = new System.Drawing.Point(87, 107); this.btnWork.Location = new System.Drawing.Point(119, 116);
this.btnWork.Name = "btnWork"; this.btnWork.Name = "btnWork";
this.btnWork.Size = new System.Drawing.Size(261, 312); this.btnWork.Size = new System.Drawing.Size(261, 312);
this.btnWork.TabIndex = 0; this.btnWork.TabIndex = 0;
...@@ -159,7 +159,7 @@ namespace TSA_V ...@@ -159,7 +159,7 @@ namespace TSA_V
this.btnHistory.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btnHistory.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnHistory.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.btnHistory.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnHistory.ForeColor = System.Drawing.Color.White; this.btnHistory.ForeColor = System.Drawing.Color.White;
this.btnHistory.Location = new System.Drawing.Point(354, 319); this.btnHistory.Location = new System.Drawing.Point(386, 328);
this.btnHistory.Name = "btnHistory"; this.btnHistory.Name = "btnHistory";
this.btnHistory.Size = new System.Drawing.Size(180, 100); this.btnHistory.Size = new System.Drawing.Size(180, 100);
this.btnHistory.TabIndex = 20; this.btnHistory.TabIndex = 20;
...@@ -254,7 +254,7 @@ namespace TSA_V ...@@ -254,7 +254,7 @@ namespace TSA_V
this.btnReplenish.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btnReplenish.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnReplenish.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.btnReplenish.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnReplenish.ForeColor = System.Drawing.Color.White; this.btnReplenish.ForeColor = System.Drawing.Color.White;
this.btnReplenish.Location = new System.Drawing.Point(540, 213); this.btnReplenish.Location = new System.Drawing.Point(572, 222);
this.btnReplenish.Name = "btnReplenish"; this.btnReplenish.Name = "btnReplenish";
this.btnReplenish.Size = new System.Drawing.Size(180, 100); this.btnReplenish.Size = new System.Drawing.Size(180, 100);
this.btnReplenish.TabIndex = 8; this.btnReplenish.TabIndex = 8;
...@@ -270,7 +270,7 @@ namespace TSA_V ...@@ -270,7 +270,7 @@ namespace TSA_V
this.btnMaintenance.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btnMaintenance.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnMaintenance.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.btnMaintenance.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnMaintenance.ForeColor = System.Drawing.Color.White; this.btnMaintenance.ForeColor = System.Drawing.Color.White;
this.btnMaintenance.Location = new System.Drawing.Point(540, 107); this.btnMaintenance.Location = new System.Drawing.Point(572, 116);
this.btnMaintenance.Name = "btnMaintenance"; this.btnMaintenance.Name = "btnMaintenance";
this.btnMaintenance.Size = new System.Drawing.Size(180, 100); this.btnMaintenance.Size = new System.Drawing.Size(180, 100);
this.btnMaintenance.TabIndex = 8; this.btnMaintenance.TabIndex = 8;
...@@ -286,7 +286,7 @@ namespace TSA_V ...@@ -286,7 +286,7 @@ namespace TSA_V
this.btnCom.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btnCom.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnCom.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.btnCom.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnCom.ForeColor = System.Drawing.Color.White; this.btnCom.ForeColor = System.Drawing.Color.White;
this.btnCom.Location = new System.Drawing.Point(540, 319); this.btnCom.Location = new System.Drawing.Point(572, 328);
this.btnCom.Name = "btnCom"; this.btnCom.Name = "btnCom";
this.btnCom.Size = new System.Drawing.Size(180, 100); this.btnCom.Size = new System.Drawing.Size(180, 100);
this.btnCom.TabIndex = 5; this.btnCom.TabIndex = 5;
...@@ -302,7 +302,7 @@ namespace TSA_V ...@@ -302,7 +302,7 @@ namespace TSA_V
this.btnAOI.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btnAOI.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnAOI.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.btnAOI.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnAOI.ForeColor = System.Drawing.Color.White; this.btnAOI.ForeColor = System.Drawing.Color.White;
this.btnAOI.Location = new System.Drawing.Point(354, 213); this.btnAOI.Location = new System.Drawing.Point(386, 222);
this.btnAOI.Name = "btnAOI"; this.btnAOI.Name = "btnAOI";
this.btnAOI.Size = new System.Drawing.Size(180, 100); this.btnAOI.Size = new System.Drawing.Size(180, 100);
this.btnAOI.TabIndex = 1; this.btnAOI.TabIndex = 1;
...@@ -318,7 +318,7 @@ namespace TSA_V ...@@ -318,7 +318,7 @@ namespace TSA_V
this.btnProduct.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btnProduct.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnProduct.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.btnProduct.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnProduct.ForeColor = System.Drawing.Color.White; this.btnProduct.ForeColor = System.Drawing.Color.White;
this.btnProduct.Location = new System.Drawing.Point(354, 107); this.btnProduct.Location = new System.Drawing.Point(386, 116);
this.btnProduct.Name = "btnProduct"; this.btnProduct.Name = "btnProduct";
this.btnProduct.Size = new System.Drawing.Size(180, 100); this.btnProduct.Size = new System.Drawing.Size(180, 100);
this.btnProduct.TabIndex = 1; this.btnProduct.TabIndex = 1;
......
...@@ -77,7 +77,7 @@ namespace TSA_V ...@@ -77,7 +77,7 @@ namespace TSA_V
isClick = true; isClick = true;
FrmBoardSelect fw = new FrmBoardSelect(); FrmBoardSelect fw = new FrmBoardSelect();
this.Visible = false; ; this.Visible = false;
fw.ShowDialog(); fw.ShowDialog();
this.Visible = true; this.Visible = true;
} }
......
...@@ -2542,4 +2542,10 @@ ...@@ -2542,4 +2542,10 @@
<data name="DeviceInGohome" xml:space="preserve"> <data name="DeviceInGohome" xml:space="preserve">
<value>11:34Backing to origin.</value> <value>11:34Backing to origin.</value>
</data> </data>
<data name="不使用AOI" xml:space="preserve">
<value>Do not use AOI</value>
</data>
<data name="加载AOI失败." xml:space="preserve">
<value>Load AOI profile fail.</value>
</data>
</root> </root>
\ No newline at end of file \ No newline at end of file
...@@ -12,7 +12,7 @@ namespace TSA_V.Properties { ...@@ -12,7 +12,7 @@ namespace TSA_V.Properties {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "15.6.0.0")] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.10.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
......
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.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="..\packages\Microsoft.ML.0.11.0\build\netstandard2.0\Microsoft.ML.props" Condition="Exists('..\packages\Microsoft.ML.0.11.0\build\netstandard2.0\Microsoft.ML.props')" />
<Import Project="..\packages\Microsoft.ML.CpuMath.0.11.0\build\netstandard2.0\Microsoft.ML.CpuMath.props" Condition="Exists('..\packages\Microsoft.ML.CpuMath.0.11.0\build\netstandard2.0\Microsoft.ML.CpuMath.props')" /> <Import Project="..\packages\Microsoft.ML.CpuMath.0.11.0\build\netstandard2.0\Microsoft.ML.CpuMath.props" Condition="Exists('..\packages\Microsoft.ML.CpuMath.0.11.0\build\netstandard2.0\Microsoft.ML.CpuMath.props')" />
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup> <PropertyGroup>
...@@ -11,14 +10,14 @@ ...@@ -11,14 +10,14 @@
<AppDesignerFolder>Properties</AppDesignerFolder> <AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>TSA_V</RootNamespace> <RootNamespace>TSA_V</RootNamespace>
<AssemblyName>Neo Station</AssemblyName> <AssemblyName>Neo Station</AssemblyName>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion> <TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment> <FileAlignment>512</FileAlignment>
<TargetFrameworkProfile /> <TargetFrameworkProfile />
<NuGetPackageImportStamp> <NuGetPackageImportStamp>
</NuGetPackageImportStamp> </NuGetPackageImportStamp>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>x86</PlatformTarget> <PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols> <DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType> <DebugType>full</DebugType>
<Optimize>false</Optimize> <Optimize>false</Optimize>
...@@ -629,14 +628,12 @@ ...@@ -629,14 +628,12 @@
<ErrorText>这台计算机上缺少此项目引用的 NuGet 程序包。使用“NuGet 程序包还原”可下载这些程序包。有关更多信息,请参见 http://go.microsoft.com/fwlink/?LinkID=322105。缺少的文件是 {0}。</ErrorText> <ErrorText>这台计算机上缺少此项目引用的 NuGet 程序包。使用“NuGet 程序包还原”可下载这些程序包。有关更多信息,请参见 http://go.microsoft.com/fwlink/?LinkID=322105。缺少的文件是 {0}。</ErrorText>
</PropertyGroup> </PropertyGroup>
<Error Condition="!Exists('..\packages\Microsoft.ML.CpuMath.0.11.0\build\netstandard2.0\Microsoft.ML.CpuMath.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.ML.CpuMath.0.11.0\build\netstandard2.0\Microsoft.ML.CpuMath.props'))" /> <Error Condition="!Exists('..\packages\Microsoft.ML.CpuMath.0.11.0\build\netstandard2.0\Microsoft.ML.CpuMath.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.ML.CpuMath.0.11.0\build\netstandard2.0\Microsoft.ML.CpuMath.props'))" />
<Error Condition="!Exists('..\packages\Microsoft.ML.0.11.0\build\netstandard2.0\Microsoft.ML.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.ML.0.11.0\build\netstandard2.0\Microsoft.ML.props'))" />
<Error Condition="!Exists('..\packages\Microsoft.ML.0.11.0\build\netstandard2.0\Microsoft.ML.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.ML.0.11.0\build\netstandard2.0\Microsoft.ML.targets'))" />
<Error Condition="!Exists('..\packages\Stub.System.Data.SQLite.Core.NetFramework.1.0.113.3\build\net46\Stub.System.Data.SQLite.Core.NetFramework.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Stub.System.Data.SQLite.Core.NetFramework.1.0.113.3\build\net46\Stub.System.Data.SQLite.Core.NetFramework.targets'))" /> <Error Condition="!Exists('..\packages\Stub.System.Data.SQLite.Core.NetFramework.1.0.113.3\build\net46\Stub.System.Data.SQLite.Core.NetFramework.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Stub.System.Data.SQLite.Core.NetFramework.1.0.113.3\build\net46\Stub.System.Data.SQLite.Core.NetFramework.targets'))" />
</Target> </Target>
<Import Project="..\packages\Microsoft.ML.0.11.0\build\netstandard2.0\Microsoft.ML.targets" Condition="Exists('..\packages\Microsoft.ML.0.11.0\build\netstandard2.0\Microsoft.ML.targets')" />
<Import Project="..\packages\Stub.System.Data.SQLite.Core.NetFramework.1.0.113.3\build\net46\Stub.System.Data.SQLite.Core.NetFramework.targets" Condition="Exists('..\packages\Stub.System.Data.SQLite.Core.NetFramework.1.0.113.3\build\net46\Stub.System.Data.SQLite.Core.NetFramework.targets')" /> <Import Project="..\packages\Stub.System.Data.SQLite.Core.NetFramework.1.0.113.3\build\net46\Stub.System.Data.SQLite.Core.NetFramework.targets" Condition="Exists('..\packages\Stub.System.Data.SQLite.Core.NetFramework.1.0.113.3\build\net46\Stub.System.Data.SQLite.Core.NetFramework.targets')" />
<PropertyGroup> <PropertyGroup>
<PostBuildEvent>"C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\bin\Hostx64\x86\editbin" /largeaddressaware "$(TargetPath)"</PostBuildEvent> <PostBuildEvent>echo "C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\bin\Hostx64\x86\editbin" /largeaddressaware "$(TargetPath)"
start $(TargetDir)</PostBuildEvent>
</PropertyGroup> </PropertyGroup>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it. <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets. Other similar extension points exist, see Microsoft.Common.targets.
......
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<packages> <packages>
<package id="Microsoft.Data.DataView" version="0.11.0" targetFramework="net461" /> <package id="Microsoft.Data.DataView" version="0.11.0" targetFramework="net461" />
<package id="Microsoft.ML" version="0.11.0" targetFramework="net461" />
<package id="Microsoft.ML.CpuMath" version="0.11.0" targetFramework="net461" /> <package id="Microsoft.ML.CpuMath" version="0.11.0" targetFramework="net461" />
<package id="Newtonsoft.Json" version="12.0.1" targetFramework="net461" /> <package id="Newtonsoft.Json" version="12.0.1" targetFramework="net461" />
<package id="Stub.System.Data.SQLite.Core.NetFramework" version="1.0.113.3" targetFramework="net461" /> <package id="Stub.System.Data.SQLite.Core.NetFramework" version="1.0.113.3" targetFramework="net461" />
......
...@@ -35,7 +35,7 @@ namespace TSA_V ...@@ -35,7 +35,7 @@ namespace TSA_V
this.Text = "显示测试_" + ScreenIndex; this.Text = "显示测试_" + ScreenIndex;
this.StartPosition = FormStartPosition.Manual; this.StartPosition = FormStartPosition.Manual;
} }
public bool CloseShowName=true; public bool CloseShowName=false;
public bool ShowForm() public bool ShowForm()
{ {
Screen[] sc = Screen.AllScreens; Screen[] sc = Screen.AllScreens;
...@@ -280,6 +280,7 @@ namespace TSA_V ...@@ -280,6 +280,7 @@ namespace TSA_V
if (!name.Equals("")) if (!name.Equals(""))
{ {
int size = (sizeX + sizeY) / 2; int size = (sizeX + sizeY) / 2;
size = 30;
if (!CloseShowName) if (!CloseShowName)
{ {
g.DrawString(name, new Font("Arial ", size, FontStyle.Regular), Brushes.White, x - size + 5, y + size + 2); g.DrawString(name, new Font("Arial ", size, FontStyle.Regular), Brushes.White, x - size + 5, y + size + 2);
......
...@@ -315,11 +315,11 @@ namespace TSA_V ...@@ -315,11 +315,11 @@ namespace TSA_V
chbOffLine.Checked = false; chbOffLine.Checked = false;
chbOffLine.Visible = false; chbOffLine.Visible = false;
} }
//else else
//{ {
// chbWorkSingleStart.Visible = true; chbWorkSingleStart.Visible = true;
// chbOffLine.Visible = true; chbOffLine.Visible = true;
//} }
} }
private void chbOffLine_CheckedChanged(object sender, EventArgs e) private void chbOffLine_CheckedChanged(object sender, EventArgs e)
......
...@@ -67,14 +67,17 @@ namespace TSA_V ...@@ -67,14 +67,17 @@ namespace TSA_V
else else
{ {
LogUtil.info("配置程序之后才能工作!"); LogUtil.info("配置程序之后才能工作!");
this.Close(); this.Close();
} }
if (TSAVBean.IsNeedAOI) if (TSAVBean.IsNeedAOI && !string.IsNullOrEmpty(board.AOIProName))
{ {
LoadAoi(); LoadAoi();
if (CurrProject == null) if (CurrProject == null)
{ {
this.Close(); LogUtil.info("没有读取到AOI,结束,IsNeedAOI=true!");
MessageBox.Show(ResourceCulture.GetString("加载AOI失败."));
//this.Close();
} }
} }
if (!IsSet) if (!IsSet)
...@@ -526,14 +529,15 @@ namespace TSA_V ...@@ -526,14 +529,15 @@ namespace TSA_V
lblPartNum.Text = smtPoint.TagNo; lblPartNum.Text = smtPoint.TagNo;
lblPointName.Text = smtPoint.PN; lblPointName.Text = smtPoint.PN;
ComponetInfo com = CSVBomManager.GetCom(BoardManager.CurrBoard.bomName, smtPoint); ComponetInfo com = CSVBomManager.GetCom(BoardManager.CurrBoard.bomName, smtPoint);
if (com != null)
{
TSAVPosition position = CSVPositionReader<TSAVPosition>.GetPositonByNum(com.PositionNum); TSAVPosition position = CSVPositionReader<TSAVPosition>.GetPositonByNum(com.PositionNum);
if (position != null) if (position != null)
{ {
lblPositionNum.Text = position.PositionNum; lblPositionNum.Text = position.PositionNum;
} }
if (com != null)
{
lblComDes.Text = com.ComponentDes; lblComDes.Text = com.ComponentDes;
this.lblComName.Text = com.PN; this.lblComName.Text = com.PN;
lblCount.Text = com.ComCount.ToString(); lblCount.Text = com.ComCount.ToString();
......
MIT License
Copyright (c) 2018 .NET Foundation
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
ML.NET uses third-party libraries or other resources that may be
distributed under licenses different than the ML.NET software.
In the event that we accidentally failed to list a required notice, please
bring it to our attention. Post an issue or email us:
dotnet@microsoft.com
The attached notices are provided for information only.
License notice for LIBMF
------------------------
https://github.com/cjlin1/libmf
Copyright (c) 2014-2015 The LIBMF Project.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. Neither name of copyright holders nor the names of its contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
\ No newline at end of file \ No newline at end of file
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!--
NuGet packages.config doesn't support native assemblies automatically,
so copy the native assemblies to the output directory.
-->
<ItemGroup Condition="Exists('packages.config') OR
Exists('$(MSBuildProjectName).packages.config') OR
Exists('packages.$(MSBuildProjectName).config')">
<Content Include="$(MSBuildThisFileDirectory)\..\..\runtimes\win-x64\native\*.dll"
Condition="'$(PlatformTarget)' == 'x64'">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<Visible>false</Visible>
<Link>%(Filename)%(Extension)</Link>
</Content>
<Content Include="$(MSBuildThisFileDirectory)\..\..\runtimes\win-x86\native\*.dll"
Condition="'$(PlatformTarget)' == 'x86'">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<Visible>false</Visible>
<Link>%(Filename)%(Extension)</Link>
</Content>
</ItemGroup>
</Project>
\ No newline at end of file \ No newline at end of file
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<EnableMLUnsupportedPlatformTargetCheck Condition="'$(EnableMLUnsupportedPlatformTargetCheck)' == ''">true</EnableMLUnsupportedPlatformTargetCheck>
</PropertyGroup>
<Target Name="_CheckForUnsupportedPlatformTarget"
Condition="'$(EnableMLUnsupportedPlatformTargetCheck)' == 'true'"
AfterTargets="_CheckForInvalidConfigurationAndPlatform">
<!--
Special case .NET Core portable applications. When building a portable .NET Core app,
the PlatformTarget is empty, and you don't know until runtime (i.e. which dotnet.exe)
what processor architecture will be used.
-->
<Error Condition="('$(PlatformTarget)' != 'x64' AND '$(PlatformTarget)' != 'x86') AND
('$(OutputType)' == 'Exe' OR '$(OutputType)'=='WinExe') AND
!('$(TargetFrameworkIdentifier)' == '.NETCoreApp' AND '$(PlatformTarget)' == '')"
Text="Microsoft.ML currently supports 'x64' and 'x86' processor architectures. Please ensure your application is targeting 'x64' or 'x86'." />
</Target>
</Project>
\ No newline at end of file \ No newline at end of file
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!