Commit bec15b6b LN

增加简洁模式配置。修改软件图标。选择程序界面增加简洁模式勾选框。简洁模式不显示 补料

1 个父辈 484350ab
......@@ -87,6 +87,8 @@ namespace TSA_V.Common
public static MyConfig<bool> Device_SideCylinderMoveFirst =true;
[MyConfigComment("离线编程模式,自动进入过板模式")]
public static MyConfig<bool> Device_AutoGuoBan = false;
[MyConfigComment("软件简洁模式,有投影仪,相机,无IO,线体,转盘")]
public static MyConfig<bool> Device_SoftMode = false;
[MyConfigComment("是否启用手势监控")]
public static MyConfig<bool> Device_HandsVideo= false;
[MyConfigComment("手势服务器端口")]
......
......@@ -4,6 +4,7 @@ using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using TSA_V.Common;
using TSA_V.DeviceLibrary;
using TSA_V.LoadCSVLibrary;
......@@ -138,11 +139,18 @@ namespace TSA_V.LoadCSVLibrary
return false;
}
public bool IsSameComAndCount(SMTPointInfo point)
{
if (this.PN.Equals(point.PN) && int.Parse(this.ComCount) >0)
public bool IsSameComAndCount(SMTPointInfo point)
{
try
{
return true;
if (this.PN.Equals(point.PN) && int.Parse(this.ComCount) > 0)
{
return true;
}
}
catch (Exception ex)
{
LogUtil.error("error :" + ex.ToString());
}
return false;
}
......
......@@ -218,7 +218,11 @@ namespace TSA_V.DeviceLibrary
List<TSAVPosition> allPos=CSVPositionReader<TSAVPosition>.getPositionList();
List<TSAVPosition> zhuanPos=(from m in allPos where m.PositionType.Equals(1) select m).ToList();
WorkModeUtil.HasZhuanPan = zhuanPos.Count > 0;
if(!WorkModeUtil.HasZhuanPan)
if (Setting_NInit.Device_SoftMode)
{
WorkModeUtil.HasZhuanPan = false;
}
if (!WorkModeUtil.HasZhuanPan)
{
LogUtil.info(Name + " DeviceCheck 未配置转盘,默认进入过板模式");
WorkModeUtil.AutoSelect(Name);
......
......@@ -22,13 +22,14 @@
#region Windows Form Designer generated code
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmBase));
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmBase));
resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmBase));
this.SuspendLayout();
//
// FrmBase
......
......@@ -11,6 +11,7 @@ using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using TSA_V.Common;
using TSA_V.Properties;
using UserFromControl;
namespace TSA_V
......@@ -102,7 +103,7 @@ namespace TSA_V
//(partentControl as Form).Resize += FrmBase_Resize;
(partentControl as Form).Move += FrmBase_Resize;
}
(partentControl as Form).Icon = global::TSA_V.Properties.Resources.neo_station1;
(partentControl as Form).Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
(partentControl as Form).AutoScaleMode = AutoScaleMode.None;
}
......
此文件的差异太大,无法显示。
......@@ -38,6 +38,7 @@
this.label3 = new System.Windows.Forms.Label();
this.cmbList = new System.Windows.Forms.ComboBox();
this.groupInfo = new System.Windows.Forms.GroupBox();
this.txtLedIndex = new System.Windows.Forms.TextBox();
this.linkCloseAll = new System.Windows.Forms.LinkLabel();
this.linkOpenAll = new System.Windows.Forms.LinkLabel();
this.linkUpdate = new System.Windows.Forms.LinkLabel();
......@@ -72,7 +73,6 @@
this.btnBack = new System.Windows.Forms.Button();
this.btnNew = new System.Windows.Forms.Button();
this.openFileDialog1 = new System.Windows.Forms.OpenFileDialog();
this.txtLedIndex = new System.Windows.Forms.TextBox();
this.groupBox1.SuspendLayout();
this.groupInfo.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.dgvList)).BeginInit();
......@@ -216,6 +216,15 @@
this.groupInfo.TabStop = false;
this.groupInfo.Text = "元器件基本信息";
//
// txtLedIndex
//
this.txtLedIndex.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtLedIndex.Location = new System.Drawing.Point(246, 302);
this.txtLedIndex.MaxLength = 30;
this.txtLedIndex.Name = "txtLedIndex";
this.txtLedIndex.Size = new System.Drawing.Size(151, 29);
this.txtLedIndex.TabIndex = 83;
//
// linkCloseAll
//
this.linkCloseAll.AutoSize = true;
......@@ -570,22 +579,12 @@
//
this.openFileDialog1.FileName = "openFileDialog1";
//
// txtLedIndex
//
this.txtLedIndex.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtLedIndex.Location = new System.Drawing.Point(246, 302);
this.txtLedIndex.MaxLength = 30;
this.txtLedIndex.Name = "txtLedIndex";
this.txtLedIndex.Size = new System.Drawing.Size(151, 29);
this.txtLedIndex.TabIndex = 83;
//
// FrmComponentList
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(1289, 729);
this.Controls.Add(this.groupBox1);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Controls.Add(this.groupBox1);
this.Name = "FrmComponentList";
this.Text = "元器件信息";
this.WindowState = System.Windows.Forms.FormWindowState.Maximized;
......
此文件的差异太大,无法显示。
......@@ -260,7 +260,6 @@ namespace TSA_V
this.Controls.Add(this.label2);
this.Controls.Add(this.TxtCode);
this.Controls.Add(this.label1);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Name = "FrmHistory";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "FrmHistory";
......
......@@ -110,7 +110,7 @@ namespace TSA_V
//
// pictureBox1
//
this.pictureBox1.Image = global::TSA_V.Properties.Resources.NEO_STATION;
this.pictureBox1.Image = global::TSA_V.Properties.Resources.NS;
this.pictureBox1.Location = new System.Drawing.Point(12, 12);
this.pictureBox1.Name = "pictureBox1";
this.pictureBox1.Size = new System.Drawing.Size(50, 50);
......
......@@ -68,7 +68,7 @@
this.btnDeviceSelect.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnDeviceSelect.Font = new System.Drawing.Font("微软雅黑", 18F);
this.btnDeviceSelect.ForeColor = System.Drawing.Color.White;
this.btnDeviceSelect.Location = new System.Drawing.Point(181, 248);
this.btnDeviceSelect.Location = new System.Drawing.Point(181, 174);
this.btnDeviceSelect.Name = "btnDeviceSelect";
this.btnDeviceSelect.Size = new System.Drawing.Size(240, 70);
this.btnDeviceSelect.TabIndex = 12;
......@@ -132,7 +132,7 @@
this.btnDebug.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnDebug.Font = new System.Drawing.Font("微软雅黑", 18F);
this.btnDebug.ForeColor = System.Drawing.Color.White;
this.btnDebug.Location = new System.Drawing.Point(181, 173);
this.btnDebug.Location = new System.Drawing.Point(427, 249);
this.btnDebug.Name = "btnDebug";
this.btnDebug.Size = new System.Drawing.Size(240, 70);
this.btnDebug.TabIndex = 5;
......@@ -148,7 +148,7 @@
this.btnPwdUpdate.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnPwdUpdate.Font = new System.Drawing.Font("微软雅黑", 18F);
this.btnPwdUpdate.ForeColor = System.Drawing.Color.White;
this.btnPwdUpdate.Location = new System.Drawing.Point(427, 248);
this.btnPwdUpdate.Location = new System.Drawing.Point(181, 250);
this.btnPwdUpdate.Name = "btnPwdUpdate";
this.btnPwdUpdate.Size = new System.Drawing.Size(240, 70);
this.btnPwdUpdate.TabIndex = 19;
......@@ -195,7 +195,7 @@
//
// pictureBox1
//
this.pictureBox1.Image = global::TSA_V.Properties.Resources.NEO_STATION;
this.pictureBox1.Image = global::TSA_V.Properties.Resources.NS;
this.pictureBox1.Location = new System.Drawing.Point(12, 12);
this.pictureBox1.Name = "pictureBox1";
this.pictureBox1.Size = new System.Drawing.Size(50, 50);
......
......@@ -130,7 +130,10 @@ namespace TSA_V
btnDeviceSelect.Visible = false;
btnLanguage.Visible = false;
}
btnWidthC.Visible = !Setting_NInit.Device_SoftMode;
btnPosition.Visible = !Setting_NInit.Device_SoftMode;
btnDebug.Visible = !Setting_NInit.Device_SoftMode;
}
private void btnDeviceSelect_Click(object sender, EventArgs e)
{
......
......@@ -997,7 +997,7 @@
RudN65tdA8sHzg46DF645Xrr8m2v29fvrLwzMBQydHc4cnjkLvvu5L2key/vZ9yff7DpIfph4SOpR+WP
lR7X/aj3Y+uI5ciZUdfRvidBTx6Mscae/5T+04fx/Kfkp+UTqhONk2aTp6fcp24+W/1s/Hnq8/npgp+l
f65+ofviu18cf+mbWTUz/pL/cuHX4lfyr468Xva6e9Z/9vGb5Dfzc4Vv5d8efcd41/s+7P3EfOYH7IeK
j3ofuz55f3q4kLyw8Bv3hPP74uYdwgAAAAlwSFlzAAALEAAACxABrSO9dQAA9UFJREFUeF7snYd620jT
j3ofuz55f3q4kLyw8Bv3hPP74uYdwgAAAAlwSFlzAAALDgAACw4BQL7hQQAA9UFJREFUeF7snYd620jT
rM/9X9v/7VpizsiZlC/hvNUNUrQs2RJJKO3U06YhhIndEwqDnv9X1u3h4eFnQMC7A8Wr233ZdPxerIQ8
yeNV010cBs/FZbtM20XaLbL9LG03eUOAFwTHEySDZ0kSwfZnAwJ+BXrS7Q9F3W6zepXWcdGibv21l4FG
pWW3TOpFXO3yGsO5WMdIADGi9vO4Gm/LeUwauro7DKGzWERSNKR5tiuV8qwu6q7bP1xmrQEBHw7sru32
......
......@@ -131,7 +131,7 @@ namespace TSA_V
//
// pictureBox1
//
this.pictureBox1.Image = global::TSA_V.Properties.Resources.NEO_STATION;
this.pictureBox1.Image = global::TSA_V.Properties.Resources.NS;
this.pictureBox1.Location = new System.Drawing.Point(12, 12);
this.pictureBox1.Name = "pictureBox1";
this.pictureBox1.Size = new System.Drawing.Size(50, 50);
......
......@@ -192,6 +192,9 @@ namespace TSA_V
LogUtil.error("加载相机出错:" + ex.ToString());
}
MouseManager.Start();
btnReplenish.Visible = !Setting_NInit.Device_SoftMode;
btnCom.Visible = !Setting_NInit.Device_SoftMode;
}
private void WorkModeUtil_checkModeEndEvent()
......@@ -237,6 +240,8 @@ namespace TSA_V
this.btnAOI.BackgroundImage = ImageManager.Menu_光学检测;
this.btnReplenish.BackgroundImage = ImageManager.Menu_补料;
}
btnReplenish.Visible = !Setting_NInit.Device_SoftMode;
btnCom.Visible = !Setting_NInit.Device_SoftMode;
}
void timer_Elapsed(object sender, System.Timers.ElapsedEventArgs e)
......@@ -261,7 +266,7 @@ namespace TSA_V
}
else
{
if (Setting_NInit.Device_AutoGuoBan)
if (Setting_NInit.Device_AutoGuoBan||Setting_NInit.Device_SoftMode)
{
}
......@@ -288,7 +293,7 @@ namespace TSA_V
}
if (IOManager.ISConnection())
{
if (!Setting_NInit.Device_AutoGuoBan)
if (!Setting_NInit.Device_AutoGuoBan &&(!Setting_NInit.Device_SoftMode))
{
IOBase.instance.CloseAllConnection();
}
......
......@@ -1240,6 +1240,9 @@
QmCC
</value>
</data>
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>25</value>
</metadata>
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
AAABAAkAMDAAAAEACACoDgAAlgAAACAgAAABACAAqBAAAD4PAAAQEAAAAQAgAGgEAADmHwAAFBQAAAEA
......
......@@ -2737,4 +2737,8 @@
<data name="xyAxisArrive" xml:space="preserve">
<value>XYaxial target</value>
</data>
<data name = "comInitError" xml:space = "preserve"> <value> {0}Initialization failure </value> </data>
<data name = "comOpenFail" xml:space = "preserve"> <value> Serial port {0} open failed </value> </data>
<data name = "FrmBoardSelect_chbSoftMode_Text" xml:space = "preserve"> <value> simplicity mode </value> </data>
<data name = "isRestart" xml:space = "preserve"> <value> Changing this mode requires reloading the device, whether to restart the software now? </value> </data>
</root>
\ No newline at end of file
......@@ -2715,4 +2715,8 @@
<data name="xyAxisArrive" xml:space="preserve">
<value>XY轴目标</value>
</data>
<data name = "comInitError" xml:space = "preserve"> <value> {0}初始化失败 </value> </data>
<data name = "comOpenFail" xml:space = "preserve"> <value> 串口{0}打开失败 </value> </data>
<data name = "FrmBoardSelect_chbSoftMode_Text" xml:space = "preserve"> <value> 简洁模式 </value> </data>
<data name = "isRestart" xml:space = "preserve"> <value> 更改此模式需要重新加载设备,是否现在重启软件? </value> </data>
</root>
\ No newline at end of file
......@@ -2889,4 +2889,9 @@
<data name="xyAxisArrive" xml:space="preserve">
<value>XY轴目标</value>
</data>
<data name = "comInitError" xml:space = "preserve"> <value> {0}初始化失败 </value> </data>
<data name = "comOpenFail" xml:space = "preserve"> <value> 串口{0}打开失败 </value> </data>
<data name = "FrmBoardSelect_chbSoftMode_Text" xml:space = "preserve"> <value> 简洁模式 </value> </data>
<data name = "isRestart" xml:space = "preserve"> <value> 更改此模式需要重新加载设备,是否现在重启软件? </value> </data>
</root>
\ No newline at end of file
......@@ -153,6 +153,16 @@ namespace TSA_V.Properties {
/// <summary>
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
/// </summary>
internal static System.Drawing.Bitmap NS {
get {
object obj = ResourceManager.GetObject("NS", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
/// </summary>
internal static System.Drawing.Bitmap ok {
get {
object obj = ResourceManager.GetObject("ok", resourceCulture);
......
......@@ -145,6 +145,9 @@
<data name="编辑" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\编辑.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="202403181014" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\202403181014.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="程序编辑背景" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\程序编辑背景.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
......@@ -199,6 +202,9 @@
<data name="元器件信息背景" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\元器件信息背景.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="NS" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\image\form\NS.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="开始工作" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\开始工作.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
......@@ -214,7 +220,4 @@
<data name="元器件信息" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\元器件信息.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="202403181014" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\202403181014.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
</root>
\ No newline at end of file
......@@ -582,6 +582,40 @@
</Content>
<None Include="packages.config" />
<None Include="Properties\app.manifest" />
<Content Include="image\form\NS.ico">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<None Include="image\form\NS.png" />
<Content Include="image\form\up.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="image\form\down.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="image\form\type2.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="image\form\left.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="image\form\type6.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="image\form\type1.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="image\form\right.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="image\form\type4.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="image\form\type5.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="image\form\type3.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="image\wait.gif">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
......
......@@ -442,8 +442,7 @@ namespace TSA_V
this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
this.ClientSize = new System.Drawing.Size(928, 501);
this.Controls.Add(this.panel1);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Controls.Add(this.panel1);
this.Name = "FrmIoManager";
this.Text = "IO模块调试";
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.FrmMain_FormClosing);
......
......@@ -701,8 +701,7 @@
this.Controls.Add(this.cmbMoveType);
this.Controls.Add(this.label12);
this.Controls.Add(this.cmbTargetType);
this.Controls.Add(this.label19);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Controls.Add(this.label19);
this.MaximizeBox = true;
this.MinimizeBox = true;
this.Name = "FrmPusicanTest";
......
......@@ -1089,8 +1089,7 @@
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(1344, 701);
this.Controls.Add(this.panel1);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
this.Name = "FrmBoardInfo";
this.Text = "新增程序";
this.WindowState = System.Windows.Forms.FormWindowState.Maximized;
......
......@@ -405,8 +405,7 @@
this.AutoSize = true;
this.ClientSize = new System.Drawing.Size(1247, 485);
this.Controls.Add(this.panel1);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
this.Name = "FrmBoardList";
this.Text = "程序编辑";
this.WindowState = System.Windows.Forms.FormWindowState.Maximized;
......
......@@ -378,8 +378,7 @@
this.Controls.Add(this.btnSaveAndNext);
this.Controls.Add(this.groupBox1);
this.Controls.Add(this.btnCancel);
this.Controls.Add(this.btnSave);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Controls.Add(this.btnSave);
this.Margin = new System.Windows.Forms.Padding(4);
this.Name = "FrmPointInfo";
this.Text = "组装信息";
......
此文件类型无法预览
using System;
using Org.BouncyCastle.Ocsp;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
......@@ -530,6 +531,65 @@ namespace TSA_V
g.Dispose();
}
public void ShowBoardPoint(BoardInfo board, bool showName, int rgbColor, params SMTPointInfo[] points)
{
if (!ISShow)
{
return;
}
Color pColor = Color.FromArgb(rgbColor);
ClearPoint();
Graphics g = panel1.CreateGraphics();
if (board != null && board.calInfo != null && board.calInfo.leftUpPoint != null && board.calInfo.rightBottomPoint != null)
{
DrawBoardArea(g, board.calInfo.leftUpPoint, board.calInfo.rightBottomPoint);
}
foreach (SMTPointInfo point in points)
{
int type = point.PointType;
int x = (int)point.NodePositionX;
int y = (int)point.NodePositionY;
int sizex = point.PointSizeX;
int sizey = point.PointSizeY;
DrawPoint(pColor, g, x, y, type, point.PolaritiesType, sizex, sizey, point.PenWidth, "");
if (showName)
{
int size = (sizex + sizey) / 2;
if (!CloseShowName)
{
if (point.CheckOK && (points.Length > 1))
{
g.DrawString(point.ShowText, new Font("Arial ", size, FontStyle.Regular), Brushes.Red, x - size / 2 + 5, y + size / 2 + 2);
}
else
{
Brush brush = new SolidBrush(pColor);
g.DrawString(point.ShowText, new Font("Arial ", size, FontStyle.Regular), brush, x - size / 2 + 5, y + size / 2 + 2);
}
}
}
}
g.Dispose();
}
public void DrawBoardArea(Graphics g,Point point1,Point point2)
{
if (!ISShow)
{
return;
}
Color boardColor = Color.LightGray;
int line = 1;
g.DrawRectangle(new Pen(boardColor,line),new Rectangle( point1.X,point1.Y,(point2.X-point1.X),(point2.Y-point1.Y)));
//g.DrawLine(new Pen(boardColor, line), point1.X, point1.Y, point2.X,point1.Y);
//g.DrawLine(new Pen(boardColor, line), point1.X, point1.Y, point1.X, point2.Y);
//g.DrawLine(new Pen(boardColor, line), point1.X, point2.Y, point2.X, point2.Y);
//g.DrawLine(new Pen(boardColor, line), point2.X, point2.Y, point1.X, point2.Y);
}
private void timer1_Tick(object sender, EventArgs e)
{
......@@ -538,7 +598,7 @@ namespace TSA_V
panAoi.BackColor = Color.Black;
panAoi.Visible = true;
}
else if (PTipSoundProcess.IsAlarm(out string msg) &&(! PTipSoundProcess.ViewScreen_Show))
else if (PTipSoundProcess.IsAlarm(out string msg) &&(! PTipSoundProcess.ViewScreen_Show)&&(!Setting_NInit.Device_SoftMode))
{
panAoi.Visible = false;
if (panel1.BackgroundImage != null)
......
......@@ -32,7 +32,7 @@ namespace TSA_V
public string defFile { get
{
//return @"G:\1.bmp";
return Application.StartupPath + @"\test (2).bmp";
//return Application.StartupPath + @"\test (2).bmp";
return Application.StartupPath + @"\test.bmp";
}
set { } }
......
......@@ -42,6 +42,7 @@
this.lblWait = new System.Windows.Forms.Label();
this.chbWorkSingleStart = new System.Windows.Forms.CheckBox();
this.chbOffLine = new System.Windows.Forms.CheckBox();
this.chbSoftMode = new System.Windows.Forms.CheckBox();
this.SuspendLayout();
//
// label1
......@@ -67,7 +68,7 @@
//
this.btnNext.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnNext.Font = new System.Drawing.Font("微软雅黑", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnNext.Location = new System.Drawing.Point(340, 346);
this.btnNext.Location = new System.Drawing.Point(340, 387);
this.btnNext.Name = "btnNext";
this.btnNext.Size = new System.Drawing.Size(120, 45);
this.btnNext.TabIndex = 273;
......@@ -79,7 +80,7 @@
//
this.btnBack.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnBack.Font = new System.Drawing.Font("微软雅黑", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnBack.Location = new System.Drawing.Point(88, 346);
this.btnBack.Location = new System.Drawing.Point(88, 387);
this.btnBack.Name = "btnBack";
this.btnBack.Size = new System.Drawing.Size(120, 45);
this.btnBack.TabIndex = 272;
......@@ -91,7 +92,7 @@
//
this.lblBoardMsg.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblBoardMsg.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(192)))), ((int)(((byte)(192)))));
this.lblBoardMsg.Location = new System.Drawing.Point(12, 274);
this.lblBoardMsg.Location = new System.Drawing.Point(12, 315);
this.lblBoardMsg.Name = "lblBoardMsg";
this.lblBoardMsg.Size = new System.Drawing.Size(510, 69);
this.lblBoardMsg.TabIndex = 5;
......@@ -125,7 +126,7 @@
//
this.btnChangeW.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnChangeW.Font = new System.Drawing.Font("微软雅黑", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnChangeW.Location = new System.Drawing.Point(214, 346);
this.btnChangeW.Location = new System.Drawing.Point(214, 387);
this.btnChangeW.Name = "btnChangeW";
this.btnChangeW.Size = new System.Drawing.Size(120, 45);
this.btnChangeW.TabIndex = 277;
......@@ -152,7 +153,7 @@
//
this.chbWorkSingleStart.AutoSize = true;
this.chbWorkSingleStart.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.chbWorkSingleStart.Location = new System.Drawing.Point(151, 246);
this.chbWorkSingleStart.Location = new System.Drawing.Point(151, 240);
this.chbWorkSingleStart.Name = "chbWorkSingleStart";
this.chbWorkSingleStart.Size = new System.Drawing.Size(182, 24);
this.chbWorkSingleStart.TabIndex = 279;
......@@ -164,7 +165,7 @@
//
this.chbOffLine.AutoSize = true;
this.chbOffLine.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.chbOffLine.Location = new System.Drawing.Point(151, 204);
this.chbOffLine.Location = new System.Drawing.Point(151, 201);
this.chbOffLine.Name = "chbOffLine";
this.chbOffLine.Size = new System.Drawing.Size(112, 24);
this.chbOffLine.TabIndex = 280;
......@@ -172,11 +173,24 @@
this.chbOffLine.UseVisualStyleBackColor = true;
this.chbOffLine.CheckedChanged += new System.EventHandler(this.chbOffLine_CheckedChanged);
//
// chbSoftMode
//
this.chbSoftMode.AutoSize = true;
this.chbSoftMode.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.chbSoftMode.Location = new System.Drawing.Point(151, 279);
this.chbSoftMode.Name = "chbSoftMode";
this.chbSoftMode.Size = new System.Drawing.Size(84, 24);
this.chbSoftMode.TabIndex = 281;
this.chbSoftMode.Text = "简洁模式";
this.chbSoftMode.UseVisualStyleBackColor = true;
this.chbSoftMode.CheckedChanged += new System.EventHandler(this.chbSoftMode_CheckedChanged);
//
// FrmBoardSelect
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(534, 431);
this.ClientSize = new System.Drawing.Size(534, 460);
this.Controls.Add(this.chbSoftMode);
this.Controls.Add(this.lblWait);
this.Controls.Add(this.btnChangeW);
this.Controls.Add(this.chbGuoban);
......@@ -212,5 +226,6 @@
private System.Windows.Forms.Label lblWait;
private System.Windows.Forms.CheckBox chbWorkSingleStart;
private System.Windows.Forms.CheckBox chbOffLine;
private System.Windows.Forms.CheckBox chbSoftMode;
}
}
\ No newline at end of file
......@@ -36,7 +36,13 @@ namespace TSA_V
txtCode.Focus();
SetScreen();
if (!IOBase.NoLine)
timer1.Start();
timer1.Start();
if (Setting_NInit.Device_SoftMode)
{
chbSoftMode.Checked = true;
}
IsInitOk = true;
CheckIfHaveincomplete();
}
......@@ -106,7 +112,8 @@ namespace TSA_V
BoardManager.CurrBoard = board;
LogUtil.info("切换到新板子:" + board.boardName+",保存当前工作的程序名称");
Setting_NInit.Work_ProcedureName= board.boardName;
FrmProjectorScreen.instance.ShowPoint(false,board.PointColor, board.GetSmtList().ToArray());
BoardInfo showBoard = chbSoftMode.Checked ? board : null;
FrmProjectorScreen.instance.ShowBoardPoint(showBoard, false,board.PointColor, board.GetSmtList().ToArray());
}
}
}
......@@ -126,6 +133,9 @@ namespace TSA_V
{
if (CanStart())
{
WorkInfo.LastDBId = 0;
FrmWork fw = new FrmWork();
this.Hide();
......@@ -343,6 +353,8 @@ namespace TSA_V
chbWorkSingleStart.Visible = false;
chbOffLine.Checked = false;
chbOffLine.Visible = false;
chbSoftMode.Checked = false;
chbSoftMode.Visible = false;
}
else
{
......@@ -355,6 +367,7 @@ namespace TSA_V
}
chbWorkSingleStart.Visible = true;
chbOffLine.Visible = true;
chbSoftMode.Visible = true ;
}
}
......@@ -363,7 +376,8 @@ namespace TSA_V
if (chbOffLine.Checked)
{
chbGuoban.Checked = false;
chbWorkSingleStart.Checked = false;
chbWorkSingleStart.Checked = false;
chbSoftMode.Checked = false;
}
}
......@@ -372,7 +386,8 @@ namespace TSA_V
if (chbWorkSingleStart.Checked)
{
chbGuoban.Checked = false;
chbOffLine.Checked = false;
chbOffLine.Checked = false;
chbSoftMode.Checked = false;
}
}
......@@ -417,5 +432,46 @@ namespace TSA_V
}
}
}
private void chbSoftMode_CheckedChanged(object sender, EventArgs e)
{
if (chbSoftMode.Checked)
{
chbGuoban.Checked = false;
chbOffLine.Checked = false;
chbWorkSingleStart.Checked = false;
chbGuoban.Visible = false;
chbOffLine.Visible = false;
chbWorkSingleStart.Visible = false;
}
else
{
chbGuoban.Visible = true;
chbOffLine.Visible = true;
chbWorkSingleStart.Visible = true;
}
if (!IsInitOk)
{
return;
}
if (!Setting_NInit.Device_SoftMode.Val.Equals(chbSoftMode.Checked))
{
Setting_NInit.Device_SoftMode= chbSoftMode.Checked;
LogUtil.info("更改简洁模式:=" + Setting_NInit.Device_SoftMode);
string msg = ResourceCulture.GetString("isRestart", "更改此模式需要重新加载设备,是否现在重启软件?" );
DialogResult dr = MessageBox.Show(msg, ResourceCulture.GetString("提示"), MessageBoxButtons.OKCancel, MessageBoxIcon.Question);
if (dr == DialogResult.OK)
{
FrmProjectorScreen.instance.Close();
this.Close();
Application.Exit();
System.Environment.Exit(0);
}
}
}
}
}
......@@ -947,7 +947,6 @@
this.Controls.Add(this.lblMsg);
this.Controls.Add(this.menuStrip1);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.MainMenuStrip = this.menuStrip1;
this.Margin = new System.Windows.Forms.Padding(4);
this.Name = "FrmWork";
......
......@@ -310,6 +310,7 @@ namespace TSA_V
}
}
FormStatus();
lblMsg.Visible = !Setting_NInit.Device_SoftMode;
lblMsg.Text = TSAVBean.GetShowMsg();
lblMsg.ForeColor = Color.Red;
......@@ -344,7 +345,7 @@ namespace TSA_V
private DateTime LastTime = DateTime.Now;
private bool isShowAOI = false;
private void ShowAOI()
private void ShowAOI(bool formCheck=false )
{
if (isShowAOI)
{
......@@ -359,7 +360,7 @@ namespace TSA_V
try
{
//判断是否需要AOI检测
if (TSAVBean.IsNeedAOI && TSAVBean.Work.IsShowAOI.Equals(false))
if (TSAVBean.IsNeedAOI &&(formCheck|| TSAVBean.Work.IsShowAOI.Equals(false)))
{
TSAVBean.Work.IsShowAOI = true;
LogUtil.info(" 工作完成, 清理投影内容,弹出 提示框提示进入AOI检测 ,设置 AOIopen = true;");
......@@ -514,6 +515,11 @@ namespace TSA_V
StartRun();
}
FrmProjectorScreen.instance.ClearPoint();
if(Setting_NInit.Device_SoftMode)
{
FrmProjectorScreen.instance.ShowBoardPoint(BoardManager.CurrBoard, true, BoardManager.CurrBoard.PointColor, board.GetSmtList().ToArray());
}
timer.Start();
LogUtil.info(Name + " Shown end ");
......@@ -848,8 +854,9 @@ namespace TSA_V
if (workSmtList.Count <= preIndex)
{
PTipSoundProcess.PlayFile(Setting_NInit.Set_BoardEndSound);
ShowAOI();
preIndex = 0;
ShowAOI(true);
preIndex = 0;
isShowAOI = false;
}
else if (preIndex < 0)
{
......@@ -873,7 +880,16 @@ namespace TSA_V
}
LogUtil.debug($"投影点位:{smtPoint.PN}-{smtPoint.TagNo}-{smtPoint.PositionNum}");
FrmProjectorScreen.instance.ShowPoint(true,BoardManager.CurrBoard.PointColor, smtPoint);
if (Setting_NInit.Device_SoftMode)
{
FrmProjectorScreen.instance.ShowBoardPoint(BoardManager.CurrBoard, true, BoardManager.CurrBoard.PointColor, smtPoint);
}
else
{
FrmProjectorScreen.instance.ShowPoint(true, BoardManager.CurrBoard.PointColor, smtPoint);
}
#region 这段代码是不是没必要
//ComponetInfo com = CSVBomManager.GetCom(this.board.bomName, smtPoint,true);
//TSAVPosition position = null;
......

20241015
字体都使用微软雅黑。
选择程序界面增加:简洁模式,更改后提示重启软件。
aoi节点名称从1开始
aoi结果显示列表:编号,元器件,结果
aoi结果可以选择图片进行切换
简洁模式:
隐藏元器件
隐藏备料
不连接设备,不显示提示框。
点位配置界面“
20240909
增加RGBLED 库位,库位表配置格式如下:类型=3,灯索引#号分割。
20_16,116,3,COM3,15,6#7#8#9#17,
......
......@@ -12,6 +12,19 @@ namespace UserFromControl
{
public static Image imgGrey;
public static Image imgGreen;
public static Image imgUp;
public static Image imgDown;
public static Image imgLeft;
public static Image imgRight;
//点类型,1 = 点,2 = +,3 =|,4 = -,5 = 方形,6 = 圆圈
public static Image imgType1;
public static Image imgType2;
public static Image imgType3;
public static Image imgType4;
public static Image imgType5;
public static Image imgType6;
/// <summary>
/// 是否已经初始化过了
/// </summary>
......@@ -23,6 +36,18 @@ namespace UserFromControl
IsInit = true;
imgGrey = Image.FromFile(Application.StartupPath + "\\image\\gray2.png");
imgGreen = Image.FromFile(Application.StartupPath+"\\image\\green.png");
imgUp = Image.FromFile(Application.StartupPath + "\\image\\form\\up.png");
imgDown = Image.FromFile(Application.StartupPath + "\\image\\form\\down.png");
imgLeft = Image.FromFile(Application.StartupPath + "\\image\\form\\left.png");
imgRight = Image.FromFile(Application.StartupPath + "\\image\\form\\right.png");
imgType1 = Image.FromFile(Application.StartupPath + "\\image\\form\\type1.png");
imgType2 = Image.FromFile(Application.StartupPath + "\\image\\form\\type2.png");
imgType3 = Image.FromFile(Application.StartupPath + "\\image\\form\\type3.png");
imgType4 = Image.FromFile(Application.StartupPath + "\\image\\form\\type4.png");
imgType5 = Image.FromFile(Application.StartupPath + "\\image\\form\\type5.png");
imgType6 = Image.FromFile(Application.StartupPath + "\\image\\form\\type6.png");
}
catch (Exception ex)
{
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!