Commit 63172ea2 LN

新校准功能

1 个父辈 be66979d
...@@ -131,6 +131,16 @@ namespace TSA_V.Common ...@@ -131,6 +131,16 @@ namespace TSA_V.Common
public static MyConfig<string> App_Server = ""; public static MyConfig<string> App_Server = "";
[MyConfigComment("设备Cid")] [MyConfigComment("设备Cid")]
public static MyConfig<string> App_Cid = ""; public static MyConfig<string> App_Cid = "";
[MyConfigComment("是否打开报警音效")]
public static MyConfig<bool> Set_AlarmSound =true;
[MyConfigComment("是否打开提示音")]
public static MyConfig<bool> Set_TipSound = true;
[MyConfigComment("是否限制鼠标不能移出主屏幕")]
public static MyConfig<bool> Set_CursorProcess= true;
public static void ChangeConfig() public static void ChangeConfig()
{ {
try try
......
...@@ -196,9 +196,23 @@ namespace TSA_V.DeviceLibrary ...@@ -196,9 +196,23 @@ namespace TSA_V.DeviceLibrary
return true; return true;
} }
public CalibrateBean calInfo = null;
} }
public class CalibrateBean
{
public Point leftUpPoint = new Point();
public Point rightBottomPoint = new Point();
/// <summary>
/// 1=已确认左上角位置
/// 2=已确认右下角位置
/// 3=正在校准中
/// </summary>
public int CurrStep = 0;
}
/// <summary> /// <summary>
///组装信息信息 ///组装信息信息
/// </summary> /// </summary>
...@@ -358,6 +372,10 @@ namespace TSA_V.DeviceLibrary ...@@ -358,6 +372,10 @@ namespace TSA_V.DeviceLibrary
/// </summary> /// </summary>
public bool Disable = false; public bool Disable = false;
/// <summary>
/// 是否编辑成功
/// </summary>
public bool IsEdit = false;
/// <summary> /// <summary>
/// 导出导入程序时使用 /// 导出导入程序时使用
......
...@@ -87,6 +87,10 @@ namespace TSA_V ...@@ -87,6 +87,10 @@ namespace TSA_V
public static void StartPlay( ) public static void StartPlay( )
{ {
if (!Setting_NInit.Set_AlarmSound)
{
return;
}
// 音频文件路径 // 音频文件路径
string audioFilePath = Application.StartupPath+ soundFileName; string audioFilePath = Application.StartupPath+ soundFileName;
......
...@@ -40,7 +40,7 @@ namespace TSA_V ...@@ -40,7 +40,7 @@ namespace TSA_V
//"10="+str10 //"10="+str10
//}; //};
xyMoveControl1.loadTypeList(ResourceCulture.GetPTypes()); xyMoveControl1.loadTypeList(ResourceCulture.GetPTypes(), ResourceCulture.GetXYControlMap());
} }
private void btnCancel_Click(object sender, EventArgs e) private void btnCancel_Click(object sender, EventArgs e)
......
...@@ -11,6 +11,7 @@ using System.Text; ...@@ -11,6 +11,7 @@ using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
using System.Windows.Forms; using System.Windows.Forms;
using TSA_V.Common; using TSA_V.Common;
using UserFromControl;
namespace TSA_V namespace TSA_V
{ {
...@@ -293,6 +294,10 @@ namespace TSA_V ...@@ -293,6 +294,10 @@ namespace TSA_V
} }
// con.Refresh(); // con.Refresh();
} }
else if (con is ProjectorControl)
{
continue;
}
else if (con.Controls.Count > 0) else if (con.Controls.Count > 0)
{ {
PreControlLanaguage(con); PreControlLanaguage(con);
......
...@@ -52,6 +52,7 @@ ...@@ -52,6 +52,7 @@
this.dataGridViewImageColumn1 = new System.Windows.Forms.DataGridViewImageColumn(); this.dataGridViewImageColumn1 = new System.Windows.Forms.DataGridViewImageColumn();
this.dataGridViewImageColumn2 = new System.Windows.Forms.DataGridViewImageColumn(); this.dataGridViewImageColumn2 = new System.Windows.Forms.DataGridViewImageColumn();
this.panel1 = new System.Windows.Forms.Panel(); this.panel1 = new System.Windows.Forms.Panel();
this.btnCalibrate = new System.Windows.Forms.Button();
this.btnColorChange = new System.Windows.Forms.Button(); this.btnColorChange = new System.Windows.Forms.Button();
this.btnOpenFile = new System.Windows.Forms.Button(); this.btnOpenFile = new System.Windows.Forms.Button();
this.btnCheck = new System.Windows.Forms.Button(); this.btnCheck = new System.Windows.Forms.Button();
...@@ -75,6 +76,24 @@ ...@@ -75,6 +76,24 @@
this.chbShowName = new System.Windows.Forms.CheckBox(); this.chbShowName = new System.Windows.Forms.CheckBox();
this.焊点列表 = new System.Windows.Forms.GroupBox(); this.焊点列表 = new System.Windows.Forms.GroupBox();
this.dgvList = new System.Windows.Forms.DataGridView(); this.dgvList = new System.Windows.Forms.DataGridView();
this.btnSetOrigin = new System.Windows.Forms.Button();
this.panel3 = new System.Windows.Forms.Panel();
this.panBoard = new System.Windows.Forms.Panel();
this.picBoard = new System.Windows.Forms.PictureBox();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.lblAoi = new System.Windows.Forms.Label();
this.lblLineW = new System.Windows.Forms.Label();
this.cmbAOIFile = new System.Windows.Forms.ComboBox();
this.txtCode = new System.Windows.Forms.TextBox();
this.txtLineWidth = new System.Windows.Forms.TextBox();
this.lbllinews = new System.Windows.Forms.Label();
this.txtBoardName = new System.Windows.Forms.TextBox();
this.label14 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.button1 = new System.Windows.Forms.Button();
this.btnSave = new System.Windows.Forms.Button();
this.panel2 = new System.Windows.Forms.Panel();
this.colorDialog1 = new System.Windows.Forms.ColorDialog();
this.Column_pointNum = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.Column_pointNum = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column_PartNum = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.Column_PartNum = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column_Name = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.Column_Name = new System.Windows.Forms.DataGridViewTextBoxColumn();
...@@ -95,30 +114,13 @@ ...@@ -95,30 +114,13 @@
this.Column_ShowText = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.Column_ShowText = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column_disable = new System.Windows.Forms.DataGridViewCheckBoxColumn(); this.Column_disable = new System.Windows.Forms.DataGridViewCheckBoxColumn();
this.Column_Notes = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.Column_Notes = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.col_IsEdit = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column_getPosition = new System.Windows.Forms.DataGridViewLinkColumn(); this.Column_getPosition = new System.Windows.Forms.DataGridViewLinkColumn();
this.Column_MoveTest = new System.Windows.Forms.DataGridViewLinkColumn(); this.Column_MoveTest = new System.Windows.Forms.DataGridViewLinkColumn();
this.Column_btnDetail = new System.Windows.Forms.DataGridViewLinkColumn(); this.Column_btnDetail = new System.Windows.Forms.DataGridViewLinkColumn();
this.Column_Del = new System.Windows.Forms.DataGridViewLinkColumn(); this.Column_Del = new System.Windows.Forms.DataGridViewLinkColumn();
this.Column_Up = new System.Windows.Forms.DataGridViewLinkColumn(); this.Column_Up = new System.Windows.Forms.DataGridViewLinkColumn();
this.Column_Down = new System.Windows.Forms.DataGridViewLinkColumn(); this.Column_Down = new System.Windows.Forms.DataGridViewLinkColumn();
this.btnSetOrigin = new System.Windows.Forms.Button();
this.panel3 = new System.Windows.Forms.Panel();
this.panBoard = new System.Windows.Forms.Panel();
this.picBoard = new System.Windows.Forms.PictureBox();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.lblAoi = new System.Windows.Forms.Label();
this.lblLineW = new System.Windows.Forms.Label();
this.cmbAOIFile = new System.Windows.Forms.ComboBox();
this.txtCode = new System.Windows.Forms.TextBox();
this.txtLineWidth = new System.Windows.Forms.TextBox();
this.lbllinews = new System.Windows.Forms.Label();
this.txtBoardName = new System.Windows.Forms.TextBox();
this.label14 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.button1 = new System.Windows.Forms.Button();
this.btnSave = new System.Windows.Forms.Button();
this.panel2 = new System.Windows.Forms.Panel();
this.colorDialog1 = new System.Windows.Forms.ColorDialog();
this.contextMenuStrip1.SuspendLayout(); this.contextMenuStrip1.SuspendLayout();
this.contextMenuStrip2.SuspendLayout(); this.contextMenuStrip2.SuspendLayout();
this.panel1.SuspendLayout(); this.panel1.SuspendLayout();
...@@ -271,6 +273,7 @@ ...@@ -271,6 +273,7 @@
// panel1 // panel1
// //
this.panel1.AutoScroll = true; this.panel1.AutoScroll = true;
this.panel1.Controls.Add(this.btnCalibrate);
this.panel1.Controls.Add(this.btnColorChange); this.panel1.Controls.Add(this.btnColorChange);
this.panel1.Controls.Add(this.btnOpenFile); this.panel1.Controls.Add(this.btnOpenFile);
this.panel1.Controls.Add(this.btnCheck); this.panel1.Controls.Add(this.btnCheck);
...@@ -291,6 +294,19 @@ ...@@ -291,6 +294,19 @@
this.panel1.Size = new System.Drawing.Size(1344, 701); this.panel1.Size = new System.Drawing.Size(1344, 701);
this.panel1.TabIndex = 0; this.panel1.TabIndex = 0;
// //
// btnCalibrate
//
this.btnCalibrate.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.btnCalibrate.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnCalibrate.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnCalibrate.Location = new System.Drawing.Point(132, 639);
this.btnCalibrate.Name = "btnCalibrate";
this.btnCalibrate.Size = new System.Drawing.Size(120, 45);
this.btnCalibrate.TabIndex = 294;
this.btnCalibrate.Text = "投影标定";
this.btnCalibrate.UseVisualStyleBackColor = true;
this.btnCalibrate.Click += new System.EventHandler(this.btnCalibrate_Click);
//
// btnColorChange // btnColorChange
// //
this.btnColorChange.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); this.btnColorChange.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
...@@ -577,6 +593,7 @@ ...@@ -577,6 +593,7 @@
this.Column_ShowText, this.Column_ShowText,
this.Column_disable, this.Column_disable,
this.Column_Notes, this.Column_Notes,
this.col_IsEdit,
this.Column_getPosition, this.Column_getPosition,
this.Column_MoveTest, this.Column_MoveTest,
this.Column_btnDetail, this.Column_btnDetail,
...@@ -601,6 +618,196 @@ ...@@ -601,6 +618,196 @@
this.dgvList.DragDrop += new System.Windows.Forms.DragEventHandler(this.dgvList_DragDrop); this.dgvList.DragDrop += new System.Windows.Forms.DragEventHandler(this.dgvList_DragDrop);
this.dgvList.DragEnter += new System.Windows.Forms.DragEventHandler(this.dgvList_DragEnter); this.dgvList.DragEnter += new System.Windows.Forms.DragEventHandler(this.dgvList_DragEnter);
// //
// btnSetOrigin
//
this.btnSetOrigin.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnSetOrigin.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnSetOrigin.Location = new System.Drawing.Point(8, 546);
this.btnSetOrigin.Name = "btnSetOrigin";
this.btnSetOrigin.Size = new System.Drawing.Size(120, 31);
this.btnSetOrigin.TabIndex = 278;
this.btnSetOrigin.Text = "重置基准点";
this.btnSetOrigin.UseVisualStyleBackColor = true;
this.btnSetOrigin.Visible = false;
this.btnSetOrigin.Click += new System.EventHandler(this.btnSetBasePoint_Click);
//
// panel3
//
this.panel3.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.panel3.Controls.Add(this.panBoard);
this.panel3.Location = new System.Drawing.Point(646, 123);
this.panel3.Name = "panel3";
this.panel3.Size = new System.Drawing.Size(688, 510);
this.panel3.TabIndex = 277;
//
// panBoard
//
this.panBoard.AutoScroll = true;
this.panBoard.Controls.Add(this.picBoard);
this.panBoard.Dock = System.Windows.Forms.DockStyle.Fill;
this.panBoard.Location = new System.Drawing.Point(0, 0);
this.panBoard.Name = "panBoard";
this.panBoard.Size = new System.Drawing.Size(688, 510);
this.panBoard.TabIndex = 261;
this.panBoard.Paint += new System.Windows.Forms.PaintEventHandler(this.panBoard_Paint);
//
// picBoard
//
this.picBoard.ContextMenuStrip = this.contextMenuStrip1;
this.picBoard.Cursor = System.Windows.Forms.Cursors.Cross;
this.picBoard.Location = new System.Drawing.Point(0, 0);
this.picBoard.Name = "picBoard";
this.picBoard.Size = new System.Drawing.Size(435, 258);
this.picBoard.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
this.picBoard.TabIndex = 259;
this.picBoard.TabStop = false;
this.picBoard.MouseDown += new System.Windows.Forms.MouseEventHandler(this.picBoard_MouseDown);
this.picBoard.MouseMove += new System.Windows.Forms.MouseEventHandler(this.picBoard_MouseMove);
//
// groupBox1
//
this.groupBox1.Controls.Add(this.lblAoi);
this.groupBox1.Controls.Add(this.lblLineW);
this.groupBox1.Controls.Add(this.cmbAOIFile);
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.label14);
this.groupBox1.Controls.Add(this.label2);
this.groupBox1.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.groupBox1.Location = new System.Drawing.Point(3, 3);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(625, 99);
this.groupBox1.TabIndex = 20;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "程序基本信息";
//
// lblAoi
//
this.lblAoi.Location = new System.Drawing.Point(9, 60);
this.lblAoi.Name = "lblAoi";
this.lblAoi.Size = new System.Drawing.Size(104, 22);
this.lblAoi.TabIndex = 283;
this.lblAoi.Text = "AOI程序:";
this.lblAoi.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// lblLineW
//
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(367, 63);
this.lblLineW.Name = "lblLineW";
this.lblLineW.Size = new System.Drawing.Size(112, 20);
this.lblLineW.TabIndex = 297;
this.lblLineW.Text = "线体宽度:";
this.lblLineW.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// cmbAOIFile
//
this.cmbAOIFile.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cmbAOIFile.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.cmbAOIFile.FormattingEnabled = true;
this.cmbAOIFile.Location = new System.Drawing.Point(117, 60);
this.cmbAOIFile.Name = "cmbAOIFile";
this.cmbAOIFile.Size = new System.Drawing.Size(230, 28);
this.cmbAOIFile.TabIndex = 282;
//
// txtCode
//
this.txtCode.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtCode.Location = new System.Drawing.Point(374, 23);
this.txtCode.MaxLength = 40;
this.txtCode.Name = "txtCode";
this.txtCode.Size = new System.Drawing.Size(180, 29);
this.txtCode.TabIndex = 10;
//
// txtLineWidth
//
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(483, 59);
this.txtLineWidth.MaxLength = 8;
this.txtLineWidth.Name = "txtLineWidth";
this.txtLineWidth.Size = new System.Drawing.Size(70, 29);
this.txtLineWidth.TabIndex = 295;
//
// lbllinews
//
this.lbllinews.AutoSize = true;
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(556, 65);
this.lbllinews.Name = "lbllinews";
this.lbllinews.Size = new System.Drawing.Size(30, 17);
this.lbllinews.TabIndex = 296;
this.lbllinews.Text = "mm";
//
// txtBoardName
//
this.txtBoardName.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtBoardName.Location = new System.Drawing.Point(117, 23);
this.txtBoardName.MaxLength = 20;
this.txtBoardName.Name = "txtBoardName";
this.txtBoardName.Size = new System.Drawing.Size(180, 29);
this.txtBoardName.TabIndex = 2;
//
// label14
//
this.label14.Location = new System.Drawing.Point(301, 26);
this.label14.Name = "label14";
this.label14.Size = new System.Drawing.Size(69, 22);
this.label14.TabIndex = 9;
this.label14.Text = "条码:";
this.label14.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// label2
//
this.label2.Location = new System.Drawing.Point(35, 29);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(78, 17);
this.label2.TabIndex = 1;
this.label2.Text = "名称";
this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// button1
//
this.button1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.button1.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.button1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.button1.Location = new System.Drawing.Point(508, 639);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(120, 45);
this.button1.TabIndex = 41;
this.button1.Text = "返回";
this.button1.UseVisualStyleBackColor = true;
this.button1.Click += new System.EventHandler(this.button1_Click);
//
// btnSave
//
this.btnSave.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.btnSave.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnSave.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnSave.Location = new System.Drawing.Point(386, 639);
this.btnSave.Name = "btnSave";
this.btnSave.Size = new System.Drawing.Size(120, 45);
this.btnSave.TabIndex = 40;
this.btnSave.Text = "保存";
this.btnSave.UseVisualStyleBackColor = true;
this.btnSave.Click += new System.EventHandler(this.btnSave_Click);
//
// panel2
//
this.panel2.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.panel2.BackColor = System.Drawing.Color.Black;
this.panel2.BackgroundImage = global::TSA_V.Properties.Resources.axisbg;
this.panel2.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None;
this.panel2.Location = new System.Drawing.Point(631, 106);
this.panel2.Name = "panel2";
this.panel2.Size = new System.Drawing.Size(703, 525);
this.panel2.TabIndex = 292;
//
// Column_pointNum // Column_pointNum
// //
this.Column_pointNum.DataPropertyName = "pointNum"; this.Column_pointNum.DataPropertyName = "pointNum";
...@@ -765,6 +972,13 @@ ...@@ -765,6 +972,13 @@
this.Column_Notes.HeaderText = "注意事项"; this.Column_Notes.HeaderText = "注意事项";
this.Column_Notes.Name = "Column_Notes"; this.Column_Notes.Name = "Column_Notes";
// //
// col_IsEdit
//
this.col_IsEdit.HeaderText = "是否已编辑";
this.col_IsEdit.Name = "col_IsEdit";
this.col_IsEdit.ReadOnly = true;
this.col_IsEdit.Visible = false;
//
// Column_getPosition // Column_getPosition
// //
this.Column_getPosition.HeaderText = "更新坐标"; this.Column_getPosition.HeaderText = "更新坐标";
...@@ -831,195 +1045,6 @@ ...@@ -831,195 +1045,6 @@
this.Column_Down.UseColumnTextForLinkValue = true; this.Column_Down.UseColumnTextForLinkValue = true;
this.Column_Down.Width = 30; this.Column_Down.Width = 30;
// //
// btnSetOrigin
//
this.btnSetOrigin.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnSetOrigin.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnSetOrigin.Location = new System.Drawing.Point(8, 546);
this.btnSetOrigin.Name = "btnSetOrigin";
this.btnSetOrigin.Size = new System.Drawing.Size(120, 31);
this.btnSetOrigin.TabIndex = 278;
this.btnSetOrigin.Text = "重置基准点";
this.btnSetOrigin.UseVisualStyleBackColor = true;
this.btnSetOrigin.Visible = false;
this.btnSetOrigin.Click += new System.EventHandler(this.btnSetBasePoint_Click);
//
// panel3
//
this.panel3.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.panel3.Controls.Add(this.panBoard);
this.panel3.Location = new System.Drawing.Point(646, 123);
this.panel3.Name = "panel3";
this.panel3.Size = new System.Drawing.Size(688, 510);
this.panel3.TabIndex = 277;
//
// panBoard
//
this.panBoard.AutoScroll = true;
this.panBoard.Controls.Add(this.picBoard);
this.panBoard.Dock = System.Windows.Forms.DockStyle.Fill;
this.panBoard.Location = new System.Drawing.Point(0, 0);
this.panBoard.Name = "panBoard";
this.panBoard.Size = new System.Drawing.Size(688, 510);
this.panBoard.TabIndex = 261;
//
// picBoard
//
this.picBoard.ContextMenuStrip = this.contextMenuStrip1;
this.picBoard.Cursor = System.Windows.Forms.Cursors.Cross;
this.picBoard.Location = new System.Drawing.Point(0, 0);
this.picBoard.Name = "picBoard";
this.picBoard.Size = new System.Drawing.Size(435, 258);
this.picBoard.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
this.picBoard.TabIndex = 259;
this.picBoard.TabStop = false;
this.picBoard.MouseDown += new System.Windows.Forms.MouseEventHandler(this.picBoard_MouseDown);
this.picBoard.MouseMove += new System.Windows.Forms.MouseEventHandler(this.picBoard_MouseMove);
//
// groupBox1
//
this.groupBox1.Controls.Add(this.lblAoi);
this.groupBox1.Controls.Add(this.lblLineW);
this.groupBox1.Controls.Add(this.cmbAOIFile);
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.label14);
this.groupBox1.Controls.Add(this.label2);
this.groupBox1.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.groupBox1.Location = new System.Drawing.Point(3, 3);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(625, 99);
this.groupBox1.TabIndex = 20;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "程序基本信息";
//
// lblAoi
//
this.lblAoi.Location = new System.Drawing.Point(9, 60);
this.lblAoi.Name = "lblAoi";
this.lblAoi.Size = new System.Drawing.Size(104, 22);
this.lblAoi.TabIndex = 283;
this.lblAoi.Text = "AOI程序:";
this.lblAoi.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// lblLineW
//
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(367, 63);
this.lblLineW.Name = "lblLineW";
this.lblLineW.Size = new System.Drawing.Size(112, 20);
this.lblLineW.TabIndex = 297;
this.lblLineW.Text = "线体宽度:";
this.lblLineW.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// cmbAOIFile
//
this.cmbAOIFile.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cmbAOIFile.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.cmbAOIFile.FormattingEnabled = true;
this.cmbAOIFile.Location = new System.Drawing.Point(117, 60);
this.cmbAOIFile.Name = "cmbAOIFile";
this.cmbAOIFile.Size = new System.Drawing.Size(230, 28);
this.cmbAOIFile.TabIndex = 282;
//
// txtCode
//
this.txtCode.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtCode.Location = new System.Drawing.Point(374, 23);
this.txtCode.MaxLength = 40;
this.txtCode.Name = "txtCode";
this.txtCode.Size = new System.Drawing.Size(180, 29);
this.txtCode.TabIndex = 10;
//
// txtLineWidth
//
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(483, 59);
this.txtLineWidth.MaxLength = 8;
this.txtLineWidth.Name = "txtLineWidth";
this.txtLineWidth.Size = new System.Drawing.Size(70, 29);
this.txtLineWidth.TabIndex = 295;
//
// lbllinews
//
this.lbllinews.AutoSize = true;
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(556, 65);
this.lbllinews.Name = "lbllinews";
this.lbllinews.Size = new System.Drawing.Size(30, 17);
this.lbllinews.TabIndex = 296;
this.lbllinews.Text = "mm";
//
// txtBoardName
//
this.txtBoardName.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtBoardName.Location = new System.Drawing.Point(117, 23);
this.txtBoardName.MaxLength = 20;
this.txtBoardName.Name = "txtBoardName";
this.txtBoardName.Size = new System.Drawing.Size(180, 29);
this.txtBoardName.TabIndex = 2;
//
// label14
//
this.label14.Location = new System.Drawing.Point(301, 26);
this.label14.Name = "label14";
this.label14.Size = new System.Drawing.Size(69, 22);
this.label14.TabIndex = 9;
this.label14.Text = "条码:";
this.label14.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// label2
//
this.label2.Location = new System.Drawing.Point(35, 29);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(78, 17);
this.label2.TabIndex = 1;
this.label2.Text = "名称";
this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// button1
//
this.button1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.button1.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.button1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.button1.Location = new System.Drawing.Point(508, 639);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(120, 45);
this.button1.TabIndex = 41;
this.button1.Text = "返回";
this.button1.UseVisualStyleBackColor = true;
this.button1.Click += new System.EventHandler(this.button1_Click);
//
// btnSave
//
this.btnSave.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.btnSave.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnSave.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnSave.Location = new System.Drawing.Point(386, 639);
this.btnSave.Name = "btnSave";
this.btnSave.Size = new System.Drawing.Size(120, 45);
this.btnSave.TabIndex = 40;
this.btnSave.Text = "保存";
this.btnSave.UseVisualStyleBackColor = true;
this.btnSave.Click += new System.EventHandler(this.btnSave_Click);
//
// panel2
//
this.panel2.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.panel2.BackColor = System.Drawing.Color.Black;
this.panel2.BackgroundImage = global::TSA_V.Properties.Resources.axisbg;
this.panel2.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None;
this.panel2.Location = new System.Drawing.Point(631, 106);
this.panel2.Name = "panel2";
this.panel2.Size = new System.Drawing.Size(703, 525);
this.panel2.TabIndex = 292;
//
// FrmBoardInfo // FrmBoardInfo
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
...@@ -1108,6 +1133,16 @@ ...@@ -1108,6 +1133,16 @@
private System.Windows.Forms.Label lblLineW; private System.Windows.Forms.Label lblLineW;
private System.Windows.Forms.TextBox txtLineWidth; private System.Windows.Forms.TextBox txtLineWidth;
private System.Windows.Forms.Label lbllinews; private System.Windows.Forms.Label lbllinews;
private System.Windows.Forms.ToolStripMenuItem 新增ToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem 禁用ToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem 全局ToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem 全部启用ToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem 全部禁用ToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem 自动排序ToolStripMenuItem;
private System.Windows.Forms.Panel panel2;
private System.Windows.Forms.Button btnColorChange;
private System.Windows.Forms.ColorDialog colorDialog1;
private System.Windows.Forms.Button btnCalibrate;
private System.Windows.Forms.DataGridViewTextBoxColumn Column_pointNum; private System.Windows.Forms.DataGridViewTextBoxColumn Column_pointNum;
private System.Windows.Forms.DataGridViewTextBoxColumn Column_PartNum; private System.Windows.Forms.DataGridViewTextBoxColumn Column_PartNum;
private System.Windows.Forms.DataGridViewTextBoxColumn Column_Name; private System.Windows.Forms.DataGridViewTextBoxColumn Column_Name;
...@@ -1128,20 +1163,12 @@ ...@@ -1128,20 +1163,12 @@
private System.Windows.Forms.DataGridViewTextBoxColumn Column_ShowText; private System.Windows.Forms.DataGridViewTextBoxColumn Column_ShowText;
private System.Windows.Forms.DataGridViewCheckBoxColumn Column_disable; private System.Windows.Forms.DataGridViewCheckBoxColumn Column_disable;
private System.Windows.Forms.DataGridViewTextBoxColumn Column_Notes; private System.Windows.Forms.DataGridViewTextBoxColumn Column_Notes;
private System.Windows.Forms.DataGridViewTextBoxColumn col_IsEdit;
private System.Windows.Forms.DataGridViewLinkColumn Column_getPosition; private System.Windows.Forms.DataGridViewLinkColumn Column_getPosition;
private System.Windows.Forms.DataGridViewLinkColumn Column_MoveTest; private System.Windows.Forms.DataGridViewLinkColumn Column_MoveTest;
private System.Windows.Forms.DataGridViewLinkColumn Column_btnDetail; private System.Windows.Forms.DataGridViewLinkColumn Column_btnDetail;
private System.Windows.Forms.DataGridViewLinkColumn Column_Del; private System.Windows.Forms.DataGridViewLinkColumn Column_Del;
private System.Windows.Forms.DataGridViewLinkColumn Column_Up; private System.Windows.Forms.DataGridViewLinkColumn Column_Up;
private System.Windows.Forms.DataGridViewLinkColumn Column_Down; private System.Windows.Forms.DataGridViewLinkColumn Column_Down;
private System.Windows.Forms.ToolStripMenuItem 新增ToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem 禁用ToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem 全局ToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem 全部启用ToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem 全部禁用ToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem 自动排序ToolStripMenuItem;
private System.Windows.Forms.Panel panel2;
private System.Windows.Forms.Button btnColorChange;
private System.Windows.Forms.ColorDialog colorDialog1;
} }
} }
\ No newline at end of file \ No newline at end of file
 
using AccAOI; using AccAOI;
using log4net; using log4net;
using OpenCvSharp.Flann;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Drawing; using System.Drawing;
...@@ -12,6 +13,7 @@ using System.Threading.Tasks; ...@@ -12,6 +13,7 @@ using System.Threading.Tasks;
using System.Windows.Forms; using System.Windows.Forms;
using TSA_V.Common; using TSA_V.Common;
using TSA_V.DeviceLibrary; using TSA_V.DeviceLibrary;
using TSA_V.frmBoard;
using TSA_V.LoadCSVLibrary; using TSA_V.LoadCSVLibrary;
namespace TSA_V namespace TSA_V
...@@ -311,6 +313,7 @@ namespace TSA_V ...@@ -311,6 +313,7 @@ namespace TSA_V
view.Cells[Column_PenWidth.Index].Value = point.PenWidth; view.Cells[Column_PenWidth.Index].Value = point.PenWidth;
view.Cells[Column_ShowText.Index].Value = point.ShowText; view.Cells[Column_ShowText.Index].Value = point.ShowText;
view.Cells[Column_disable.Index].Value = point.Disable; view.Cells[Column_disable.Index].Value = point.Disable;
view.Cells[col_IsEdit.Index].Value=point.IsEdit;
if (updateBoardInfo != null) if (updateBoardInfo != null)
{ {
...@@ -717,7 +720,8 @@ namespace TSA_V ...@@ -717,7 +720,8 @@ namespace TSA_V
point.PointType = Convert.ToInt32(row.Cells[this.Column_PointType.Name].Value.ToString()); point.PointType = Convert.ToInt32(row.Cells[this.Column_PointType.Name].Value.ToString());
point.PenWidth = Convert.ToInt32(row.Cells[this.Column_PenWidth.Name].Value.ToString()); point.PenWidth = Convert.ToInt32(row.Cells[this.Column_PenWidth.Name].Value.ToString());
point.ShowText = (row.Cells[this.Column_ShowText.Name].Value.ToString()); point.ShowText = (row.Cells[this.Column_ShowText.Name].Value.ToString());
point.Disable = Convert.ToBoolean(row.Cells[this.Column_disable.Name].Value.ToString()); point.Disable = Convert.ToBoolean(row.Cells[this.Column_disable.Name].Value.ToString());
point.IsEdit = Convert.ToBoolean(row.Cells[this.col_IsEdit.Name].Value.ToString());
} }
catch (Exception ex) catch (Exception ex)
{ {
...@@ -1523,6 +1527,38 @@ namespace TSA_V ...@@ -1523,6 +1527,38 @@ namespace TSA_V
btnColorChange.ForeColor = Color.Black; btnColorChange.ForeColor = Color.Black;
} }
private void btnCalibrate_Click(object sender, EventArgs e)
{
FrmCalibrate frm = new FrmCalibrate(updateBoardInfo);
DialogResult dialog = frm.ShowDialog();
if (dialog.Equals(DialogResult.OK))
{
int index = dgvList.FirstDisplayedScrollingRowIndex;
updateBoardInfo = BoardManager.getBoardByName(updateBoardInfo.boardName);
int color = btnColorChange.BackColor.ToArgb();
updateBoardInfo.PointColor = color;
for (int i = 0; i < updateBoardInfo.smtList.Count; i++)
{
dgvList.Rows[i].Cells[this.Column_NodeX.Name].Value = updateBoardInfo.smtList[i].NodePositionX;
dgvList.Rows[i].Cells[this.Column_NodeY.Name].Value = updateBoardInfo.smtList[i].NodePositionY;
dgvList.Rows[i].Cells[this.Column_PointSizeX.Name].Value = updateBoardInfo.smtList[i].PointSizeX;
dgvList.Rows[i].Cells[this.Column_PointSizeY.Name].Value = updateBoardInfo.smtList[i].PointSizeY;
}
SetListCurrCell(index);
FrmProjectorScreen.instance.ClearPoint();
FrmProjectorScreen.instance.ShowPoint(false, updateBoardInfo.PointColor, updateBoardInfo.smtList.ToArray());
this.Cursor = Cursors.Default;
//重新加载
MessageBox.Show(ResourceCulture.GetString(ResourceCulture.TrainOK, "坐标校准完成!"));
}
}
private void panBoard_Paint(object sender, PaintEventArgs e)
{
}
private void llblAllUSel_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) private void llblAllUSel_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
{ {
int cout = dgvList.Rows.Count; int cout = dgvList.Rows.Count;
......
...@@ -213,6 +213,9 @@ ...@@ -213,6 +213,9 @@
<metadata name="Column_Notes.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <metadata name="Column_Notes.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value> <value>True</value>
</metadata> </metadata>
<metadata name="col_IsEdit.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column_getPosition.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <metadata name="Column_getPosition.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value> <value>True</value>
</metadata> </metadata>
......
...@@ -48,7 +48,7 @@ namespace TSA_V ...@@ -48,7 +48,7 @@ namespace TSA_V
this.txtX.Text = x.ToString(); this.txtX.Text = x.ToString();
this.txtY.Text = y.ToString(); this.txtY.Text = y.ToString();
xyMoveControl1.loadTypeList(ResourceCulture.GetPTypes()); xyMoveControl1.loadTypeList(ResourceCulture.GetPTypes(), ResourceCulture.GetXYControlMap());
xyMoveControl1.ShowColor = boardInfo.PointColor; xyMoveControl1.ShowColor = boardInfo.PointColor;
} }
...@@ -110,13 +110,13 @@ namespace TSA_V ...@@ -110,13 +110,13 @@ namespace TSA_V
ProjectorControl.MaxY = (int)TSAVBean.Y_Max; ProjectorControl.MaxY = (int)TSAVBean.Y_Max;
this.PointList = list; this.PointList = list;
this.CurrIndex = currIndex; this.CurrIndex = currIndex;
ShowPoint(); ShowPoint(null);
xyMoveControl1.ShowColor = boardInfo.PointColor; xyMoveControl1.ShowColor = boardInfo.PointColor;
xyMoveControl1.loadTypeList(ResourceCulture.GetPTypes()); xyMoveControl1.loadTypeList(ResourceCulture.GetPTypes(), ResourceCulture.GetXYControlMap());
} }
private void ShowPoint() private void ShowPoint(SMTPointInfo prePoint)
{ {
updateFrom(false); updateFrom(false);
btnSave.Visible = true; btnSave.Visible = true;
...@@ -135,6 +135,18 @@ namespace TSA_V ...@@ -135,6 +135,18 @@ namespace TSA_V
xyMoveControl1.PointSizeY = smtPointInfo.PointSizeY; xyMoveControl1.PointSizeY = smtPointInfo.PointSizeY;
xyMoveControl1.PenWidth = smtPointInfo.PenWidth; xyMoveControl1.PenWidth = smtPointInfo.PenWidth;
xyMoveControl1.ShowText = smtPointInfo.ShowText; xyMoveControl1.ShowText = smtPointInfo.ShowText;
if(this.smtPointInfo.IsEdit==false)
{
if (prePoint != null && prePoint.IsEdit)
{
xyMoveControl1.PointType = prePoint.PointType;
xyMoveControl1.PointSizeX = prePoint.PointSizeX;
xyMoveControl1.PointSizeY = prePoint.PointSizeY;
xyMoveControl1.PenWidth = prePoint.PenWidth;
}
}
xyMoveControl1.ShowCurrPoint();
if (boardInfo != null) if (boardInfo != null)
{ {
xyMoveControl1.ShowColor = boardInfo.PointColor; xyMoveControl1.ShowColor = boardInfo.PointColor;
...@@ -264,6 +276,8 @@ namespace TSA_V ...@@ -264,6 +276,8 @@ namespace TSA_V
} }
else else
{ {
//设置为已保存
smtPointInfo.IsEdit = true;
if (String.IsNullOrEmpty(smtPointInfo.PositionNum)) if (String.IsNullOrEmpty(smtPointInfo.PositionNum))
{ {
ComponetInfo com = CSVBomManager.GetCom(boardInfo.bomName, smtPointInfo); ComponetInfo com = CSVBomManager.GetCom(boardInfo.bomName, smtPointInfo);
...@@ -320,7 +334,7 @@ namespace TSA_V ...@@ -320,7 +334,7 @@ namespace TSA_V
CurrIndex++; CurrIndex++;
if (PointList.Count > CurrIndex) if (PointList.Count > CurrIndex)
{ {
ShowPoint(); ShowPoint(prePoint);
NextEvent?.Invoke(CurrIndex,prePoint); NextEvent?.Invoke(CurrIndex,prePoint);
} }
} }
...@@ -336,7 +350,7 @@ namespace TSA_V ...@@ -336,7 +350,7 @@ namespace TSA_V
} }
if (PointList.Count > CurrIndex) if (PointList.Count > CurrIndex)
{ {
ShowPoint(); ShowPoint(null);
NextEvent?.Invoke(CurrIndex); NextEvent?.Invoke(CurrIndex);
} }
} }
......
...@@ -2645,4 +2645,16 @@ ...@@ -2645,4 +2645,16 @@
<data name = "Type13" xml:space = "preserve"> <value> Polarity_bottom-left </value> </data> <data name = "Type13" xml:space = "preserve"> <value> Polarity_bottom-left </value> </data>
<data name = "Type14" xml:space = "preserve"> <value> Polarity_bottom-right</value> </data> <data name = "Type14" xml:space = "preserve"> <value> Polarity_bottom-right</value> </data>
<data name = "FrmBoardInfo_btnColorChange_Text" xml:space = "preserve"> <value> Projection Color </value> </data> <data name = "FrmBoardInfo_btnColorChange_Text" xml:space = "preserve"> <value> Projection Color </value> </data>
<data name = "FrmBoardInfo_btnCalibrate_Text" xml:space = "preserve"> <value> Projection Calibration </value> </data>
<data name = "CalMsg1" xml:space = "preserve"> <value> Step 1: Move the projection cursor to the upper left corner of the board and click on the Setup button. </value> </data>
<data name = "FrmCalibrate_Text" xml:space = "preserve"> <value> Projection Calibration </value> </data>
<data name = "FrmCalibrate_groupBox2_Text" xml:space = "preserve"> <value> illustration </value> </data>
<data name = "FrmCalibrate_groupBox1_Text" xml:space = "preserve"> <value> Projection Calibration </value> </data>
<data name = "FrmCalibrate_btnExit_Text" xml:space = "preserve"> <value> Exit </value> </data>
<data name = "FrmCalibrate_btnCal_Text" xml:space = "preserve"> <value> Start Calibration </value> </data>
<data name = "FrmCalibrate_btnRightBottom_Text" xml:space = "preserve"> <value> Set to bottom right position </value> </data>
<data name = "FrmCalibrate_btnLeftUp_Text" xml:space = "preserve"> <value> Set to top left position </value> </data>
<data name = "FrmCalibrate_lblMsg_Text" xml:space = "preserve"> <value> Step 1: Move the projection cursor to the upper left corner of the board </value> </data>
<data name = "CalMsg2" xml:space = "preserve"> <value> Step 2: Move the projection cursor to the lower right corner of the board </value> </data>
<data name = "CalMsg3" xml:space = "preserve"> <value> Step 3: Click the Start Calibration button </value> </data>
</root> </root>
\ No newline at end of file \ No newline at end of file
...@@ -2629,4 +2629,16 @@ ...@@ -2629,4 +2629,16 @@
<data name = "Type13" xml:space = "preserve"> <value> 极性_左下方 </value> </data> <data name = "Type13" xml:space = "preserve"> <value> 极性_左下方 </value> </data>
<data name = "Type14" xml:space = "preserve"> <value> 极性_右下方 </value> </data> <data name = "Type14" xml:space = "preserve"> <value> 极性_右下方 </value> </data>
<data name = "FrmBoardInfo_btnColorChange_Text" xml:space = "preserve"> <value> 投影颜色 </value> </data> <data name = "FrmBoardInfo_btnColorChange_Text" xml:space = "preserve"> <value> 投影颜色 </value> </data>
<data name = "FrmBoardInfo_btnCalibrate_Text" xml:space = "preserve"> <value> 投影标定 </value> </data>
<data name = "CalMsg1" xml:space = "preserve"> <value> 第一步:请将光标移动至如图示电路板左上角位置,确认后点击设置按钮 </value> </data>
<data name = "FrmCalibrate_Text" xml:space = "preserve"> <value> 投影标定 </value> </data>
<data name = "FrmCalibrate_groupBox2_Text" xml:space = "preserve"> <value> 图示 </value> </data>
<data name = "FrmCalibrate_groupBox1_Text" xml:space = "preserve"> <value> 投影标定 </value> </data>
<data name = "FrmCalibrate_btnExit_Text" xml:space = "preserve"> <value> 退出 </value> </data>
<data name = "FrmCalibrate_btnCal_Text" xml:space = "preserve"> <value> 开始校准 </value> </data>
<data name = "FrmCalibrate_btnRightBottom_Text" xml:space = "preserve"> <value> 设置为右下角位置 </value> </data>
<data name = "FrmCalibrate_btnLeftUp_Text" xml:space = "preserve"> <value> 设置为左上角位置 </value> </data>
<data name = "FrmCalibrate_lblMsg_Text" xml:space = "preserve"> <value> 第一步:请将光标移动至如图示电路板左上角位置,确认后点击设置按钮 </value> </data>
<data name = "CalMsg2" xml:space = "preserve"> <value> 第二步:请将光标移动至如图示电路板右下角位置,确认后点击设置按钮 </value> </data>
<data name = "CalMsg3" xml:space = "preserve"> <value> 第三步:请点击开始校准按钮,自动计算投影坐标 </value> </data>
</root> </root>
\ No newline at end of file \ No newline at end of file
...@@ -2643,5 +2643,17 @@ ...@@ -2643,5 +2643,17 @@
<data name = "Type12" xml:space = "preserve"> <value> 极性_右上方 </value> </data> <data name = "Type12" xml:space = "preserve"> <value> 极性_右上方 </value> </data>
<data name = "Type13" xml:space = "preserve"> <value> 极性_左下方 </value> </data> <data name = "Type13" xml:space = "preserve"> <value> 极性_左下方 </value> </data>
<data name = "Type14" xml:space = "preserve"> <value> 极性_右下方 </value> </data> <data name = "Type14" xml:space = "preserve"> <value> 极性_右下方 </value> </data>
<data name = "FrmBoardInfo_btnColorChange_Text" xml:space = "preserve"> <value> 投影颜色 </value> </data> <data name = "FrmBoardInfo_btnColorChange_Text" xml:space = "preserve"> <value> 投影颜色 </value> </data>
<data name = "FrmBoardInfo_btnCalibrate_Text" xml:space = "preserve"> <value> 投影标定 </value> </data>
<data name = "CalMsg1" xml:space = "preserve"> <value> 第一步:请将光标移动至如图示电路板左上角位置,确认后点击设置按钮 </value> </data>
<data name = "FrmCalibrate_Text" xml:space = "preserve"> <value> 投影标定 </value> </data>
<data name = "FrmCalibrate_groupBox2_Text" xml:space = "preserve"> <value> 图示 </value> </data>
<data name = "FrmCalibrate_groupBox1_Text" xml:space = "preserve"> <value> 投影标定 </value> </data>
<data name = "FrmCalibrate_btnExit_Text" xml:space = "preserve"> <value> 退出 </value> </data>
<data name = "FrmCalibrate_btnCal_Text" xml:space = "preserve"> <value> 开始校准 </value> </data>
<data name = "FrmCalibrate_btnRightBottom_Text" xml:space = "preserve"> <value> 设置为右下角位置 </value> </data>
<data name = "FrmCalibrate_btnLeftUp_Text" xml:space = "preserve"> <value> 设置为左上角位置 </value> </data>
<data name = "FrmCalibrate_lblMsg_Text" xml:space = "preserve"> <value> 第一步:请将光标移动至如图示电路板左上角位置,确认后点击设置按钮 </value> </data>
<data name = "CalMsg2" xml:space = "preserve"> <value> 第二步:请将光标移动至如图示电路板右下角位置,确认后点击设置按钮 </value> </data>
<data name = "CalMsg3" xml:space = "preserve"> <value> 第三步:请点击开始校准按钮,自动计算投影坐标 </value> </data>
</root> </root>
\ No newline at end of file \ No newline at end of file
...@@ -63,6 +63,16 @@ namespace TSA_V.Properties { ...@@ -63,6 +63,16 @@ namespace TSA_V.Properties {
/// <summary> /// <summary>
/// 查找 System.Drawing.Bitmap 类型的本地化资源。 /// 查找 System.Drawing.Bitmap 类型的本地化资源。
/// </summary> /// </summary>
internal static System.Drawing.Bitmap _202403181014 {
get {
object obj = ResourceManager.GetObject("202403181014", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
/// </summary>
internal static System.Drawing.Bitmap axisbg { internal static System.Drawing.Bitmap axisbg {
get { get {
object obj = ResourceManager.GetObject("axisbg", resourceCulture); object obj = ResourceManager.GetObject("axisbg", resourceCulture);
......
...@@ -118,20 +118,23 @@ ...@@ -118,20 +118,23 @@
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader> </resheader>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" /> <assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="NEO_STATION" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\NEO STATION.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="ok1" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\ok.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="退出" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="退出" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\退出.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> <value>..\Resources\退出.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data> </data>
<data name="设备配置背景" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="设备配置背景" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\设备配置背景.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> <value>..\Resources\设备配置背景.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data> </data>
<data name="IMG_3501" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\IMG_3501.JPG;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="x+" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="x+" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\image\x+.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> <value>..\image\x+.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data> </data>
<data name="编辑" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="neo_station1" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\编辑.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> <value>..\neo station.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data> </data>
<data name="z+" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="z+" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\image\z+.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> <value>..\image\z+.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
...@@ -139,8 +142,8 @@ ...@@ -139,8 +142,8 @@
<data name="error" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="error" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\image\error.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> <value>..\image\error.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data> </data>
<data name="元器件信息背景" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="编辑" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\元器件信息背景.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> <value>..\Resources\编辑.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data> </data>
<data name="程序编辑背景" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="程序编辑背景" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\程序编辑背景.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> <value>..\Resources\程序编辑背景.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
...@@ -151,8 +154,8 @@ ...@@ -151,8 +154,8 @@
<data name="defaultBoard0" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="defaultBoard0" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\defaultBoard0.jpg;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> <value>..\Resources\defaultBoard0.jpg;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data> </data>
<data name="ok1" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="IMG_3501" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\ok.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> <value>..\Resources\IMG_3501.JPG;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data> </data>
<data name="程序编辑背景3" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="程序编辑背景3" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\程序编辑背景3.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> <value>..\Resources\程序编辑背景3.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
...@@ -160,12 +163,18 @@ ...@@ -160,12 +163,18 @@
<data name="统计分析" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="统计分析" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\统计分析.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> <value>..\Resources\统计分析.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data> </data>
<data name="背景图dark" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\背景图dark.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="程序编辑背景1" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="程序编辑背景1" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\程序编辑背景1.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> <value>..\Resources\程序编辑背景1.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data> </data>
<data name="程序编辑背景2" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="程序编辑背景2" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\程序编辑背景2.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> <value>..\Resources\程序编辑背景2.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data> </data>
<data name="backImage" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\image\backImage.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="背景图" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="背景图" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\image\背景图.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> <value>..\image\背景图.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data> </data>
...@@ -178,12 +187,18 @@ ...@@ -178,12 +187,18 @@
<data name="开始工作背景" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="开始工作背景" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\开始工作背景.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> <value>..\Resources\开始工作背景.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data> </data>
<data name="axisbg" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\axisbg.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="退出背景" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="退出背景" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\退出背景.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> <value>..\Resources\退出背景.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data> </data>
<data name="设备配置" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="设备配置" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\设备配置.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> <value>..\Resources\设备配置.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data> </data>
<data name="元器件信息背景" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\元器件信息背景.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="开始工作" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="开始工作" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\开始工作.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> <value>..\Resources\开始工作.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data> </data>
...@@ -199,19 +214,7 @@ ...@@ -199,19 +214,7 @@
<data name="元器件信息" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="元器件信息" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\元器件信息.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> <value>..\Resources\元器件信息.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data> </data>
<data name="backImage" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="202403181014" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\image\backImage.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> <value>..\Resources\202403181014.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="背景图dark" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\背景图dark.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="NEO_STATION" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\NEO STATION.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="neo_station1" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\neo station.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="axisbg" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\axisbg.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data> </data>
</root> </root>
\ No newline at end of file \ No newline at end of file
...@@ -151,6 +151,26 @@ namespace TSA_V ...@@ -151,6 +151,26 @@ namespace TSA_V
{ {
return className + spiltStr + Text; return className + spiltStr + Text;
} }
public static Dictionary<string, string> GetXYControlMap() {
Dictionary<string, string> controlTextMap = new Dictionary<string, string>();
controlTextMap.Add("group_Text", ResourceCulture.GetString("FrmPointInfo_group_Text", "坐标"));
controlTextMap.Add("lblLineWidth_Text", ResourceCulture.GetString("FrmPointInfo_lblLineWidth_Text", "画笔宽度:"));
controlTextMap.Add("lblName_Text", ResourceCulture.GetString("FrmPointInfo_lblName_Text", "投影文字:"));
controlTextMap.Add("lblSizeLength_Text", ResourceCulture.GetString("FrmPointInfo_lblSizeLength_Text", "横向大小→:"));
controlTextMap.Add("lblSizeWidth_Text", ResourceCulture.GetString("FrmPointInfo_lblSizeWidth_Text", "纵向大小↓: "));
controlTextMap.Add("lblStepValue_Text", ResourceCulture.GetString("FrmPointInfo_lblStepValue_Text", "步进值:"));
controlTextMap.Add("lbltype_Text", ResourceCulture.GetString("FrmPointInfo_lbltype_Text", "坐标点形状:"));
controlTextMap.Add("lblx_Text", ResourceCulture.GetString("FrmPointInfo_lblx_Text", "Y轴坐标:"));
controlTextMap.Add("lbly_Text", ResourceCulture.GetString("FrmPointInfo_lbly_Text", "X轴坐标:"));
controlTextMap.Add("btnDown_Text", ResourceCulture.GetString("FrmPointInfo_btnDown_Text", "下移"));
controlTextMap.Add("btnUp_Text", ResourceCulture.GetString("FrmPointInfo_btnUp_Text", "上移"));
controlTextMap.Add("btnShowPoint_Text", ResourceCulture.GetString("FrmPointInfo_btnShowPoint_Text", "移动测试"));
controlTextMap.Add("btnLeft_Text", ResourceCulture.GetString("FrmPointInfo_btnLeft_Text", "左移"));
controlTextMap.Add("btnRight_Text", ResourceCulture.GetString("FrmPointInfo_btnRight_Text", "右移"));
return controlTextMap;
}
public static string[] GetPTypes() public static string[] GetPTypes()
{ {
string str7 = ResourceCulture.GetString(ResourceCulture.Type7, "极性_上方"); string str7 = ResourceCulture.GetString(ResourceCulture.Type7, "极性_上方");
......
...@@ -120,6 +120,12 @@ ...@@ -120,6 +120,12 @@
<Reference Include="System.Xml" /> <Reference Include="System.Xml" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Compile Include="frmBoard\FrmCalibrate.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="frmBoard\FrmCalibrate.Designer.cs">
<DependentUpon>FrmCalibrate.cs</DependentUpon>
</Compile>
<Compile Include="manager\AOIManager.cs" /> <Compile Include="manager\AOIManager.cs" />
<Compile Include="DataCalculate.cs"> <Compile Include="DataCalculate.cs">
<SubType>Form</SubType> <SubType>Form</SubType>
...@@ -356,6 +362,9 @@ ...@@ -356,6 +362,9 @@
<EmbeddedResource Include="FrmBoardList.resx"> <EmbeddedResource Include="FrmBoardList.resx">
<DependentUpon>FrmBoardList.cs</DependentUpon> <DependentUpon>FrmBoardList.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
<EmbeddedResource Include="frmBoard\FrmCalibrate.resx">
<DependentUpon>FrmCalibrate.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="FrmHistory.resx"> <EmbeddedResource Include="FrmHistory.resx">
<DependentUpon>FrmHistory.cs</DependentUpon> <DependentUpon>FrmHistory.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
...@@ -515,6 +524,7 @@ ...@@ -515,6 +524,7 @@
<Content Include="image\alarm2.gif"> <Content Include="image\alarm2.gif">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content> </Content>
<None Include="Resources\202403181014.png" />
<Content Include="sound\alarm.wav"> <Content Include="sound\alarm.wav">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content> </Content>
......
namespace TSA_V.frmBoard
{
partial class FrmCalibrate
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
this.xyMoveControl1 = new UserFromControl.ProjectorControl();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.btnExit = new System.Windows.Forms.Button();
this.btnCal = new System.Windows.Forms.Button();
this.btnRightBottom = new System.Windows.Forms.Button();
this.btnLeftUp = new System.Windows.Forms.Button();
this.lblMsg = new System.Windows.Forms.Label();
this.groupBox2 = new System.Windows.Forms.GroupBox();
this.panBoard = new System.Windows.Forms.Panel();
this.picBoard = new System.Windows.Forms.PictureBox();
this.timer1 = new System.Windows.Forms.Timer(this.components);
this.groupBox1.SuspendLayout();
this.groupBox2.SuspendLayout();
this.panBoard.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.picBoard)).BeginInit();
this.SuspendLayout();
//
// xyMoveControl1
//
this.xyMoveControl1.BackColor = System.Drawing.Color.White;
this.xyMoveControl1.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.xyMoveControl1.GroupName = "坐标";
this.xyMoveControl1.Location = new System.Drawing.Point(22, 20);
this.xyMoveControl1.Name = "xyMoveControl1";
this.xyMoveControl1.PenWidth = 2;
this.xyMoveControl1.PointSizeX = 5;
this.xyMoveControl1.PointSizeY = 5;
this.xyMoveControl1.PointType = 1;
this.xyMoveControl1.ShowText = "";
this.xyMoveControl1.Size = new System.Drawing.Size(510, 303);
this.xyMoveControl1.TabIndex = 288;
this.xyMoveControl1.XValue = 1D;
this.xyMoveControl1.YValue = 1D;
//
// groupBox1
//
this.groupBox1.Controls.Add(this.btnExit);
this.groupBox1.Controls.Add(this.btnCal);
this.groupBox1.Controls.Add(this.btnRightBottom);
this.groupBox1.Controls.Add(this.btnLeftUp);
this.groupBox1.Controls.Add(this.lblMsg);
this.groupBox1.Controls.Add(this.xyMoveControl1);
this.groupBox1.Location = new System.Drawing.Point(12, 12);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(776, 368);
this.groupBox1.TabIndex = 289;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "投影标定";
//
// btnExit
//
this.btnExit.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.btnExit.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnExit.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnExit.Location = new System.Drawing.Point(559, 245);
this.btnExit.Name = "btnExit";
this.btnExit.Size = new System.Drawing.Size(180, 45);
this.btnExit.TabIndex = 295;
this.btnExit.Text = "退出";
this.btnExit.UseVisualStyleBackColor = true;
this.btnExit.Click += new System.EventHandler(this.btnExit_Click);
//
// btnCal
//
this.btnCal.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.btnCal.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnCal.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnCal.Location = new System.Drawing.Point(559, 180);
this.btnCal.Name = "btnCal";
this.btnCal.Size = new System.Drawing.Size(180, 45);
this.btnCal.TabIndex = 294;
this.btnCal.Text = "开始校准";
this.btnCal.UseVisualStyleBackColor = true;
this.btnCal.Click += new System.EventHandler(this.btnCal_Click);
//
// btnRightBottom
//
this.btnRightBottom.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.btnRightBottom.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnRightBottom.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnRightBottom.Location = new System.Drawing.Point(559, 115);
this.btnRightBottom.Name = "btnRightBottom";
this.btnRightBottom.Size = new System.Drawing.Size(180, 45);
this.btnRightBottom.TabIndex = 293;
this.btnRightBottom.Text = "设置为右下角位置";
this.btnRightBottom.UseVisualStyleBackColor = true;
this.btnRightBottom.Click += new System.EventHandler(this.btnRightBottom_Click);
//
// btnLeftUp
//
this.btnLeftUp.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.btnLeftUp.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnLeftUp.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnLeftUp.Location = new System.Drawing.Point(559, 50);
this.btnLeftUp.Name = "btnLeftUp";
this.btnLeftUp.Size = new System.Drawing.Size(180, 45);
this.btnLeftUp.TabIndex = 292;
this.btnLeftUp.Text = "设置为左上角位置";
this.btnLeftUp.UseVisualStyleBackColor = true;
this.btnLeftUp.Click += new System.EventHandler(this.btnLeftUp_Click);
//
// lblMsg
//
this.lblMsg.AutoSize = true;
this.lblMsg.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblMsg.ForeColor = System.Drawing.Color.Red;
this.lblMsg.Location = new System.Drawing.Point(32, 339);
this.lblMsg.Name = "lblMsg";
this.lblMsg.Size = new System.Drawing.Size(522, 22);
this.lblMsg.TabIndex = 289;
this.lblMsg.Text = "第一步:请将光标移动至如图示电路板左上角位置,确认后点击设置按钮";
//
// groupBox2
//
this.groupBox2.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.groupBox2.Controls.Add(this.panBoard);
this.groupBox2.Location = new System.Drawing.Point(13, 387);
this.groupBox2.Name = "groupBox2";
this.groupBox2.Size = new System.Drawing.Size(775, 318);
this.groupBox2.TabIndex = 290;
this.groupBox2.TabStop = false;
this.groupBox2.Text = "图示";
//
// panBoard
//
this.panBoard.Controls.Add(this.picBoard);
this.panBoard.Dock = System.Windows.Forms.DockStyle.Fill;
this.panBoard.Location = new System.Drawing.Point(3, 17);
this.panBoard.Name = "panBoard";
this.panBoard.Size = new System.Drawing.Size(769, 298);
this.panBoard.TabIndex = 1;
//
// picBoard
//
this.picBoard.Image = global::TSA_V.Properties.Resources._202403181014;
this.picBoard.Location = new System.Drawing.Point(32, 27);
this.picBoard.Name = "picBoard";
this.picBoard.Size = new System.Drawing.Size(686, 242);
this.picBoard.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
this.picBoard.TabIndex = 0;
this.picBoard.TabStop = false;
//
// timer1
//
this.timer1.Interval = 500;
this.timer1.Tick += new System.EventHandler(this.timer1_Tick);
//
// FrmCalibrate
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(800, 727);
this.Controls.Add(this.groupBox2);
this.Controls.Add(this.groupBox1);
this.Name = "FrmCalibrate";
this.Text = "投影标定";
this.Load += new System.EventHandler(this.FrmCalibrate_Load);
this.Shown += new System.EventHandler(this.FrmCalibrate_Shown);
this.groupBox1.ResumeLayout(false);
this.groupBox1.PerformLayout();
this.groupBox2.ResumeLayout(false);
this.panBoard.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.picBoard)).EndInit();
this.ResumeLayout(false);
}
#endregion
private UserFromControl.ProjectorControl xyMoveControl1;
private System.Windows.Forms.GroupBox groupBox1;
private System.Windows.Forms.Label lblMsg;
private System.Windows.Forms.GroupBox groupBox2;
private System.Windows.Forms.PictureBox picBoard;
private System.Windows.Forms.Button btnLeftUp;
private System.Windows.Forms.Button btnCal;
private System.Windows.Forms.Button btnRightBottom;
private System.Windows.Forms.Timer timer1;
private System.Windows.Forms.Button btnExit;
private System.Windows.Forms.Panel panBoard;
}
}
\ No newline at end of file \ No newline at end of file
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Windows.Forms;
using TSA_V.Common;
using TSA_V.DeviceLibrary;
namespace TSA_V.frmBoard
{
public partial class FrmCalibrate : FrmBase
{
private BoardInfo currBoard = null;
/// <summary>
/// 1=已确认左上角位置
/// 2=已确认右下角位置
/// 3=正在校准中
/// </summary>
private int CurrStep = 0;
public FrmCalibrate(BoardInfo board)
{
InitializeComponent();
this.currBoard = board;
}
private void FrmCalibrate_Load(object sender, EventArgs e)
{
picBoard.Image = currBoard.GetImage();
picBoard.SizeMode = PictureBoxSizeMode.StretchImage;
SetPicSize();
LoadPoint();
timer1.Start();
xyMoveControl1.loadTypeList(ResourceCulture.GetPTypes(),ResourceCulture.GetXYControlMap());
xyMoveControl1.ShowPointEvent += XyMoveControl1_ShowPointEvent;
xyMoveControl1.PointType = 2;
xyMoveControl1.PointSizeX = 20;
xyMoveControl1.PointSizeY = 20;
xyMoveControl1.PenWidth = 4;
xyMoveControl1.XValue = 300;
xyMoveControl1.YValue = 300;
btnLeftUp.Visible = true;
btnRightBottom.Visible = false;
btnCal.Visible = false;
xyMoveControl1.ShowCurrPoint();
CurrStep = 0;
LoadCalInfo();
}
private bool XyMoveControl1_ShowPointEvent(ProjectorPInfo p)
{
FrmProjectorScreen.instance.ClearPoint();
FrmProjectorScreen.instance.ShowPoint(p);
return true;
}
private void SetPicSize()
{
int yuliuP = 30;
int xishu = 100;
picBoard.Width = currBoard.boardWidth * xishu;
picBoard.Height = currBoard.boardLength * xishu;
int maxWidth = panBoard.Width - yuliuP * 2;
int maxHeight = panBoard.Height - yuliuP * 2;
if (picBoard.Width > maxWidth)
{
picBoard.Height = currBoard.boardLength * xishu * maxWidth / (currBoard.boardWidth * xishu);
picBoard.Width = maxWidth;
}
if (picBoard.Height > maxHeight)
{
picBoard.Width = currBoard.boardWidth * xishu * maxHeight / (currBoard.boardLength * xishu);
picBoard.Height = maxHeight;
}
picBoard.Location=new Point( (panBoard.Width - picBoard.Width )/ 2,(panBoard.Height-picBoard.Height)/2);
}
private void LoadCalInfo()
{
if (currBoard.calInfo == null)
{
CurrStep = 0;
}
else
{
if (CurrStep == 0)
{
Point p = new Point();
if (currBoard.calInfo.leftUpPoint != null)
{
p = currBoard.calInfo.leftUpPoint;
xyMoveControl1.XValue = p.X;
xyMoveControl1.YValue = p.Y;
}
else
{
xyMoveControl1.XValue = 300;
xyMoveControl1.YValue = 300;
}
xyMoveControl1.ShowCurrPoint();
btnLeftUp.Visible = true;
btnRightBottom.Visible = false;
btnCal.Visible = false;
lblMsg.Text = ResourceCulture.GetString("CalMsg1", "第一步:请将光标移动至如图示电路板左上角位置,确认后点击设置按钮");
}
else if (CurrStep == 1)
{
Point p = new Point();
if (currBoard.calInfo.rightBottomPoint != null)
{
p = currBoard.calInfo.rightBottomPoint;
xyMoveControl1.XValue = p.X;
xyMoveControl1.YValue = p.Y;
}
else
{
p = currBoard.calInfo.leftUpPoint;
xyMoveControl1.XValue = p.X;
xyMoveControl1.YValue = p.Y;
}
xyMoveControl1.ShowCurrPoint();
btnLeftUp.Visible = false;
btnRightBottom.Visible = true;
btnCal.Visible = false;
lblMsg.Text = ResourceCulture.GetString("CalMsg2", "第二步:请将光标移动至如图示电路板右下角位置,确认后点击设置按钮");
}
else if (CurrStep == 2)
{
btnLeftUp.Visible = false;
btnRightBottom.Visible = false;
btnCal.Visible = true;
lblMsg.Text = ResourceCulture.GetString("CalMsg3", "第三步:请点击开始校准按钮,自动计算投影坐标");
}
}
}
private void LoadPoint()
{
Crop();
}
private void Crop()
{
try
{
Color color = lastColor;
Graphics g = panBoard.CreateGraphics();
g.Clear(panBoard.BackColor);
int lineWidth = 5;
int lineLength = 20;
if (CurrStep == 0 || CurrStep == 2)
{
Point point1 = new Point(picBoard.Location.X, picBoard.Location.Y);
g.DrawLine(new Pen(color, lineWidth), new Point(point1.X - lineLength, point1.Y), new Point(point1.X + lineLength, point1.Y));
g.DrawLine(new Pen(color, lineWidth), new Point(point1.X, point1.Y - lineLength), new Point(point1.X, point1.Y + lineLength));
}
if (CurrStep == 1 || CurrStep == 2)
{
Point point2 = new Point(picBoard.Location.X + picBoard.Width, picBoard.Location.Y + picBoard.Height);
g.DrawLine(new Pen(color, lineWidth), new Point(point2.X - lineLength, point2.Y), new Point(point2.X + lineLength, point2.Y));
g.DrawLine(new Pen(color, lineWidth), new Point(point2.X, point2.Y - lineLength), new Point(point2.X, point2.Y + lineLength));
}
g.Flush();
g.Dispose();
if (lastColor.Equals(Color.Red))
{
lastColor = Color.Orange;
}
else
{
lastColor = Color.Red;
}
}
catch(Exception ex)
{
LogUtil.error("画标定位置出错:" + ex.ToString());
}
}
private Color lastColor = Color.Red;
private void timer1_Tick(object sender, EventArgs e)
{
if (!this.Visible)
{
return;
}
Crop();
}
private void btnLeftUp_Click(object sender, EventArgs e)
{
Point p = new Point((int)xyMoveControl1.XValue, (int)xyMoveControl1.YValue);
if (currBoard.calInfo == null)
{
currBoard.calInfo = new CalibrateBean();
currBoard.calInfo.leftUpPoint = p;
currBoard.calInfo.rightBottomPoint = new Point(p.X + 300, p.Y + 300 ) ;
}
else
{
currBoard.calInfo.leftUpPoint = p;
}
currBoard.calInfo.CurrStep = 1;
//BoardManager.Update(currBoard);
LogUtil.info($"程序{currBoard.boardName}设置左上角坐标为:{p.X},{p.Y}");
CurrStep = 1;
LoadCalInfo();
}
private void btnRightBottom_Click(object sender, EventArgs e)
{
Point p = new Point((int)xyMoveControl1.XValue, (int)xyMoveControl1.YValue);
if (currBoard.calInfo == null)
{
currBoard.calInfo = new CalibrateBean();
}
currBoard.calInfo.rightBottomPoint = p;
currBoard.calInfo.CurrStep = 2;
//BoardManager.Update(currBoard);
LogUtil.info($"程序{currBoard.boardName}设置右下角坐标为:{p.X},{p.Y}");
CurrStep = 2;
LoadCalInfo();
}
private void btnCal_Click(object sender, EventArgs e)
{
this.Enabled = false;
try
{
if (currBoard.calInfo == null || currBoard.calInfo.leftUpPoint == null)
{
CurrStep = 0;
LoadCalInfo();
return;
}
else if (currBoard.calInfo.rightBottomPoint == null)
{
CurrStep = 1;
LoadCalInfo();
return;
}
else
{
CalibrationProcess();
}
}
catch (Exception ex)
{
LogUtil.error("校准出错:" + ex.ToString());
}
finally
{
this.Enabled = true;
}
}
private void CalibrationProcess()
{
try
{
List<SMTPointInfo> pointList = new List<SMTPointInfo>(currBoard.smtList);
SMTPointInfo lefup = new SMTPointInfo();
lefup.PositionX = 0;
lefup.PositionY = 0;
lefup.NodePositionX = currBoard.calInfo.leftUpPoint.X;
lefup.NodePositionY = currBoard.calInfo.leftUpPoint.Y;
SMTPointInfo right = new SMTPointInfo();
right.PositionX = currBoard.boardWidth;
right.PositionY = currBoard.boardLength;
right.NodePositionX = currBoard.calInfo.rightBottomPoint.X;
right.NodePositionY = currBoard.calInfo.rightBottomPoint.Y;
LogUtil.info($" 【{ currBoard.boardName}】左上角(0,0)坐标【{lefup.NodePositionX},{ lefup.NodePositionY}】右下角({right.PositionX},{right.PositionY})【{right.NodePositionX},{right.NodePositionY}】");
List<SMTPointInfo> checkOKList = new List<SMTPointInfo>() { lefup, right };
for (int i = 0; i < pointList.Count; i++)
{
pointList[i] = CalPointNodePosition(pointList[i], checkOKList);
}
currBoard.smtList = pointList;
BoardManager.Update(currBoard);
FrmProjectorScreen.instance.ClearPoint();
FrmProjectorScreen.instance.ShowPoint(false, currBoard.PointColor, pointList.ToArray());
this.Cursor = Cursors.Default;
//重新加载
MessageBox.Show(ResourceCulture.GetString(ResourceCulture.TrainOK, "坐标校准完成!"));
DialogResult = DialogResult.OK;
this.Close();
}
catch (Exception ex)
{
LogUtil.error("校准坐标出错:" + ex.ToString());
}
}
private SMTPointInfo CalPointNodePosition(SMTPointInfo smtPoint, List<SMTPointInfo> checkOKList)
{
try
{
double oldX = smtPoint.NodePositionX;
double oldY = smtPoint.NodePositionY;
//SMTPointInfo APoint = GetPoint(smtPoint, checkOKList);
//SMTPointInfo BPoint = GetPoint(APoint, checkOKList);
SMTPointInfo APoint = checkOKList[0];
SMTPointInfo BPoint = checkOKList[1];
//计算坐标
if (Math.Abs(smtPoint.PositionX - APoint.PositionX) < 0.01)
{
smtPoint.NodePositionX = APoint.NodePositionX;
}
else
{
smtPoint.NodePositionX = APoint.NodePositionX + (BPoint.NodePositionX - APoint.NodePositionX) * (smtPoint.PositionX - APoint.PositionX) / (BPoint.PositionX - APoint.PositionX);
if (double.IsNaN(smtPoint.NodePositionX) || double.IsInfinity(smtPoint.NodePositionX))
{
smtPoint.NodePositionX = APoint.NodePositionX;
}
}
if (Math.Abs(smtPoint.PositionY - APoint.PositionY) < 0.01)
{
smtPoint.NodePositionY = APoint.NodePositionY;
}
else
{
smtPoint.NodePositionY = APoint.NodePositionY + (BPoint.NodePositionY - APoint.NodePositionY) * (smtPoint.PositionY - APoint.PositionY) / (BPoint.PositionY - APoint.PositionY);
if (double.IsNaN(smtPoint.NodePositionY) || double.IsInfinity(smtPoint.NodePositionY))
{
smtPoint.NodePositionY = APoint.NodePositionY;
}
}
if (smtPoint.NodePositionX <= 0)
{
smtPoint.NodePositionX = 1;
}
else if (smtPoint.NodePositionX > FrmProjectorScreen.instance.ScreenWidth)
{
smtPoint.NodePositionX = FrmProjectorScreen.instance.ScreenWidth;
}
if (smtPoint.NodePositionY <= 0)
{
smtPoint.NodePositionY = 1;
}
else if (smtPoint.NodePositionY > FrmProjectorScreen.instance.ScreenHeight)
{
smtPoint.NodePositionY = FrmProjectorScreen.instance.ScreenHeight;
}
if (smtPoint.PointSizeX < 1 || smtPoint.PointSizeX > 255)
{
smtPoint.PointSizeX = Setting_NInit.Device_DefaultPointSize;
}
if (smtPoint.PointSizeY < 1 || smtPoint.PointSizeY > 255)
{
smtPoint.PointSizeY = Setting_NInit.Device_DefaultPointSize;
}
//smtPoint.PointSize = 4;
//smtPoint.NodePositionX = BPoint.NodePositionX - (BPoint.NodePositionX - APoint.NodePositionX) * (BPoint.PositionX - smtPoint.PositionX) / (BPoint.PositionX - APoint.PositionX);
//smtPoint.NodePositionY = BPoint.NodePositionY - (BPoint.NodePositionY - APoint.NodePositionY) * (BPoint.PositionY - smtPoint.PositionY) / (BPoint.PositionY - APoint.PositionY);
LogUtil.info(" 【" + smtPoint.PN + "】图片坐标【" + smtPoint.PositionX + "," + smtPoint.PositionY + "】旧坐标【" + oldX + "," + oldY + "】新坐标【" + smtPoint.NodePositionX + "," + smtPoint.NodePositionY + "】");
return smtPoint;
}
catch (Exception ex)
{
LogUtil.error (" 【" + smtPoint.PN + "】图片坐标【" + smtPoint.PositionX + "," + smtPoint.PositionY + "】校准坐标出错:"+ex.ToString());
}
return smtPoint;
}
private SMTPointInfo GetPoint(SMTPointInfo smtPoint, List<SMTPointInfo> checkOKList)
{
SMTPointInfo p = null;
double maxPingFang = 0;
foreach (SMTPointInfo sm in checkOKList)
{
if (sm.pointNum.Equals(smtPoint.pointNum))
{
continue;
}
double xjuli = sm.PositionX - smtPoint.PositionX;
double yjuli = sm.PositionY - smtPoint.PositionY;
double cping = xjuli * xjuli + yjuli * yjuli;
if (cping > maxPingFang)
{
p = sm;
maxPingFang = cping;
continue;
}
}
if (p != null)
{
return p;
}
return null;
}
private void btnExit_Click(object sender, EventArgs e)
{
this.Close();
}
private void FrmCalibrate_Shown(object sender, EventArgs e)
{
xyMoveControl1.ShowCurrPoint();
}
}
}
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="timer1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
</root>
\ No newline at end of file \ No newline at end of file
...@@ -34,10 +34,17 @@ namespace TSA_V ...@@ -34,10 +34,17 @@ namespace TSA_V
try try
{ {
Thread.Sleep(50); Thread.Sleep(50);
MouseProcess(); if (!Setting_NInit.Set_CursorProcess)
}catch (Exception ex) {
}
else
{
MouseProcess();
}
}
catch (Exception ex)
{ {
LogUtil.error("光标处理出错:"+ex.ToString()); LogUtil.error("光标处理出错:" + ex.ToString());
} }
} }
LogUtil.info("光标位置处理线程已退出."); LogUtil.info("光标位置处理线程已退出.");
......
...@@ -56,7 +56,7 @@ namespace UserFromControl ...@@ -56,7 +56,7 @@ namespace UserFromControl
cmbType.Items.Add(str); cmbType.Items.Add(str);
} }
} }
public void loadTypeList(string[] list) public void loadTypeList(string[] list,Dictionary<string,string> controlTextMap)
{ {
typeList = new List<string>(); typeList = new List<string>();
this.cmbType.Items.Clear(); this.cmbType.Items.Clear();
...@@ -78,6 +78,22 @@ namespace UserFromControl ...@@ -78,6 +78,22 @@ namespace UserFromControl
{ {
cmbType.Items.Add(str); cmbType.Items.Add(str);
} }
group.Text = controlTextMap["group_Text"];
lblLineWidth.Text = controlTextMap["lblLineWidth_Text"];
lblName.Text = controlTextMap["lblName_Text"];
lblSizeLength.Text = controlTextMap["lblSizeLength_Text"];
lblSizeWidth.Text = controlTextMap["lblSizeWidth_Text"];
lblStepValue.Text = controlTextMap["lblStepValue_Text"];
lbltype.Text = controlTextMap["lbltype_Text"];
lblx.Text = controlTextMap["lblx_Text"];
lbly.Text = controlTextMap["lbly_Text"];
btnDown.Text = controlTextMap["btnDown_Text"];
btnUp.Text = controlTextMap["btnUp_Text"];
btnShowPoint.Text = controlTextMap["btnShowPoint_Text"];
btnLeft.Text = controlTextMap["btnLeft_Text"];
btnRight.Text = controlTextMap["btnRight_Text"];
//
} }
public string GroupName public string GroupName
{ {
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!