This commit is contained in:
2025-11-20 15:13:29 +08:00
parent b48e0b79dd
commit 979afae645
28 changed files with 1299 additions and 345 deletions

View File

@@ -2,8 +2,8 @@
<configuration>
<appSettings>
<add key="connecting1" value="Data Source=192.168.40.2;user instance=false;Initial Catalog=DissColorMachine;User ID=sa;Password=ABCabc123" />
<add key="connecting" value="Data Source=CT-PC;user instance=false;Initial Catalog=FATrace;TrustServerCertificate=True;User ID=admin;Password=Glico@admin" />
<add key="connecting" value="Data Source=CT-PC;user instance=false;Initial Catalog=FATrace;TrustServerCertificate=True;User ID=admin;Password=Glico@admin" />
<add key="connecting" value="Data Source=CT-PC;user instance=false;Initial Catalog=FATrace;TrustServerCertificate=True;User ID=sa;Password=12345678" />
<add key="connecting2" value="Data Source=CT-PC;user instance=false;Initial Catalog=FATrace;TrustServerCertificate=True;User ID=admin;Password=Glico@admin" />
<add key="RemoteConnecting" value="Data Source=CT-PC;user instance=false;Initial Catalog=MoviconDb;User ID=sa;Password=12345678" />
<add key="PLCIP" value="127.0.0.1" />
<add key="PLCPort" value="6000" />

View File

@@ -11,6 +11,405 @@
<ItemGroup>
<None Remove="C:\Users\chong\.nuget\packages\nlog.config\4.7.15\contentFiles\any\any\NLog.config" />
<None Remove="Images\About.png" />
<None Remove="Images\button1.png" />
<None Remove="Images\button10.png" />
<None Remove="Images\button11.png" />
<None Remove="Images\button13.png" />
<None Remove="Images\button2.png" />
<None Remove="Images\button3.png" />
<None Remove="Images\button4.png" />
<None Remove="Images\button5.png" />
<None Remove="Images\button6.png" />
<None Remove="Images\button7.png" />
<None Remove="Images\button8.png" />
<None Remove="Images\button9.png" />
<None Remove="Images\ele_icon_w_depository.png" />
<None Remove="Images\Falut.png" />
<None Remove="Images\GilicoLogo.png" />
<None Remove="Images\hand1.png" />
<None Remove="Images\hand2.png" />
<None Remove="Images\handauto.png" />
<None Remove="Images\icontexto_message_types_alert_red_128px_505529_easyicon.net.png" />
<None Remove="Images\Input.png" />
<None Remove="Images\IPQC制程检验 %281%29.png" />
<None Remove="Images\IPQC制程检验.png" />
<None Remove="Images\ip_address_512px_1169699_easyicon.net.png" />
<None Remove="Images\Load.png" />
<None Remove="Images\Log.png" />
<None Remove="Images\logo.png" />
<None Remove="Images\Main.png" />
<None Remove="Images\name.png" />
<None Remove="Images\NG.png" />
<None Remove="Images\no.png" />
<None Remove="Images\ok.png" />
<None Remove="Images\Output.png" />
<None Remove="Images\P0.ico" />
<None Remove="Images\P1.ico" />
<None Remove="Images\P2.ico" />
<None Remove="Images\P3.ico" />
<None Remove="Images\P4.png" />
<None Remove="Images\putput1.png" />
<None Remove="Images\putput2.png" />
<None Remove="Images\putput3.png" />
<None Remove="Images\Question.png" />
<None Remove="Images\Quit.png" />
<None Remove="Images\red_alert_128px_569416_easyicon.net.png" />
<None Remove="Images\RunState 1.png" />
<None Remove="Images\RunState 2.png" />
<None Remove="Images\RunState 3.png" />
<None Remove="Images\RunState 4.png" />
<None Remove="Images\RunState 5.png" />
<None Remove="Images\RunState.png" />
<None Remove="Images\set1.png" />
<None Remove="Images\set2.png" />
<None Remove="Images\set3.png" />
<None Remove="Images\time_128px_1195887_easyicon.net.ico" />
<None Remove="Images\Tool.png" />
<None Remove="Images\user_853px_1149308_easyicon.net.png" />
<None Remove="Images\vrcologo_01.ico" />
<None Remove="Images\vrcologo_01.png" />
<None Remove="Images\Wait.png" />
<None Remove="Images\Well.png" />
<None Remove="Images\不合格.png" />
<None Remove="Images\任务完成数量.png" />
<None Remove="Images\信息.png" />
<None Remove="Images\信息输入输出.png" />
<None Remove="Images\关闭.png" />
<None Remove="Images\分类.png" />
<None Remove="Images\切换.png" />
<None Remove="Images\切换1.png" />
<None Remove="Images\包装 %281%29.png" />
<None Remove="Images\包装.png" />
<None Remove="Images\压缩机.png" />
<None Remove="Images\原料需求.png" />
<None Remove="Images\双手自动.png" />
<None Remove="Images\合格.png" />
<None Remove="Images\垫付费核销.png" />
<None Remove="Images\工单 %281%29.png" />
<None Remove="Images\工单.png" />
<None Remove="Images\工单信息.png" />
<None Remove="Images\时间.png" />
<None Remove="Images\条码 %281%29.png" />
<None Remove="Images\条码.png" />
<None Remove="Images\次品1 %281%29.png" />
<None Remove="Images\次品1.png" />
<None Remove="Images\次品报表.png" />
<None Remove="Images\注销.png" />
<None Remove="Images\用户 管理.png" />
<None Remove="Images\登录 %281%29.png" />
<None Remove="Images\登录 %282%29.png" />
<None Remove="Images\登录.png" />
<None Remove="Images\箱子.png" />
<None Remove="Images\警告.png" />
<None Remove="Images\质检 %281%29.png" />
<None Remove="Images\质检 %282%29.png" />
<None Remove="Images\质检 %283%29.png" />
<None Remove="Images\质检.png" />
<None Remove="Images\进度.png" />
<None Remove="Images\选择.png" />
<None Remove="Images\邮筒.png" />
<None Remove="Images\错误.png" />
</ItemGroup>
<ItemGroup>
<Content Include="Images\About.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Images\button1.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Images\button10.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Images\button11.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Images\button13.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Images\button2.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Images\button3.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Images\button4.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Images\button5.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Images\button6.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Images\button7.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Images\button8.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Images\button9.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Images\ele_icon_w_depository.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Images\Falut.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Images\GilicoLogo.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Images\hand1.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Images\hand2.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Images\handauto.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Images\icontexto_message_types_alert_red_128px_505529_easyicon.net.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Images\Input.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Images\IPQC制程检验 (1).png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Images\IPQC制程检验.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Images\ip_address_512px_1169699_easyicon.net.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Images\Load.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Images\Log.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Images\logo.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Images\Main.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Images\name.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Images\NG.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Images\no.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Images\ok.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Images\Output.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Images\P0.ico">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Images\P1.ico">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Images\P2.ico">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Images\P3.ico">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Images\P4.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Images\putput1.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Images\putput2.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Images\putput3.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Images\Question.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Images\Quit.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Images\red_alert_128px_569416_easyicon.net.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Images\RunState 1.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Images\RunState 2.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Images\RunState 3.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Images\RunState 4.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Images\RunState 5.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Images\RunState.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Images\set1.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Images\set2.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Images\set3.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Images\time_128px_1195887_easyicon.net.ico">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Images\Tool.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Images\user_853px_1149308_easyicon.net.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Images\vrcologo_01.ico">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Images\vrcologo_01.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Images\Wait.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Images\Well.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Images\不合格.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Images\任务完成数量.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Images\信息.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Images\信息输入输出.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Images\关闭.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Images\分类.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Images\切换.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Images\切换1.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Images\包装 (1).png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Images\包装.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Images\压缩机.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Images\原料需求.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Images\双手自动.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Images\合格.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Images\垫付费核销.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Images\工单 (1).png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Images\工单.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Images\工单信息.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Images\时间.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Images\条码 (1).png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Images\条码.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Images\次品1 (1).png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Images\次品1.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Images\次品报表.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Images\注销.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Images\用户 管理.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Images\登录 (1).png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Images\登录 (2).png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Images\登录.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Images\箱子.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Images\警告.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Images\质检 (1).png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Images\质检 (2).png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Images\质检 (3).png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Images\质检.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Images\进度.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Images\选择.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Images\邮筒.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Images\错误.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup>
<ItemGroup>
@@ -52,286 +451,4 @@
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<None Update="Images\About.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="Images\button1.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="Images\button11.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="Images\button13.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="Images\button2.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="Images\button3.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="Images\button4.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="Images\button5.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="Images\button6.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="Images\button7.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="Images\button8.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="Images\button9.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="Images\GilicoLogo.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="Images\hand1.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="Images\hand2.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="Images\handauto.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="Images\icontexto_message_types_alert_red_128px_505529_easyicon.net.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="Images\Input.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="Images\IPQC制程检验 %281%29.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="Images\IPQC制程检验.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="Images\ip_address_512px_1169699_easyicon.net.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="Images\Load.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="Images\Log.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="Images\logo.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="Images\Main.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="Images\name.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="Images\NG.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="Images\no.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="Images\ok.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="Images\Output.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="Images\P0.ico">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="Images\P1.ico">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="Images\P2.ico">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="Images\P3.ico">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="Images\P4.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="Images\putput1.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="Images\putput2.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="Images\putput3.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="Images\Question.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="Images\Quit.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="Images\red_alert_128px_569416_easyicon.net.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="Images\RunState 1.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="Images\RunState 2.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="Images\RunState 3.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="Images\RunState 4.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="Images\RunState 5.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="Images\RunState.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="Images\set1.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="Images\set2.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="Images\set3.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="Images\time_128px_1195887_easyicon.net.ico">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="Images\Tool.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="Images\user_853px_1149308_easyicon.net.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="Images\vrcologo_01.ico">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="Images\vrcologo_01.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="Images\Wait.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="Images\Well.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="Images\不合格.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="Images\任务完成数量.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="Images\关闭.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="Images\分类.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="Images\切换.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="Images\切换1.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="Images\包装 %281%29.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="Images\包装.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="Images\压缩机.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="Images\双手自动.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="Images\合格.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="Images\垫付费核销.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="Images\工单 %281%29.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="Images\工单.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="Images\工单信息.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="Images\时间.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="Images\条码 %281%29.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="Images\条码.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="Images\次品1 %281%29.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="Images\次品1.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="Images\次品报表.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="Images\注销.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="Images\用户 管理.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="Images\登录 %281%29.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="Images\登录 %282%29.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="Images\登录.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="Images\箱子.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="Images\警告.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="Images\质检 %281%29.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="Images\质检 %282%29.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="Images\质检 %283%29.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="Images\质检.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="Images\进度.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="Images\选择.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="Images\邮筒.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="Images\错误.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
</Project>

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.6 KiB

After

Width:  |  Height:  |  Size: 5.4 KiB

View File

@@ -60,6 +60,16 @@ namespace FATrace.App.Properties {
}
}
/// <summary>
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
/// </summary>
internal static System.Drawing.Bitmap ele_icon_w_depository {
get {
object obj = ResourceManager.GetObject("ele_icon_w_depository", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
/// </summary>
@@ -70,6 +80,26 @@ namespace FATrace.App.Properties {
}
}
/// <summary>
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
/// </summary>
internal static System.Drawing.Bitmap {
get {
object obj = ResourceManager.GetObject("信息", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
/// </summary>
internal static System.Drawing.Bitmap {
get {
object obj = ResourceManager.GetObject("信息输入输出", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
/// </summary>
@@ -100,6 +130,16 @@ namespace FATrace.App.Properties {
}
}
/// <summary>
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
/// </summary>
internal static System.Drawing.Bitmap {
get {
object obj = ResourceManager.GetObject("原料需求", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
/// </summary>
@@ -119,5 +159,25 @@ namespace FATrace.App.Properties {
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
/// </summary>
internal static System.Drawing.Bitmap {
get {
object obj = ResourceManager.GetObject("称重", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
/// </summary>
internal static System.Drawing.Bitmap {
get {
object obj = ResourceManager.GetObject("选择", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
}
}

View File

@@ -118,22 +118,40 @@
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="GilicoLogo" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\GilicoLogo.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
<data name="关闭" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\关闭.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="分类" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\分类.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="登录 (2)" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\登录 (2).png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
<data name="原料需求" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\原料需求.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="选择" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\选择.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="工单信息" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\工单信息.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="关闭" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\关闭.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
<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="分类1" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\分类1.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="信息输入输出" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\信息输入输出.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="ele_icon_w_depository" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\ele_icon_w_depository.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="GilicoLogo" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\GilicoLogo.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="登录 (2)" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\登录 (2).png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</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>
</root>

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

View File

@@ -49,6 +49,7 @@ namespace FATrace.App
TabControlMain = new TabControl();
tabPage2 = new TabPage();
panel3 = new Panel();
pictureBox4 = new PictureBox();
btnWeightPrint = new Button();
txtCode = new TextBox();
label13 = new Label();
@@ -57,6 +58,7 @@ namespace FATrace.App
label8 = new Label();
label10 = new Label();
panel2 = new Panel();
pictureBox3 = new PictureBox();
lblRawUseStateTip = new Label();
btnClearRaw = new Button();
lblRawUseState = new Label();
@@ -73,6 +75,7 @@ namespace FATrace.App
label4 = new Label();
label3 = new Label();
panel1 = new Panel();
pictureBox2 = new PictureBox();
lblRawBeforeInfo = new Label();
btnRawName3 = new Button();
btnRawName2 = new Button();
@@ -109,8 +112,11 @@ namespace FATrace.App
TabControlMain.SuspendLayout();
tabPage2.SuspendLayout();
panel3.SuspendLayout();
((System.ComponentModel.ISupportInitialize)pictureBox4).BeginInit();
panel2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)pictureBox3).BeginInit();
panel1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)pictureBox2).BeginInit();
tabPage3.SuspendLayout();
tabPage1.SuspendLayout();
groupBox1.SuspendLayout();
@@ -336,6 +342,7 @@ namespace FATrace.App
// panel3
//
panel3.BorderStyle = BorderStyle.FixedSingle;
panel3.Controls.Add(pictureBox4);
panel3.Controls.Add(btnWeightPrint);
panel3.Controls.Add(txtCode);
panel3.Controls.Add(label13);
@@ -349,6 +356,17 @@ namespace FATrace.App
panel3.Size = new Size(878, 176);
panel3.TabIndex = 3;
//
// pictureBox4
//
pictureBox4.BackgroundImageLayout = ImageLayout.None;
pictureBox4.Image = Properties.Resources.;
pictureBox4.Location = new Point(7, 3);
pictureBox4.Name = "pictureBox4";
pictureBox4.Size = new Size(35, 35);
pictureBox4.SizeMode = PictureBoxSizeMode.StretchImage;
pictureBox4.TabIndex = 15;
pictureBox4.TabStop = false;
//
// btnWeightPrint
//
btnWeightPrint.Font = new Font("Microsoft YaHei UI", 15.75F, FontStyle.Bold, GraphicsUnit.Point, 134);
@@ -367,6 +385,7 @@ namespace FATrace.App
txtCode.ForeColor = Color.Blue;
txtCode.Location = new Point(129, 127);
txtCode.Name = "txtCode";
txtCode.ReadOnly = true;
txtCode.Size = new Size(410, 33);
txtCode.TabIndex = 16;
txtCode.Text = "YG05030013,202509231802,3,01,0001";
@@ -387,7 +406,7 @@ namespace FATrace.App
label9.AutoSize = true;
label9.Font = new Font("Microsoft YaHei UI", 14.25F, FontStyle.Regular, GraphicsUnit.Point, 134);
label9.ForeColor = SystemColors.WindowFrame;
label9.Location = new Point(235, 56);
label9.Location = new Point(235, 63);
label9.Name = "label9";
label9.Size = new Size(24, 25);
label9.TabIndex = 11;
@@ -396,7 +415,7 @@ namespace FATrace.App
// txtRtWeight
//
txtRtWeight.Font = new Font("Microsoft YaHei UI", 14.25F, FontStyle.Regular, GraphicsUnit.Point, 134);
txtRtWeight.Location = new Point(129, 50);
txtRtWeight.Location = new Point(129, 57);
txtRtWeight.Name = "txtRtWeight";
txtRtWeight.Size = new Size(100, 32);
txtRtWeight.TabIndex = 10;
@@ -404,11 +423,11 @@ namespace FATrace.App
// label8
//
label8.AutoSize = true;
label8.Font = new Font("Microsoft YaHei UI", 15.75F, FontStyle.Bold, GraphicsUnit.Point, 134);
label8.Font = new Font("Microsoft YaHei UI", 18F, FontStyle.Bold);
label8.ForeColor = SystemColors.ControlDarkDark;
label8.Location = new Point(14, 4);
label8.Location = new Point(44, 5);
label8.Name = "label8";
label8.Size = new Size(96, 28);
label8.Size = new Size(110, 31);
label8.TabIndex = 9;
label8.Text = "称重信息";
//
@@ -417,7 +436,7 @@ namespace FATrace.App
label10.AutoSize = true;
label10.Font = new Font("Microsoft YaHei UI", 14.25F, FontStyle.Bold, GraphicsUnit.Point, 134);
label10.ForeColor = SystemColors.WindowFrame;
label10.Location = new Point(30, 53);
label10.Location = new Point(30, 60);
label10.Name = "label10";
label10.Size = new Size(107, 26);
label10.TabIndex = 9;
@@ -426,6 +445,7 @@ namespace FATrace.App
// panel2
//
panel2.BorderStyle = BorderStyle.FixedSingle;
panel2.Controls.Add(pictureBox3);
panel2.Controls.Add(lblRawUseStateTip);
panel2.Controls.Add(btnClearRaw);
panel2.Controls.Add(lblRawUseState);
@@ -447,12 +467,23 @@ namespace FATrace.App
panel2.Size = new Size(878, 156);
panel2.TabIndex = 2;
//
// pictureBox3
//
pictureBox3.BackgroundImageLayout = ImageLayout.None;
pictureBox3.Image = Properties.Resources.;
pictureBox3.Location = new Point(7, 5);
pictureBox3.Name = "pictureBox3";
pictureBox3.Size = new Size(35, 35);
pictureBox3.SizeMode = PictureBoxSizeMode.StretchImage;
pictureBox3.TabIndex = 13;
pictureBox3.TabStop = false;
//
// lblRawUseStateTip
//
lblRawUseStateTip.BackColor = Color.LightSalmon;
lblRawUseStateTip.Font = new Font("Microsoft YaHei UI", 14.25F, FontStyle.Bold, GraphicsUnit.Point, 134);
lblRawUseStateTip.ForeColor = SystemColors.ButtonHighlight;
lblRawUseStateTip.Location = new Point(159, 106);
lblRawUseStateTip.Location = new Point(159, 102);
lblRawUseStateTip.Name = "lblRawUseStateTip";
lblRawUseStateTip.Size = new Size(247, 34);
lblRawUseStateTip.TabIndex = 11;
@@ -470,6 +501,7 @@ namespace FATrace.App
btnClearRaw.TabIndex = 10;
btnClearRaw.Text = "清零当前原料";
btnClearRaw.UseVisualStyleBackColor = true;
btnClearRaw.Click += btnClearRaw_Click;
//
// lblRawUseState
//
@@ -489,7 +521,7 @@ namespace FATrace.App
label11.AutoSize = true;
label11.Font = new Font("Microsoft YaHei UI", 14.25F, FontStyle.Regular, GraphicsUnit.Point, 134);
label11.ForeColor = SystemColors.WindowFrame;
label11.Location = new Point(819, 51);
label11.Location = new Point(819, 54);
label11.Name = "label11";
label11.Size = new Size(36, 25);
label11.TabIndex = 14;
@@ -510,7 +542,7 @@ namespace FATrace.App
// txtRemainWeight
//
txtRemainWeight.Font = new Font("Microsoft YaHei UI", 14.25F, FontStyle.Regular, GraphicsUnit.Point, 134);
txtRemainWeight.Location = new Point(715, 46);
txtRemainWeight.Location = new Point(715, 49);
txtRemainWeight.Name = "txtRemainWeight";
txtRemainWeight.Size = new Size(100, 32);
txtRemainWeight.TabIndex = 13;
@@ -518,7 +550,7 @@ namespace FATrace.App
// txtShelfLife
//
txtShelfLife.Font = new Font("Microsoft YaHei UI", 14.25F, FontStyle.Regular, GraphicsUnit.Point, 134);
txtShelfLife.Location = new Point(504, 46);
txtShelfLife.Location = new Point(504, 49);
txtShelfLife.Name = "txtShelfLife";
txtShelfLife.Size = new Size(100, 32);
txtShelfLife.TabIndex = 7;
@@ -528,7 +560,7 @@ namespace FATrace.App
label12.AutoSize = true;
label12.Font = new Font("Microsoft YaHei UI", 14.25F, FontStyle.Bold, GraphicsUnit.Point, 134);
label12.ForeColor = SystemColors.WindowFrame;
label12.Location = new Point(618, 49);
label12.Location = new Point(618, 52);
label12.Name = "label12";
label12.Size = new Size(107, 26);
label12.TabIndex = 12;
@@ -539,7 +571,7 @@ namespace FATrace.App
label6.AutoSize = true;
label6.Font = new Font("Microsoft YaHei UI", 14.25F, FontStyle.Bold, GraphicsUnit.Point, 134);
label6.ForeColor = SystemColors.WindowFrame;
label6.Location = new Point(428, 49);
label6.Location = new Point(428, 52);
label6.Name = "label6";
label6.Size = new Size(88, 26);
label6.TabIndex = 6;
@@ -548,7 +580,7 @@ namespace FATrace.App
// txtBatch
//
txtBatch.Font = new Font("Microsoft YaHei UI", 14.25F, FontStyle.Regular, GraphicsUnit.Point, 134);
txtBatch.Location = new Point(315, 46);
txtBatch.Location = new Point(315, 49);
txtBatch.Name = "txtBatch";
txtBatch.Size = new Size(100, 32);
txtBatch.TabIndex = 5;
@@ -558,7 +590,7 @@ namespace FATrace.App
label7.AutoSize = true;
label7.Font = new Font("Microsoft YaHei UI", 14.25F, FontStyle.Bold, GraphicsUnit.Point, 134);
label7.ForeColor = SystemColors.WindowFrame;
label7.Location = new Point(260, 49);
label7.Location = new Point(260, 52);
label7.Name = "label7";
label7.Size = new Size(69, 26);
label7.TabIndex = 4;
@@ -569,7 +601,7 @@ namespace FATrace.App
label5.AutoSize = true;
label5.Font = new Font("Microsoft YaHei UI", 14.25F, FontStyle.Regular, GraphicsUnit.Point, 134);
label5.ForeColor = SystemColors.WindowFrame;
label5.Location = new Point(221, 52);
label5.Location = new Point(221, 55);
label5.Name = "label5";
label5.Size = new Size(36, 25);
label5.TabIndex = 3;
@@ -578,7 +610,7 @@ namespace FATrace.App
// txtWeight
//
txtWeight.Font = new Font("Microsoft YaHei UI", 14.25F, FontStyle.Regular, GraphicsUnit.Point, 134);
txtWeight.Location = new Point(115, 46);
txtWeight.Location = new Point(115, 49);
txtWeight.Name = "txtWeight";
txtWeight.Size = new Size(100, 32);
txtWeight.TabIndex = 2;
@@ -588,7 +620,7 @@ namespace FATrace.App
label4.AutoSize = true;
label4.Font = new Font("Microsoft YaHei UI", 14.25F, FontStyle.Bold, GraphicsUnit.Point, 134);
label4.ForeColor = SystemColors.WindowFrame;
label4.Location = new Point(22, 49);
label4.Location = new Point(22, 52);
label4.Name = "label4";
label4.Size = new Size(107, 26);
label4.TabIndex = 1;
@@ -597,17 +629,18 @@ namespace FATrace.App
// label3
//
label3.AutoSize = true;
label3.Font = new Font("Microsoft YaHei UI", 15.75F, FontStyle.Bold, GraphicsUnit.Point, 134);
label3.Font = new Font("Microsoft YaHei UI", 18F, FontStyle.Bold);
label3.ForeColor = SystemColors.ControlDarkDark;
label3.Location = new Point(14, 6);
label3.Location = new Point(42, 6);
label3.Name = "label3";
label3.Size = new Size(96, 28);
label3.Size = new Size(110, 31);
label3.TabIndex = 0;
label3.Text = "信息输入";
//
// panel1
//
panel1.BorderStyle = BorderStyle.FixedSingle;
panel1.Controls.Add(pictureBox2);
panel1.Controls.Add(lblRawBeforeInfo);
panel1.Controls.Add(btnRawName3);
panel1.Controls.Add(btnRawName2);
@@ -619,6 +652,17 @@ namespace FATrace.App
panel1.Size = new Size(878, 170);
panel1.TabIndex = 1;
//
// pictureBox2
//
pictureBox2.BackgroundImageLayout = ImageLayout.None;
pictureBox2.Image = Properties.Resources.;
pictureBox2.Location = new Point(8, 6);
pictureBox2.Name = "pictureBox2";
pictureBox2.Size = new Size(35, 35);
pictureBox2.SizeMode = PictureBoxSizeMode.StretchImage;
pictureBox2.TabIndex = 12;
pictureBox2.TabStop = false;
//
// lblRawBeforeInfo
//
lblRawBeforeInfo.BackColor = Color.Tomato;
@@ -668,11 +712,11 @@ namespace FATrace.App
// label2
//
label2.AutoSize = true;
label2.Font = new Font("Microsoft YaHei UI", 15.75F, FontStyle.Bold, GraphicsUnit.Point, 134);
label2.Font = new Font("Microsoft YaHei UI", 18F, FontStyle.Bold);
label2.ForeColor = SystemColors.ControlDarkDark;
label2.Location = new Point(7, 6);
label2.Location = new Point(45, 8);
label2.Name = "label2";
label2.Size = new Size(138, 28);
label2.Size = new Size(158, 31);
label2.TabIndex = 0;
label2.Text = "选中原料名称";
//
@@ -925,6 +969,7 @@ namespace FATrace.App
StartPosition = FormStartPosition.CenterScreen;
Text = "管理界面";
WindowState = FormWindowState.Maximized;
FormClosed += frmMain_FormClosed;
Load += frmMain_Load;
statusStrip1.ResumeLayout(false);
statusStrip1.PerformLayout();
@@ -938,10 +983,13 @@ namespace FATrace.App
tabPage2.ResumeLayout(false);
panel3.ResumeLayout(false);
panel3.PerformLayout();
((System.ComponentModel.ISupportInitialize)pictureBox4).EndInit();
panel2.ResumeLayout(false);
panel2.PerformLayout();
((System.ComponentModel.ISupportInitialize)pictureBox3).EndInit();
panel1.ResumeLayout(false);
panel1.PerformLayout();
((System.ComponentModel.ISupportInitialize)pictureBox2).EndInit();
tabPage3.ResumeLayout(false);
tabPage3.PerformLayout();
tabPage1.ResumeLayout(false);
@@ -1026,5 +1074,8 @@ namespace FATrace.App
private Label label26;
private Label label27;
private Button btnMain;
private PictureBox pictureBox2;
private PictureBox pictureBox3;
private PictureBox pictureBox4;
}
}

View File

@@ -206,6 +206,8 @@ namespace FATrace.App
private async void frmMain_Load(object sender, EventArgs e) // 将加载事件改为 async 以便等待连接
{
this.TabControlMain.SelectedIndex = 1;
// 初始化打印机对象
CurZebraPrint = new ZebraPrint(_printerIp, _printerPort);
@@ -275,6 +277,8 @@ namespace FATrace.App
await CheckDbStatusAsync();
await CheckPrinterStatusAsync();
});
}
/// <summary>
@@ -604,6 +608,37 @@ namespace FATrace.App
}
}
/// <summary>
/// 清零当前的原料
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void btnClearRaw_Click(object sender, EventArgs e)
{
DialogResult result = MessageBox.Show("您确定清零当前的原料?", "Confirmation",
MessageBoxButtons.YesNo, MessageBoxIcon.Question);
if (result == DialogResult.No)
{
return;
}
if (CurSelectedRawProInput == null)
{
MessageBox.Show("请选中原料后再操作。", "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
return;
}
var UpdatedData = FSqlContext.FDb.Update<RawProInput>()
.Set(a => a.RawState, RawSplitState.SplitComplete)
.Where(a => a.Id == CurSelectedRawProInput.Id)
.ExecuteUpdated();
if (UpdatedData.Count() > 0)
{
ClearInput();
}
}
/// <summary>
/// 称重打印数据
/// </summary>
@@ -613,9 +648,15 @@ namespace FATrace.App
{
if (CurSelectedRawProInput == null)
{
MessageBox.Show("请先选择要称重的产品", "称重通信错误", MessageBoxButtons.OK, MessageBoxIcon.Warning);
MessageBox.Show("请先选择要称重的产品", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
return;
}
if (string.IsNullOrEmpty(CurSelectedRawProInput.RawName) || string.IsNullOrEmpty(CurSelectedRawProInput.Batch) || string.IsNullOrEmpty(CurSelectedRawProInput.RawCode))
{
MessageBox.Show("选择的产品信息无数据,请信息输入后再操作", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
return;
}
//新的剩余重量 Kg
var NewRemainWeight = CurSelectedRawProInput.RemainWeight - CurWeight / 1000;
@@ -654,6 +695,9 @@ namespace FATrace.App
{
Batch = CurSelectedRawProInput.Batch,
InBagCode = Code,
BoxCode = Code + ",A",
OpUser = CurrentOperationNo,
CheckUser = CurrentOperationNo,
RawCode = CurSelectedRawProInput.RawCode,
ShelfLife = CurSelectedRawProInput.ShelfLife,
RawName = CurSelectedRawProInput.RawName,
@@ -961,9 +1005,12 @@ namespace FATrace.App
}
private void btnSysConfig_Click(object sender, EventArgs e)
{
if (!string.IsNullOrEmpty(CurrentOperationNo))
{
}
}
private void btnExit_Click(object sender, EventArgs e)
{
@@ -1000,9 +1047,16 @@ namespace FATrace.App
}
private void btnMain_Click(object sender, EventArgs e)
{
if (!string.IsNullOrEmpty(CurrentOperationNo))
{
TabControlMain.SelectedIndex = 0;
}
else
{
MessageBox.Show("请登录后再操作!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
}
private void btnHistoryData_Click(object sender, EventArgs e)
{
@@ -1016,7 +1070,6 @@ namespace FATrace.App
#endregion
#region
private void btnSearchHistoryData_Click(object sender, EventArgs e)
@@ -1169,6 +1222,15 @@ namespace FATrace.App
#endregion
private void frmMain_FormClosed(object sender, FormClosedEventArgs e)
{
//CurZebraPrint.Close();
if (_scaleTcp != null)
{
_scaleTcp!.StopAsync();
}
}
}
}

View File

@@ -2,9 +2,10 @@
<configuration>
<appSettings>
<add key="connecting1" value="Data Source=192.168.40.2;user instance=false;Initial Catalog=DissColorMachine;User ID=sa;Password=ABCabc123" />
<add key="connecting" value="Data Source=192.0.1.100;user instance=false;Initial Catalog=FATrace;TrustServerCertificate=True;User ID=sa;Password=Glico@123" />
<add key="RemoteConnecting" value="Data Source=CT-PC;user instance=false;Initial Catalog=MoviconDb;User ID=sa;Password=12345678" />
<add key="PLCIP" value="192.0.1.10" />
<add key="connecting2" value="Data Source=192.0.1.100;user instance=false;Initial Catalog=FATrace;TrustServerCertificate=True;User ID=sa;Password=Glico@123" />
<add key="connecting" value="Data Source=CT-PC;user instance=false;Initial Catalog=FATrace;TrustServerCertificate=True;User ID=sa;Password=12345678" />
<add key="connecting3" value="Data Source=CT-PC;user instance=false;Initial Catalog=FATrace;User ID=sa;Password=12345678" />
<add key="PLCIP" value="127.0.1.1" />
<add key="PLCPort" value="5000" />
<add key="PLCScan" value="600" />
<!-- Keyence 布尔量地址:用于 WeightPhotoEnable 信号(默认 M100 -->

View File

@@ -248,7 +248,7 @@ namespace FATrace.WPLApp
//containerRegistry.RegisterSingleton<INavigationMenuService, NavigationMenuService>();
containerRegistry.RegisterForNavigation<MainView, MainViewModel>();
//containerRegistry.RegisterForNavigation<DashBoardView, DashBoardViewModel>();
containerRegistry.RegisterForNavigation<DashboardView, DashboardViewModel>("DashBoardView");
//containerRegistry.RegisterForNavigation<UserView, UserViewModel>();
containerRegistry.RegisterForNavigation<FootView, FootViewModel>();
containerRegistry.RegisterForNavigation<HeadView, HeadViewModel>();

View File

@@ -0,0 +1,9 @@
using Prism.Events;
namespace FATrace.WPLApp.Events
{
/// <summary>
/// 请求刷新 Dashboard 统计信息的事件(无负载)。
/// </summary>
public class DashboardRefreshEvent : PubSubEvent<bool> { }
}

View File

@@ -115,20 +115,36 @@ namespace FATrace.WPLApp.Services
{
public RawProUserCsvDtoMap()
{
Map(x => x.RawCode).Index(0).Name(nameof(RawProUserCsvDto.RawCode));
Map(x => x.RawName).Index(1).Name(nameof(RawProUserCsvDto.RawName));
Map(x => x.InBagCode).Index(2).Name(nameof(RawProUserCsvDto.InBagCode));
Map(x => x.BoxCode).Index(3).Name(nameof(RawProUserCsvDto.BoxCode));
Map(x => x.Batch).Index(4).Name(nameof(RawProUserCsvDto.Batch));
Map(x => x.ShelfLife).Index(5).Name(nameof(RawProUserCsvDto.ShelfLife));
Map(x => x.Weight).Index(6).Name(nameof(RawProUserCsvDto.Weight));
Map(x => x.DeliveryDate).Index(7).Name(nameof(RawProUserCsvDto.DeliveryDate));
Map(x => x.RemainWeight).Index(8).Name(nameof(RawProUserCsvDto.RemainWeight));
Map(x => x.StockWeight).Index(9).Name(nameof(RawProUserCsvDto.StockWeight));
Map(x => x.WeightTime).Index(10).Name(nameof(RawProUserCsvDto.WeightTime)).TypeConverterOption.Format("yyyy-MM-dd HH:mm:ss");
Map(x => x.OpUser).Index(11).Name(nameof(RawProUserCsvDto.OpUser));
Map(x => x.CheckUser).Index(12).Name(nameof(RawProUserCsvDto.CheckUser));
Map(x => x.OutTime).Index(13).Name(nameof(RawProUserCsvDto.OutTime)).TypeConverterOption.Format("yyyy-MM-dd HH:mm:ss");
//Map(x => x.RawCode).Index(0).Name(nameof(RawProUserCsvDto.RawCode));
//Map(x => x.RawName).Index(1).Name(nameof(RawProUserCsvDto.RawName));
//Map(x => x.InBagCode).Index(2).Name(nameof(RawProUserCsvDto.InBagCode));
//Map(x => x.BoxCode).Index(3).Name(nameof(RawProUserCsvDto.BoxCode));
//Map(x => x.Batch).Index(4).Name(nameof(RawProUserCsvDto.Batch));
//Map(x => x.ShelfLife).Index(5).Name(nameof(RawProUserCsvDto.ShelfLife));
//Map(x => x.Weight).Index(6).Name(nameof(RawProUserCsvDto.Weight));
//Map(x => x.DeliveryDate).Index(7).Name(nameof(RawProUserCsvDto.DeliveryDate));
//Map(x => x.RemainWeight).Index(8).Name(nameof(RawProUserCsvDto.RemainWeight));
//Map(x => x.StockWeight).Index(9).Name(nameof(RawProUserCsvDto.StockWeight));
//Map(x => x.WeightTime).Index(10).Name(nameof(RawProUserCsvDto.WeightTime)).TypeConverterOption.Format("yyyy-MM-dd HH:mm:ss");
//Map(x => x.OpUser).Index(11).Name(nameof(RawProUserCsvDto.OpUser));
//Map(x => x.CheckUser).Index(12).Name(nameof(RawProUserCsvDto.CheckUser));
//Map(x => x.OutTime).Index(13).Name(nameof(RawProUserCsvDto.OutTime)).TypeConverterOption.Format("yyyy-MM-dd HH:mm:ss");
Map(x => x.RawCode).Index(0).Name("原料编号");
Map(x => x.RawName).Index(1).Name("原料名称");
Map(x => x.InBagCode).Index(2).Name("内袋二维码");
Map(x => x.BoxCode).Index(3).Name("外箱二维码");
Map(x => x.Batch).Index(4).Name("批号");
Map(x => x.ShelfLife).Index(5).Name("保质期");
Map(x => x.Weight).Index(6).Name("称重重量(g)");
Map(x => x.DeliveryDate).Index(7).Name("配料日期");
Map(x => x.RemainWeight).Index(8).Name("剩余重量(Kg)");
Map(x => x.StockWeight).Index(9).Name("入库总重量(Kg)");
Map(x => x.WeightTime).Index(10).Name("称重时间").TypeConverterOption.Format("yyyy-MM-dd HH:mm:ss");
Map(x => x.OpUser).Index(11).Name("操作者");
Map(x => x.CheckUser).Index(12).Name("确认者");
Map(x => x.OutTime).Index(13).Name("出库时间").TypeConverterOption.Format("yyyy-MM-dd HH:mm:ss");
}
}
}

View File

@@ -6,6 +6,8 @@ using Prism.Mvvm;
using System.Collections.Concurrent;
using System.Windows;
using ComConfigHelper = FATrace.Com.ConfigHelper;
using Prism.Events;
using FATrace.WPLApp.Events;
namespace FATrace.WPLApp.Services
{
@@ -15,10 +17,12 @@ namespace FATrace.WPLApp.Services
/// </summary>
public class DataServices : BindableBase, IDisposable
{
public DataServices(ILogService logService, IFreeSql freeSql)
public DataServices(ILogService logService, IFreeSql freeSql, IEventAggregator eventAggregator, SysRunService sysRunService)
{
LogService = logService;
FreeSql = freeSql;
EventAggregator = eventAggregator;
SysRunService = sysRunService;
LineSglModel = new LineSglModel();
LineSglModel.WeightScanCodeHandle += LineSglModel_WeightScanCodeHandle;
@@ -116,7 +120,7 @@ namespace FATrace.WPLApp.Services
var Result = FreeSql.Update<RawProUse>()
.Set(p => p.OutTime, DateTime.Now)
.Where(p => p.BoxCode == BoxScanCode+",A")//外箱二维码就是外箱扫描码
.Where(p => p.BoxCode == BoxScanCode + ",A")//外箱二维码就是外箱扫描码
.ExecuteAffrows();
if (Result > 0)
{
@@ -151,7 +155,7 @@ namespace FATrace.WPLApp.Services
KeyencePlcMcNet.Write("D1250", new Int16[30]);
});
try { EventAggregator?.GetEvent<DashboardRefreshEvent>()?.Publish(true); } catch { }
}
/// <summary>
@@ -227,8 +231,19 @@ namespace FATrace.WPLApp.Services
public ILogService LogService { get; }
public IFreeSql FreeSql { get; }
public IEventAggregator EventAggregator { get; }
public SysRunService SysRunService { get; }
//通信组件
private bool _plcConnected;
public bool PlcConnected
{
get { return _plcConnected; }
private set { _plcConnected = value; RaisePropertyChanged(); }
}
/// <summary>
/// 基恩士通信组件
/// </summary>
private KeyenceMcNet KeyencePlcMcNet { get; set; } = null;
private string _WeightScanCode;
@@ -304,6 +319,7 @@ namespace FATrace.WPLApp.Services
// 读取 PLC 配置(大小写敏感,采用公共 ConfigHelper 并提供默认值)
string PLCIP = ComConfigHelper.GetStringOrDefault("PLCIP", "192.0.1.10");
int Port = ComConfigHelper.GetIntOrDefault("PLCPort", 5000);
try { SysRunService.PlcIp = PLCIP; SysRunService.PlcPort = Port; } catch { }
//PLC通信的连接
KeyencePlcMcNet = new KeyenceMcNet();
@@ -317,16 +333,22 @@ namespace FATrace.WPLApp.Services
if (connect.IsSuccess)//初始连接状态的显示判断
{
Console.WriteLine($"PLC-连接 OK");
PlcConnected = true;
try { SysRunService.PlcLinkState = true; SysRunService.SysRunState.ComState = 1; SysRunService.SysRunState.ComMsg = "正常"; } catch { }
}
else
{
MessageBox.Show(connect.Message + Environment.NewLine + "ErrorCode: " + connect.ErrorCode);
PlcConnected = false;
try { SysRunService.PlcLinkState = false; SysRunService.SysRunState.ComState = 2; SysRunService.SysRunState.ComMsg = "连接失败"; } catch { }
}
}
catch (Exception ex)
{
LogService.Error(String.Format("ErrSource : {0} ErrMsg : {1}", ex.StackTrace.ToString(), ex.Message.ToString()));
//insertLogToDBDelegate.BeginInvoke(1, "UpdateUIMethod异常", ex.Message.ToString() + ex.StackTrace.Substring(ex.StackTrace.Length - 40, 40), null, null);
PlcConnected = false;
try { SysRunService.PlcLinkState = false; SysRunService.SysRunState.ComState = 2; SysRunService.SysRunState.ComMsg = "异常"; } catch { }
}
}
@@ -446,6 +468,14 @@ namespace FATrace.WPLApp.Services
if (OperateResultBoxScanSgl.IsSuccess)
{
LineSglModel.BoxScanCodeEnable = OperateResultBoxScanSgl.Content;
PlcConnected = true;
try { SysRunService.PlcLinkState = true; SysRunService.SysRunState.ComState = 1; SysRunService.SysRunState.ComMsg = "正常"; } catch { }
}
else
{
PlcConnected = false;
try { SysRunService.PlcLinkState = false; SysRunService.SysRunState.ComState = 2; SysRunService.SysRunState.ComMsg = "连接失败"; } catch { }
}
}
@@ -488,11 +518,16 @@ namespace FATrace.WPLApp.Services
if (!ret.IsSuccess)
{
LogService.Warn($"PLC重连失败: {ret.Message} (Code: {ret.ErrorCode})");
PlcConnected = false;
try { SysRunService.PlcLinkState = false; SysRunService.SysRunState.ComState = 2; SysRunService.SysRunState.ComMsg = "异常"; } catch { }
}
else { PlcConnected = true; try { SysRunService.PlcLinkState = true; SysRunService.SysRunState.ComState = 1; SysRunService.SysRunState.ComMsg = "正常"; } catch { } }
}
catch (Exception ex)
{
LogService.Error($"PLC重连异常: {ex.Message}");
PlcConnected = false;
try { SysRunService.PlcLinkState = false; SysRunService.SysRunState.ComState = 2; SysRunService.SysRunState.ComMsg = "异常"; } catch { }
}
}

View File

@@ -23,6 +23,41 @@ namespace FATrace.WPLApp.Services
}
private string _PlcIp;
/// <summary>
/// PLC IP
/// </summary>
public string PlcIp
{
get => _PlcIp;
set { _PlcIp = value; RaisePropertyChanged(); UpdatePlcEndPoint(); }
}
private int _PlcPort;
/// <summary>
/// PLC 端口
/// </summary>
public int PlcPort
{
get => _PlcPort;
set { _PlcPort = value; RaisePropertyChanged(); UpdatePlcEndPoint(); }
}
private string _PlcEndPoint;
/// <summary>
/// PLC 终端显示IP:Port
/// </summary>
public string PlcEndPoint
{
get => _PlcEndPoint;
private set { _PlcEndPoint = value; RaisePropertyChanged(); }
}
private void UpdatePlcEndPoint()
{
PlcEndPoint = string.IsNullOrWhiteSpace(PlcIp) ? string.Empty : $"{PlcIp}:{PlcPort}";
}
private bool _PlcLinkState = false;
/// <summary>
/// PLC连接状态

View File

@@ -0,0 +1,315 @@
using FATrace.WPLApp.Core;
using Prism.Commands;
using System;
using System.Collections.ObjectModel;
using System.Linq;
using System.Threading.Tasks;
using System.Windows.Threading;
using FreeSql;
using FATrace.Model;
using FATrace.WPLApp.Services;
using System.IO;
using System.Windows;
using System.Text;
using Prism.Events;
using FATrace.WPLApp.Events;
namespace FATrace.WPLApp.ViewModels
{
public class DashboardViewModel : NavigationViewModel
{
private readonly IFreeSql _fsql;
private readonly ILogService _log;
private readonly DataServices _data;
private DispatcherTimer _logTimer;
private bool _initialized;
private TextWriter _originalConsoleOut;
private ConsoleInterceptWriter _consoleInterceptor;
private readonly IEventAggregator _ea;
public DashboardViewModel(IFreeSql fsql, ILogService log, DataServices data, IEventAggregator ea)
{
_fsql = fsql;
_log = log;
_data = data;
_ea = ea;
LiveMessages = new ObservableCollection<string>();
RefreshCommand = new DelegateCommand(async () => await RefreshStatsAsync());
ClearLogsCommand = new DelegateCommand(() => LiveMessages.Clear());
PlcConnected = _data.PlcConnected;
_data.PropertyChanged += (s, e) =>
{
if (e.PropertyName == nameof(DataServices.PlcConnected))
{
var val = _data.PlcConnected;
if (Application.Current?.Dispatcher?.CheckAccess() == true)
PlcConnected = val;
else
Application.Current?.Dispatcher?.BeginInvoke(new Action(() => PlcConnected = val));
}
};
// 订阅产线信号事件,生成人类可读的运行消息
_data.LineSglModel.WeightScanCodeHandle += (s, e) =>
{
var code = _data.WeightScanCode;
if (Application.Current?.Dispatcher?.CheckAccess() == true)
LatestWeightScanCode = code;
else
Application.Current?.Dispatcher?.BeginInvoke(new Action(() => LatestWeightScanCode = code));
AppendLiveMessage($"称重扫码触发: {code}");
};
_data.LineSglModel.BoxSprayCodeReqHandle += (s, e) =>
{
AppendLiveMessage("外箱喷码请求: 已向PLC下发喷码数据");
};
_data.LineSglModel.BoxScanCodeReqHandle += (s, e) =>
{
var code = _data.BoxScanCode;
if (Application.Current?.Dispatcher?.CheckAccess() == true)
LatestBoxScanCode = code;
else
Application.Current?.Dispatcher?.BeginInvoke(new Action(() => LatestBoxScanCode = code));
AppendLiveMessage($"外箱扫码触发: {code}");
};
// 订阅外部刷新事件(来自 DataServices 的 BoxScanCode 完成后)
try
{
_dashEventToken = _ea.GetEvent<DashboardRefreshEvent>().Subscribe(_ =>
{
Application.Current?.Dispatcher?.BeginInvoke(new Action(async () => await RefreshStatsAsync()));
});
}
catch { }
}
#region Properties
private double _todayWeight;
public double TodayWeight { get => _todayWeight; set { _todayWeight = value; RaisePropertyChanged(); } }
private double _monthWeight;
public double MonthWeight { get => _monthWeight; set { _monthWeight = value; RaisePropertyChanged(); } }
private double _yearWeight;
public double YearWeight { get => _yearWeight; set { _yearWeight = value; RaisePropertyChanged(); } }
private double _totalWeight;
public double TotalWeight { get => _totalWeight; set { _totalWeight = value; RaisePropertyChanged(); } }
private string _latestWeightScanCode;
public string LatestWeightScanCode { get => _latestWeightScanCode; set { _latestWeightScanCode = value; RaisePropertyChanged(); } }
private string _latestBoxScanCode;
public string LatestBoxScanCode { get => _latestBoxScanCode; set { _latestBoxScanCode = value; RaisePropertyChanged(); } }
private bool _plcConnected;
public bool PlcConnected { get => _plcConnected; set { _plcConnected = value; RaisePropertyChanged(); } }
public ObservableCollection<string> LiveMessages { get; }
#endregion
#region Commands
public DelegateCommand RefreshCommand { get; }
public DelegateCommand ClearLogsCommand { get; }
#endregion
private void StartLogTimer()
{
if (_logTimer != null) return;
_logTimer = new DispatcherTimer
{
Interval = TimeSpan.FromMilliseconds(500)
};
_logTimer.Tick += (s, e) =>
{
// 从 DataServices 的队列中取出消息并展示
int drain = 0;
while (_data.TryDequeueMessage(out var msg))
{
if (!string.IsNullOrWhiteSpace(msg))
{
AppendLiveMessage(msg);
drain++;
if (drain >= 50) break; // 防止一次处理过多
}
}
};
_logTimer.Start();
}
private void AppendLiveMessage(string message)
{
if (string.IsNullOrWhiteSpace(message)) return;
var line = $"{DateTime.Now:HH:mm:ss} {message}";
void add() => LiveMessages.Add(line);
if (Application.Current?.Dispatcher?.CheckAccess() == true) add();
else Application.Current?.Dispatcher?.BeginInvoke(new Action(add));
// 限制最大条数,避免内存增长
const int max = 500;
void trim()
{
if (LiveMessages.Count > max)
{
while (LiveMessages.Count > max)
LiveMessages.RemoveAt(0);
}
}
if (Application.Current?.Dispatcher?.CheckAccess() == true) trim();
else Application.Current?.Dispatcher?.BeginInvoke(new Action(trim));
}
private async Task RefreshStatsAsync()
{
try
{
var todayStart = DateTime.Today;
var todayEnd = todayStart.AddDays(1).AddTicks(-1);
var monthStart = new DateTime(DateTime.Today.Year, DateTime.Today.Month, 1);
var monthEnd = monthStart.AddMonths(1).AddTicks(-1);
var yearStart = new DateTime(DateTime.Today.Year, 1, 1);
var yearEnd = yearStart.AddYears(1).AddTicks(-1);
var ret = await Task.Run(() =>
{
double t = Convert.ToDouble(
_fsql.Select<RawProUse>()
.Where(a => a.WeightTime >= todayStart && a.WeightTime <= todayEnd)
.Sum(a => a.Weight));
double m = Convert.ToDouble(
_fsql.Select<RawProUse>()
.Where(a => a.WeightTime >= monthStart && a.WeightTime <= monthEnd)
.Sum(a => a.Weight));
double y = Convert.ToDouble(
_fsql.Select<RawProUse>()
.Where(a => a.WeightTime >= yearStart && a.WeightTime <= yearEnd)
.Sum(a => a.Weight));
double all = Convert.ToDouble(_fsql.Select<RawProUse>().Sum(a => a.Weight));
return (t, m, y, all);
});
TodayWeight = ret.t;
MonthWeight = ret.m;
YearWeight = ret.y;
TotalWeight = ret.all;
}
catch (Exception ex)
{
_log.Error($"Dashboard 统计刷新失败: {ex}");
}
}
public override async void OnNavigatedTo(Prism.Regions.NavigationContext navigationContext)
{
if (!_initialized)
{
_initialized = true;
//StartLogTimer();
await RefreshStatsAsync();
// 初始化展示最近一次扫描值
LatestWeightScanCode = _data.WeightScanCode;
LatestBoxScanCode = _data.BoxScanCode;
TryHookConsole();
}
}
public override void OnNavigatedFrom(Prism.Regions.NavigationContext navigationContext)
{
if (_logTimer != null)
{
try { _logTimer.Stop(); } catch { }
_logTimer = null;
}
UnhookConsole();
try { if (_dashEventToken != null) _ea.GetEvent<DashboardRefreshEvent>().Unsubscribe(_dashEventToken); } catch { }
}
private void TryHookConsole()
{
try
{
if (_consoleInterceptor != null) return;
_originalConsoleOut = Console.Out;
_consoleInterceptor = new ConsoleInterceptWriter(_originalConsoleOut, AppendLiveMessage);
Console.SetOut(_consoleInterceptor);
}
catch { }
}
private void UnhookConsole()
{
try
{
if (_consoleInterceptor != null && _originalConsoleOut != null)
{
Console.SetOut(_originalConsoleOut);
}
}
catch { }
finally
{
_consoleInterceptor = null;
_originalConsoleOut = null;
}
}
private class ConsoleInterceptWriter : TextWriter
{
private readonly TextWriter _inner;
private readonly Action<string> _onLine;
private readonly StringWriter _buffer = new StringWriter();
public ConsoleInterceptWriter(TextWriter inner, Action<string> onLine)
{
_inner = inner;
_onLine = onLine;
}
public override Encoding Encoding => _inner.Encoding;
public override void Write(char value)
{
_inner.Write(value);
if (value == '\n')
{
var line = _buffer.ToString();
_buffer.GetStringBuilder().Clear();
if (!string.IsNullOrWhiteSpace(line)) _onLine(line.TrimEnd('\r'));
}
else
{
_buffer.Write(value);
}
}
public override void Write(string value)
{
_inner.Write(value);
if (value == null) return;
foreach (var ch in value)
{
Write(ch);
}
}
public override void WriteLine(string value)
{
_inner.WriteLine(value);
if (!string.IsNullOrWhiteSpace(value)) _onLine(value);
}
}
private SubscriptionToken _dashEventToken;
}
}

View File

@@ -28,12 +28,13 @@ namespace FATrace.WPLApp.ViewModels
{
private readonly IFreeSql _fsql;
private readonly ILogService _log;
private readonly CsvServices csvServices;
public RawProUseViewModel(IFreeSql fsql, ILogService log)
public RawProUseViewModel(IFreeSql fsql, ILogService log, CsvServices csvServices)
{
_fsql = fsql;
_log = log;
this.csvServices = csvServices;
Items = new ObservableCollection<RawProUseDto>();
// 集合变化时动态刷新导出命令可用性
Items.CollectionChanged += (s, e) =>
@@ -51,6 +52,8 @@ namespace FATrace.WPLApp.ViewModels
.ObservesProperty(() => IsBusy)
// Items 是集合引用,通常不会替换引用,这里通过 CollectionChanged 手动触发
;
ExportCSVCommand = new DelegateCommand(ExportToCsv, () => !IsBusy && Items.Count > 0)
.ObservesProperty(() => IsBusy);
ClearCommand = new DelegateCommand(ClearFilters, () => !IsBusy)
.ObservesProperty(() => IsBusy);
@@ -212,6 +215,7 @@ namespace FATrace.WPLApp.ViewModels
#region
public DelegateCommand SearchCommand { get; }
public DelegateCommand ExportCommand { get; }
public DelegateCommand ExportCSVCommand { get; }
public DelegateCommand ClearCommand { get; }
public DelegateCommand FirstPageCommand { get; }
public DelegateCommand PrevPageCommand { get; }
@@ -356,6 +360,63 @@ namespace FATrace.WPLApp.ViewModels
}
}
/// <summary>
/// 使用 CsvServices 将当前界面数据导出为 CSV 文件(每条记录一个文件,命名为 InBagCode.csv
/// </summary>
private void ExportToCsv()
{
if (IsBusy) return;
if (Items.Count == 0)
{
System.Windows.MessageBox.Show("无可导出的数据", "提示", MessageBoxButton.OK, MessageBoxImage.Information);
return;
}
try
{
IsBusy = true;
var dr = "D:\\迅雷下载";
// 转换为 RawProUserCsvDto
var all = Items.Select(it => new RawProUserCsvDto
{
RawCode = it.RawCode,
RawName = it.RawName,
InBagCode = it.InBagCode,
BoxCode = it.BoxCode,
Batch = it.Batch,
ShelfLife = it.ShelfLife,
Weight = it.Weight,
DeliveryDate = it.WeightTime.ToString("yyyyMMdd"),
RemainWeight = it.RemainWeight,
StockWeight = it.StockWeight,
WeightTime = it.WeightTime,
OpUser = it.OpUser,
CheckUser = it.CheckUser,
OutTime = it.OutTime
}).ToList();
// 过滤 InBagCode 为空的记录,避免导出失败
var valid = all.Where(x => !string.IsNullOrWhiteSpace(x.InBagCode)).ToList();
int skipped = all.Count - valid.Count;
var svc = csvServices;
var paths = svc.ExportMany(valid, dr, overwrite: true);
_log.Info($"RawProUse CSV 导出完成: 目录={dr}, 成功={valid.Count}, 跳过={skipped}");
System.Windows.MessageBox.Show($"导出完成:成功 {valid.Count} 条,跳过 {skipped} 条。\n目录{dr}", "提示", MessageBoxButton.OK, MessageBoxImage.Information);
}
catch (Exception ex)
{
_log.Error($"RawProUse CSV 导出失败: {ex}");
System.Windows.MessageBox.Show($"导出失败: {ex.Message}", "错误", MessageBoxButton.OK, MessageBoxImage.Error);
}
finally
{
IsBusy = false;
}
}
/// <summary>
/// 导出当前查询结果为 Excel.xlsx
/// </summary>

View File

@@ -0,0 +1,125 @@
<UserControl x:Class="FATrace.WPLApp.Views.DashboardView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:FATrace.WPLApp.Views"
xmlns:prism="http://prismlibrary.com/"
mc:Ignorable="d"
d:DesignHeight="720" d:DesignWidth="1280"
prism:ViewModelLocator.AutoWireViewModel="True">
<Grid Margin="12">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
<RowDefinition Height="2*"/>
</Grid.RowDefinitions>
<!-- 顶部统计卡片 -->
<Grid Grid.Row="0" Margin="0,0,0,10">
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition/>
<ColumnDefinition/>
<ColumnDefinition/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<Border Grid.Column="0" Background="#F3F6FA" BorderBrush="#DDE3EB" BorderThickness="1" CornerRadius="6" Padding="12" Margin="0,0,10,0">
<StackPanel>
<StackPanel Orientation="Horizontal">
<TextBlock FontFamily="/Assets/Fonts/#iconfont" FontSize="16" Text="&#xeb2c;" Margin="0,0,6,0"/>
<TextBlock Text="本日称重总量" Foreground="#55657E" FontSize="14"/>
</StackPanel>
<TextBlock Text="{Binding TodayWeight, StringFormat={}{0:N2} g}" FontSize="26" FontWeight="Bold"/>
</StackPanel>
</Border>
<Border Grid.Column="1" Background="#F3F6FA" BorderBrush="#DDE3EB" BorderThickness="1" CornerRadius="6" Padding="12" Margin="0,0,10,0">
<StackPanel>
<StackPanel Orientation="Horizontal">
<TextBlock FontFamily="/Assets/Fonts/#iconfont" FontSize="16" Text="&#xeb08;" Margin="0,0,6,0"/>
<TextBlock Text="本月称重总量" Foreground="#55657E" FontSize="14"/>
</StackPanel>
<TextBlock Text="{Binding MonthWeight, StringFormat={}{0:N2} g}" FontSize="26" FontWeight="Bold"/>
</StackPanel>
</Border>
<Border Grid.Column="2" Background="#F3F6FA" BorderBrush="#DDE3EB" BorderThickness="1" CornerRadius="6" Padding="12" Margin="0,0,10,0">
<StackPanel>
<StackPanel Orientation="Horizontal">
<TextBlock FontFamily="/Assets/Fonts/#iconfont" FontSize="16" Text="&#xeb1a;" Margin="0,0,6,0"/>
<TextBlock Text="本年称重总量" Foreground="#55657E" FontSize="14"/>
</StackPanel>
<TextBlock Text="{Binding YearWeight, StringFormat={}{0:N2} g}" FontSize="26" FontWeight="Bold"/>
</StackPanel>
</Border>
<Border Grid.Column="3" Background="#F3F6FA" BorderBrush="#DDE3EB" BorderThickness="1" CornerRadius="6" Padding="12" Margin="0,0,10,0">
<StackPanel>
<StackPanel Orientation="Horizontal">
<TextBlock FontFamily="/Assets/Fonts/#iconfont" FontSize="16" Text="&#xec1f;" Margin="0,0,6,0"/>
<TextBlock Text="累计称重总量" Foreground="#55657E" FontSize="14"/>
</StackPanel>
<TextBlock Text="{Binding TotalWeight, StringFormat={}{0:N2} g}" FontSize="26" FontWeight="Bold"/>
</StackPanel>
</Border>
</Grid>
<!-- 中部:实时运行信息 + 右侧状态 -->
<Grid Grid.Row="1">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="2*"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<!-- 实时信息 -->
<Border Grid.Column="0" BorderBrush="#DDE3EB" BorderThickness="1" CornerRadius="6" Padding="8" Background="White" Margin="0,0,10,0">
<DockPanel>
<TextBlock DockPanel.Dock="Top" Text="实时运行信息(扫码/喷码)" FontWeight="Bold" FontSize="14" Margin="2,0,0,6"/>
<ListBox ItemsSource="{Binding LiveMessages}">
<ListBox.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding}" FontFamily="Consolas" FontSize="13"/>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
</DockPanel>
</Border>
<!-- 右侧状态 -->
<Border Grid.Column="1" BorderBrush="#DDE3EB" BorderThickness="1" CornerRadius="6" Padding="12" Background="White">
<StackPanel>
<StackPanel Orientation="Horizontal">
<TextBlock FontFamily="/Assets/Fonts/#iconfont" FontSize="16" Text="&#xec98;" Margin="0,0,6,0"/>
<TextBlock Text="设备/通信状态" FontWeight="Bold" FontSize="14"/>
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,8,0,0" VerticalAlignment="Center">
<Ellipse Width="14" Height="14">
<Ellipse.Style>
<Style TargetType="Ellipse">
<Setter Property="Fill" Value="#D9534F"/>
<Style.Triggers>
<DataTrigger Binding="{Binding PlcConnected}" Value="True">
<Setter Property="Fill" Value="#5CB85C"/>
</DataTrigger>
</Style.Triggers>
</Style>
</Ellipse.Style>
</Ellipse>
<TextBlock Text=" PLC连接" VerticalAlignment="Center"/>
</StackPanel>
<Separator Margin="0,10,0,10"/>
<TextBlock Text="最近称重扫码" Foreground="#55657E"/>
<TextBox Text="{Binding LatestWeightScanCode}" IsReadOnly="True" FontFamily="Consolas"/>
<TextBlock Text="最近外箱扫码" Foreground="#55657E" Margin="0,8,0,0"/>
<TextBox Text="{Binding LatestBoxScanCode}" IsReadOnly="True" FontFamily="Consolas"/>
</StackPanel>
</Border>
</Grid>
<!-- 底部:预留区域 -->
<Border Grid.Row="2" BorderBrush="#DDE3EB" BorderThickness="1" CornerRadius="6" Padding="12" Background="#F9FAFB" Margin="0,10,0,0">
<TextBlock Text="预留区域(可放置其他信息)" Foreground="#7A8CA6"/>
</Border>
</Grid>
</UserControl>

View File

@@ -0,0 +1,28 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
namespace FATrace.WPLApp.Views
{
/// <summary>
/// DashboardView.xaml 的交互逻辑
/// </summary>
public partial class DashboardView : UserControl
{
public DashboardView()
{
InitializeComponent();
}
}
}

View File

@@ -11,7 +11,7 @@
<Grid Margin="2,1,2,2" Background="#f6f5ec">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="2*" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="*" />
@@ -78,13 +78,34 @@
</Style>
</Border.Style>
<StackPanel Style="{StaticResource StackPanelStyle}">
<Ellipse
Width="10"
Height="10"
Margin="0,0,6,0">
<Ellipse.Style>
<Style TargetType="Ellipse">
<Setter Property="Fill" Value="Red" />
<Style.Triggers>
<DataTrigger Binding="{Binding SysRunService.PlcLinkState}" Value="True">
<Setter Property="Fill" Value="Lime" />
</DataTrigger>
</Style.Triggers>
</Style>
</Ellipse.Style>
</Ellipse>
<TextBlock Style="{StaticResource TextBlockIcon}" Text="&#xe776;" />
<TextBlock Style="{StaticResource TextBlockStyle}" Text="PLC通信:" />
<TextBlock Style="{StaticResource TextBlockStyle}" Text="PLC:" />
<TextBlock
Margin="5,0"
FontSize="16"
Foreground="White"
Text="{Binding SysRunService.PlcEndPoint}" />
<TextBlock Style="{StaticResource TextBlockStyle}" Text="/" />
<TextBlock Style="{StaticResource TextBlockStyle}" Text="{Binding SysRunService.SysRunState.ComMsg}" />
</StackPanel>
</Border>
<Border Grid.Column="2" Style="{StaticResource BoardStyle}">
<!--<Border Grid.Column="2" Style="{StaticResource BoardStyle}">
<StackPanel Style="{StaticResource StackPanelStyle}">
<TextBlock Style="{StaticResource TextBlockIcon}" Text="&#xe9b0;" />
<TextBlock Style="{StaticResource TextBlockStyle}" Text="数据记录:" />
@@ -94,9 +115,9 @@
Foreground="White"
Text="{Binding c}" />
</StackPanel>
</Border>
</Border>-->
<Border Grid.Column="3">
<Border Grid.Column="2">
<Border.Style>
<Style BasedOn="{StaticResource BoardStyle}" TargetType="Border">
<Style.Triggers>