Переглянути джерело

开料分拣输送增加清除NG通道队列

陈子杰 2 місяців тому
батько
коміт
d7abaf481a

+ 11 - 0
SCADA_DAQ/Customer/Views/Menu/UctFrmBackOfSortingDelivery/UctFrmSortingDelivery.xaml.cs

@@ -9,6 +9,7 @@ using SCADA_DAQ.Plugin.Machine;
 using SCADA_DAQ.Plugin.Machine.Device;
 using System;
 using System.Collections.Generic;
+using System.Collections.ObjectModel;
 using System.Linq;
 using System.Text;
 using System.Threading.Tasks;
@@ -63,6 +64,8 @@ namespace SCADA_DAQ.Customer.Views.Menu.UctFrmBackOfSortingDelivery
             HeteromorphosisDelivery.Delivery.Left.DataContext = _PLC.GetListenReg(SortingDeliveryMachine.Tag_HeteromorphosisRollerState);
             HeteromorphosisDelivery.Delivery.Right.DataContext = _PLC.GetListenReg(SortingDeliveryMachine.Tag_HeteromorphosisRollerState);
             var regGroup = _PLC.ListenReg.Where(t => t.Value.Comment.GroupName == "手动" && t.Value.Comment.Annotation != "").ToList();
+            CodeInfo.ClearNGQueue.Click += ClearNGQueue_Click;
+            
 
             string[] delivery1Str = new string[]
             {
@@ -161,6 +164,14 @@ namespace SCADA_DAQ.Customer.Views.Menu.UctFrmBackOfSortingDelivery
             _Sbr1.BarCodeReceived += _Sbr1_BarCodeReceived;
         }
 
+        private void ClearNGQueue_Click(object sender, RoutedEventArgs e)
+        {
+            if (MessageBox.Show("当前队列将会清空,是否继续?") == MessageBoxResult.OK)
+            {
+                _PLC.LeftLoversOrAbnormal.Clear();
+            }
+        }
+
         private void _Sbr1_BarCodeReceived(object sender, SCADA.BarcodeReader.BarcodeReceivedEventArgs e)
         {
             Dispatcher.Invoke(() =>

+ 4 - 1
SCADA_DAQ/Customer/Views/Uct/UctSortingDelivery/BoardInfoDashboard.xaml

@@ -40,7 +40,10 @@
                         </DataGridTextColumn>-->
                     </dashboard:DashboardDataGrid.Columns>
                 </dashboard:DashboardDataGrid>
-            <wpfcontrol:IconButton ButtonKind="ClearButton"  Title="清除记录"  Grid.Row="1" HorizontalAlignment="Right" Click="IconButton_Click"/>
+            <StackPanel HorizontalAlignment="Center" Orientation="Horizontal">
+                <wpfcontrol:IconButton ButtonKind="ClearButton"  Title="清除NG通道板件"  Grid.Row="1" HorizontalAlignment="Right" x:Name="ClearNGQueue"/>
+                <wpfcontrol:IconButton ButtonKind="ClearButton"  Title="清除所有板件"  Grid.Row="1" HorizontalAlignment="Right" Click="IconButton_Click"/>
+            </StackPanel>
         </Grid>
         </wpfcontrol:Card>
 </wpfcontrol:BaseUserControl>

+ 2 - 0
SCADA_DAQ/Customer/Views/Uct/UctSortingDelivery/BoardInfoDashboard.xaml.cs

@@ -24,6 +24,7 @@ namespace SCADA_DAQ.Customer.Views.Uct.UctSortingDelivery
     /// </summary>
     public partial class BoardsInfoDashboard : BaseUserControl
     {
+
         public BoardsInfoDashboard()
         {
             InitializeComponent();
@@ -58,5 +59,6 @@ namespace SCADA_DAQ.Customer.Views.Uct.UctSortingDelivery
                 }
             }
         }
+
     }
 }