Commit 850f0e20 LN

增加提示音

1 个父辈 41e0eb5f
......@@ -139,7 +139,15 @@ namespace TSA_V.Common
public static MyConfig<bool> Set_TipSound = true;
[MyConfigComment("是否限制鼠标不能移出主屏幕")]
public static MyConfig<bool> Set_CursorProcess= true;
[MyConfigComment("报警音效文件")]
public static MyConfig<string> Set_AlarmSoundFile = @"\sound\alarm.wav";
[MyConfigComment("新板子开始音效文件")]
public static MyConfig<string> Set_NewBoardSound = @"\sound\newBoard.wav";
[MyConfigComment("板子结束音效文件")]
public static MyConfig<string> Set_BoardEndSound = @"\sound\boardEnd.wav";
[MyConfigComment("点位切换音效文件")]
public static MyConfig<string> Set_PointChangeSound = @"\sound\pointC.wav";
public static void ChangeConfig()
{
......
......@@ -108,16 +108,16 @@
<Compile Include="deviceLibrary\IO\NiRenIO.cs" />
<Compile Include="deviceLibrary\ledLabel\LedLabelController.cs" />
<Compile Include="deviceLibrary\ledLabel\LabelInfo.cs" />
<Compile Include="manager\ProjectorProcess.cs" />
<Compile Include="manager\LedManager.cs" />
<Compile Include="manager\PTipSoundProcess.cs" />
<Compile Include="deviceLibrary\led\LedManager.cs" />
<Compile Include="manager\LineWidthManager.cs" />
<Compile Include="manager\ResourceControl.cs" />
<Compile Include="manager\ScanRequestLabel.cs" />
<Compile Include="manager\StockInfo.cs" />
<Compile Include="manager\TSAVBean.cs" />
<Compile Include="manager\TSAVBean_Partial.cs" />
<Compile Include="manager\TSAVStatus.cs" />
<Compile Include="manager\WorkInfo.cs" />
<Compile Include="deviceLibrary\ledLabel\ScanRequestLabel.cs" />
<Compile Include="manager\work\StockInfo.cs" />
<Compile Include="manager\work\TSAVBean.cs" />
<Compile Include="manager\work\TSAVBean_Partial.cs" />
<Compile Include="manager\work\TSAVStatus.cs" />
<Compile Include="manager\work\WorkInfo.cs" />
<Compile Include="manager\WorkModeUtil.cs" />
<Compile Include="mes\DeviceStatus.cs" />
<Compile Include="mes\MesUtil.cs" />
......
......@@ -12,7 +12,7 @@ using static TSA_V.Common.LogUtil;
namespace TSA_V
{
public class ProjectorProcess
public class PTipSoundProcess
{
/// <summary>
/// 第二屏幕是否显示,默认不显示
......@@ -28,10 +28,11 @@ namespace TSA_V
private static bool InPlay = false;
private static string soundFileName = @"\sound\alarm.wav";
//private static string soundFileName = @"\sound\alarm.wav";
// 创建一个新的 SoundPlayer 实例
private static SoundPlayer player = new SoundPlayer();
private static SoundPlayer alarmPlayer = new SoundPlayer();
public static void Init()
{
if (proTimer == null)
......@@ -64,11 +65,14 @@ namespace TSA_V
private static void ProTimer_Elapsed(object sender, System.Timers.ElapsedEventArgs e)
{
if (ProjectorProcess.IsAlarm(out string msg))
if (PTipSoundProcess.IsAlarm(out string msg))
{
if (InPlay)
{
if (!Setting_NInit.Set_AlarmSound)
{
StopPlay();
}
}
else
{
......@@ -85,7 +89,7 @@ namespace TSA_V
}
public static void StartPlay( )
private static void StartPlay( )
{
if (!Setting_NInit.Set_AlarmSound)
{
......@@ -93,7 +97,7 @@ namespace TSA_V
}
// 音频文件路径
string audioFilePath = Application.StartupPath+ soundFileName;
string audioFilePath = Application.StartupPath+ Setting_NInit.Set_AlarmSoundFile;
LogUtil.info("开始播放:" + audioFilePath);
try
......@@ -101,9 +105,9 @@ namespace TSA_V
if(File.Exists(audioFilePath))
{
// 设置要播放的音频文件路径
player.SoundLocation = audioFilePath;
alarmPlayer.SoundLocation = audioFilePath;
// 播放音频
player.PlayLooping();
alarmPlayer.PlayLooping();
}
else
......@@ -121,14 +125,58 @@ namespace TSA_V
}
public static void StopPlay()
private static void StopPlay()
{
InPlay = false;
LogUtil.info("停止播放音频");
// 停止播放音频
player.Stop();
alarmPlayer.Stop();
}
public static void PlayFile(string filename)
{
if (!Setting_NInit.Set_TipSound)
{
return;
}
if (InPlay)
{
//报警中不播放。
return;
}
// 音频文件路径
string audioFilePath = Application.StartupPath + filename;
if (filename.Equals(Setting_NInit.Set_PointChangeSound))
{
}
else
{
LogUtil.info("开始播放:" + audioFilePath);
}
try
{
if (File.Exists(audioFilePath))
{
// 设置要播放的音频文件路径
alarmPlayer.SoundLocation = audioFilePath;
// 播放音频
alarmPlayer.Play();
}
else
{
LogUtil.error("未找到音频文件:" + audioFilePath);
}
}
catch (Exception ex)
{
LogUtil.error("发生错误:" + ex.Message);
}
}
}
}
......@@ -134,7 +134,7 @@ namespace TSA_V.DeviceLibrary
//return ResourceControl.GetString(ResourceControl.InitXFail, "振镜初始化失败");
}
});
ProjectorProcess.Init();
PTipSoundProcess.Init();
serverCommunication = new ServerCommunication();
serverCommunication.StartConnectServer();
return "";
......
......@@ -59,13 +59,15 @@ namespace TSA_V.DeviceLibrary
{
LogUtil.info("开始程序【" + boardInfo.boardName + "】的插件");
//LedLabelController.CloseAll();
}
}
IsShowAOI = false;
currPoint = null;
IsWorking = true;
endWorkTime = DateTime.Now;
IsWaitMove = false;
BoardCount = 0;
PTipSoundProcess.PlayFile(Setting_NInit.Set_NewBoardSound);
}
public List<SMTPointInfo> GetSmtList()
{
......@@ -136,6 +138,7 @@ namespace TSA_V.DeviceLibrary
IsShowAOI = false;
IsWorking = false;
IsWaitMove = false;
PTipSoundProcess.PlayFile(Setting_NInit.Set_BoardEndSound);
}
}catch(Exception ex)
{
......@@ -217,6 +220,7 @@ namespace TSA_V.DeviceLibrary
}
else
{
PTipSoundProcess.PlayFile(Setting_NInit.Set_PointChangeSound);
currPoint = GetSmtList()[currIndex];
//LogUtil.info(" 程序【" + currBoard.boardName + "】插件【" + currPoint.pointName + "】");
......
......@@ -29,6 +29,9 @@
private void InitializeComponent()
{
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.chbMouse = new System.Windows.Forms.CheckBox();
this.chbWorkT = new System.Windows.Forms.CheckBox();
this.chbAlarmT = new System.Windows.Forms.CheckBox();
this.lblconfigdetial = new System.Windows.Forms.Label();
this.chbDisSideCylinder = new System.Windows.Forms.CheckBox();
this.chbDisBottomCylinder = new System.Windows.Forms.CheckBox();
......@@ -71,23 +74,56 @@
//
// groupBox1
//
this.groupBox1.Controls.Add(this.chbMouse);
this.groupBox1.Controls.Add(this.chbWorkT);
this.groupBox1.Controls.Add(this.chbAlarmT);
this.groupBox1.Controls.Add(this.lblconfigdetial);
this.groupBox1.Controls.Add(this.chbDisSideCylinder);
this.groupBox1.Controls.Add(this.chbDisBottomCylinder);
this.groupBox1.Controls.Add(this.chbISDebug);
this.groupBox1.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.groupBox1.Location = new System.Drawing.Point(27, 13);
this.groupBox1.Location = new System.Drawing.Point(27, 5);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(541, 95);
this.groupBox1.Size = new System.Drawing.Size(541, 190);
this.groupBox1.TabIndex = 284;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "其他参数";
//
// chbMouse
//
this.chbMouse.AutoSize = true;
this.chbMouse.Location = new System.Drawing.Point(51, 153);
this.chbMouse.Name = "chbMouse";
this.chbMouse.Size = new System.Drawing.Size(123, 21);
this.chbMouse.TabIndex = 293;
this.chbMouse.Text = "鼠标保持在主屏幕";
this.chbMouse.UseVisualStyleBackColor = true;
//
// chbWorkT
//
this.chbWorkT.AutoSize = true;
this.chbWorkT.Location = new System.Drawing.Point(51, 122);
this.chbWorkT.Name = "chbWorkT";
this.chbWorkT.Size = new System.Drawing.Size(99, 21);
this.chbWorkT.TabIndex = 292;
this.chbWorkT.Text = "开启工作音效";
this.chbWorkT.UseVisualStyleBackColor = true;
//
// chbAlarmT
//
this.chbAlarmT.AutoSize = true;
this.chbAlarmT.Location = new System.Drawing.Point(51, 91);
this.chbAlarmT.Name = "chbAlarmT";
this.chbAlarmT.Size = new System.Drawing.Size(99, 21);
this.chbAlarmT.TabIndex = 291;
this.chbAlarmT.Text = "开启报警音效";
this.chbAlarmT.UseVisualStyleBackColor = true;
//
// lblconfigdetial
//
this.lblconfigdetial.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.lblconfigdetial.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblconfigdetial.Location = new System.Drawing.Point(443, 66);
this.lblconfigdetial.Location = new System.Drawing.Point(443, 161);
this.lblconfigdetial.Name = "lblconfigdetial";
this.lblconfigdetial.Size = new System.Drawing.Size(91, 23);
this.lblconfigdetial.TabIndex = 290;
......@@ -97,7 +133,7 @@
// chbDisSideCylinder
//
this.chbDisSideCylinder.AutoSize = true;
this.chbDisSideCylinder.Location = new System.Drawing.Point(103, 96);
this.chbDisSideCylinder.Location = new System.Drawing.Point(399, 22);
this.chbDisSideCylinder.Name = "chbDisSideCylinder";
this.chbDisSideCylinder.Size = new System.Drawing.Size(99, 21);
this.chbDisSideCylinder.TabIndex = 21;
......@@ -108,18 +144,17 @@
// chbDisBottomCylinder
//
this.chbDisBottomCylinder.AutoSize = true;
this.chbDisBottomCylinder.Location = new System.Drawing.Point(103, 59);
this.chbDisBottomCylinder.Location = new System.Drawing.Point(51, 60);
this.chbDisBottomCylinder.Name = "chbDisBottomCylinder";
this.chbDisBottomCylinder.Size = new System.Drawing.Size(99, 21);
this.chbDisBottomCylinder.TabIndex = 20;
this.chbDisBottomCylinder.Text = "禁用底部气缸";
this.chbDisBottomCylinder.UseVisualStyleBackColor = true;
this.chbDisBottomCylinder.Visible = false;
//
// chbISDebug
//
this.chbISDebug.AutoSize = true;
this.chbISDebug.Location = new System.Drawing.Point(103, 34);
this.chbISDebug.Location = new System.Drawing.Point(51, 29);
this.chbISDebug.Name = "chbISDebug";
this.chbISDebug.Size = new System.Drawing.Size(183, 21);
this.chbISDebug.TabIndex = 19;
......@@ -140,9 +175,9 @@
this.groupBox4.Controls.Add(this.label3);
this.groupBox4.Controls.Add(this.cmbBoardList);
this.groupBox4.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.groupBox4.Location = new System.Drawing.Point(27, 127);
this.groupBox4.Location = new System.Drawing.Point(27, 211);
this.groupBox4.Name = "groupBox4";
this.groupBox4.Size = new System.Drawing.Size(541, 237);
this.groupBox4.Size = new System.Drawing.Size(541, 214);
this.groupBox4.TabIndex = 284;
this.groupBox4.TabStop = false;
this.groupBox4.Text = "坐标修正(会修正所选程序的组装坐标,点击更新生效)";
......@@ -302,7 +337,7 @@
//
this.btnCancel.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnCancel.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnCancel.Location = new System.Drawing.Point(312, 568);
this.btnCancel.Location = new System.Drawing.Point(312, 608);
this.btnCancel.Name = "btnCancel";
this.btnCancel.Size = new System.Drawing.Size(120, 45);
this.btnCancel.TabIndex = 279;
......@@ -314,7 +349,7 @@
//
this.btnOk.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnOk.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnOk.Location = new System.Drawing.Point(161, 568);
this.btnOk.Location = new System.Drawing.Point(161, 608);
this.btnOk.Name = "btnOk";
this.btnOk.Size = new System.Drawing.Size(120, 45);
this.btnOk.TabIndex = 278;
......@@ -329,7 +364,7 @@
this.gbKNDSetting.Controls.Add(this.txtKNDIP);
this.gbKNDSetting.Controls.Add(this.lblKNDIP);
this.gbKNDSetting.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.gbKNDSetting.Location = new System.Drawing.Point(27, 171);
this.gbKNDSetting.Location = new System.Drawing.Point(27, 211);
this.gbKNDSetting.Name = "gbKNDSetting";
this.gbKNDSetting.Size = new System.Drawing.Size(267, 140);
this.gbKNDSetting.TabIndex = 285;
......@@ -383,9 +418,9 @@
this.groupBox3.Controls.Add(this.txtCode);
this.groupBox3.Controls.Add(this.lblCode);
this.groupBox3.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.groupBox3.Location = new System.Drawing.Point(27, 379);
this.groupBox3.Location = new System.Drawing.Point(27, 430);
this.groupBox3.Name = "groupBox3";
this.groupBox3.Size = new System.Drawing.Size(541, 168);
this.groupBox3.Size = new System.Drawing.Size(541, 160);
this.groupBox3.TabIndex = 286;
this.groupBox3.TabStop = false;
this.groupBox3.Text = "DCS测试";
......@@ -469,7 +504,7 @@
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(605, 633);
this.ClientSize = new System.Drawing.Size(605, 676);
this.Controls.Add(this.groupBox3);
this.Controls.Add(this.groupBox1);
this.Controls.Add(this.groupBox4);
......@@ -527,5 +562,8 @@
private System.Windows.Forms.CheckBox chbDisSideCylinder;
private System.Windows.Forms.CheckBox chbDisBottomCylinder;
private System.Windows.Forms.Label lblconfigdetial;
private System.Windows.Forms.CheckBox chbWorkT;
private System.Windows.Forms.CheckBox chbAlarmT;
private System.Windows.Forms.CheckBox chbMouse;
}
}
\ No newline at end of file
......@@ -18,21 +18,17 @@ namespace TSA_V
{
InitializeComponent();
List<string> typeList = new List<string>();
string[] typeList = ResourceCulture.GetPTypes() ;
this.cmbType.Items.Clear();
typeList.AddRange(new string[] {
"1=●",
"2=✚",
"3=┃",
"4=━━",
"5=□",
"6=○",
"7=极性_上方",
"8=极性_下方",
"9=极性_左方",
"10=极性_右方"
});
//typeList.AddRange(new string[] {
//"1=●",
//"2=✚",
//"3=┃",
//"4=━━",
//"5=□",
//"6=○"
//});
foreach (string str in typeList)
{
cmbType.Items.Add(str);
......@@ -68,6 +64,9 @@ namespace TSA_V
chbDisBottomCylinder.Visible = false;
chbDisSideCylinder.Visible = false;
}
chbAlarmT.Checked = Setting_NInit.Set_AlarmSound;
chbMouse.Checked = Setting_NInit.Set_CursorProcess;
chbWorkT.Checked = Setting_NInit.Set_TipSound;
}
public void LoadCom()
{
......@@ -128,7 +127,10 @@ namespace TSA_V
string server = txtAddr.Text.Trim();
//ConfigAppSettings.SaveValue(Setting_Init.DCSServerAddr, server);
Setting_NInit.App_DCSServerAddr = server;
LogUtil.info($"保存配置成功: 调试{ isDebug },禁用底部气缸{disBottom},禁用侧挡气缸{disSide},地址{server} ");
Setting_NInit.Set_AlarmSound = chbAlarmT.Checked;
Setting_NInit.Set_TipSound = chbWorkT.Checked;
Setting_NInit.Set_CursorProcess = chbMouse.Checked;
LogUtil.info($"保存配置成功: 调试{ isDebug },禁用底部气缸{disBottom},禁用侧挡气缸{disSide},地址{server} ,报警提示{Setting_NInit.Set_AlarmSound},工作音效{Setting_NInit.Set_TipSound},鼠标限制{Setting_NInit.Set_CursorProcess}");
MessageBox.Show(ResourceCulture.GetString(ResourceCulture.SaveOk, "保存成功"));
}
......
......@@ -395,7 +395,7 @@ namespace TSA_V
if (!FrmProjectorScreen.instance.ISShow)
{
LogUtil.info("检测到工三个个显示器,显示投影界面,视图提示界面");
ProjectorProcess.ViewScreen_Show = true;
PTipSoundProcess.ViewScreen_Show = true;
int secondSIndex = 2;
if (FrmProjectorScreen.instance.ScreenIndex == 2)
{
......
......@@ -2695,4 +2695,8 @@
<data name = "Col_Count_N" xml:space = "preserve"> <value> Modified Quantity </value> </data>
<data name = "Col_Text" xml:space = "preserve"> <value> projected text </value> </data>
<data name = "FrmComponentList_btnImport_Text" xml:space = "preserve"> <value> Import </value> </data>
<data name = "FrmDeviceConfig_chbMouse_Text" xml:space = "preserve"> <value> Keep the mouse on the home screen </value> </data>
<data name = "FrmDeviceConfig_chbWorkT_Text" xml:space = "preserve"> <value> Turn on the work sound </value> </data>
<data name = "FrmDeviceConfig_chbAlarmT_Text" xml:space = "preserve"> <value> Turn on the alarm sound </value> </data>
<data name = "FrmDeviceConfig_chbDisBottomCylinder_Text" xml:space = "preserve"> <value> Disable bottom cylinder </value> </data>
</root>
\ No newline at end of file
......@@ -2679,4 +2679,8 @@
<data name = "Col_Count_N" xml:space = "preserve"> <value> 修改后数量 </value> </data>
<data name = "Col_Text" xml:space = "preserve"> <value> 投影文字 </value> </data>
<data name = "FrmComponentList_btnImport_Text" xml:space = "preserve"> <value> 导入 </value> </data>
<data name = "FrmDeviceConfig_chbMouse_Text" xml:space = "preserve"> <value> 鼠标保持在主屏幕 </value> </data>
<data name = "FrmDeviceConfig_chbWorkT_Text" xml:space = "preserve"> <value> 开启工作音效 </value> </data>
<data name = "FrmDeviceConfig_chbAlarmT_Text" xml:space = "preserve"> <value> 开启报警音效 </value> </data>
<data name = "FrmDeviceConfig_chbDisBottomCylinder_Text" xml:space = "preserve"> <value> 禁用底部气缸 </value> </data>
</root>
\ No newline at end of file
......@@ -2693,5 +2693,9 @@
<data name = "SaveOk" xml:space = "preserve"> <value> 保存成功 </value> </data>
<data name = "Col_Count_N" xml:space = "preserve"> <value> 修改后数量 </value> </data>
<data name = "Col_Text" xml:space = "preserve"> <value> 投影文字 </value> </data>
<data name = "FrmComponentList_btnImport_Text" xml:space = "preserve"> <value> 导入 </value> </data>
<data name = "FrmComponentList_btnImport_Text" xml:space = "preserve"> <value> 导入 </value> </data>
<data name = "FrmDeviceConfig_chbMouse_Text" xml:space = "preserve"> <value> 鼠标保持在主屏幕 </value> </data>
<data name = "FrmDeviceConfig_chbWorkT_Text" xml:space = "preserve"> <value> 开启工作音效 </value> </data>
<data name = "FrmDeviceConfig_chbAlarmT_Text" xml:space = "preserve"> <value> 开启报警音效 </value> </data>
<data name = "FrmDeviceConfig_chbDisBottomCylinder_Text" xml:space = "preserve"> <value> 禁用底部气缸 </value> </data>
</root>
\ No newline at end of file
......@@ -210,7 +210,7 @@
<Compile Include="deviceDebug\FrmUpdatePwd.Designer.cs">
<DependentUpon>FrmUpdatePwd.cs</DependentUpon>
</Compile>
<Compile Include="FormManager.cs" />
<Compile Include="manager\FormManager.cs" />
<Compile Include="frmBoard\FrmAddBoard.cs">
<SubType>Form</SubType>
</Compile>
......@@ -401,7 +401,7 @@
<Compile Include="workForm\FrmWorkMenu.Designer.cs">
<DependentUpon>FrmWorkMenu.cs</DependentUpon>
</Compile>
<Compile Include="ImageManager.cs" />
<Compile Include="manager\ImageManager.cs" />
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="deviceDebug\FrmPusicanTest.cs">
......@@ -763,6 +763,15 @@
<Content Include="Properties\MOSCOT.jpg" />
<None Include="Resources\背景图dark.png" />
<None Include="Resources\axisbg.png" />
<Content Include="sound\boardEnd.wav">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="sound\newBoard.wav">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="sound\pointC.wav">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="记录.txt" />
</ItemGroup>
<ItemGroup />
......
......@@ -533,12 +533,12 @@ namespace TSA_V
private void timer1_Tick(object sender, EventArgs e)
{
if (ProjectorProcess.AOIopen)
if (PTipSoundProcess.AOIopen)
{
panAoi.BackColor = Color.Black;
panAoi.Visible = true;
}
else if (ProjectorProcess.IsAlarm(out string msg) &&(! ProjectorProcess.ViewScreen_Show))
else if (PTipSoundProcess.IsAlarm(out string msg) &&(! PTipSoundProcess.ViewScreen_Show))
{
panAoi.Visible = false;
if (panel1.BackgroundImage != null)
......@@ -547,7 +547,7 @@ namespace TSA_V
}
else
{
if (ProjectorProcess.DisShowScreenAlarm)
if (PTipSoundProcess.DisShowScreenAlarm)
{
}
......
......@@ -356,7 +356,7 @@ namespace TSA_V
private void timer1_Tick(object sender, EventArgs e)
{
if (ProjectorProcess.IsAlarm(out string msg))
if (PTipSoundProcess.IsAlarm(out string msg))
{
panAoi.Visible = false;
if (panel1.BackgroundImage != null)
......
此文件类型无法预览
此文件类型无法预览
此文件类型无法预览
......@@ -196,7 +196,7 @@ namespace TSA_V
{ //画图
int width = Convert.ToInt32(board.boardWidth);
int height = Convert.ToInt32(board.boardLength);
Graphics grfx = picBoard.CreateGraphics();
//Graphics grfx = picBoard.CreateGraphics();
preShowPointX = Math.Abs(smtPoint.PositionX) * picBoard.Width / height;
preShowPointY = Math.Abs(smtPoint.PositionY) * picBoard.Width / height;
}
......@@ -343,7 +343,7 @@ namespace TSA_V
TSAVBean.Work.IsShowAOI = true;
LogUtil.info(" 工作完成, 清理投影内容,弹出 提示框提示进入AOI检测 ,设置 AOIopen = true;");
ProjectorProcess.AOIopen = true;
PTipSoundProcess.AOIopen = true;
IOManager.IOMove(IOManager.Device_Led, IO_VALUE.LOW);
FrmProjectorScreen.instance.ClearPoint();
//IOManager.IOMove(IOManager.Camera_Led, IO_VALUE.HIGH);
......@@ -351,7 +351,7 @@ namespace TSA_V
frm.ShowDialog();
IOManager.IOMove(IOManager.Device_Led, IO_VALUE.HIGH );
ProjectorProcess.AOIopen = false;
PTipSoundProcess.AOIopen = false;
LogUtil.info("AOI检测已关闭 ,设置 AOIopen = false;");
// IOManager.IOMove(IOManager.Camera_Led, IO_VALUE.LOW);
......@@ -810,14 +810,23 @@ namespace TSA_V
if (workSmtList.Count <= preIndex)
{
PTipSoundProcess.PlayFile(Setting_NInit.Set_BoardEndSound);
ShowAOI();
preIndex = 0;
preIndex = 0;
}
else if (preIndex < 0)
{
preIndex = workSmtList.Count - 1;
}
smtPoint = workSmtList[preIndex];
if (preIndex != 0)
{
PTipSoundProcess.PlayFile(Setting_NInit.Set_PointChangeSound);
}
else
{
PTipSoundProcess.PlayFile(Setting_NInit.Set_NewBoardSound);
}
ShowMsg();
if (pointXMap.ContainsKey(smtPoint.pointNum))
{
......@@ -828,7 +837,7 @@ namespace TSA_V
{ //画图
int width = Convert.ToInt32(board.boardWidth);
int height = Convert.ToInt32(board.boardLength);
Graphics grfx = picBoard.CreateGraphics();
//Graphics grfx = picBoard.CreateGraphics();
preShowPointX = Math.Abs(smtPoint.PositionX) * picBoard.Width / height;
preShowPointY = Math.Abs(smtPoint.PositionY) * picBoard.Width / height;
}
......@@ -908,12 +917,12 @@ namespace TSA_V
{
LogUtil.info("点击【" + btnCamera.Text + "】,清理投影内容,进入AOI检测 , 设置AOIopen = true");
IOManager.IOMove(IOManager.Device_Led, IO_VALUE.LOW);
ProjectorProcess.AOIopen = true;
PTipSoundProcess.AOIopen = true;
FrmProjectorScreen.instance.ClearPoint();
// IOManager.IOMove(IOManager.Camera_Led, IO_VALUE.HIGH);
FrmAOICheck frm = new FrmAOICheck(CurrProject);
frm.ShowDialog();
ProjectorProcess.AOIopen = false;
PTipSoundProcess.AOIopen = false;
IOManager.IOMove(IOManager.Device_Led, IO_VALUE.HIGH);
LogUtil.info("点击【" + btnCamera.Text + "】,AOI检测已关闭 , 设置AOIopen = false");
// IOManager.IOMove(IOManager.Camera_Led, IO_VALUE.LOW);
......
......@@ -186,7 +186,7 @@ namespace TSA_V
float y = (float)Math.Abs(weld.PositionY) * picBoard.Width / Width;
pointXMap.Add(weld.pointNum, x);
pointYMap.Add(weld.pointNum, y);
if (weld.TagNo.Equals(smtPoint.TagNo))
if (weld.TagNo.Equals(smtPoint.TagNo)&&weld.PN.Equals(smtPoint.PN))
//if (prepareWeld && weld.pointName.Equals(smtPoint.pointName))
{
int lineLength = 12;
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!