Commit aceaf5c7 LN

导入数据提示修改。

1 个父辈 254ae75e
......@@ -74,42 +74,64 @@ namespace TSA_V
positionPNMap[com.PositionNum].Add(com.PN);
}
}
string msg = "";
foreach (string pnKey in PnPositonMap.Keys)
{
List<string> positions = new List<string>(PnPositonMap[pnKey]);
if (positions.Count > 1)
{
result = MessageBox.Show(ResourceCulture.GetString(ResourceCulture.SureImportPosition,
"元器件【{0}】配置多个位置【{1}】,是否确定导入?", pnKey, getListMsg(positions), "",
MessageBoxButtons.OKCancel)); ;
msg += ResourceCulture.GetString(ResourceCulture.SureImportPosition, "元器件【{0}】配置多个位置【{1}】", pnKey, getListMsg(positions)) + "\r\n";
//result = MessageBox.Show(ResourceCulture.GetString(ResourceCulture.SureImportPosition,
// "元器件【{0}】配置多个位置【{1}】,是否确定导入?", pnKey, getListMsg(positions), "",
// MessageBoxButtons.OKCancel)); ;
//if (!result.Equals(DialogResult.OK))
//{
// comList = new List<ComponetInfo>();
// return;
//}
}
}
if (msg != "")
{
result = MessageBox.Show(msg, ResourceCulture.GetString(ResourceCulture.SureImportPositionStr), MessageBoxButtons.OKCancel);
if (!result.Equals(DialogResult.OK))
{
comList = new List<ComponetInfo>();
return;
}
}
}
msg = "";
foreach (string key in positionPNMap.Keys)
{
List<string> pnList = new List<string>(positionPNMap[key]);
if (pnList.Count > 1)
{
result = MessageBox.Show(ResourceCulture.GetString(ResourceCulture.SureImportPn,
"位置【{0}】配置多个元器件【{1}】,是否确定导入?", key, getListMsg(pnList), "",
MessageBoxButtons.OKCancel)); ;
msg += MessageBox.Show(ResourceCulture.GetString(ResourceCulture.SureImportPn,
"位置【{0}】配置多个元器件【{1}】", key, getListMsg(pnList))) + "\r\n";
// result = MessageBox.Show(ResourceCulture.GetString(ResourceCulture.SureImportPn,
// "位置【{0}】配置多个元器件【{1}】,是否确定导入?", key, getListMsg(pnList), "",
// MessageBoxButtons.OKCancel)); ;
// if (!result.Equals(DialogResult.OK))
// {
// comList = new List<ComponetInfo>();
// return;
// }
//}
}
}
if (msg != "")
{
result = MessageBox.Show(msg, ResourceCulture.GetString(ResourceCulture.SureImportPositionStr), MessageBoxButtons.OKCancel);
if (!result.Equals(DialogResult.OK))
{
comList = new List<ComponetInfo>();
return;
}
}
}
}
}
private void btnCancel_Click(object sender, EventArgs e)
{
if (this.txtBomName.Text.Equals("") || this.txtBomFilePath.Text.Equals(""))
......
......@@ -2456,13 +2456,16 @@
<value> The component is in use and cannot be deleted. </value>
</data>
<data name="SureImportPosition" xml:space="preserve">
<value> The component [{0}] is configured with multiple locations [{1}], whether it is determined to import ? </value>
<value> The component [{0}] is configured with multiple locations [{1}] </value>
</data>
<data name="SureImportPositionStr" xml:space="preserve">
<value> whether it is determined to import </value>
</data>
<data name="ComExists" xml:space="preserve">
<value> The component already exists. </value>
</data>
<data name="SureImportPn" xml:space="preserve">
<value> Location [{0}] Configure multiple components [{1}], determine whether to import? </value>
<value> Location [{0}] Configure multiple components [{1}] </value>
</data>
<data name="BLText" xml:space="preserve">
<value> Program [{0}] component library [{1}] is preparing materials </value>
......
......@@ -2473,13 +2473,16 @@
<value> 元器件已使用,不能删除 </value>
</data>
<data name="SureImportPosition" xml:space="preserve">
<value> 元器件【{0}】配置多个位置【{1}】,是否确定导入? </value>
<value> 元器件【{0}】配置多个位置【{1}】 </value>
</data>
<data name="SureImportPositionStr" xml:space="preserve">
<value> 是否确定导入? </value>
</data>
<data name="ComExists" xml:space="preserve">
<value> 元器件已存在 </value>
</data>
<data name="SureImportPn" xml:space="preserve">
<value> 位置【{0}】配置多个元器件【{1}】,是否确定导入? </value>
<value> 位置【{0}】配置多个元器件【{1}】 </value>
</data>
<data name="BLText" xml:space="preserve">
<value> 程序【{0}】元器件库【{1}】备料中 </value>
......
......@@ -2467,13 +2467,16 @@
<value> 元器件已使用,不能删除 </value>
</data>
<data name="SureImportPosition" xml:space="preserve">
<value> 元器件【{0}】配置多个位置【{1}】,是否确定导入? </value>
<value> 元器件【{0}】配置多个位置【{1}】 </value>
</data>
<data name="SureImportPositionStr" xml:space="preserve">
<value> 是否确定导入</value>
</data>
<data name="ComExists" xml:space="preserve">
<value> 元器件已存在 </value>
</data>
<data name="SureImportPn" xml:space="preserve">
<value> 位置【{0}】配置多个元器件【{1}】,是否确定导入? </value>
<value> 位置【{0}】配置多个元器件【{1}】 </value>
</data>
<data name="BLText" xml:space="preserve">
<value> 程序【{0}】元器件库【{1}】备料中 </value>
......
......@@ -835,10 +835,14 @@ namespace TSA_V
/// </summary>
public static string CanotDelCom = "CanotDelCom";
/// <summary>
/// 元器件【{0}】配置多个位置【{1}】,是否确定导入?
/// 元器件【{0}】配置多个位置【{1}】
/// </summary>
public static string SureImportPosition = "SureImportPosition";
/// <summary>
/// 是否确定导入?
/// </summary>
public static string SureImportPositionStr= "SureImportPositionStr";
/// <summary>
/// 元器件已存在
/// </summary>
internal static string ComExists= "ComExists";
......@@ -857,7 +861,7 @@ namespace TSA_V
internal static string smtpoint_select= "smtpoint_select";
/// <summary>
/// 位置【{0}】配置多个元器件【{1}】,是否确定导入?
/// 位置【{0}】配置多个元器件【{1}】
/// </summary>
internal static readonly string SureImportPn= "SureImportPn";
......
......@@ -600,37 +600,61 @@ namespace TSA_V
}
}
string showMsg = "";
foreach (string pnKey in PnPositonMap.Keys)
{
List<string> positions = new List<string>(PnPositonMap[pnKey]);
if (positions.Count > 1)
{
DialogResult result = MessageBox.Show(ResourceCulture.GetString(ResourceCulture.SureImportPosition,
"元器件【{0}】配置多个位置【{1}】,是否确定导入?", pnKey, getListMsg(positions), "",
MessageBoxButtons.OKCancel)); ;
showMsg += ResourceCulture.GetString(ResourceCulture.SureImportPosition,
"元器件【{0}】配置多个位置【{1}】,是否确定导入?", pnKey, getListMsg(positions)) + "\r\n";
// DialogResult result = MessageBox.Show(ResourceCulture.GetString(ResourceCulture.SureImportPosition,
// "元器件【{0}】配置多个位置【{1}】,是否确定导入?", pnKey, getListMsg(positions), "",
// MessageBoxButtons.OKCancel)); ;
// if (!result.Equals(DialogResult.OK))
// {
// uploadPointList = new List<ComponetInfo>();
// return false ;
// }
}
}
if (showMsg != "")
{
DialogResult result = MessageBox.Show(showMsg, ResourceCulture.GetString(ResourceCulture.SureImportPositionStr), MessageBoxButtons.OKCancel); ;
if (!result.Equals(DialogResult.OK))
{
uploadPointList = new List<ComponetInfo>();
return false ;
}
return false;
}
}
showMsg = "";
foreach (string key in positionPNMap.Keys)
{
List<string> pnList = new List<string>(positionPNMap[key]);
if (pnList.Count > 1)
{
DialogResult result = MessageBox.Show(ResourceCulture.GetString(ResourceCulture.SureImportPn,
"位置【{0}】配置多个元器件【{1}】,是否确定导入?", key, getListMsg(pnList), "",
MessageBoxButtons.OKCancel)); ;
showMsg += ResourceCulture.GetString(ResourceCulture.SureImportPn,
"位置【{0}】配置多个元器件【{1}】,是否确定导入?", key, getListMsg(pnList)) + "\r\n";
//DialogResult result = MessageBox.Show(ResourceCulture.GetString(ResourceCulture.SureImportPn,
// "位置【{0}】配置多个元器件【{1}】,是否确定导入?", key, getListMsg(pnList), "",
// MessageBoxButtons.OKCancel)); ;
//if (!result.Equals(DialogResult.OK))
//{
// uploadPointList = new List<ComponetInfo>();
// return false ;
//}
}
}
if (showMsg != "")
{
DialogResult result = MessageBox.Show(showMsg, ResourceCulture.GetString(ResourceCulture.SureImportPositionStr), MessageBoxButtons.OKCancel);
if (!result.Equals(DialogResult.OK))
{
uploadPointList = new List<ComponetInfo>();
return false ;
}
return false;
}
}
return true;
}
......
using System;
using log4net.Filter;
using System;
using System.CodeDom;
using System.Collections.Generic;
using System.Drawing;
......@@ -57,6 +58,10 @@ namespace TSA_V
//校准点不再自动计算
return smtPoint;
}
if (checkOKList.Count < 2)
{
return smtPoint;
}
double oldX = smtPoint.NodePositionX;
double oldY = smtPoint.NodePositionY;
//SMTPointInfo APoint = GetPoint(smtPoint, checkOKList);
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!