Browse Source

Merge branch '75豪德众益洋智能家居' of http://www.imaodou.com.cn:30030/c_jack/EICP3.0_69 into 75豪德众益洋智能家居

陈子杰 4 months ago
parent
commit
be4b1f67e9

+ 472 - 0
SCADA_DAQ/Customer/Doc/Label_202406261033_01.cyc

@@ -0,0 +1,472 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<CycleFile>
+<Cycle Name="Cycle_Label">
+<Field Name="LabelName" Value="202406261033_01_0036.bmp" />
+<Field Name="X" Value="591.00" />
+<Field Name="Y" Value="1891.00" />
+<Field Name="R" Value="0" />
+<Field Name="ID" Value="D2400000893720490_02" />
+<Field Name="PositionX" Value="589.65" />
+<Field Name="PositionY" Value="1891.25" />
+<Field Name="ActualLength" Value="330.00" />
+<Field Name="ActualWidth" Value="383.00" />
+<Field Name="Waste" Value="0" />
+<Field Name="Accurate" Value="0" />
+</Cycle>
+<Cycle Name="Cycle_Label">
+<Field Name="LabelName" Value="202406261033_01_0001.bmp" />
+<Field Name="X" Value="988.00" />
+<Field Name="Y" Value="2657.50" />
+<Field Name="R" Value="0" />
+<Field Name="ID" Value="D2300089241030100" />
+<Field Name="PositionX" Value="986.75" />
+<Field Name="PositionY" Value="2658.25" />
+<Field Name="ActualLength" Value="173.00" />
+<Field Name="ActualWidth" Value="321.00" />
+<Field Name="Waste" Value="0" />
+<Field Name="Accurate" Value="0" />
+</Cycle>
+<Cycle Name="Cycle_Label">
+<Field Name="LabelName" Value="202406261033_01_0002.bmp" />
+<Field Name="X" Value="167.00" />
+<Field Name="Y" Value="153.50" />
+<Field Name="R" Value="0" />
+<Field Name="ID" Value="D2400000893720490_12" />
+<Field Name="PositionX" Value="165.75" />
+<Field Name="PositionY" Value="154.25" />
+<Field Name="ActualLength" Value="173.00" />
+<Field Name="ActualWidth" Value="321.00" />
+<Field Name="Waste" Value="0" />
+<Field Name="Accurate" Value="0" />
+</Cycle>
+<Cycle Name="Cycle_Label">
+<Field Name="LabelName" Value="202406261033_01_0003.bmp" />
+<Field Name="X" Value="167.00" />
+<Field Name="Y" Value="335.50" />
+<Field Name="R" Value="0" />
+<Field Name="ID" Value="D2400000893720490_08" />
+<Field Name="PositionX" Value="165.75" />
+<Field Name="PositionY" Value="335.75" />
+<Field Name="ActualLength" Value="173.00" />
+<Field Name="ActualWidth" Value="321.00" />
+<Field Name="Waste" Value="0" />
+<Field Name="Accurate" Value="0" />
+</Cycle>
+<Cycle Name="Cycle_Label">
+<Field Name="LabelName" Value="202406261033_01_0004.bmp" />
+<Field Name="X" Value="496.00" />
+<Field Name="Y" Value="96.50" />
+<Field Name="R" Value="0" />
+<Field Name="ID" Value="D2300089241030130" />
+<Field Name="PositionX" Value="495.25" />
+<Field Name="PositionY" Value="97.25" />
+<Field Name="ActualLength" Value="173.00" />
+<Field Name="ActualWidth" Value="321.00" />
+<Field Name="Waste" Value="0" />
+<Field Name="Accurate" Value="0" />
+</Cycle>
+<Cycle Name="Cycle_Label">
+<Field Name="LabelName" Value="202406261033_01_0005.bmp" />
+<Field Name="X" Value="803.50" />
+<Field Name="Y" Value="84.00" />
+<Field Name="R" Value="0" />
+<Field Name="ID" Value="D2400000893720490_01" />
+<Field Name="PositionX" Value="802.25" />
+<Field Name="PositionY" Value="84.25" />
+<Field Name="ActualLength" Value="120.00" />
+<Field Name="ActualWidth" Value="276.00" />
+<Field Name="Waste" Value="0" />
+<Field Name="Accurate" Value="0" />
+</Cycle>
+<Cycle Name="Cycle_Label">
+<Field Name="LabelName" Value="202406261033_01_0006.bmp" />
+<Field Name="X" Value="496.00" />
+<Field Name="Y" Value="278.50" />
+<Field Name="R" Value="0" />
+<Field Name="ID" Value="D2300089241030120" />
+<Field Name="PositionX" Value="495.25" />
+<Field Name="PositionY" Value="278.75" />
+<Field Name="ActualLength" Value="173.00" />
+<Field Name="ActualWidth" Value="321.00" />
+<Field Name="Waste" Value="0" />
+<Field Name="Accurate" Value="0" />
+</Cycle>
+<Cycle Name="Cycle_Label">
+<Field Name="LabelName" Value="202406261033_01_0007.bmp" />
+<Field Name="X" Value="1073.00" />
+<Field Name="Y" Value="202.00" />
+<Field Name="R" Value="0" />
+<Field Name="ID" Value="D2400000893720490" />
+<Field Name="PositionX" Value="1072.75" />
+<Field Name="PositionY" Value="202.75" />
+<Field Name="ActualLength" Value="300.00" />
+<Field Name="ActualWidth" Value="200.00" />
+<Field Name="Waste" Value="0" />
+<Field Name="Accurate" Value="0" />
+</Cycle>
+<Cycle Name="Cycle_Label">
+<Field Name="LabelName" Value="202406261033_01_0008.bmp" />
+<Field Name="X" Value="815.50" />
+<Field Name="Y" Value="252.00" />
+<Field Name="R" Value="0" />
+<Field Name="ID" Value="D2400000893720490_32" />
+<Field Name="PositionX" Value="814.25" />
+<Field Name="PositionY" Value="252.75" />
+<Field Name="ActualLength" Value="200.00" />
+<Field Name="ActualWidth" Value="300.00" />
+<Field Name="Waste" Value="0" />
+<Field Name="Accurate" Value="0" />
+</Cycle>
+<Cycle Name="Cycle_Label">
+<Field Name="LabelName" Value="202406261033_01_0009.bmp" />
+<Field Name="X" Value="1132.50" />
+<Field Name="Y" Value="577.00" />
+<Field Name="R" Value="0" />
+<Field Name="ID" Value="D2300088681110070" />
+<Field Name="PositionX" Value="1131.75" />
+<Field Name="PositionY" Value="577.75" />
+<Field Name="ActualLength" Value="276.00" />
+<Field Name="ActualWidth" Value="120.00" />
+<Field Name="Waste" Value="0" />
+<Field Name="Accurate" Value="0" />
+</Cycle>
+<Cycle Name="Cycle_Label">
+<Field Name="LabelName" Value="202406261033_01_0010.bmp" />
+<Field Name="X" Value="865.00" />
+<Field Name="Y" Value="447.50" />
+<Field Name="R" Value="0" />
+<Field Name="ID" Value="D2400000893720490_11" />
+<Field Name="PositionX" Value="863.75" />
+<Field Name="PositionY" Value="447.75" />
+<Field Name="ActualLength" Value="173.00" />
+<Field Name="ActualWidth" Value="321.00" />
+<Field Name="Waste" Value="0" />
+<Field Name="Accurate" Value="0" />
+</Cycle>
+<Cycle Name="Cycle_Label">
+<Field Name="LabelName" Value="202406261033_01_0011.bmp" />
+<Field Name="X" Value="904.00" />
+<Field Name="Y" Value="628.50" />
+<Field Name="R" Value="0" />
+<Field Name="ID" Value="D2300089241030090" />
+<Field Name="PositionX" Value="902.75" />
+<Field Name="PositionY" Value="629.25" />
+<Field Name="ActualLength" Value="173.00" />
+<Field Name="ActualWidth" Value="321.00" />
+<Field Name="Waste" Value="0" />
+<Field Name="Accurate" Value="0" />
+</Cycle>
+<Cycle Name="Cycle_Label">
+<Field Name="LabelName" Value="202406261033_01_0012.bmp" />
+<Field Name="X" Value="535.00" />
+<Field Name="Y" Value="459.50" />
+<Field Name="R" Value="0" />
+<Field Name="ID" Value="D2400000893720490_07" />
+<Field Name="PositionX" Value="534.25" />
+<Field Name="PositionY" Value="460.25" />
+<Field Name="ActualLength" Value="173.00" />
+<Field Name="ActualWidth" Value="321.00" />
+<Field Name="Waste" Value="0" />
+<Field Name="Accurate" Value="0" />
+</Cycle>
+<Cycle Name="Cycle_Label">
+<Field Name="LabelName" Value="202406261033_01_0013.bmp" />
+<Field Name="X" Value="617.50" />
+<Field Name="Y" Value="2654.50" />
+<Field Name="R" Value="0" />
+<Field Name="ID" Value="D2400000244610260" />
+<Field Name="PositionX" Value="616.75" />
+<Field Name="PositionY" Value="2655.25" />
+<Field Name="ActualLength" Value="179.00" />
+<Field Name="ActualWidth" Value="402.00" />
+<Field Name="Waste" Value="0" />
+<Field Name="Accurate" Value="0" />
+</Cycle>
+<Cycle Name="Cycle_Label">
+<Field Name="LabelName" Value="202406261033_01_0014.bmp" />
+<Field Name="X" Value="207.50" />
+<Field Name="Y" Value="2654.50" />
+<Field Name="R" Value="0" />
+<Field Name="ID" Value="D2400000893720490_29" />
+<Field Name="PositionX" Value="206.25" />
+<Field Name="PositionY" Value="2655.25" />
+<Field Name="ActualLength" Value="179.00" />
+<Field Name="ActualWidth" Value="402.00" />
+<Field Name="Waste" Value="0" />
+<Field Name="Accurate" Value="0" />
+</Cycle>
+<Cycle Name="Cycle_Label">
+<Field Name="LabelName" Value="202406261033_01_0015.bmp" />
+<Field Name="X" Value="969.50" />
+<Field Name="Y" Value="829.00" />
+<Field Name="R" Value="0" />
+<Field Name="ID" Value="D2400000893720490_09" />
+<Field Name="PositionX" Value="968.25" />
+<Field Name="PositionY" Value="829.25" />
+<Field Name="ActualLength" Value="210.00" />
+<Field Name="ActualWidth" Value="360.00" />
+<Field Name="Waste" Value="0" />
+<Field Name="Accurate" Value="0" />
+</Cycle>
+<Cycle Name="Cycle_Label">
+<Field Name="LabelName" Value="202406261033_01_0016.bmp" />
+<Field Name="X" Value="554.50" />
+<Field Name="Y" Value="660.00" />
+<Field Name="R" Value="0" />
+<Field Name="ID" Value="D2300089241030140" />
+<Field Name="PositionX" Value="553.75" />
+<Field Name="PositionY" Value="660.25" />
+<Field Name="ActualLength" Value="210.00" />
+<Field Name="ActualWidth" Value="360.00" />
+<Field Name="Waste" Value="0" />
+<Field Name="Accurate" Value="0" />
+</Cycle>
+<Cycle Name="Cycle_Label">
+<Field Name="LabelName" Value="202406261033_01_0017.bmp" />
+<Field Name="X" Value="186.50" />
+<Field Name="Y" Value="535.00" />
+<Field Name="R" Value="0" />
+<Field Name="ID" Value="D2400000893720490_10" />
+<Field Name="PositionX" Value="185.25" />
+<Field Name="PositionY" Value="535.75" />
+<Field Name="ActualLength" Value="210.00" />
+<Field Name="ActualWidth" Value="360.00" />
+<Field Name="Waste" Value="0" />
+<Field Name="Accurate" Value="0" />
+</Cycle>
+<Cycle Name="Cycle_Label">
+<Field Name="LabelName" Value="202406261033_01_0018.bmp" />
+<Field Name="X" Value="186.50" />
+<Field Name="Y" Value="754.00" />
+<Field Name="R" Value="0" />
+<Field Name="ID" Value="D2300089241030110" />
+<Field Name="PositionX" Value="185.25" />
+<Field Name="PositionY" Value="754.25" />
+<Field Name="ActualLength" Value="210.00" />
+<Field Name="ActualWidth" Value="360.00" />
+<Field Name="Waste" Value="0" />
+<Field Name="Accurate" Value="0" />
+</Cycle>
+<Cycle Name="Cycle_Label">
+<Field Name="LabelName" Value="202406261033_01_0019.bmp" />
+<Field Name="X" Value="1006.50" />
+<Field Name="Y" Value="2449.50" />
+<Field Name="R" Value="0" />
+<Field Name="ID" Value="D2400000160330230" />
+<Field Name="PositionX" Value="1005.15" />
+<Field Name="PositionY" Value="2449.75" />
+<Field Name="ActualLength" Value="215.00" />
+<Field Name="ActualWidth" Value="385.80" />
+<Field Name="Waste" Value="0" />
+<Field Name="Accurate" Value="0" />
+</Cycle>
+<Cycle Name="Cycle_Label">
+<Field Name="LabelName" Value="202406261033_01_0020.bmp" />
+<Field Name="X" Value="1006.50" />
+<Field Name="Y" Value="2225.50" />
+<Field Name="R" Value="0" />
+<Field Name="ID" Value="D2400000893720490_16" />
+<Field Name="PositionX" Value="1005.15" />
+<Field Name="PositionY" Value="2226.25" />
+<Field Name="ActualLength" Value="215.00" />
+<Field Name="ActualWidth" Value="385.80" />
+<Field Name="Waste" Value="0" />
+<Field Name="Accurate" Value="0" />
+</Cycle>
+<Cycle Name="Cycle_Label">
+<Field Name="LabelName" Value="202406261033_01_0021.bmp" />
+<Field Name="X" Value="984.50" />
+<Field Name="Y" Value="2002.50" />
+<Field Name="R" Value="0" />
+<Field Name="ID" Value="D2400000160330240" />
+<Field Name="PositionX" Value="983.45" />
+<Field Name="PositionY" Value="2002.75" />
+<Field Name="ActualLength" Value="215.00" />
+<Field Name="ActualWidth" Value="384.40" />
+<Field Name="Waste" Value="0" />
+<Field Name="Accurate" Value="0" />
+</Cycle>
+<Cycle Name="Cycle_Label">
+<Field Name="LabelName" Value="202406261033_01_0022.bmp" />
+<Field Name="X" Value="607.00" />
+<Field Name="Y" Value="2422.50" />
+<Field Name="R" Value="0" />
+<Field Name="ID" Value="D2400000893720490_13" />
+<Field Name="PositionX" Value="606.25" />
+<Field Name="PositionY" Value="2422.75" />
+<Field Name="ActualLength" Value="269.00" />
+<Field Name="ActualWidth" Value="395.00" />
+<Field Name="Waste" Value="0" />
+<Field Name="Accurate" Value="0" />
+</Cycle>
+<Cycle Name="Cycle_Label">
+<Field Name="LabelName" Value="202406261033_01_0023.bmp" />
+<Field Name="X" Value="204.00" />
+<Field Name="Y" Value="2422.50" />
+<Field Name="R" Value="0" />
+<Field Name="ID" Value="D2300089241090150" />
+<Field Name="PositionX" Value="202.75" />
+<Field Name="PositionY" Value="2422.75" />
+<Field Name="ActualLength" Value="269.00" />
+<Field Name="ActualWidth" Value="395.00" />
+<Field Name="Waste" Value="0" />
+<Field Name="Accurate" Value="0" />
+</Cycle>
+<Cycle Name="Cycle_Label">
+<Field Name="LabelName" Value="202406261033_01_0024.bmp" />
+<Field Name="X" Value="591.50" />
+<Field Name="Y" Value="2171.50" />
+<Field Name="R" Value="0" />
+<Field Name="ID" Value="D2400000893720490_18" />
+<Field Name="PositionX" Value="590.50" />
+<Field Name="PositionY" Value="2172.25" />
+<Field Name="ActualLength" Value="215.00" />
+<Field Name="ActualWidth" Value="384.50" />
+<Field Name="Waste" Value="0" />
+<Field Name="Accurate" Value="0" />
+</Cycle>
+<Cycle Name="Cycle_Label">
+<Field Name="LabelName" Value="202406261033_01_0025.bmp" />
+<Field Name="X" Value="198.50" />
+<Field Name="Y" Value="2171.50" />
+<Field Name="R" Value="0" />
+<Field Name="ID" Value="D2400000160330250" />
+<Field Name="PositionX" Value="197.50" />
+<Field Name="PositionY" Value="2172.25" />
+<Field Name="ActualLength" Value="215.00" />
+<Field Name="ActualWidth" Value="384.50" />
+<Field Name="Waste" Value="0" />
+<Field Name="Accurate" Value="0" />
+</Cycle>
+<Cycle Name="Cycle_Label">
+<Field Name="LabelName" Value="202406261033_01_0026.bmp" />
+<Field Name="X" Value="198.50" />
+<Field Name="Y" Value="1948.50" />
+<Field Name="R" Value="0" />
+<Field Name="ID" Value="D2400000893720490_17" />
+<Field Name="PositionX" Value="197.45" />
+<Field Name="PositionY" Value="1948.75" />
+<Field Name="ActualLength" Value="215.00" />
+<Field Name="ActualWidth" Value="384.40" />
+<Field Name="Waste" Value="0" />
+<Field Name="Accurate" Value="0" />
+</Cycle>
+<Cycle Name="Cycle_Label">
+<Field Name="LabelName" Value="202406261033_01_0027.bmp" />
+<Field Name="X" Value="982.00" />
+<Field Name="Y" Value="1731.50" />
+<Field Name="R" Value="0" />
+<Field Name="ID" Value="D2300089231010050" />
+<Field Name="PositionX" Value="981.15" />
+<Field Name="PositionY" Value="1732.25" />
+<Field Name="ActualLength" Value="309.00" />
+<Field Name="ActualWidth" Value="383.00" />
+<Field Name="Waste" Value="0" />
+<Field Name="Accurate" Value="0" />
+</Cycle>
+<Cycle Name="Cycle_Label">
+<Field Name="LabelName" Value="202406261033_01_0028.bmp" />
+<Field Name="X" Value="981.00" />
+<Field Name="Y" Value="1414.50" />
+<Field Name="R" Value="0" />
+<Field Name="ID" Value="D2300089231010060" />
+<Field Name="PositionX" Value="979.75" />
+<Field Name="PositionY" Value="1414.75" />
+<Field Name="ActualLength" Value="309.00" />
+<Field Name="ActualWidth" Value="383.00" />
+<Field Name="Waste" Value="0" />
+<Field Name="Accurate" Value="0" />
+</Cycle>
+<Cycle Name="Cycle_Label">
+<Field Name="LabelName" Value="202406261033_01_0029.bmp" />
+<Field Name="X" Value="981.00" />
+<Field Name="Y" Value="1096.50" />
+<Field Name="R" Value="0" />
+<Field Name="ID" Value="D2300089231010030" />
+<Field Name="PositionX" Value="979.75" />
+<Field Name="PositionY" Value="1097.25" />
+<Field Name="ActualLength" Value="309.00" />
+<Field Name="ActualWidth" Value="383.00" />
+<Field Name="Waste" Value="0" />
+<Field Name="Accurate" Value="0" />
+</Cycle>
+<Cycle Name="Cycle_Label">
+<Field Name="LabelName" Value="202406261033_01_0030.bmp" />
+<Field Name="X" Value="198.00" />
+<Field Name="Y" Value="1021.50" />
+<Field Name="R" Value="0" />
+<Field Name="ID" Value="D2300089231010040" />
+<Field Name="PositionX" Value="196.75" />
+<Field Name="PositionY" Value="1022.25" />
+<Field Name="ActualLength" Value="309.00" />
+<Field Name="ActualWidth" Value="383.00" />
+<Field Name="Waste" Value="0" />
+<Field Name="Accurate" Value="0" />
+</Cycle>
+<Cycle Name="Cycle_Label">
+<Field Name="LabelName" Value="202406261033_01_0031.bmp" />
+<Field Name="X" Value="198.00" />
+<Field Name="Y" Value="1339.50" />
+<Field Name="R" Value="0" />
+<Field Name="ID" Value="D2400000893720490_03" />
+<Field Name="PositionX" Value="196.75" />
+<Field Name="PositionY" Value="1339.75" />
+<Field Name="ActualLength" Value="309.00" />
+<Field Name="ActualWidth" Value="383.00" />
+<Field Name="Waste" Value="0" />
+<Field Name="Accurate" Value="0" />
+</Cycle>
+<Cycle Name="Cycle_Label">
+<Field Name="LabelName" Value="202406261033_01_0032.bmp" />
+<Field Name="X" Value="198.00" />
+<Field Name="Y" Value="1667.00" />
+<Field Name="R" Value="0" />
+<Field Name="ID" Value="D2300089231010020" />
+<Field Name="PositionX" Value="196.75" />
+<Field Name="PositionY" Value="1667.75" />
+<Field Name="ActualLength" Value="330.00" />
+<Field Name="ActualWidth" Value="383.00" />
+<Field Name="Waste" Value="0" />
+<Field Name="Accurate" Value="0" />
+</Cycle>
+<Cycle Name="Cycle_Label">
+<Field Name="LabelName" Value="202406261033_01_0033.bmp" />
+<Field Name="X" Value="589.00" />
+<Field Name="Y" Value="927.50" />
+<Field Name="R" Value="0" />
+<Field Name="ID" Value="D2400000893720490_05" />
+<Field Name="PositionX" Value="588.25" />
+<Field Name="PositionY" Value="928.25" />
+<Field Name="ActualLength" Value="309.00" />
+<Field Name="ActualWidth" Value="383.00" />
+<Field Name="Waste" Value="0" />
+<Field Name="Accurate" Value="0" />
+</Cycle>
+<Cycle Name="Cycle_Label">
+<Field Name="LabelName" Value="202406261033_01_0034.bmp" />
+<Field Name="X" Value="589.00" />
+<Field Name="Y" Value="1245.50" />
+<Field Name="R" Value="0" />
+<Field Name="ID" Value="D2400000893720490_04" />
+<Field Name="PositionX" Value="588.25" />
+<Field Name="PositionY" Value="1245.75" />
+<Field Name="ActualLength" Value="309.00" />
+<Field Name="ActualWidth" Value="383.00" />
+<Field Name="Waste" Value="0" />
+<Field Name="Accurate" Value="0" />
+</Cycle>
+<Cycle Name="Cycle_Label">
+<Field Name="LabelName" Value="202406261033_01_0035.bmp" />
+<Field Name="X" Value="589.00" />
+<Field Name="Y" Value="1562.50" />
+<Field Name="R" Value="0" />
+<Field Name="ID" Value="D2400000893720490_06" />
+<Field Name="PositionX" Value="588.25" />
+<Field Name="PositionY" Value="1563.25" />
+<Field Name="ActualLength" Value="309.00" />
+<Field Name="ActualWidth" Value="383.00" />
+<Field Name="Waste" Value="0" />
+<Field Name="Accurate" Value="0" />
+</Cycle>
+
+</CycleFile>

+ 1 - 1
SCADA_DAQ/Customer/Views/Menu/UctFrmSorting/UctFrmSortingMain.xaml

@@ -149,7 +149,7 @@
                             </wpfcontrol:IconButton>
                             <!--<wpfcontrol:IconButton ButtonStyle="Primary" Title="请求下一片" Width="90" Margin="12,6"/>
 <wpfcontrol:IconButton ButtonStyle="Primary" Title="相机到位" Width="90" Margin="12,6"/>-->
-                            <wpfcontrol:IconButton ButtonStyle="Warning" Title="模拟运行" x:Name="Btn_Sim" Click="Btn_Sim_Click"/>
+                            <wpfcontrol:IconButton ButtonStyle="Warning" ButtonKind="StartButton" Title="模拟运行" x:Name="Btn_Sim" Click="Btn_Sim_Click"/>
                         </StackPanel>
                     </StackPanel>
                     <TextBlock  Grid.Row="1" x:Name="ShowFlag" FontSize="22" HorizontalAlignment="Center">

+ 24 - 22
SCADA_DAQ/Customer/Views/Menu/UctFrmSorting/UctFrmSortingMain.xaml.cs

@@ -1,34 +1,21 @@
-using NPOI.SS.Formula.Functions;
-using SCADA;
-using SCADA.CommonCtrl.SCADAUI;
+using SCADA.CommonCtrl.SCADAUI;
 using SCADA.CommonCtrl.WpfControl;
 using SCADA.CommonLib;
 using SCADA.Drive;
 using SCADA_DAQ.Customer.Machines;
 using SCADA_DAQ.Customer.Models;
-using SCADA_DAQ.Customer.Service;
 using SCADA_DAQ.Customer.Views.Uct;
 using SCADA_DAQ.Plugin.Machine;
 using System;
-using System.CodeDom;
-using System.Collections.Generic;
 using System.Linq;
-using System.Text;
 using System.Threading;
 using System.Threading.Tasks;
 using System.Windows;
-using System.Windows.Annotations;
 using System.Windows.Controls;
 using System.Windows.Data;
-using System.Windows.Documents;
-using System.Windows.Input;
 using System.Windows.Media;
 using System.Windows.Media.Animation;
-using System.Windows.Media.Imaging;
-using System.Windows.Navigation;
-using System.Windows.Shapes;
 using System.Windows.Threading;
-using static NPOI.HSSF.Util.HSSFColor;
 
 namespace SCADA_DAQ.Customer.Views.Menu.UctFrmSorting
 {
@@ -41,13 +28,20 @@ namespace SCADA_DAQ.Customer.Views.Menu.UctFrmSorting
         SortMachine plc;
         UctCup cup;  //吸盘
         Point cupOrig = new Point(-165, -255);
+
         /// <summary>
         /// 
         /// </summary>
-        public UctFrmSortingMain(ActionPara actionPara)
+        public UctFrmSortingMain()
         {
             InitializeComponent();
             ToolBar.Visibility = Visibility.Collapsed;
+        }
+        /// <summary>
+        /// 
+        /// </summary>
+        public UctFrmSortingMain(ActionPara actionPara) : this()
+        {
             plc = MachineServer.GetInstance().GetMachine<SortMachine>(actionPara.DeviceId);
             CurrentPos.SetMacBinding(plc);
             DG_Labels.DataContext = plc;
@@ -61,7 +55,7 @@ namespace SCADA_DAQ.Customer.Views.Menu.UctFrmSorting
             RestartBtn.DataContext = plc.GetListenReg(SortMachine.Tag_PhotographOK);
             CupResetBtn.DataContext = plc.GetListenReg(SortMachine.Tag_CupReset);
             AlarmRoller.DataContext = plc;
-            PathSelect.Content = new AutoView(plc.File) { FontSize = 22,MaxTitleWidth = 100,ContentWidth = 1000};
+            PathSelect.Content = new AutoView(plc.File) { FontSize = 22, MaxTitleWidth = 100, ContentWidth = 1000 };
             if (plc != null)
             {
                 plc.NewBoardArrived += Plc_NewBoardArrived;
@@ -97,10 +91,7 @@ namespace SCADA_DAQ.Customer.Views.Menu.UctFrmSorting
             }
         }
 
-        public UctFrmSortingMain()
-        {
-            InitializeComponent();
-        }
+
         private void BaseDevice_RegReadValueChanged(object sender, RegReadValueChangedEventArgs e)
         {
             var reg = (RegInfo)sender;
@@ -227,8 +218,14 @@ namespace SCADA_DAQ.Customer.Views.Menu.UctFrmSorting
             if (plc.BaseDevice.Simulated)
             {
                 Btn_Sim.IsEnabled = false;
+                if (string.IsNullOrEmpty(plc.File.FilePath))
+                {
+                    MessageBox.Show(Application.Current.MainWindow, "没有选择有效的NC文件");
+                    return;
+                }
                 Task.Run(async () =>
                 {
+
                     plc.GetListenReg(SortMachine.Tag_SortFinish).ResetBit();
                     plc.GetListenReg(SortMachine.Tag_StartSort).SetBit();
                     await Task.Delay(1000);
@@ -270,9 +267,9 @@ namespace SCADA_DAQ.Customer.Views.Menu.UctFrmSorting
                 if (reg == plc.GetListenReg(SortMachine.Tag_ManualStart) && plc.File.FilePath == null)
                 {
                     MessageBox.Show("未选择分拣文件!");
-                    
+
                 }
-                else if(reg == plc.GetListenReg(SortMachine.Tag_PhotographOK))
+                else if (reg == plc.GetListenReg(SortMachine.Tag_PhotographOK))
                 {
                     plc.GetListenReg(SortMachine.Tag_RequestNext).WriteReg(1);
                     Task.Run(() =>
@@ -307,6 +304,11 @@ namespace SCADA_DAQ.Customer.Views.Menu.UctFrmSorting
                 reg.WriteReg(reg.Value == 0 ? 1 : 0);
             }
         }
+
+        private void Btn_Sim_Click(object sender, OpenFileButton.OpenFileButtonMouseEventArgs e)
+        {
+
+        }
     }
 
     public class ActionPara : ObservableObject