Commit a2f307bf LN

形状和极性分开

1 个父辈 3ee55dd0
...@@ -227,7 +227,7 @@ namespace TSA_V.DeviceLibrary ...@@ -227,7 +227,7 @@ namespace TSA_V.DeviceLibrary
PositionY = 0; PositionY = 0;
} }
public SMTPointInfo(int num, string partNum, string name, double positionX, double positionY, string PositionNum,string showText, public SMTPointInfo(int num, string partNum, string name, double positionX, double positionY, string PositionNum,string showText,
int pointType=1,int pointSizex=1,int pointSizeY=1,int penWidth =2, int pointType=1,int pointSizex=1,int pointSizeY=1,int penWidth =2, int PolaritiesType=0,
bool needs = false, bool needc = false, int sTemp = 0, double sTime = 0) bool needs = false, bool needc = false, int sTemp = 0, double sTime = 0)
{ {
this.TagNo = partNum; this.TagNo = partNum;
...@@ -245,6 +245,7 @@ namespace TSA_V.DeviceLibrary ...@@ -245,6 +245,7 @@ namespace TSA_V.DeviceLibrary
this.PointSizeY = pointSizeY; this.PointSizeY = pointSizeY;
this.PenWidth = penWidth; this.PenWidth = penWidth;
this.ShowText = showText; this.ShowText = showText;
this.PolaritiesType = PolaritiesType;
//if (String.IsNullOrEmpty(this.ShowText)) //if (String.IsNullOrEmpty(this.ShowText))
//{ //{
// this.ShowText = name; // this.ShowText = name;
...@@ -378,6 +379,11 @@ namespace TSA_V.DeviceLibrary ...@@ -378,6 +379,11 @@ namespace TSA_V.DeviceLibrary
public bool IsEdit = false; public bool IsEdit = false;
/// <summary> /// <summary>
/// 极性,
/// </summary>
public int PolaritiesType = 0;
/// <summary>
/// 导出导入程序时使用 /// 导出导入程序时使用
/// </summary> /// </summary>
public ComponetInfo componet; public ComponetInfo componet;
......
...@@ -8,7 +8,7 @@ namespace TSA_V.DeviceLibrary ...@@ -8,7 +8,7 @@ namespace TSA_V.DeviceLibrary
{ {
public class ProjectorPInfo public class ProjectorPInfo
{ {
public ProjectorPInfo(int x, int y, int type=1, int sizeX=4, int sizeY=4,int lineWidth=2,string showText="",int color=-1) public ProjectorPInfo(int x, int y, int type=1,int polaritiesType=0, int sizeX=4, int sizeY=4,int lineWidth=2,string showText="",int color=-1)
{ {
this.PX = x; this.PX = x;
this.PY = y; this.PY = y;
...@@ -18,6 +18,7 @@ namespace TSA_V.DeviceLibrary ...@@ -18,6 +18,7 @@ namespace TSA_V.DeviceLibrary
this.PenWidth = lineWidth; this.PenWidth = lineWidth;
this.ShowText = showText; this.ShowText = showText;
this.showColor = color; this.showColor = color;
this.PolaritiesType= polaritiesType;
} }
public int PX = 2; public int PX = 2;
public int PY = 2; public int PY = 2;
...@@ -33,5 +34,10 @@ namespace TSA_V.DeviceLibrary ...@@ -33,5 +34,10 @@ namespace TSA_V.DeviceLibrary
public string ShowText = ""; public string ShowText = "";
public int showColor = -1; public int showColor = -1;
/// <summary>
/// 极性,
/// </summary>
public int PolaritiesType = 0;
} }
} }
...@@ -87,6 +87,13 @@ namespace TSA_V.DeviceLibrary ...@@ -87,6 +87,13 @@ namespace TSA_V.DeviceLibrary
needSave = true; needSave = true;
sm.PN = sm.pointName; ; sm.PN = sm.pointName; ;
} }
if (sm.PointType > 6)
{
//极性处理
needSave = true;
sm.PolaritiesType = sm.PointType - 6;
sm.PointType =5;
}
} }
if (board.boardId > MaxId) if (board.boardId > MaxId)
......
...@@ -331,9 +331,9 @@ namespace TSA_V.DeviceLibrary ...@@ -331,9 +331,9 @@ namespace TSA_V.DeviceLibrary
} }
public delegate bool ShowPointDelegate(ProjectorPInfo p ); public delegate bool ShowPointDelegate(ProjectorPInfo p );
public static event ShowPointDelegate ShowPointEvent; public static event ShowPointDelegate ShowPointEvent;
public static void ShowPoint(double x, double y, int type = 1, int sizex = 1, int sizey = 1, int penWidth = 2, string name = "",int color=-1) public static void ShowPoint(double x, double y, int type = 1,int polaritiesType=0, int sizex = 1, int sizey = 1, int penWidth = 2, string name = "",int color=-1)
{ {
ProjectorPInfo p = new ProjectorPInfo((int)x, (int)y, type, sizex, sizey, penWidth, name,color); ProjectorPInfo p = new ProjectorPInfo((int)x, (int)y, type, polaritiesType, sizex, sizey, penWidth, name,color);
ShowPointEvent?.Invoke(p); ShowPointEvent?.Invoke(p);
} }
......
...@@ -294,7 +294,7 @@ namespace TSA_V.DeviceLibrary ...@@ -294,7 +294,7 @@ namespace TSA_V.DeviceLibrary
if (TSAVBean.IsValidPosition(currPoint.NodePositionX, currPoint.NodePositionY)) if (TSAVBean.IsValidPosition(currPoint.NodePositionX, currPoint.NodePositionY))
{ {
//LogUtil.info(" 程序【" + currBoard.boardName + "】插件【" + currPoint.pointName + "】,X轴【" + currPoint.NodePositionX + "】,Y轴【" + currPoint.NodePositionY + "】"); //LogUtil.info(" 程序【" + currBoard.boardName + "】插件【" + currPoint.pointName + "】,X轴【" + currPoint.NodePositionX + "】,Y轴【" + currPoint.NodePositionY + "】");
TSAVBean.ShowPoint(currPoint.NodePositionX, currPoint.NodePositionY, currPoint.PointType, currPoint.PointSizeX, currPoint.PointSizeY, currPoint.PenWidth, currPoint.ShowText, currBoard.PointColor); TSAVBean.ShowPoint(currPoint.NodePositionX, currPoint.NodePositionY, currPoint.PointType,currPoint.PolaritiesType, currPoint.PointSizeX, currPoint.PointSizeY, currPoint.PenWidth, currPoint.ShowText, currBoard.PointColor);
waitList.Add(WaitResultInfo.WaitTime(1000)); waitList.Add(WaitResultInfo.WaitTime(1000));
} }
else else
......
...@@ -2657,4 +2657,6 @@ ...@@ -2657,4 +2657,6 @@
<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 = "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 = "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> <data name = "CalMsg3" xml:space = "preserve"> <value> Step 3: Click the Start Calibration button </value> </data>
<data name = "Type_None" xml:space = "preserve"> <value> None </value> </data>
<data name = "FrmPointInfo_lblPolarities_Text" xml:space = "preserve"> <value> Polarity </value> </data>
</root> </root>
\ No newline at end of file \ No newline at end of file
...@@ -2641,4 +2641,6 @@ ...@@ -2641,4 +2641,6 @@
<data name = "FrmCalibrate_lblMsg_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 = "CalMsg2" xml:space = "preserve"> <value> 第二步:请将光标移动至如图示电路板右下角位置,确认后点击设置按钮 </value> </data>
<data name = "CalMsg3" xml:space = "preserve"> <value> 第三步:请点击开始校准按钮,自动计算投影坐标 </value> </data> <data name = "CalMsg3" xml:space = "preserve"> <value> 第三步:请点击开始校准按钮,自动计算投影坐标 </value> </data>
<data name = "Type_None" xml:space = "preserve"> <value> 无 </value> </data>
<data name = "FrmPointInfo_lblPolarities_Text" xml:space = "preserve"> <value> 极性 </value> </data>
</root> </root>
\ No newline at end of file \ No newline at end of file
...@@ -2656,4 +2656,6 @@ ...@@ -2656,4 +2656,6 @@
<data name = "FrmCalibrate_lblMsg_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 = "CalMsg2" xml:space = "preserve"> <value> 第二步:请将光标移动至如图示电路板右下角位置,确认后点击设置按钮 </value> </data>
<data name = "CalMsg3" xml:space = "preserve"> <value> 第三步:请点击开始校准按钮,自动计算投影坐标 </value> </data> <data name = "CalMsg3" xml:space = "preserve"> <value> 第三步:请点击开始校准按钮,自动计算投影坐标 </value> </data>
<data name = "Type_None" xml:space = "preserve"> <value> 无 </value> </data>
<data name = "FrmPointInfo_lblPolarities_Text" xml:space = "preserve"> <value> 极性 </value> </data>
</root> </root>
\ No newline at end of file \ No newline at end of file
...@@ -168,6 +168,7 @@ namespace TSA_V ...@@ -168,6 +168,7 @@ namespace TSA_V
controlTextMap.Add("btnShowPoint_Text", ResourceCulture.GetString("FrmPointInfo_btnShowPoint_Text", "移动测试")); controlTextMap.Add("btnShowPoint_Text", ResourceCulture.GetString("FrmPointInfo_btnShowPoint_Text", "移动测试"));
controlTextMap.Add("btnLeft_Text", ResourceCulture.GetString("FrmPointInfo_btnLeft_Text", "左移")); controlTextMap.Add("btnLeft_Text", ResourceCulture.GetString("FrmPointInfo_btnLeft_Text", "左移"));
controlTextMap.Add("btnRight_Text", ResourceCulture.GetString("FrmPointInfo_btnRight_Text", "右移")); controlTextMap.Add("btnRight_Text", ResourceCulture.GetString("FrmPointInfo_btnRight_Text", "右移"));
controlTextMap.Add("lblPolarities_Text", ResourceCulture.GetString("FrmPointInfo_lblPolarities_Text", "极性"));
return controlTextMap; return controlTextMap;
} }
...@@ -188,14 +189,45 @@ namespace TSA_V ...@@ -188,14 +189,45 @@ namespace TSA_V
"4=━━", "4=━━",
"5=□", "5=□",
"6=○", "6=○",
"7="+str7, //"7="+str7,
"8="+str8, //"8="+str8,
"9="+str9, //"9="+str9,
"10="+str10, //"10="+str10,
"11="+str11, //"11="+str11,
"12="+str12, //"12="+str12,
"13="+str13, //"13="+str13,
"14="+str14 //"14="+str14
};
return typeList;
}
public static string[] GetDirTypes()
{
string str7 = ResourceCulture.GetString(ResourceCulture.Type7, "极性_上方");
string str8 = ResourceCulture.GetString(ResourceCulture.Type8, "极性_下方");
string str9 = ResourceCulture.GetString(ResourceCulture.Type9, "极性_左方");
string str10 = ResourceCulture.GetString(ResourceCulture.Type10, "极性_右方");
string str11 = ResourceCulture.GetString(ResourceCulture.Type11, "极性_左上方");
string str12 = ResourceCulture.GetString(ResourceCulture.Type12, "极性_右上方");
string str13 = ResourceCulture.GetString(ResourceCulture.Type13, "极性_左下方");
string str14 = ResourceCulture.GetString(ResourceCulture.Type14, "极性_右下方");
string wu = ResourceCulture.GetString(ResourceCulture.Type_None, "无");
string[] typeList = new string[] {
//"1=●",
//"2=✚",
//"3=┃",
//"4=━━",
//"5=□",
//"6=○",
"0="+wu,
"1="+str7,
"2="+str8,
"3="+str9,
"4="+str10,
"5="+str11,
"6="+str12,
"7="+str13,
"8="+str14
}; };
return typeList; return typeList;
...@@ -860,6 +892,10 @@ namespace TSA_V ...@@ -860,6 +892,10 @@ namespace TSA_V
/// 极性_右下方 /// 极性_右下方
/// </summary> /// </summary>
internal static readonly string Type14 = "Type14"; internal static readonly string Type14 = "Type14";
/// <summary>
/// 无
/// </summary>
internal static readonly string Type_None= "无";
internal static readonly string CreateNew = "CreateNew"; internal static readonly string CreateNew = "CreateNew";
} }
......
...@@ -120,6 +120,12 @@ ...@@ -120,6 +120,12 @@
<Reference Include="System.Xml" /> <Reference Include="System.Xml" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Compile Include="frmBoard\FrmBomUpload.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="frmBoard\FrmBomUpload.Designer.cs">
<DependentUpon>FrmBomUpload.cs</DependentUpon>
</Compile>
<Compile Include="frmBoard\FrmCalibrate.cs"> <Compile Include="frmBoard\FrmCalibrate.cs">
<SubType>Form</SubType> <SubType>Form</SubType>
</Compile> </Compile>
...@@ -362,6 +368,9 @@ ...@@ -362,6 +368,9 @@
<EmbeddedResource Include="frmBoard\FrmBoardList.resx"> <EmbeddedResource Include="frmBoard\FrmBoardList.resx">
<DependentUpon>FrmBoardList.cs</DependentUpon> <DependentUpon>FrmBoardList.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
<EmbeddedResource Include="frmBoard\FrmBomUpload.resx">
<DependentUpon>FrmBomUpload.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="frmBoard\FrmCalibrate.resx"> <EmbeddedResource Include="frmBoard\FrmCalibrate.resx">
<DependentUpon>FrmCalibrate.cs</DependentUpon> <DependentUpon>FrmCalibrate.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
......
...@@ -57,6 +57,7 @@ ...@@ -57,6 +57,7 @@
this.label9 = new System.Windows.Forms.Label(); this.label9 = new System.Windows.Forms.Label();
this.txtCsvFileName = new System.Windows.Forms.TextBox(); this.txtCsvFileName = new System.Windows.Forms.TextBox();
this.groupBoxSelCom = new System.Windows.Forms.GroupBox(); this.groupBoxSelCom = new System.Windows.Forms.GroupBox();
this.rbBom = new System.Windows.Forms.RadioButton();
this.likSelCsvFile = new System.Windows.Forms.LinkLabel(); this.likSelCsvFile = new System.Windows.Forms.LinkLabel();
this.likDownFile = new System.Windows.Forms.LinkLabel(); this.likDownFile = new System.Windows.Forms.LinkLabel();
this.rdbUpload = new System.Windows.Forms.RadioButton(); this.rdbUpload = new System.Windows.Forms.RadioButton();
...@@ -67,7 +68,6 @@ ...@@ -67,7 +68,6 @@
this.groupBox_new = new System.Windows.Forms.GroupBox(); this.groupBox_new = new System.Windows.Forms.GroupBox();
this.linkLabel3 = new System.Windows.Forms.LinkLabel(); this.linkLabel3 = new System.Windows.Forms.LinkLabel();
this.linkLabel2 = new System.Windows.Forms.LinkLabel(); this.linkLabel2 = new System.Windows.Forms.LinkLabel();
this.radioButton1 = new System.Windows.Forms.RadioButton();
this.groupBoxSelCom.SuspendLayout(); this.groupBoxSelCom.SuspendLayout();
this.groupBox_new.SuspendLayout(); this.groupBox_new.SuspendLayout();
this.SuspendLayout(); this.SuspendLayout();
...@@ -342,7 +342,7 @@ ...@@ -342,7 +342,7 @@
// //
// groupBoxSelCom // groupBoxSelCom
// //
this.groupBoxSelCom.Controls.Add(this.radioButton1); this.groupBoxSelCom.Controls.Add(this.rbBom);
this.groupBoxSelCom.Controls.Add(this.likSelCsvFile); this.groupBoxSelCom.Controls.Add(this.likSelCsvFile);
this.groupBoxSelCom.Controls.Add(this.likDownFile); this.groupBoxSelCom.Controls.Add(this.likDownFile);
this.groupBoxSelCom.Controls.Add(this.rdbUpload); this.groupBoxSelCom.Controls.Add(this.rdbUpload);
...@@ -350,13 +350,25 @@ ...@@ -350,13 +350,25 @@
this.groupBoxSelCom.Controls.Add(this.cmbBomList); this.groupBoxSelCom.Controls.Add(this.cmbBomList);
this.groupBoxSelCom.Controls.Add(this.txtCsvFileName); this.groupBoxSelCom.Controls.Add(this.txtCsvFileName);
this.groupBoxSelCom.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.groupBoxSelCom.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.groupBoxSelCom.Location = new System.Drawing.Point(390, 12); this.groupBoxSelCom.Location = new System.Drawing.Point(390, 6);
this.groupBoxSelCom.Name = "groupBoxSelCom"; this.groupBoxSelCom.Name = "groupBoxSelCom";
this.groupBoxSelCom.Size = new System.Drawing.Size(273, 317); this.groupBoxSelCom.Size = new System.Drawing.Size(273, 317);
this.groupBoxSelCom.TabIndex = 298; this.groupBoxSelCom.TabIndex = 298;
this.groupBoxSelCom.TabStop = false; this.groupBoxSelCom.TabStop = false;
this.groupBoxSelCom.Text = "请选择元器件库"; this.groupBoxSelCom.Text = "请选择元器件库";
// //
// rbBom
//
this.rbBom.AutoSize = true;
this.rbBom.Location = new System.Drawing.Point(7, 271);
this.rbBom.Name = "rbBom";
this.rbBom.Size = new System.Drawing.Size(80, 21);
this.rbBom.TabIndex = 302;
this.rbBom.TabStop = true;
this.rbBom.Text = "BOM上传";
this.rbBom.UseVisualStyleBackColor = true;
this.rbBom.CheckedChanged += new System.EventHandler(this.rbBom_CheckedChanged);
//
// likSelCsvFile // likSelCsvFile
// //
this.likSelCsvFile.AutoSize = true; this.likSelCsvFile.AutoSize = true;
...@@ -419,16 +431,18 @@ ...@@ -419,16 +431,18 @@
// xyMoveControl1 // xyMoveControl1
// //
this.xyMoveControl1.BackColor = System.Drawing.Color.White; this.xyMoveControl1.BackColor = System.Drawing.Color.White;
this.xyMoveControl1.Cursor = System.Windows.Forms.Cursors.Default;
this.xyMoveControl1.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.xyMoveControl1.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.xyMoveControl1.GroupName = "坐标"; this.xyMoveControl1.GroupName = "坐标";
this.xyMoveControl1.Location = new System.Drawing.Point(16, 335); this.xyMoveControl1.Location = new System.Drawing.Point(16, 325);
this.xyMoveControl1.Name = "xyMoveControl1"; this.xyMoveControl1.Name = "xyMoveControl1";
this.xyMoveControl1.PenWidth = 2; this.xyMoveControl1.PenWidth = 2;
this.xyMoveControl1.PointSizeX = 5; this.xyMoveControl1.PointSizeX = 5;
this.xyMoveControl1.PointSizeY = 5; this.xyMoveControl1.PointSizeY = 5;
this.xyMoveControl1.PointType = 1; this.xyMoveControl1.PointType = 1;
this.xyMoveControl1.PolaritiesType = 0;
this.xyMoveControl1.ShowText = ""; this.xyMoveControl1.ShowText = "";
this.xyMoveControl1.Size = new System.Drawing.Size(654, 303); this.xyMoveControl1.Size = new System.Drawing.Size(654, 316);
this.xyMoveControl1.TabIndex = 287; this.xyMoveControl1.TabIndex = 287;
this.xyMoveControl1.XValue = 1D; this.xyMoveControl1.XValue = 1D;
this.xyMoveControl1.YValue = 1D; this.xyMoveControl1.YValue = 1D;
...@@ -455,7 +469,7 @@ ...@@ -455,7 +469,7 @@
this.groupBox_new.Controls.Add(this.txtBoardL); this.groupBox_new.Controls.Add(this.txtBoardL);
this.groupBox_new.Controls.Add(this.label5); this.groupBox_new.Controls.Add(this.label5);
this.groupBox_new.Controls.Add(this.label4); this.groupBox_new.Controls.Add(this.label4);
this.groupBox_new.Location = new System.Drawing.Point(21, 12); this.groupBox_new.Location = new System.Drawing.Point(21, 6);
this.groupBox_new.Name = "groupBox_new"; this.groupBox_new.Name = "groupBox_new";
this.groupBox_new.Size = new System.Drawing.Size(363, 317); this.groupBox_new.Size = new System.Drawing.Size(363, 317);
this.groupBox_new.TabIndex = 303; this.groupBox_new.TabIndex = 303;
...@@ -485,21 +499,10 @@ ...@@ -485,21 +499,10 @@
this.linkLabel2.Text = "选择Gerber文件"; this.linkLabel2.Text = "选择Gerber文件";
this.linkLabel2.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabel2_LinkClicked); this.linkLabel2.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabel2_LinkClicked);
// //
// radioButton1
//
this.radioButton1.AutoSize = true;
this.radioButton1.Location = new System.Drawing.Point(7, 271);
this.radioButton1.Name = "radioButton1";
this.radioButton1.Size = new System.Drawing.Size(80, 21);
this.radioButton1.TabIndex = 302;
this.radioButton1.TabStop = true;
this.radioButton1.Text = "BOM上传";
this.radioButton1.UseVisualStyleBackColor = true;
//
// FrmAddBoard // FrmAddBoard
// //
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
this.ClientSize = new System.Drawing.Size(688, 778); this.ClientSize = new System.Drawing.Size(688, 740);
this.Controls.Add(this.groupBox_new); this.Controls.Add(this.groupBox_new);
this.Controls.Add(this.groupBoxSelCom); this.Controls.Add(this.groupBoxSelCom);
this.Controls.Add(this.chbSort); this.Controls.Add(this.chbSort);
...@@ -561,6 +564,6 @@ ...@@ -561,6 +564,6 @@
private System.Windows.Forms.GroupBox groupBox_new; private System.Windows.Forms.GroupBox groupBox_new;
private System.Windows.Forms.LinkLabel linkLabel2; private System.Windows.Forms.LinkLabel linkLabel2;
private System.Windows.Forms.LinkLabel linkLabel3; private System.Windows.Forms.LinkLabel linkLabel3;
private System.Windows.Forms.RadioButton radioButton1; private System.Windows.Forms.RadioButton rbBom;
} }
} }
\ No newline at end of file \ No newline at end of file
...@@ -12,6 +12,7 @@ using System.Threading.Tasks; ...@@ -12,6 +12,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;
using UserFromControl; using UserFromControl;
...@@ -40,7 +41,7 @@ namespace TSA_V ...@@ -40,7 +41,7 @@ namespace TSA_V
//"10="+str10 //"10="+str10
//}; //};
xyMoveControl1.loadTypeList(ResourceCulture.GetPTypes(), ResourceCulture.GetXYControlMap()); xyMoveControl1.loadTypeList(ResourceCulture.GetPTypes(), ResourceCulture.GetDirTypes(), ResourceCulture.GetXYControlMap());
} }
private void btnCancel_Click(object sender, EventArgs e) private void btnCancel_Click(object sender, EventArgs e)
...@@ -175,6 +176,7 @@ namespace TSA_V ...@@ -175,6 +176,7 @@ namespace TSA_V
int pointSizeY = xyMoveControl1.PointSizeY; int pointSizeY = xyMoveControl1.PointSizeY;
int pointType = xyMoveControl1.PointType; int pointType = xyMoveControl1.PointType;
int penWidth = xyMoveControl1.PenWidth; int penWidth = xyMoveControl1.PenWidth;
int PolaritiesType = xyMoveControl1.PolaritiesType;
foreach (ComponetInfo com in comList) foreach (ComponetInfo com in comList)
{ {
double x =com.PositionX+ pianYiX; double x =com.PositionX+ pianYiX;
...@@ -195,7 +197,7 @@ namespace TSA_V ...@@ -195,7 +197,7 @@ namespace TSA_V
y = board.boardLength - y; y = board.boardLength - y;
x = board.boardWidth - x; x = board.boardWidth - x;
} }
SMTPointInfo point = new SMTPointInfo(i, com.TagNo, com.PN, x, y, com.PositionNum,com.Text, pointType,pointSizeX,pointSizeY,penWidth); SMTPointInfo point = new SMTPointInfo(i, com.TagNo, com.PN, x, y, com.PositionNum,com.Text, pointType,pointSizeX,pointSizeY,penWidth, PolaritiesType);
y = board.boardLength - y; y = board.boardLength - y;
...@@ -323,7 +325,7 @@ namespace TSA_V ...@@ -323,7 +325,7 @@ namespace TSA_V
xyMoveControl1.ShowText = ""; xyMoveControl1.ShowText = "";
rdbUpload.Checked = true; rdbUpload.Checked = true;
ComChange(true); ComChange( );
if (IOBase.NoLine) if (IOBase.NoLine)
{ {
...@@ -357,23 +359,40 @@ namespace TSA_V ...@@ -357,23 +359,40 @@ namespace TSA_V
xyMoveControl1.UpdateStatus(); xyMoveControl1.UpdateStatus();
} }
private void ComChange(bool isUploadSel) private void ComChange( )
{ {
txtCsvFileName.Visible = isUploadSel; if (rdbUpload.Checked) {
likDownFile.Visible = isUploadSel; txtCsvFileName.Visible = true ;
likSelCsvFile.Visible = isUploadSel; likDownFile.Visible = true ;
likSelCsvFile.Visible = true;
cmbBomList.Visible = false ;
}
else if (rdbSelCom.Checked)
{
txtCsvFileName.Visible = false ;
likDownFile.Visible = false ;
likSelCsvFile.Visible = false ;
cmbBomList.Visible = true ;
}
else if (rbBom.Checked)
{
FrmBomUpload frm = new FrmBomUpload();
DialogResult resut= frm.ShowDialog();
if(resut.Equals(DialogResult.OK) )
{
cmbBomList.Visible = !isUploadSel;
}
}
} }
private void rdbUpload_CheckedChanged(object sender, EventArgs e) private void rdbUpload_CheckedChanged(object sender, EventArgs e)
{ {
ComChange(rdbUpload.Checked); ComChange( );
} }
private void rdbSelCom_CheckedChanged(object sender, EventArgs e) private void rdbSelCom_CheckedChanged(object sender, EventArgs e)
{ {
ComChange(!rdbSelCom.Checked); ComChange( );
} }
private void btnOpenFile_Click(object sender, LinkLabelLinkClickedEventArgs e) private void btnOpenFile_Click(object sender, LinkLabelLinkClickedEventArgs e)
...@@ -552,5 +571,10 @@ namespace TSA_V ...@@ -552,5 +571,10 @@ namespace TSA_V
{ {
} }
private void rbBom_CheckedChanged(object sender, EventArgs e)
{
ComChange();
}
} }
} }
...@@ -28,15 +28,14 @@ ...@@ -28,15 +28,14 @@
/// </summary> /// </summary>
private void InitializeComponent() private void InitializeComponent()
{ {
this.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmBoardInfo)); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmBoardInfo));
this.contextMenuStrip1 = new System.Windows.Forms.ContextMenuStrip(this.components); this.contextMenuStrip1 = new System.Windows.Forms.ContextMenuStrip();
this.记录为组装坐标ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.记录为组装坐标ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.更新为组装坐标ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.更新为组装坐标ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.新增ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.新增ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.openFileDialog1 = new System.Windows.Forms.OpenFileDialog(); this.openFileDialog1 = new System.Windows.Forms.OpenFileDialog();
this.toolTip1 = new System.Windows.Forms.ToolTip(this.components); this.toolTip1 = new System.Windows.Forms.ToolTip();
this.contextMenuStrip2 = new System.Windows.Forms.ContextMenuStrip(this.components); this.contextMenuStrip2 = new System.Windows.Forms.ContextMenuStrip();
this.测试位置ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.测试位置ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.详情ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.详情ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.删除ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.删除ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
...@@ -47,7 +46,7 @@ ...@@ -47,7 +46,7 @@
this.全部启用ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.全部启用ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.全部禁用ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.全部禁用ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.自动排序ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.自动排序ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.timer1 = new System.Windows.Forms.Timer(this.components); this.timer1 = new System.Windows.Forms.Timer();
this.backgroundWorker1 = new System.ComponentModel.BackgroundWorker(); this.backgroundWorker1 = new System.ComponentModel.BackgroundWorker();
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();
...@@ -115,6 +114,7 @@ ...@@ -115,6 +114,7 @@
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.col_IsEdit = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.col_Polarities = 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();
...@@ -594,6 +594,7 @@ ...@@ -594,6 +594,7 @@
this.Column_disable, this.Column_disable,
this.Column_Notes, this.Column_Notes,
this.col_IsEdit, this.col_IsEdit,
this.col_Polarities,
this.Column_getPosition, this.Column_getPosition,
this.Column_MoveTest, this.Column_MoveTest,
this.Column_btnDetail, this.Column_btnDetail,
...@@ -979,6 +980,12 @@ ...@@ -979,6 +980,12 @@
this.col_IsEdit.ReadOnly = true; this.col_IsEdit.ReadOnly = true;
this.col_IsEdit.Visible = false; this.col_IsEdit.Visible = false;
// //
// col_Polarities
//
this.col_Polarities.HeaderText = "极性";
this.col_Polarities.Name = "col_Polarities";
this.col_Polarities.Visible = false;
//
// Column_getPosition // Column_getPosition
// //
this.Column_getPosition.HeaderText = "更新坐标"; this.Column_getPosition.HeaderText = "更新坐标";
...@@ -1164,6 +1171,7 @@ ...@@ -1164,6 +1171,7 @@
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.DataGridViewTextBoxColumn col_IsEdit;
private System.Windows.Forms.DataGridViewTextBoxColumn col_Polarities;
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;
......
...@@ -314,6 +314,7 @@ namespace TSA_V ...@@ -314,6 +314,7 @@ namespace TSA_V
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; view.Cells[col_IsEdit.Index].Value=point.IsEdit;
view.Cells[col_Polarities.Index].Value = point.PolaritiesType;
if (updateBoardInfo != null) if (updateBoardInfo != null)
{ {
...@@ -492,6 +493,7 @@ namespace TSA_V ...@@ -492,6 +493,7 @@ namespace TSA_V
int penWidth = Int32.Parse(dgvList.Rows[rowIndex].Cells[this.Column_PenWidth.Name].Value.ToString()); int penWidth = Int32.Parse(dgvList.Rows[rowIndex].Cells[this.Column_PenWidth.Name].Value.ToString());
string name = dgvList.Rows[rowIndex].Cells[this.Column_Name.Name].Value.ToString(); string name = dgvList.Rows[rowIndex].Cells[this.Column_Name.Name].Value.ToString();
string showText = dgvList.Rows[rowIndex].Cells[this.Column_ShowText.Name].Value.ToString(); string showText = dgvList.Rows[rowIndex].Cells[this.Column_ShowText.Name].Value.ToString();
int polaritiesType = Int32.Parse( dgvList.Rows[rowIndex].Cells[this.col_Polarities.Name].Value.ToString());
//判断位置是否超出范围 //判断位置是否超出范围
if (!TSAVBean.IsValidPosition(x, y)) if (!TSAVBean.IsValidPosition(x, y))
{ {
...@@ -501,7 +503,7 @@ namespace TSA_V ...@@ -501,7 +503,7 @@ namespace TSA_V
else else
{ {
FrmProjectorScreen.instance.ClearPoint(); FrmProjectorScreen.instance.ClearPoint();
FrmProjectorScreen.instance.ShowPoint(new ProjectorPInfo((int)x, (int)y, type, sizeX, sizeY, penWidth, showText,btnColorChange.BackColor.ToArgb())); FrmProjectorScreen.instance.ShowPoint(new ProjectorPInfo((int)x, (int)y, type, polaritiesType, sizeX, sizeY, penWidth, showText,btnColorChange.BackColor.ToArgb()));
} }
} }
...@@ -722,6 +724,7 @@ namespace TSA_V ...@@ -722,6 +724,7 @@ namespace TSA_V
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()); point.IsEdit = Convert.ToBoolean(row.Cells[this.col_IsEdit.Name].Value.ToString());
point.PolaritiesType = Convert.ToInt32(row.Cells[this.col_Polarities.Name].Value.ToString());
} }
catch (Exception ex) catch (Exception ex)
{ {
......
...@@ -216,6 +216,9 @@ ...@@ -216,6 +216,9 @@
<metadata name="col_IsEdit.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <metadata name="col_IsEdit.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_Polarities.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>
......
namespace TSA_V.frmBoard
{
partial class FrmBomUpload
{
/// <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.groupBox1 = new System.Windows.Forms.GroupBox();
this.linkSelXy = new System.Windows.Forms.LinkLabel();
this.linkSelBom = new System.Windows.Forms.LinkLabel();
this.label3 = new System.Windows.Forms.Label();
this.txtXyFile = new System.Windows.Forms.TextBox();
this.label2 = new System.Windows.Forms.Label();
this.txtBomFile = new System.Windows.Forms.TextBox();
this.groupBox2 = new System.Windows.Forms.GroupBox();
this.cmbTagNumber2 = new System.Windows.Forms.ComboBox();
this.label8 = new System.Windows.Forms.Label();
this.label7 = new System.Windows.Forms.Label();
this.label6 = new System.Windows.Forms.Label();
this.cmbDes = new System.Windows.Forms.ComboBox();
this.cmbY = new System.Windows.Forms.ComboBox();
this.cmbX = new System.Windows.Forms.ComboBox();
this.cmbTagNumber = new System.Windows.Forms.ComboBox();
this.cmbPn = new System.Windows.Forms.ComboBox();
this.label4 = new System.Windows.Forms.Label();
this.label1 = new System.Windows.Forms.Label();
this.btnCancel = new System.Windows.Forms.Button();
this.btnUpload = new System.Windows.Forms.Button();
this.openFileDialog1 = new System.Windows.Forms.OpenFileDialog();
this.groupBox1.SuspendLayout();
this.groupBox2.SuspendLayout();
this.SuspendLayout();
//
// groupBox1
//
this.groupBox1.Controls.Add(this.linkSelXy);
this.groupBox1.Controls.Add(this.linkSelBom);
this.groupBox1.Controls.Add(this.label3);
this.groupBox1.Controls.Add(this.txtXyFile);
this.groupBox1.Controls.Add(this.label2);
this.groupBox1.Controls.Add(this.txtBomFile);
this.groupBox1.Location = new System.Drawing.Point(22, 13);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(742, 128);
this.groupBox1.TabIndex = 0;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "请选择文件";
//
// linkSelXy
//
this.linkSelXy.AutoSize = true;
this.linkSelXy.Location = new System.Drawing.Point(44, 85);
this.linkSelXy.Name = "linkSelXy";
this.linkSelXy.Size = new System.Drawing.Size(65, 12);
this.linkSelXy.TabIndex = 305;
this.linkSelXy.TabStop = true;
this.linkSelXy.Text = "选择XY文件";
this.linkSelXy.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkSelXy_LinkClicked);
//
// linkSelBom
//
this.linkSelBom.AutoSize = true;
this.linkSelBom.Location = new System.Drawing.Point(44, 29);
this.linkSelBom.Name = "linkSelBom";
this.linkSelBom.Size = new System.Drawing.Size(71, 12);
this.linkSelBom.TabIndex = 304;
this.linkSelBom.TabStop = true;
this.linkSelBom.Text = "选择Bom文件";
this.linkSelBom.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkSelBom_LinkClicked);
//
// label3
//
this.label3.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label3.Location = new System.Drawing.Point(561, 21);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(118, 20);
this.label3.TabIndex = 79;
this.label3.Text = "XY文件:";
this.label3.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// txtXyFile
//
this.txtXyFile.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtXyFile.Location = new System.Drawing.Point(130, 69);
this.txtXyFile.MaxLength = 20;
this.txtXyFile.Multiline = true;
this.txtXyFile.Name = "txtXyFile";
this.txtXyFile.Size = new System.Drawing.Size(342, 43);
this.txtXyFile.TabIndex = 78;
//
// label2
//
this.label2.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label2.Location = new System.Drawing.Point(584, 57);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(118, 20);
this.label2.TabIndex = 77;
this.label2.Text = "XY文件:";
this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// txtBomFile
//
this.txtBomFile.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtBomFile.Location = new System.Drawing.Point(132, 20);
this.txtBomFile.MaxLength = 20;
this.txtBomFile.Multiline = true;
this.txtBomFile.Name = "txtBomFile";
this.txtBomFile.Size = new System.Drawing.Size(342, 43);
this.txtBomFile.TabIndex = 76;
//
// groupBox2
//
this.groupBox2.Controls.Add(this.cmbTagNumber2);
this.groupBox2.Controls.Add(this.label8);
this.groupBox2.Controls.Add(this.label7);
this.groupBox2.Controls.Add(this.label6);
this.groupBox2.Controls.Add(this.cmbDes);
this.groupBox2.Controls.Add(this.cmbY);
this.groupBox2.Controls.Add(this.cmbX);
this.groupBox2.Controls.Add(this.cmbTagNumber);
this.groupBox2.Controls.Add(this.cmbPn);
this.groupBox2.Controls.Add(this.label4);
this.groupBox2.Controls.Add(this.label1);
this.groupBox2.Location = new System.Drawing.Point(22, 148);
this.groupBox2.Name = "groupBox2";
this.groupBox2.Size = new System.Drawing.Size(742, 404);
this.groupBox2.TabIndex = 1;
this.groupBox2.TabStop = false;
this.groupBox2.Text = "请选择对应关系";
//
// cmbTagNumber2
//
this.cmbTagNumber2.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cmbTagNumber2.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.cmbTagNumber2.FormattingEnabled = true;
this.cmbTagNumber2.Location = new System.Drawing.Point(411, 20);
this.cmbTagNumber2.Name = "cmbTagNumber2";
this.cmbTagNumber2.Size = new System.Drawing.Size(220, 28);
this.cmbTagNumber2.TabIndex = 318;
//
// label8
//
this.label8.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label8.Location = new System.Drawing.Point(43, 135);
this.label8.Name = "label8";
this.label8.Size = new System.Drawing.Size(118, 20);
this.label8.TabIndex = 317;
this.label8.Text = "X坐标:";
this.label8.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// label7
//
this.label7.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label7.Location = new System.Drawing.Point(43, 185);
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(118, 20);
this.label7.TabIndex = 316;
this.label7.Text = "Y坐标:";
this.label7.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// label6
//
this.label6.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label6.Location = new System.Drawing.Point(43, 235);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(118, 20);
this.label6.TabIndex = 315;
this.label6.Text = "说明:";
this.label6.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// cmbDes
//
this.cmbDes.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cmbDes.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.cmbDes.FormattingEnabled = true;
this.cmbDes.Location = new System.Drawing.Point(167, 231);
this.cmbDes.Name = "cmbDes";
this.cmbDes.Size = new System.Drawing.Size(220, 28);
this.cmbDes.TabIndex = 312;
//
// cmbY
//
this.cmbY.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cmbY.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.cmbY.FormattingEnabled = true;
this.cmbY.Location = new System.Drawing.Point(167, 181);
this.cmbY.Name = "cmbY";
this.cmbY.Size = new System.Drawing.Size(220, 28);
this.cmbY.TabIndex = 311;
//
// cmbX
//
this.cmbX.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cmbX.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.cmbX.FormattingEnabled = true;
this.cmbX.Location = new System.Drawing.Point(167, 131);
this.cmbX.Name = "cmbX";
this.cmbX.Size = new System.Drawing.Size(220, 28);
this.cmbX.TabIndex = 310;
//
// cmbTagNumber
//
this.cmbTagNumber.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cmbTagNumber.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.cmbTagNumber.FormattingEnabled = true;
this.cmbTagNumber.Location = new System.Drawing.Point(167, 20);
this.cmbTagNumber.Name = "cmbTagNumber";
this.cmbTagNumber.Size = new System.Drawing.Size(220, 28);
this.cmbTagNumber.TabIndex = 309;
//
// cmbPn
//
this.cmbPn.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cmbPn.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.cmbPn.FormattingEnabled = true;
this.cmbPn.Location = new System.Drawing.Point(167, 76);
this.cmbPn.Name = "cmbPn";
this.cmbPn.Size = new System.Drawing.Size(220, 28);
this.cmbPn.TabIndex = 308;
//
// label4
//
this.label4.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label4.Location = new System.Drawing.Point(43, 24);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(118, 20);
this.label4.TabIndex = 307;
this.label4.Text = "位号:";
this.label4.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// label1
//
this.label1.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label1.Location = new System.Drawing.Point(43, 80);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(118, 20);
this.label1.TabIndex = 306;
this.label1.Text = "物料编码:";
this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// btnCancel
//
this.btnCancel.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnCancel.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnCancel.Location = new System.Drawing.Point(399, 571);
this.btnCancel.Name = "btnCancel";
this.btnCancel.Size = new System.Drawing.Size(120, 45);
this.btnCancel.TabIndex = 320;
this.btnCancel.Text = "取消";
this.btnCancel.UseVisualStyleBackColor = true;
this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click);
//
// btnUpload
//
this.btnUpload.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnUpload.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnUpload.Location = new System.Drawing.Point(270, 571);
this.btnUpload.Name = "btnUpload";
this.btnUpload.Size = new System.Drawing.Size(120, 45);
this.btnUpload.TabIndex = 319;
this.btnUpload.Text = "确定上传";
this.btnUpload.UseVisualStyleBackColor = true;
this.btnUpload.Click += new System.EventHandler(this.btnUpload_Click);
//
// openFileDialog1
//
this.openFileDialog1.FileName = "openFileDialog1";
//
// FrmBomUpload
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(800, 644);
this.Controls.Add(this.btnCancel);
this.Controls.Add(this.btnUpload);
this.Controls.Add(this.groupBox2);
this.Controls.Add(this.groupBox1);
this.Name = "FrmBomUpload";
this.Text = "BOM表上传";
this.groupBox1.ResumeLayout(false);
this.groupBox1.PerformLayout();
this.groupBox2.ResumeLayout(false);
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.GroupBox groupBox1;
private System.Windows.Forms.GroupBox groupBox2;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.TextBox txtXyFile;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.TextBox txtBomFile;
private System.Windows.Forms.LinkLabel linkSelXy;
private System.Windows.Forms.LinkLabel linkSelBom;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label8;
private System.Windows.Forms.Label label7;
private System.Windows.Forms.Label label6;
private System.Windows.Forms.ComboBox cmbDes;
private System.Windows.Forms.ComboBox cmbY;
private System.Windows.Forms.ComboBox cmbX;
private System.Windows.Forms.ComboBox cmbTagNumber;
private System.Windows.Forms.ComboBox cmbPn;
private System.Windows.Forms.ComboBox cmbTagNumber2;
private System.Windows.Forms.Button btnCancel;
private System.Windows.Forms.Button btnUpload;
private System.Windows.Forms.OpenFileDialog openFileDialog1;
}
}
\ No newline at end of file \ No newline at end of file
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace TSA_V.frmBoard
{
public partial class FrmBomUpload : FrmBase
{
public FrmBomUpload()
{
InitializeComponent();
}
private void linkSelBom_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
{
openFileDialog1.DefaultExt = "csv|xls|xlsx";
openFileDialog1.Filter = "csv|*.csv|xls|*.xls|xlsx|*.xlsx";
string directory = Environment.GetFolderPath(Environment.SpecialFolder.DesktopDirectory);//桌面路径
openFileDialog1.InitialDirectory = directory;
if (openFileDialog1.ShowDialog() == DialogResult.OK)
{
openFileDialog1.Tag = true;
txtBomFile.Text=openFileDialog1.FileName;
ReadBomFile(openFileDialog1.FileName);
}
else
{
openFileDialog1.FileName = "";
}
}
private void ReadBomFile(string fileName)
{
}
private void ReadXyFile(string fileName)
{
}
private void linkSelXy_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
{
openFileDialog1.DefaultExt = "csv|xls|xlsx";
openFileDialog1.Filter = "csv|*.csv|xls|*.xls|xlsx|*.xlsx";
string directory = Environment.GetFolderPath(Environment.SpecialFolder.DesktopDirectory);//桌面路径
openFileDialog1.InitialDirectory = directory;
if (openFileDialog1.ShowDialog() == DialogResult.OK)
{
openFileDialog1.Tag = true;
txtXyFile.Text = openFileDialog1.FileName;
ReadXyFile(openFileDialog1.FileName);
}
else
{
openFileDialog1.FileName = "";
}
}
private void btnUpload_Click(object sender, EventArgs e)
{
}
private void btnCancel_Click(object sender, EventArgs e)
{
this.Close();
}
}
}
<?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="openFileDialog1.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
...@@ -49,16 +49,18 @@ ...@@ -49,16 +49,18 @@
// xyMoveControl1 // xyMoveControl1
// //
this.xyMoveControl1.BackColor = System.Drawing.Color.White; this.xyMoveControl1.BackColor = System.Drawing.Color.White;
this.xyMoveControl1.Cursor = System.Windows.Forms.Cursors.Default;
this.xyMoveControl1.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.xyMoveControl1.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.xyMoveControl1.GroupName = "坐标"; this.xyMoveControl1.GroupName = "坐标";
this.xyMoveControl1.Location = new System.Drawing.Point(22, 20); this.xyMoveControl1.Location = new System.Drawing.Point(22, 12);
this.xyMoveControl1.Name = "xyMoveControl1"; this.xyMoveControl1.Name = "xyMoveControl1";
this.xyMoveControl1.PenWidth = 2; this.xyMoveControl1.PenWidth = 2;
this.xyMoveControl1.PointSizeX = 5; this.xyMoveControl1.PointSizeX = 5;
this.xyMoveControl1.PointSizeY = 5; this.xyMoveControl1.PointSizeY = 5;
this.xyMoveControl1.PointType = 1; this.xyMoveControl1.PointType = 1;
this.xyMoveControl1.PolaritiesType = 0;
this.xyMoveControl1.ShowText = ""; this.xyMoveControl1.ShowText = "";
this.xyMoveControl1.Size = new System.Drawing.Size(510, 303); this.xyMoveControl1.Size = new System.Drawing.Size(510, 320);
this.xyMoveControl1.TabIndex = 288; this.xyMoveControl1.TabIndex = 288;
this.xyMoveControl1.XValue = 1D; this.xyMoveControl1.XValue = 1D;
this.xyMoveControl1.YValue = 1D; this.xyMoveControl1.YValue = 1D;
...@@ -71,9 +73,9 @@ ...@@ -71,9 +73,9 @@
this.groupBox1.Controls.Add(this.btnLeftUp); this.groupBox1.Controls.Add(this.btnLeftUp);
this.groupBox1.Controls.Add(this.lblMsg); this.groupBox1.Controls.Add(this.lblMsg);
this.groupBox1.Controls.Add(this.xyMoveControl1); this.groupBox1.Controls.Add(this.xyMoveControl1);
this.groupBox1.Location = new System.Drawing.Point(12, 12); this.groupBox1.Location = new System.Drawing.Point(12, 2);
this.groupBox1.Name = "groupBox1"; this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(776, 368); this.groupBox1.Size = new System.Drawing.Size(776, 376);
this.groupBox1.TabIndex = 289; this.groupBox1.TabIndex = 289;
this.groupBox1.TabStop = false; this.groupBox1.TabStop = false;
this.groupBox1.Text = "投影标定"; this.groupBox1.Text = "投影标定";
...@@ -83,7 +85,7 @@ ...@@ -83,7 +85,7 @@
this.btnExit.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); 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.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.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.Location = new System.Drawing.Point(559, 253);
this.btnExit.Name = "btnExit"; this.btnExit.Name = "btnExit";
this.btnExit.Size = new System.Drawing.Size(180, 45); this.btnExit.Size = new System.Drawing.Size(180, 45);
this.btnExit.TabIndex = 295; this.btnExit.TabIndex = 295;
...@@ -96,7 +98,7 @@ ...@@ -96,7 +98,7 @@
this.btnCal.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); 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.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.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.Location = new System.Drawing.Point(559, 188);
this.btnCal.Name = "btnCal"; this.btnCal.Name = "btnCal";
this.btnCal.Size = new System.Drawing.Size(180, 45); this.btnCal.Size = new System.Drawing.Size(180, 45);
this.btnCal.TabIndex = 294; this.btnCal.TabIndex = 294;
...@@ -109,7 +111,7 @@ ...@@ -109,7 +111,7 @@
this.btnRightBottom.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); 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.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.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.Location = new System.Drawing.Point(559, 123);
this.btnRightBottom.Name = "btnRightBottom"; this.btnRightBottom.Name = "btnRightBottom";
this.btnRightBottom.Size = new System.Drawing.Size(180, 45); this.btnRightBottom.Size = new System.Drawing.Size(180, 45);
this.btnRightBottom.TabIndex = 293; this.btnRightBottom.TabIndex = 293;
...@@ -122,7 +124,7 @@ ...@@ -122,7 +124,7 @@
this.btnLeftUp.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); 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.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.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.Location = new System.Drawing.Point(559, 58);
this.btnLeftUp.Name = "btnLeftUp"; this.btnLeftUp.Name = "btnLeftUp";
this.btnLeftUp.Size = new System.Drawing.Size(180, 45); this.btnLeftUp.Size = new System.Drawing.Size(180, 45);
this.btnLeftUp.TabIndex = 292; this.btnLeftUp.TabIndex = 292;
...@@ -135,7 +137,7 @@ ...@@ -135,7 +137,7 @@
this.lblMsg.AutoSize = true; this.lblMsg.AutoSize = true;
this.lblMsg.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); 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.ForeColor = System.Drawing.Color.Red;
this.lblMsg.Location = new System.Drawing.Point(32, 339); this.lblMsg.Location = new System.Drawing.Point(32, 343);
this.lblMsg.Name = "lblMsg"; this.lblMsg.Name = "lblMsg";
this.lblMsg.Size = new System.Drawing.Size(522, 22); this.lblMsg.Size = new System.Drawing.Size(522, 22);
this.lblMsg.TabIndex = 289; this.lblMsg.TabIndex = 289;
...@@ -147,9 +149,9 @@ ...@@ -147,9 +149,9 @@
| System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right))); | System.Windows.Forms.AnchorStyles.Right)));
this.groupBox2.Controls.Add(this.panBoard); this.groupBox2.Controls.Add(this.panBoard);
this.groupBox2.Location = new System.Drawing.Point(13, 387); this.groupBox2.Location = new System.Drawing.Point(13, 381);
this.groupBox2.Name = "groupBox2"; this.groupBox2.Name = "groupBox2";
this.groupBox2.Size = new System.Drawing.Size(775, 318); this.groupBox2.Size = new System.Drawing.Size(775, 343);
this.groupBox2.TabIndex = 290; this.groupBox2.TabIndex = 290;
this.groupBox2.TabStop = false; this.groupBox2.TabStop = false;
this.groupBox2.Text = "图示"; this.groupBox2.Text = "图示";
...@@ -160,15 +162,15 @@ ...@@ -160,15 +162,15 @@
this.panBoard.Dock = System.Windows.Forms.DockStyle.Fill; this.panBoard.Dock = System.Windows.Forms.DockStyle.Fill;
this.panBoard.Location = new System.Drawing.Point(3, 17); this.panBoard.Location = new System.Drawing.Point(3, 17);
this.panBoard.Name = "panBoard"; this.panBoard.Name = "panBoard";
this.panBoard.Size = new System.Drawing.Size(769, 298); this.panBoard.Size = new System.Drawing.Size(769, 323);
this.panBoard.TabIndex = 1; this.panBoard.TabIndex = 1;
// //
// picBoard // picBoard
// //
this.picBoard.Image = global::TSA_V.Properties.Resources._202403181014; this.picBoard.Image = global::TSA_V.Properties.Resources._202403181014;
this.picBoard.Location = new System.Drawing.Point(32, 27); this.picBoard.Location = new System.Drawing.Point(32, 24);
this.picBoard.Name = "picBoard"; this.picBoard.Name = "picBoard";
this.picBoard.Size = new System.Drawing.Size(686, 242); this.picBoard.Size = new System.Drawing.Size(686, 269);
this.picBoard.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom; this.picBoard.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
this.picBoard.TabIndex = 0; this.picBoard.TabIndex = 0;
this.picBoard.TabStop = false; this.picBoard.TabStop = false;
......
...@@ -30,9 +30,10 @@ namespace TSA_V.frmBoard ...@@ -30,9 +30,10 @@ namespace TSA_V.frmBoard
SetPicSize(); SetPicSize();
LoadPoint(); LoadPoint();
timer1.Start(); timer1.Start();
xyMoveControl1.loadTypeList(ResourceCulture.GetPTypes(),ResourceCulture.GetXYControlMap()); xyMoveControl1.loadTypeList(ResourceCulture.GetPTypes(), ResourceCulture.GetDirTypes(), ResourceCulture.GetXYControlMap());
xyMoveControl1.ShowPointEvent += XyMoveControl1_ShowPointEvent; xyMoveControl1.ShowPointEvent += XyMoveControl1_ShowPointEvent;
xyMoveControl1.PointType = 2; xyMoveControl1.PointType = 2;
xyMoveControl1.PolaritiesType = 0;
xyMoveControl1.PointSizeX = 20; xyMoveControl1.PointSizeX = 20;
xyMoveControl1.PointSizeY = 20; xyMoveControl1.PointSizeY = 20;
xyMoveControl1.PenWidth = 4; xyMoveControl1.PenWidth = 4;
......
...@@ -319,6 +319,7 @@ ...@@ -319,6 +319,7 @@
this.xyMoveControl1.PointSizeX = 4; this.xyMoveControl1.PointSizeX = 4;
this.xyMoveControl1.PointSizeY = 1; this.xyMoveControl1.PointSizeY = 1;
this.xyMoveControl1.PointType = 1; this.xyMoveControl1.PointType = 1;
this.xyMoveControl1.PolaritiesType = 0;
this.xyMoveControl1.ShowText = ""; this.xyMoveControl1.ShowText = "";
this.xyMoveControl1.Size = new System.Drawing.Size(506, 315); this.xyMoveControl1.Size = new System.Drawing.Size(506, 315);
this.xyMoveControl1.TabIndex = 63; this.xyMoveControl1.TabIndex = 63;
......
...@@ -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(), ResourceCulture.GetXYControlMap()); xyMoveControl1.loadTypeList(ResourceCulture.GetPTypes(), ResourceCulture.GetDirTypes(), ResourceCulture.GetXYControlMap());
xyMoveControl1.ShowColor = boardInfo.PointColor; xyMoveControl1.ShowColor = boardInfo.PointColor;
} }
...@@ -113,7 +113,7 @@ namespace TSA_V ...@@ -113,7 +113,7 @@ namespace TSA_V
ShowPoint(null); ShowPoint(null);
xyMoveControl1.ShowColor = boardInfo.PointColor; xyMoveControl1.ShowColor = boardInfo.PointColor;
xyMoveControl1.loadTypeList(ResourceCulture.GetPTypes(), ResourceCulture.GetXYControlMap()); xyMoveControl1.loadTypeList(ResourceCulture.GetPTypes(), ResourceCulture.GetDirTypes(), ResourceCulture.GetXYControlMap());
} }
private void ShowPoint(SMTPointInfo prePoint) private void ShowPoint(SMTPointInfo prePoint)
...@@ -131,6 +131,7 @@ namespace TSA_V ...@@ -131,6 +131,7 @@ namespace TSA_V
xyMoveControl1.XValue = smtPointInfo.NodePositionX; xyMoveControl1.XValue = smtPointInfo.NodePositionX;
xyMoveControl1.YValue = smtPointInfo.NodePositionY; xyMoveControl1.YValue = smtPointInfo.NodePositionY;
xyMoveControl1.PointType = smtPointInfo.PointType; xyMoveControl1.PointType = smtPointInfo.PointType;
xyMoveControl1.PolaritiesType= smtPointInfo.PolaritiesType;
xyMoveControl1.PointSizeX = smtPointInfo.PointSizeX; xyMoveControl1.PointSizeX = smtPointInfo.PointSizeX;
xyMoveControl1.PointSizeY = smtPointInfo.PointSizeY; xyMoveControl1.PointSizeY = smtPointInfo.PointSizeY;
xyMoveControl1.PenWidth = smtPointInfo.PenWidth; xyMoveControl1.PenWidth = smtPointInfo.PenWidth;
...@@ -144,6 +145,7 @@ namespace TSA_V ...@@ -144,6 +145,7 @@ namespace TSA_V
xyMoveControl1.PointSizeX = prePoint.PointSizeX; xyMoveControl1.PointSizeX = prePoint.PointSizeX;
xyMoveControl1.PointSizeY = prePoint.PointSizeY; xyMoveControl1.PointSizeY = prePoint.PointSizeY;
xyMoveControl1.PenWidth = prePoint.PenWidth; xyMoveControl1.PenWidth = prePoint.PenWidth;
xyMoveControl1.PolaritiesType = prePoint.PolaritiesType;
} }
} }
xyMoveControl1.ShowCurrPoint(); xyMoveControl1.ShowCurrPoint();
...@@ -248,6 +250,7 @@ namespace TSA_V ...@@ -248,6 +250,7 @@ namespace TSA_V
smtPointInfo.PointSizeY = xyMoveControl1.PointSizeY; smtPointInfo.PointSizeY = xyMoveControl1.PointSizeY;
smtPointInfo.PenWidth = xyMoveControl1.PenWidth; smtPointInfo.PenWidth = xyMoveControl1.PenWidth;
smtPointInfo.ShowText = xyMoveControl1.ShowText; smtPointInfo.ShowText = xyMoveControl1.ShowText;
smtPointInfo.PolaritiesType= xyMoveControl1.PolaritiesType;
smtPointInfo.NeedSoldering = chbNeedSoldering.Checked; smtPointInfo.NeedSoldering = chbNeedSoldering.Checked;
smtPointInfo.NeedCheck = chbNeedCheck.Checked; smtPointInfo.NeedCheck = chbNeedCheck.Checked;
smtPointInfo.WeldTime = FormUtil.getDoubleValue(txtWeldTime); smtPointInfo.WeldTime = FormUtil.getDoubleValue(txtWeldTime);
......
...@@ -223,7 +223,7 @@ namespace TSA_V ...@@ -223,7 +223,7 @@ namespace TSA_V
} }
} }
private void DrawPoint(Color color, Graphics g, int x, int y, int type = 0, int sizeX = 2, int sizeY = 2, int lineLength = 2, string name = "") private void DrawPoint(Color color, Graphics g, int x, int y, int type = 0, int PolaritiesType=0, int sizeX = 2, int sizeY = 2, int lineLength = 2, string name = "")
{ {
if (sizeX < 2) if (sizeX < 2)
{ {
...@@ -263,7 +263,97 @@ namespace TSA_V ...@@ -263,7 +263,97 @@ namespace TSA_V
{ {
g.DrawEllipse(pen, x - sizeX / 2, y - sizeY / 2, sizeX, sizeY); g.DrawEllipse(pen, x - sizeX / 2, y - sizeY / 2, sizeX, sizeY);
} }
else if (type.Equals(PointType_Define.Plus_Up_7)) else if(type> PointType_Define.Cycle_6)
{
g.DrawRectangle(pen, x - sizeX / 2, y - sizeY / 2, sizeX, sizeY);
}
else
{
g.FillEllipse(myBrush, new Rectangle(x - sizeX / 2, y - sizeY / 2, sizeX, sizeY));//画实心椭圆
}
//else if (type.Equals(PointType_Define.Plus_Up_7))
//{
// int plusSize = sizeX / 2;
// int pX = x;
// int pY = y - sizeY / 2 - lineLength - plusSize;
// g.DrawLine(pen, new Point(pX - plusSize, pY), new Point(pX + plusSize, pY));
// g.DrawLine(pen, new Point(pX, pY - plusSize), new Point(pX, pY + plusSize));
// g.DrawRectangle(pen, x - sizeX / 2, y - sizeY / 2, sizeX, sizeY);
//}
//else if (type.Equals(PointType_Define.Plus_Down_8))
//{
// g.DrawRectangle(pen, x - sizeX / 2, y - sizeY / 2, sizeX, sizeY);
// int plusSize = sizeX / 2;
// int pX = x;
// int pY = y + sizeY / 2 + lineLength + plusSize;
// g.DrawLine(pen, new Point(pX - plusSize, pY), new Point(pX + plusSize, pY));
// g.DrawLine(pen, new Point(pX, pY - plusSize), new Point(pX, pY + plusSize));
//}
//else if (type.Equals(PointType_Define.Plus_Left_9))
//{
// g.DrawRectangle(pen, x - sizeX / 2, y - sizeY / 2, sizeX, sizeY);
// int plusSize = sizeY / 2;
// int pX = x - sizeX / 2 - lineLength - plusSize;
// int pY = y;
// g.DrawLine(pen, new Point(pX - plusSize, pY), new Point(pX + plusSize, pY));
// g.DrawLine(pen, new Point(pX, pY - plusSize), new Point(pX, pY + plusSize));
//}
//else if (type.Equals(PointType_Define.Plus_Right_10))
//{
// g.DrawRectangle(pen, x - sizeX / 2, y - sizeY / 2, sizeX, sizeY);
// int plusSize = sizeY / 2;
// int pX = x + sizeX / 2 + lineLength + plusSize;
// int pY = y;
// g.DrawLine(pen, new Point(pX - plusSize, pY), new Point(pX + plusSize, pY));
// g.DrawLine(pen, new Point(pX, pY - plusSize), new Point(pX, pY + plusSize));
//}
//else if (type.Equals(PointType_Define.Plus_LUp_11))
//{
// int plusSize = sizeX / 2;
// int pX = x-plusSize;
// int pY = y - sizeY / 2 - lineLength - plusSize;
// g.DrawLine(pen, new Point(pX - plusSize, pY), new Point(pX + plusSize, pY));
// g.DrawLine(pen, new Point(pX, pY - plusSize), new Point(pX, pY + plusSize));
// g.DrawRectangle(pen, x - sizeX / 2, y - sizeY / 2, sizeX, sizeY);
//}
//else if (type.Equals(PointType_Define.Plus_RUp_12))
//{
// int plusSize = sizeX / 2;
// int pX = x + plusSize;
// int pY = y - sizeY / 2 - lineLength - plusSize;
// g.DrawLine(pen, new Point(pX - plusSize, pY), new Point(pX + plusSize, pY));
// g.DrawLine(pen, new Point(pX, pY - plusSize), new Point(pX, pY + plusSize));
// g.DrawRectangle(pen, x - sizeX / 2, y - sizeY / 2, sizeX, sizeY);
//}
//else if (type.Equals(PointType_Define.Plus_LDown_13))
//{
// g.DrawRectangle(pen, x - sizeX / 2, y - sizeY / 2, sizeX, sizeY);
// int plusSize = sizeX / 2;
// int pX = x-plusSize;
// int pY = y + sizeY / 2 + lineLength + plusSize;
// g.DrawLine(pen, new Point(pX - plusSize, pY), new Point(pX + plusSize, pY));
// g.DrawLine(pen, new Point(pX, pY - plusSize), new Point(pX, pY + plusSize));
//}
//else if (type.Equals(PointType_Define.Plus_RDown_14))
//{
// g.DrawRectangle(pen, x - sizeX / 2, y - sizeY / 2, sizeX, sizeY);
// int plusSize = sizeX / 2;
// int pX = x + plusSize;
// int pY = y + sizeY / 2 + lineLength + plusSize;
// g.DrawLine(pen, new Point(pX - plusSize, pY), new Point(pX + plusSize, pY));
// g.DrawLine(pen, new Point(pX, pY - plusSize), new Point(pX, pY + plusSize));
//}
if (PolaritiesType.Equals(PolaritiesType_Define.Plus_Up_1))
{ {
int plusSize = sizeX / 2; int plusSize = sizeX / 2;
int pX = x; int pX = x;
...@@ -271,11 +361,11 @@ namespace TSA_V ...@@ -271,11 +361,11 @@ namespace TSA_V
g.DrawLine(pen, new Point(pX - plusSize, pY), new Point(pX + plusSize, pY)); g.DrawLine(pen, new Point(pX - plusSize, pY), new Point(pX + plusSize, pY));
g.DrawLine(pen, new Point(pX, pY - plusSize), new Point(pX, pY + plusSize)); g.DrawLine(pen, new Point(pX, pY - plusSize), new Point(pX, pY + plusSize));
g.DrawRectangle(pen, x - sizeX / 2, y - sizeY / 2, sizeX, sizeY); // g.DrawRectangle(pen, x - sizeX / 2, y - sizeY / 2, sizeX, sizeY);
} }
else if (type.Equals(PointType_Define.Plus_Down_8)) else if (PolaritiesType.Equals(PolaritiesType_Define.Plus_Down_2))
{ {
g.DrawRectangle(pen, x - sizeX / 2, y - sizeY / 2, sizeX, sizeY); // g.DrawRectangle(pen, x - sizeX / 2, y - sizeY / 2, sizeX, sizeY);
int plusSize = sizeX / 2; int plusSize = sizeX / 2;
int pX = x; int pX = x;
...@@ -283,9 +373,9 @@ namespace TSA_V ...@@ -283,9 +373,9 @@ namespace TSA_V
g.DrawLine(pen, new Point(pX - plusSize, pY), new Point(pX + plusSize, pY)); g.DrawLine(pen, new Point(pX - plusSize, pY), new Point(pX + plusSize, pY));
g.DrawLine(pen, new Point(pX, pY - plusSize), new Point(pX, pY + plusSize)); g.DrawLine(pen, new Point(pX, pY - plusSize), new Point(pX, pY + plusSize));
} }
else if (type.Equals(PointType_Define.Plus_Left_9)) else if (PolaritiesType.Equals(PolaritiesType_Define.Plus_Left_3))
{ {
g.DrawRectangle(pen, x - sizeX / 2, y - sizeY / 2, sizeX, sizeY); // g.DrawRectangle(pen, x - sizeX / 2, y - sizeY / 2, sizeX, sizeY);
int plusSize = sizeY / 2; int plusSize = sizeY / 2;
int pX = x - sizeX / 2 - lineLength - plusSize; int pX = x - sizeX / 2 - lineLength - plusSize;
...@@ -293,9 +383,9 @@ namespace TSA_V ...@@ -293,9 +383,9 @@ namespace TSA_V
g.DrawLine(pen, new Point(pX - plusSize, pY), new Point(pX + plusSize, pY)); g.DrawLine(pen, new Point(pX - plusSize, pY), new Point(pX + plusSize, pY));
g.DrawLine(pen, new Point(pX, pY - plusSize), new Point(pX, pY + plusSize)); g.DrawLine(pen, new Point(pX, pY - plusSize), new Point(pX, pY + plusSize));
} }
else if (type.Equals(PointType_Define.Plus_Right_10)) else if (PolaritiesType.Equals(PolaritiesType_Define.Plus_Right_4))
{ {
g.DrawRectangle(pen, x - sizeX / 2, y - sizeY / 2, sizeX, sizeY); // g.DrawRectangle(pen, x - sizeX / 2, y - sizeY / 2, sizeX, sizeY);
int plusSize = sizeY / 2; int plusSize = sizeY / 2;
int pX = x + sizeX / 2 + lineLength + plusSize; int pX = x + sizeX / 2 + lineLength + plusSize;
...@@ -303,17 +393,17 @@ namespace TSA_V ...@@ -303,17 +393,17 @@ namespace TSA_V
g.DrawLine(pen, new Point(pX - plusSize, pY), new Point(pX + plusSize, pY)); g.DrawLine(pen, new Point(pX - plusSize, pY), new Point(pX + plusSize, pY));
g.DrawLine(pen, new Point(pX, pY - plusSize), new Point(pX, pY + plusSize)); g.DrawLine(pen, new Point(pX, pY - plusSize), new Point(pX, pY + plusSize));
} }
else if (type.Equals(PointType_Define.Plus_LUp_11)) else if (PolaritiesType.Equals(PolaritiesType_Define.Plus_LUp_5))
{ {
int plusSize = sizeX / 2; int plusSize = sizeX / 2;
int pX = x-plusSize; int pX = x - plusSize;
int pY = y - sizeY / 2 - lineLength - plusSize; int pY = y - sizeY / 2 - lineLength - plusSize;
g.DrawLine(pen, new Point(pX - plusSize, pY), new Point(pX + plusSize, pY)); g.DrawLine(pen, new Point(pX - plusSize, pY), new Point(pX + plusSize, pY));
g.DrawLine(pen, new Point(pX, pY - plusSize), new Point(pX, pY + plusSize)); g.DrawLine(pen, new Point(pX, pY - plusSize), new Point(pX, pY + plusSize));
g.DrawRectangle(pen, x - sizeX / 2, y - sizeY / 2, sizeX, sizeY); // g.DrawRectangle(pen, x - sizeX / 2, y - sizeY / 2, sizeX, sizeY);
} }
else if (type.Equals(PointType_Define.Plus_RUp_12)) else if (PolaritiesType.Equals(PolaritiesType_Define.Plus_RUp_6))
{ {
int plusSize = sizeX / 2; int plusSize = sizeX / 2;
int pX = x + plusSize; int pX = x + plusSize;
...@@ -321,21 +411,21 @@ namespace TSA_V ...@@ -321,21 +411,21 @@ namespace TSA_V
g.DrawLine(pen, new Point(pX - plusSize, pY), new Point(pX + plusSize, pY)); g.DrawLine(pen, new Point(pX - plusSize, pY), new Point(pX + plusSize, pY));
g.DrawLine(pen, new Point(pX, pY - plusSize), new Point(pX, pY + plusSize)); g.DrawLine(pen, new Point(pX, pY - plusSize), new Point(pX, pY + plusSize));
g.DrawRectangle(pen, x - sizeX / 2, y - sizeY / 2, sizeX, sizeY); // g.DrawRectangle(pen, x - sizeX / 2, y - sizeY / 2, sizeX, sizeY);
} }
else if (type.Equals(PointType_Define.Plus_LDown_13)) else if (PolaritiesType.Equals(PolaritiesType_Define.Plus_LDown_7))
{ {
g.DrawRectangle(pen, x - sizeX / 2, y - sizeY / 2, sizeX, sizeY); // g.DrawRectangle(pen, x - sizeX / 2, y - sizeY / 2, sizeX, sizeY);
int plusSize = sizeX / 2; int plusSize = sizeX / 2;
int pX = x-plusSize; int pX = x - plusSize;
int pY = y + sizeY / 2 + lineLength + plusSize; int pY = y + sizeY / 2 + lineLength + plusSize;
g.DrawLine(pen, new Point(pX - plusSize, pY), new Point(pX + plusSize, pY)); g.DrawLine(pen, new Point(pX - plusSize, pY), new Point(pX + plusSize, pY));
g.DrawLine(pen, new Point(pX, pY - plusSize), new Point(pX, pY + plusSize)); g.DrawLine(pen, new Point(pX, pY - plusSize), new Point(pX, pY + plusSize));
} }
else if (type.Equals(PointType_Define.Plus_RDown_14)) else if (PolaritiesType.Equals(PolaritiesType_Define.Plus_RDown_8))
{ {
g.DrawRectangle(pen, x - sizeX / 2, y - sizeY / 2, sizeX, sizeY); // g.DrawRectangle(pen, x - sizeX / 2, y - sizeY / 2, sizeX, sizeY);
int plusSize = sizeX / 2; int plusSize = sizeX / 2;
int pX = x + plusSize; int pX = x + plusSize;
...@@ -343,10 +433,6 @@ namespace TSA_V ...@@ -343,10 +433,6 @@ namespace TSA_V
g.DrawLine(pen, new Point(pX - plusSize, pY), new Point(pX + plusSize, pY)); g.DrawLine(pen, new Point(pX - plusSize, pY), new Point(pX + plusSize, pY));
g.DrawLine(pen, new Point(pX, pY - plusSize), new Point(pX, pY + plusSize)); g.DrawLine(pen, new Point(pX, pY - plusSize), new Point(pX, pY + plusSize));
} }
else
{
g.FillEllipse(myBrush, new Rectangle(x - sizeX / 2, y - sizeY / 2, sizeX, sizeY));//画实心椭圆
}
if (!name.Equals("")) if (!name.Equals(""))
{ {
int size = (sizeX + sizeY) / 2; int size = (sizeX + sizeY) / 2;
...@@ -374,7 +460,7 @@ namespace TSA_V ...@@ -374,7 +460,7 @@ namespace TSA_V
} }
Graphics g = panel1.CreateGraphics(); Graphics g = panel1.CreateGraphics();
Color pColor = Color.FromArgb(p.showColor); Color pColor = Color.FromArgb(p.showColor);
DrawPoint(pColor, g, p.PX, p.PY, p.PType, p.SizeX, p.SizeY, p.PenWidth, p.ShowText); DrawPoint(pColor, g, p.PX, p.PY, p.PType,p.PolaritiesType, p.SizeX, p.SizeY, p.PenWidth, p.ShowText);
g.Dispose(); g.Dispose();
} }
public void ShowPoint(bool showName,int rgbColor, params SMTPointInfo[] points) public void ShowPoint(bool showName,int rgbColor, params SMTPointInfo[] points)
...@@ -393,7 +479,7 @@ namespace TSA_V ...@@ -393,7 +479,7 @@ namespace TSA_V
int y = (int)point.NodePositionY; int y = (int)point.NodePositionY;
int sizex = point.PointSizeX; int sizex = point.PointSizeX;
int sizey = point.PointSizeY; int sizey = point.PointSizeY;
DrawPoint(pColor, g, x, y, type, sizex, sizey, point.PenWidth, ""); DrawPoint(pColor, g, x, y, type, point.PolaritiesType, sizex, sizey, point.PenWidth, "");
if (showName) if (showName)
{ {
...@@ -459,77 +545,122 @@ namespace TSA_V ...@@ -459,77 +545,122 @@ namespace TSA_V
} }
} }
} }
public class PolaritiesType_Define {
public static int Plus_None = 0;
public class PointType_Define
{
public static int None = 0;
/// <summary> /// <summary>
/// "1=●", /// "1=正极限_上方",
/// </summary> /// </summary>
public static int Point_1 = 1; public static int Plus_Up_1 = 1;
/// <summary> /// <summary>
/// "2=✚", /// "2=正极限_下方",
/// </summary> /// </summary>
public static int PlusSign_2 = 2; public static int Plus_Down_2 = 2;
/// <summary> /// <summary>
/// "3=┃", /// "3=正极限_左方 ✚□",
/// </summary> /// </summary>
public static int VerticalLine_3 = 3; public static int Plus_Left_3 =3;
/// <summary> /// <summary>
/// "4=━━", ///"4=正极限_右方 □✚"
/// </summary> /// </summary>
public static int Line_4 = 4; public static int Plus_Right_4 = 4;
/// <summary> /// <summary>
/// "5=□", /// "5=正极限_左上方",
/// </summary> /// </summary>
public static int Rectangle_5 = 5; public static int Plus_LUp_5 = 5;
/// <summary> /// <summary>
/// "6=○" /// "6=正极限_右上方",
/// </summary> /// </summary>
public static int Cycle_6 = 6; public static int Plus_RUp_6 = 6;
/// <summary> /// <summary>
/// "7=正极限_上方", /// "7=正极限_左下方",
/// </summary> /// </summary>
public static int Plus_Up_7 = 7; public static int Plus_LDown_7 = 7;
/// <summary> /// <summary>
/// "8=正极限_下方", ///"8=正极限_右下方"
/// </summary> /// </summary>
public static int Plus_Down_8 = 8; public static int Plus_RDown_8 = 8;
}
public class PointType_Define
{
public static int None = 0;
/// <summary> /// <summary>
/// "9=正极限_左方 ✚□", /// "1=●",
/// </summary> /// </summary>
public static int Plus_Left_9 = 9; public static int Point_1 = 1;
/// <summary> /// <summary>
///"10=正极限_右方 □✚" /// "2=✚",
/// </summary> /// </summary>
public static int Plus_Right_10 = 10; public static int PlusSign_2 = 2;
/// <summary> /// <summary>
/// "11=正极限_左上方", /// "3=┃",
/// </summary> /// </summary>
public static int Plus_LUp_11 = 11; public static int VerticalLine_3 = 3;
/// <summary> /// <summary>
/// "12=正极限_右上方", /// "4=━━",
/// </summary> /// </summary>
public static int Plus_RUp_12 = 12; public static int Line_4 = 4;
/// <summary> /// <summary>
/// "13=正极限_左下方", /// "5=□",
/// </summary> /// </summary>
public static int Plus_LDown_13 = 13; public static int Rectangle_5 = 5;
/// <summary> /// <summary>
///"14=正极限_右下方" /// "6=○"
/// </summary> /// </summary>
public static int Plus_RDown_14 = 14; public static int Cycle_6 = 6;
///// <summary>
///// "7=正极限_上方",
///// </summary>
//public static int Plus_Up_7 = 7;
///// <summary>
///// "8=正极限_下方",
///// </summary>
//public static int Plus_Down_8 = 8;
///// <summary>
///// "9=正极限_左方 ✚□",
///// </summary>
//public static int Plus_Left_9 = 9;
///// <summary>
/////"10=正极限_右方 □✚"
///// </summary>
//public static int Plus_Right_10 = 10;
///// <summary>
///// "11=正极限_左上方",
///// </summary>
//public static int Plus_LUp_11 = 11;
///// <summary>
///// "12=正极限_右上方",
///// </summary>
//public static int Plus_RUp_12 = 12;
///// <summary>
///// "13=正极限_左下方",
///// </summary>
//public static int Plus_LDown_13 = 13;
///// <summary>
/////"14=正极限_右下方"
///// </summary>
//public static int Plus_RDown_14 = 14;
} }
} }
...@@ -29,6 +29,8 @@ ...@@ -29,6 +29,8 @@
private void InitializeComponent() private void InitializeComponent()
{ {
this.group = new System.Windows.Forms.GroupBox(); this.group = new System.Windows.Forms.GroupBox();
this.cmbpolarities = new System.Windows.Forms.ComboBox();
this.lblPolarities = new System.Windows.Forms.Label();
this.panImg = new System.Windows.Forms.Panel(); this.panImg = new System.Windows.Forms.Panel();
this.lblName = new System.Windows.Forms.Label(); this.lblName = new System.Windows.Forms.Label();
this.txtname = new System.Windows.Forms.TextBox(); this.txtname = new System.Windows.Forms.TextBox();
...@@ -64,6 +66,8 @@ ...@@ -64,6 +66,8 @@
this.group.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) this.group.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right))); | System.Windows.Forms.AnchorStyles.Right)));
this.group.Controls.Add(this.cmbpolarities);
this.group.Controls.Add(this.lblPolarities);
this.group.Controls.Add(this.panImg); this.group.Controls.Add(this.panImg);
this.group.Controls.Add(this.lblName); this.group.Controls.Add(this.lblName);
this.group.Controls.Add(this.txtname); this.group.Controls.Add(this.txtname);
...@@ -88,12 +92,43 @@ ...@@ -88,12 +92,43 @@
this.group.Controls.Add(this.lbltype); this.group.Controls.Add(this.lbltype);
this.group.Location = new System.Drawing.Point(5, 3); this.group.Location = new System.Drawing.Point(5, 3);
this.group.Name = "group"; this.group.Name = "group";
this.group.Size = new System.Drawing.Size(532, 298); this.group.Size = new System.Drawing.Size(532, 300);
this.group.TabIndex = 61; this.group.TabIndex = 61;
this.group.TabStop = false; this.group.TabStop = false;
this.group.Text = "投影位置"; this.group.Text = "投影位置";
this.group.Paint += new System.Windows.Forms.PaintEventHandler(this.group_Paint); this.group.Paint += new System.Windows.Forms.PaintEventHandler(this.group_Paint);
// //
// cmbpolarities
//
this.cmbpolarities.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cmbpolarities.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.cmbpolarities.FormattingEnabled = true;
this.cmbpolarities.Items.AddRange(new object[] {
"0=无",
"1=上方",
" 2=下方",
" 3=左方",
" 4=右方",
" 5=左上方",
" 6=右上方",
" 7=左下方",
" 8=右下方"});
this.cmbpolarities.Location = new System.Drawing.Point(124, 140);
this.cmbpolarities.Name = "cmbpolarities";
this.cmbpolarities.Size = new System.Drawing.Size(134, 28);
this.cmbpolarities.TabIndex = 330;
this.cmbpolarities.SelectedIndexChanged += new System.EventHandler(this.cmbpolarities_SelectedIndexChanged);
//
// lblPolarities
//
this.lblPolarities.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblPolarities.Location = new System.Drawing.Point(11, 146);
this.lblPolarities.Name = "lblPolarities";
this.lblPolarities.Size = new System.Drawing.Size(107, 17);
this.lblPolarities.TabIndex = 329;
this.lblPolarities.Text = "极性:";
this.lblPolarities.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// panImg // panImg
// //
this.panImg.ForeColor = System.Drawing.Color.White; this.panImg.ForeColor = System.Drawing.Color.White;
...@@ -105,7 +140,7 @@ ...@@ -105,7 +140,7 @@
// lblName // lblName
// //
this.lblName.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.lblName.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblName.Location = new System.Drawing.Point(11, 27); this.lblName.Location = new System.Drawing.Point(11, 22);
this.lblName.Name = "lblName"; this.lblName.Name = "lblName";
this.lblName.Size = new System.Drawing.Size(107, 17); this.lblName.Size = new System.Drawing.Size(107, 17);
this.lblName.TabIndex = 327; this.lblName.TabIndex = 327;
...@@ -115,7 +150,7 @@ ...@@ -115,7 +150,7 @@
// txtname // txtname
// //
this.txtname.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.txtname.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtname.Location = new System.Drawing.Point(124, 23); this.txtname.Location = new System.Drawing.Point(124, 18);
this.txtname.Name = "txtname"; this.txtname.Name = "txtname";
this.txtname.Size = new System.Drawing.Size(134, 26); this.txtname.Size = new System.Drawing.Size(134, 26);
this.txtname.TabIndex = 326; this.txtname.TabIndex = 326;
...@@ -123,7 +158,7 @@ ...@@ -123,7 +158,7 @@
// numSizeY // numSizeY
// //
this.numSizeY.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.numSizeY.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.numSizeY.Location = new System.Drawing.Point(124, 187); this.numSizeY.Location = new System.Drawing.Point(124, 202);
this.numSizeY.Maximum = new decimal(new int[] { this.numSizeY.Maximum = new decimal(new int[] {
255, 255,
0, 0,
...@@ -146,7 +181,7 @@ ...@@ -146,7 +181,7 @@
// numSizeX // numSizeX
// //
this.numSizeX.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.numSizeX.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.numSizeX.Location = new System.Drawing.Point(124, 154); this.numSizeX.Location = new System.Drawing.Point(124, 172);
this.numSizeX.Maximum = new decimal(new int[] { this.numSizeX.Maximum = new decimal(new int[] {
255, 255,
0, 0,
...@@ -169,7 +204,7 @@ ...@@ -169,7 +204,7 @@
// numY // numY
// //
this.numY.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.numY.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.numY.Location = new System.Drawing.Point(124, 86); this.numY.Location = new System.Drawing.Point(124, 78);
this.numY.Maximum = new decimal(new int[] { this.numY.Maximum = new decimal(new int[] {
4000, 4000,
0, 0,
...@@ -192,7 +227,7 @@ ...@@ -192,7 +227,7 @@
// numX // numX
// //
this.numX.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.numX.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.numX.Location = new System.Drawing.Point(124, 53); this.numX.Location = new System.Drawing.Point(124, 48);
this.numX.Maximum = new decimal(new int[] { this.numX.Maximum = new decimal(new int[] {
4000, 4000,
0, 0,
...@@ -215,7 +250,7 @@ ...@@ -215,7 +250,7 @@
// numPenWidth // numPenWidth
// //
this.numPenWidth.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.numPenWidth.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.numPenWidth.Location = new System.Drawing.Point(124, 220); this.numPenWidth.Location = new System.Drawing.Point(124, 232);
this.numPenWidth.Maximum = new decimal(new int[] { this.numPenWidth.Maximum = new decimal(new int[] {
255, 255,
0, 0,
...@@ -238,7 +273,7 @@ ...@@ -238,7 +273,7 @@
// lblLineWidth // lblLineWidth
// //
this.lblLineWidth.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.lblLineWidth.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblLineWidth.Location = new System.Drawing.Point(11, 228); this.lblLineWidth.Location = new System.Drawing.Point(11, 239);
this.lblLineWidth.Name = "lblLineWidth"; this.lblLineWidth.Name = "lblLineWidth";
this.lblLineWidth.Size = new System.Drawing.Size(107, 17); this.lblLineWidth.Size = new System.Drawing.Size(107, 17);
this.lblLineWidth.TabIndex = 318; this.lblLineWidth.TabIndex = 318;
...@@ -248,7 +283,7 @@ ...@@ -248,7 +283,7 @@
// lblSizeWidth // lblSizeWidth
// //
this.lblSizeWidth.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.lblSizeWidth.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblSizeWidth.Location = new System.Drawing.Point(11, 194); this.lblSizeWidth.Location = new System.Drawing.Point(11, 208);
this.lblSizeWidth.Name = "lblSizeWidth"; this.lblSizeWidth.Name = "lblSizeWidth";
this.lblSizeWidth.Size = new System.Drawing.Size(107, 17); this.lblSizeWidth.Size = new System.Drawing.Size(107, 17);
this.lblSizeWidth.TabIndex = 296; this.lblSizeWidth.TabIndex = 296;
...@@ -258,7 +293,7 @@ ...@@ -258,7 +293,7 @@
// lblSizeLength // lblSizeLength
// //
this.lblSizeLength.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.lblSizeLength.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblSizeLength.Location = new System.Drawing.Point(11, 160); this.lblSizeLength.Location = new System.Drawing.Point(11, 177);
this.lblSizeLength.Name = "lblSizeLength"; this.lblSizeLength.Name = "lblSizeLength";
this.lblSizeLength.Size = new System.Drawing.Size(107, 17); this.lblSizeLength.Size = new System.Drawing.Size(107, 17);
this.lblSizeLength.TabIndex = 317; this.lblSizeLength.TabIndex = 317;
...@@ -278,7 +313,7 @@ ...@@ -278,7 +313,7 @@
"20", "20",
"50", "50",
"100"}); "100"});
this.cmbStep.Location = new System.Drawing.Point(124, 253); this.cmbStep.Location = new System.Drawing.Point(124, 262);
this.cmbStep.Name = "cmbStep"; this.cmbStep.Name = "cmbStep";
this.cmbStep.Size = new System.Drawing.Size(134, 28); this.cmbStep.Size = new System.Drawing.Size(134, 28);
this.cmbStep.TabIndex = 315; this.cmbStep.TabIndex = 315;
...@@ -286,7 +321,7 @@ ...@@ -286,7 +321,7 @@
// lblStepValue // lblStepValue
// //
this.lblStepValue.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.lblStepValue.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblStepValue.Location = new System.Drawing.Point(11, 262); this.lblStepValue.Location = new System.Drawing.Point(11, 270);
this.lblStepValue.Name = "lblStepValue"; this.lblStepValue.Name = "lblStepValue";
this.lblStepValue.Size = new System.Drawing.Size(107, 17); this.lblStepValue.Size = new System.Drawing.Size(107, 17);
this.lblStepValue.TabIndex = 314; this.lblStepValue.TabIndex = 314;
...@@ -353,7 +388,7 @@ ...@@ -353,7 +388,7 @@
"4=━━", "4=━━",
"5=□", "5=□",
"6=○"}); "6=○"});
this.cmbType.Location = new System.Drawing.Point(124, 119); this.cmbType.Location = new System.Drawing.Point(124, 108);
this.cmbType.Name = "cmbType"; this.cmbType.Name = "cmbType";
this.cmbType.Size = new System.Drawing.Size(134, 28); this.cmbType.Size = new System.Drawing.Size(134, 28);
this.cmbType.TabIndex = 303; this.cmbType.TabIndex = 303;
...@@ -362,7 +397,7 @@ ...@@ -362,7 +397,7 @@
// lbly // lbly
// //
this.lbly.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.lbly.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lbly.Location = new System.Drawing.Point(11, 92); this.lbly.Location = new System.Drawing.Point(11, 84);
this.lbly.Name = "lbly"; this.lbly.Name = "lbly";
this.lbly.Size = new System.Drawing.Size(107, 17); this.lbly.Size = new System.Drawing.Size(107, 17);
this.lbly.TabIndex = 302; this.lbly.TabIndex = 302;
...@@ -372,7 +407,7 @@ ...@@ -372,7 +407,7 @@
// lblx // lblx
// //
this.lblx.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.lblx.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblx.Location = new System.Drawing.Point(11, 58); this.lblx.Location = new System.Drawing.Point(11, 53);
this.lblx.Name = "lblx"; this.lblx.Name = "lblx";
this.lblx.Size = new System.Drawing.Size(107, 17); this.lblx.Size = new System.Drawing.Size(107, 17);
this.lblx.TabIndex = 301; this.lblx.TabIndex = 301;
...@@ -394,7 +429,7 @@ ...@@ -394,7 +429,7 @@
// lbltype // lbltype
// //
this.lbltype.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.lbltype.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lbltype.Location = new System.Drawing.Point(11, 126); this.lbltype.Location = new System.Drawing.Point(11, 115);
this.lbltype.Name = "lbltype"; this.lbltype.Name = "lbltype";
this.lbltype.Size = new System.Drawing.Size(107, 17); this.lbltype.Size = new System.Drawing.Size(107, 17);
this.lbltype.TabIndex = 294; this.lbltype.TabIndex = 294;
...@@ -409,7 +444,7 @@ ...@@ -409,7 +444,7 @@
this.Controls.Add(this.group); this.Controls.Add(this.group);
this.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.Name = "ProjectorControl"; this.Name = "ProjectorControl";
this.Size = new System.Drawing.Size(544, 308); this.Size = new System.Drawing.Size(544, 310);
this.Load += new System.EventHandler(this.GalvanometerControl_Load); this.Load += new System.EventHandler(this.GalvanometerControl_Load);
this.group.ResumeLayout(false); this.group.ResumeLayout(false);
this.group.PerformLayout(); this.group.PerformLayout();
...@@ -447,5 +482,7 @@ ...@@ -447,5 +482,7 @@
private System.Windows.Forms.Label lblName; private System.Windows.Forms.Label lblName;
private System.Windows.Forms.TextBox txtname; private System.Windows.Forms.TextBox txtname;
private System.Windows.Forms.Panel panImg; private System.Windows.Forms.Panel panImg;
private System.Windows.Forms.ComboBox cmbpolarities;
private System.Windows.Forms.Label lblPolarities;
} }
} }
...@@ -26,58 +26,33 @@ namespace UserFromControl ...@@ -26,58 +26,33 @@ namespace UserFromControl
{ {
cmbType.SelectedIndex = 0; cmbType.SelectedIndex = 0;
} }
cmbpolarities.SelectedIndex = 0;
PointSizeX = Setting_NInit.Device_DefaultPointSize; PointSizeX = Setting_NInit.Device_DefaultPointSize;
PointSizeY = Setting_NInit.Device_DefaultPointSize; PointSizeY = Setting_NInit.Device_DefaultPointSize;
PointType = Setting_NInit.Device_DefaultPointType; PointType = Setting_NInit.Device_DefaultPointType;
PolaritiesType = 0;
numSizeX.Maximum = MaxX / 2; numSizeX.Maximum = MaxX / 2;
numSizeY.Maximum=MaxY/ 2; numSizeY.Maximum=MaxY/ 2;
//LogUtil.info($"投影点位范围:X:{MaxX},Y:{MaxY}");
typeList = new List<string>();
this.cmbType.Items.Clear();
typeList.AddRange(new string[] {
"1=●",
"2=✚",
"3=┃",
"4=━━",
"5=□",
"6=○",
"7=极性_上方",
"8=极性_下方",
"9=极性_左方",
"10=极性_右方",
"11=极性_左上方",
"12=极性_右上方",
"13=极性_左下方",
"14=极性_右下方"
});
foreach (string str in typeList)
{
cmbType.Items.Add(str);
}
} }
public void loadTypeList(string[] list,Dictionary<string,string> controlTextMap) public void loadTypeList(string[] list, string[] dirlist,Dictionary<string,string> controlTextMap)
{ {
int oldT = cmbType.SelectedIndex;
int oldPt=cmbpolarities.SelectedIndex;
typeList = new List<string>(); typeList = new List<string>();
this.cmbType.Items.Clear(); this.cmbType.Items.Clear();
//typeList.AddRange(new string[] {
//"1=●",
//"2=✚",
//"3=┃",
//"4=━━",
//"5=□",
//"6=○",
//"7=极性_上方",
//"8=极性_下方",
//"9=极性_左方",
//"10=极性_右方"
//});
typeList.AddRange(list); typeList.AddRange(list);
foreach (string str in typeList) foreach (string str in typeList)
{ {
cmbType.Items.Add(str); cmbType.Items.Add(str);
} }
cmbpolarities.Items.Clear();
foreach(string str in dirlist)
{
cmbpolarities.Items.Add(str);
}
cmbType.SelectedIndex = oldT;
cmbpolarities.SelectedIndex = oldPt;
group.Text = controlTextMap["group_Text"]; group.Text = controlTextMap["group_Text"];
lblLineWidth.Text = controlTextMap["lblLineWidth_Text"]; lblLineWidth.Text = controlTextMap["lblLineWidth_Text"];
lblName.Text = controlTextMap["lblName_Text"]; lblName.Text = controlTextMap["lblName_Text"];
...@@ -93,6 +68,7 @@ namespace UserFromControl ...@@ -93,6 +68,7 @@ namespace UserFromControl
btnShowPoint.Text = controlTextMap["btnShowPoint_Text"]; btnShowPoint.Text = controlTextMap["btnShowPoint_Text"];
btnLeft.Text = controlTextMap["btnLeft_Text"]; btnLeft.Text = controlTextMap["btnLeft_Text"];
btnRight.Text = controlTextMap["btnRight_Text"]; btnRight.Text = controlTextMap["btnRight_Text"];
lblPolarities.Text = controlTextMap["lblPolarities_Text"];
// //
} }
public string GroupName public string GroupName
...@@ -119,7 +95,7 @@ namespace UserFromControl ...@@ -119,7 +95,7 @@ namespace UserFromControl
int sizeY = FormUtil.GetIntValue(numSizeY); int sizeY = FormUtil.GetIntValue(numSizeY);
int penWidth = (int)numPenWidth.Value; int penWidth = (int)numPenWidth.Value;
string name = FormUtil.getValue(txtname); string name = FormUtil.getValue(txtname);
int ptype = cmbpolarities.SelectedIndex;
////如果亮度和大小超过范围,直接用默认值 ////如果亮度和大小超过范围,直接用默认值
//if (sizeX < 1 || sizeX > 255) //if (sizeX < 1 || sizeX > 255)
//{ //{
...@@ -131,7 +107,7 @@ namespace UserFromControl ...@@ -131,7 +107,7 @@ namespace UserFromControl
// sizeY = TSAVBean.DefaultPSize; // sizeY = TSAVBean.DefaultPSize;
// numSizeY.Text = sizeY.ToString(); // numSizeY.Text = sizeY.ToString();
//} //}
ProjectorPInfo p = new ProjectorPInfo(px, py, pointType, sizeX, sizeY, penWidth,name, ShowColor); ProjectorPInfo p = new ProjectorPInfo(px, py, pointType,ptype, sizeX, sizeY, penWidth,name, ShowColor);
return p; return p;
} }
public void ShowCurrPoint() public void ShowCurrPoint()
...@@ -218,48 +194,51 @@ namespace UserFromControl ...@@ -218,48 +194,51 @@ namespace UserFromControl
if (!(cmbType.SelectedIndex + 1).Equals(lastType)) if (!(cmbType.SelectedIndex + 1).Equals(lastType))
{ {
lastType = cmbType.SelectedIndex + 1; lastType = cmbType.SelectedIndex + 1;
if (lastType >= 9 && lastType <= 10) //if (lastType >= 9 && lastType <= 10)
{ //{
if (numSizeX.Value <= 6) // if (numSizeX.Value <= 6)
{ // {
numSizeX.Value = 6; // numSizeX.Value = 6;
} // }
if (numSizeX.Value == numSizeY.Value * 2) // if (numSizeX.Value == numSizeY.Value * 2)
{ // {
} // }
else if (numSizeY.Value * 2 > numSizeX.Value && numSizeX.Value < 15) // else if (numSizeY.Value * 2 > numSizeX.Value && numSizeX.Value < 15)
{ // {
numSizeX.Value = numSizeY.Value * 2; // numSizeX.Value = numSizeY.Value * 2;
} // }
else // else
{ // {
numSizeY.Value = numSizeX.Value / 2; // numSizeY.Value = numSizeX.Value / 2;
} // }
} //}
else if( (lastType >= 7 && lastType <= 8)|| (lastType >= 11 && lastType <= 14)) //else if( (lastType >= 7 && lastType <= 8)|| (lastType >= 11 && lastType <= 14))
{ //{
if (numSizeX.Value <= 3) // if (numSizeX.Value <= 3)
{ // {
numSizeX.Value = 3; // numSizeX.Value = 3;
} // }
if(numSizeY.Value== numSizeX.Value * 2) // if(numSizeY.Value== numSizeX.Value * 2)
{ // {
} // }
else if (numSizeX.Value * 2 > numSizeY.Value &&numSizeY.Value<15) // else if (numSizeX.Value * 2 > numSizeY.Value &&numSizeY.Value<15)
{ // {
numSizeY.Value = numSizeX.Value * 2; // numSizeY.Value = numSizeX.Value * 2;
} // }
else // else
{ // {
numSizeX.Value = numSizeY.Value / 2; // numSizeX.Value = numSizeY.Value / 2;
} // }
} //}
DrawPoint(lastType); DrawPoint(lastType,lastPolaritiesType);
ShowCurrPoint();
} }
} }
private int lastType=1; private int lastType=1;
private int lastPolaritiesType = 0;
public double XValue public double XValue
{ {
set set
...@@ -287,7 +266,11 @@ namespace UserFromControl ...@@ -287,7 +266,11 @@ namespace UserFromControl
{ {
set set
{ {
if ((int) value >= 1) if ((int)value >= cmbType.Items.Count)
{
value = cmbType.Items.Count - 1;
}
if ((int) value >= 1)
{ {
cmbType.SelectedIndex = ((int)value) - 1; cmbType.SelectedIndex = ((int)value) - 1;
} }
...@@ -345,6 +328,30 @@ namespace UserFromControl ...@@ -345,6 +328,30 @@ namespace UserFromControl
return FormUtil.getValue(txtname); return FormUtil.getValue(txtname);
} }
} }
public int PolaritiesType
{
set
{
if ((int)value >= cmbpolarities.Items.Count)
{
value = cmbpolarities.Items.Count - 1;
}
if ((int)value >= 0)
{
cmbpolarities.SelectedIndex = ((int)value) ;
}
else
{
cmbpolarities.SelectedIndex = 0;
}
}
get
{
return cmbpolarities.SelectedIndex;
}
}
public void UpdateStatus() public void UpdateStatus()
{ {
//numX.Text = GalvanometerManager.GetLastPoint().X.ToString(); //numX.Text = GalvanometerManager.GetLastPoint().X.ToString();
...@@ -370,7 +377,7 @@ namespace UserFromControl ...@@ -370,7 +377,7 @@ namespace UserFromControl
cmbType.SelectedIndex = 0; cmbType.SelectedIndex = 0;
} }
} }
private void DrawPoint(int type , int x=0, int y=0, int sizeX = 2, int sizeY = 2 ,int lineLength=2 ) private void DrawPoint(int type,int polaritiesType , int x=0, int y=0, int sizeX = 2, int sizeY = 2 ,int lineLength=2 )
{ {
Graphics g = panImg.CreateGraphics(); Graphics g = panImg.CreateGraphics();
if (sizeX < 2) if (sizeX < 2)
...@@ -413,36 +420,42 @@ namespace UserFromControl ...@@ -413,36 +420,42 @@ namespace UserFromControl
else if (type.Equals(6)) else if (type.Equals(6))
{ {
g.DrawEllipse(pen, x - sizeX / 2, y - sizeY / 2, sizeX, sizeY); g.DrawEllipse(pen, x - sizeX / 2, y - sizeY / 2, sizeX, sizeY);
}else if (type>6)
{
g.DrawEllipse(pen, x - sizeX / 2, y - sizeY / 2, sizeX, sizeY);
} }
else if (type.Equals(7)) else
{ {
sizeX = 12; g.FillEllipse(myBrush, new Rectangle(x - sizeX / 2, y - sizeY / 2, sizeX, sizeY));//画实心椭圆
sizeY = 36; }
if (polaritiesType.Equals(0))
{
}
else if (polaritiesType.Equals(1))
{
//sizeX = 12;
//sizeY = 36;
int plusSize = sizeX / 2; int plusSize = sizeX / 2;
int pX = x; int pX = x;
int pY = y - sizeY / 2 - lineLength - plusSize; int pY = y - sizeY / 2 - lineLength - plusSize;
g.DrawLine(pen, new Point(pX - plusSize, pY), new Point(pX + plusSize, pY)); g.DrawLine(pen, new Point(pX - plusSize, pY), new Point(pX + plusSize, pY));
g.DrawLine(pen, new Point(pX, pY - plusSize), new Point(pX, pY + plusSize)); g.DrawLine(pen, new Point(pX, pY - plusSize), new Point(pX, pY + plusSize));
g.DrawRectangle(pen, x - sizeX / 2, y - sizeY / 2, sizeX, sizeY);
} }
else if (type.Equals(8)) else if (polaritiesType.Equals(2))
{ {
sizeX = 12; //sizeX = 12;
sizeY = 36; //sizeY = 36;
g.DrawRectangle(pen, x - sizeX / 2, y - sizeY / 2, sizeX, sizeY);
int plusSize = sizeX / 2; int plusSize = sizeX / 2;
int pX = x; int pX = x;
int pY = y + sizeY / 2 + lineLength + plusSize; int pY = y + sizeY / 2 + lineLength + plusSize;
g.DrawLine(pen, new Point(pX - plusSize, pY), new Point(pX + plusSize, pY)); g.DrawLine(pen, new Point(pX - plusSize, pY), new Point(pX + plusSize, pY));
g.DrawLine(pen, new Point(pX, pY - plusSize), new Point(pX, pY + plusSize)); g.DrawLine(pen, new Point(pX, pY - plusSize), new Point(pX, pY + plusSize));
} }
else if (type.Equals(9)) else if (polaritiesType.Equals(3))
{ {
sizeX = 36; //sizeX = 12;
sizeY = 12; //sizeY = 36;
g.DrawRectangle(pen, x - sizeX / 2, y - sizeY / 2, sizeX, sizeY);
int plusSize = sizeY / 2; int plusSize = sizeY / 2;
int pX = x - sizeX / 2 - lineLength - plusSize; int pX = x - sizeX / 2 - lineLength - plusSize;
...@@ -450,11 +463,10 @@ namespace UserFromControl ...@@ -450,11 +463,10 @@ namespace UserFromControl
g.DrawLine(pen, new Point(pX - plusSize, pY), new Point(pX + plusSize, pY)); g.DrawLine(pen, new Point(pX - plusSize, pY), new Point(pX + plusSize, pY));
g.DrawLine(pen, new Point(pX, pY - plusSize), new Point(pX, pY + plusSize)); g.DrawLine(pen, new Point(pX, pY - plusSize), new Point(pX, pY + plusSize));
} }
else if (type.Equals(10)) else if (polaritiesType.Equals(4))
{ {
sizeX = 36; //sizeX = 12;
sizeY = 12; //sizeY = 36;
g.DrawRectangle(pen, x - sizeX / 2, y - sizeY / 2, sizeX, sizeY);
int plusSize = sizeY / 2; int plusSize = sizeY / 2;
int pX = x + sizeX / 2 + lineLength + plusSize; int pX = x + sizeX / 2 + lineLength + plusSize;
...@@ -462,47 +474,54 @@ namespace UserFromControl ...@@ -462,47 +474,54 @@ namespace UserFromControl
g.DrawLine(pen, new Point(pX - plusSize, pY), new Point(pX + plusSize, pY)); g.DrawLine(pen, new Point(pX - plusSize, pY), new Point(pX + plusSize, pY));
g.DrawLine(pen, new Point(pX, pY - plusSize), new Point(pX, pY + plusSize)); g.DrawLine(pen, new Point(pX, pY - plusSize), new Point(pX, pY + plusSize));
} }
else if (type.Equals(11)) else if (polaritiesType.Equals(5))
{ {
sizeX = 12; //sizeX = 12;
sizeY = 36; //sizeY = 36;
int plusSize = sizeX / 2; int plusSize = sizeX / 2;
int pX = x-6; int pX = x - 6;
int pY = y - sizeY / 2 - lineLength - plusSize; int pY = y - sizeY / 2 - lineLength - plusSize;
g.DrawLine(pen, new Point(pX - plusSize, pY), new Point(pX + plusSize, pY)); g.DrawLine(pen, new Point(pX - plusSize, pY), new Point(pX + plusSize, pY));
g.DrawLine(pen, new Point(pX, pY - plusSize), new Point(pX, pY + plusSize)); g.DrawLine(pen, new Point(pX, pY - plusSize), new Point(pX, pY + plusSize));
g.DrawRectangle(pen, x - sizeX / 2, y - sizeY / 2, sizeX, sizeY);
} }
else if (type.Equals(12)) else if (polaritiesType.Equals(6))
{ {
sizeX = 12; //sizeX = 12;
sizeY = 36; //sizeY = 36;
int plusSize = sizeX / 2; int plusSize = sizeX / 2;
int pX = x + 6; int pX = x + 6;
int pY = y - sizeY / 2 - lineLength - plusSize; int pY = y - sizeY / 2 - lineLength - plusSize;
g.DrawLine(pen, new Point(pX - plusSize, pY), new Point(pX + plusSize, pY)); g.DrawLine(pen, new Point(pX - plusSize, pY), new Point(pX + plusSize, pY));
g.DrawLine(pen, new Point(pX, pY - plusSize), new Point(pX, pY + plusSize)); g.DrawLine(pen, new Point(pX, pY - plusSize), new Point(pX, pY + plusSize));
g.DrawRectangle(pen, x - sizeX / 2, y - sizeY / 2, sizeX, sizeY);
} }
else if (type.Equals(13)) else if (polaritiesType.Equals(6))
{ {
sizeX = 12; //sizeX = 12;
sizeY = 36; //sizeY = 36;
g.DrawRectangle(pen, x - sizeX / 2, y - sizeY / 2, sizeX, sizeY); int plusSize = sizeX / 2;
int pX = x + 6;
int pY = y - sizeY / 2 - lineLength - plusSize;
g.DrawLine(pen, new Point(pX - plusSize, pY), new Point(pX + plusSize, pY));
g.DrawLine(pen, new Point(pX, pY - plusSize), new Point(pX, pY + plusSize));
}
else if (polaritiesType.Equals(7))
{
//sizeX = 12;
//sizeY = 36;
int plusSize = sizeX / 2; int plusSize = sizeX / 2;
int pX = x-6; int pX = x - 6;
int pY = y + sizeY / 2 + lineLength + plusSize; int pY = y + sizeY / 2 + lineLength + plusSize;
g.DrawLine(pen, new Point(pX - plusSize, pY), new Point(pX + plusSize, pY)); g.DrawLine(pen, new Point(pX - plusSize, pY), new Point(pX + plusSize, pY));
g.DrawLine(pen, new Point(pX, pY - plusSize), new Point(pX, pY + plusSize)); g.DrawLine(pen, new Point(pX, pY - plusSize), new Point(pX, pY + plusSize));
} }
else if (type.Equals(14)) else if (polaritiesType.Equals(8))
{ {
sizeX = 12; //sizeX = 12;
sizeY = 36; //sizeY = 36;
g.DrawRectangle(pen, x - sizeX / 2, y - sizeY / 2, sizeX, sizeY);
int plusSize = sizeX / 2; int plusSize = sizeX / 2;
int pX = x + 6; int pX = x + 6;
...@@ -510,15 +529,124 @@ namespace UserFromControl ...@@ -510,15 +529,124 @@ namespace UserFromControl
g.DrawLine(pen, new Point(pX - plusSize, pY), new Point(pX + plusSize, pY)); g.DrawLine(pen, new Point(pX - plusSize, pY), new Point(pX + plusSize, pY));
g.DrawLine(pen, new Point(pX, pY - plusSize), new Point(pX, pY + plusSize)); g.DrawLine(pen, new Point(pX, pY - plusSize), new Point(pX, pY + plusSize));
} }
else
{ //else if (type.Equals(7))
g.FillEllipse(myBrush, new Rectangle(x - sizeX / 2, y - sizeY / 2, sizeX, sizeY));//画实心椭圆 //{
} // sizeX = 12;
// sizeY = 36;
// int plusSize = sizeX / 2;
// int pX = x;
// int pY = y - sizeY / 2 - lineLength - plusSize;
// g.DrawLine(pen, new Point(pX - plusSize, pY), new Point(pX + plusSize, pY));
// g.DrawLine(pen, new Point(pX, pY - plusSize), new Point(pX, pY + plusSize));
// g.DrawRectangle(pen, x - sizeX / 2, y - sizeY / 2, sizeX, sizeY);
//}
//else if (type.Equals(8))
//{
// sizeX = 12;
// sizeY = 36;
// g.DrawRectangle(pen, x - sizeX / 2, y - sizeY / 2, sizeX, sizeY);
// int plusSize = sizeX / 2;
// int pX = x;
// int pY = y + sizeY / 2 + lineLength + plusSize;
// g.DrawLine(pen, new Point(pX - plusSize, pY), new Point(pX + plusSize, pY));
// g.DrawLine(pen, new Point(pX, pY - plusSize), new Point(pX, pY + plusSize));
//}
//else if (type.Equals(9))
//{
// sizeX = 36;
// sizeY = 12;
// g.DrawRectangle(pen, x - sizeX / 2, y - sizeY / 2, sizeX, sizeY);
// int plusSize = sizeY / 2;
// int pX = x - sizeX / 2 - lineLength - plusSize;
// int pY = y;
// g.DrawLine(pen, new Point(pX - plusSize, pY), new Point(pX + plusSize, pY));
// g.DrawLine(pen, new Point(pX, pY - plusSize), new Point(pX, pY + plusSize));
//}
//else if (type.Equals(10))
//{
// sizeX = 36;
// sizeY = 12;
// g.DrawRectangle(pen, x - sizeX / 2, y - sizeY / 2, sizeX, sizeY);
// int plusSize = sizeY / 2;
// int pX = x + sizeX / 2 + lineLength + plusSize;
// int pY = y;
// g.DrawLine(pen, new Point(pX - plusSize, pY), new Point(pX + plusSize, pY));
// g.DrawLine(pen, new Point(pX, pY - plusSize), new Point(pX, pY + plusSize));
//}
//else if (type.Equals(11))
//{
// sizeX = 12;
// sizeY = 36;
// int plusSize = sizeX / 2;
// int pX = x-6;
// int pY = y - sizeY / 2 - lineLength - plusSize;
// g.DrawLine(pen, new Point(pX - plusSize, pY), new Point(pX + plusSize, pY));
// g.DrawLine(pen, new Point(pX, pY - plusSize), new Point(pX, pY + plusSize));
// g.DrawRectangle(pen, x - sizeX / 2, y - sizeY / 2, sizeX, sizeY);
//}
//else if (type.Equals(12))
//{
// sizeX = 12;
// sizeY = 36;
// int plusSize = sizeX / 2;
// int pX = x + 6;
// int pY = y - sizeY / 2 - lineLength - plusSize;
// g.DrawLine(pen, new Point(pX - plusSize, pY), new Point(pX + plusSize, pY));
// g.DrawLine(pen, new Point(pX, pY - plusSize), new Point(pX, pY + plusSize));
// g.DrawRectangle(pen, x - sizeX / 2, y - sizeY / 2, sizeX, sizeY);
//}
//else if (type.Equals(13))
//{
// sizeX = 12;
// sizeY = 36;
// g.DrawRectangle(pen, x - sizeX / 2, y - sizeY / 2, sizeX, sizeY);
// int plusSize = sizeX / 2;
// int pX = x-6;
// int pY = y + sizeY / 2 + lineLength + plusSize;
// g.DrawLine(pen, new Point(pX - plusSize, pY), new Point(pX + plusSize, pY));
// g.DrawLine(pen, new Point(pX, pY - plusSize), new Point(pX, pY + plusSize));
//}
//else if (type.Equals(14))
//{
// sizeX = 12;
// sizeY = 36;
// g.DrawRectangle(pen, x - sizeX / 2, y - sizeY / 2, sizeX, sizeY);
// int plusSize = sizeX / 2;
// int pX = x + 6;
// int pY = y + sizeY / 2 + lineLength + plusSize;
// g.DrawLine(pen, new Point(pX - plusSize, pY), new Point(pX + plusSize, pY));
// g.DrawLine(pen, new Point(pX, pY - plusSize), new Point(pX, pY + plusSize));
//}
//else
//{
// g.FillEllipse(myBrush, new Rectangle(x - sizeX / 2, y - sizeY / 2, sizeX, sizeY));//画实心椭圆
//}
} }
private void group_Paint(object sender, PaintEventArgs e) private void group_Paint(object sender, PaintEventArgs e)
{ {
DrawPoint(lastType); DrawPoint(lastType, lastPolaritiesType);
ShowCurrPoint();
}
private void cmbpolarities_SelectedIndexChanged(object sender, EventArgs e)
{
if (!(cmbpolarities.SelectedIndex + 1).Equals(lastPolaritiesType))
{
lastPolaritiesType = cmbpolarities.SelectedIndex;
DrawPoint(lastType, lastPolaritiesType);
ShowCurrPoint();
}
} }
} }
} }
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!