浏览代码

Merge branch '73美的微波炉老化数据采集' of http://imaodou.com.cn:30030/c_jack/EICP3.0_69 into 73美的微波炉老化数据采集

mengshunguo 1 月之前
父节点
当前提交
ea86415e4d
共有 2 个文件被更改,包括 21 次插入1 次删除
  1. 1 1
      SCADA_DAQ/Customer/UctFrmMain.xaml
  2. 20 0
      SCADA_DAQ/Customer/UctFrmMain.xaml.cs

+ 1 - 1
SCADA_DAQ/Customer/UctFrmMain.xaml

@@ -54,7 +54,7 @@
                 </wpfcontrol:SmartGrid.Columns>
             </wpfcontrol:SmartGrid>
         </wpfcontrol:Card>-->
-        <wpfcontrol:Card Header="工装板绑定" Margin="4" Grid.Column="1" Grid.Row="1" CardStyle="Success" FontSize="{DynamicResource LargeFontSize}">
+        <wpfcontrol:Card Header="工装板绑定" Visibility="Collapsed" Margin="4" Grid.Column="1" Grid.Row="1" CardStyle="Success" FontSize="{DynamicResource LargeFontSize}">
             <ContentControl>
                 <wpfcontrol:SmartGrid IsReadOnly="True" ShowHeader="False" ShowFooter="False" x:Name="DG_Binding" ShowRowTips="False">
                     <wpfcontrol:SmartGrid.Columns>

+ 20 - 0
SCADA_DAQ/Customer/UctFrmMain.xaml.cs

@@ -86,6 +86,26 @@ namespace SCADA_DAQ.Customer
             //    });
             //}
             //T_PowerChart.Update(processDatas);
+
+
+            var datas = Env.DAL.App_Microwave_TestResult.GetTopN<ProductModel>(100);
+            var index = 0;
+            CreateBackGroundTask(() =>
+            {
+                var data = datas[index % datas.Count];
+                data.CreateTime = DateTime.Now;
+                if (data.ProcessDatas == null || data.ProcessDatas.Count <= 0)
+                {
+                    var process = Env.DAL.App_Microwave_ProcessData.GetData<ProcessData>(t => t.ReportId == data.ID);
+                    data.ProcessDatas = process.ToList();
+                }
+                Dispatcher.Invoke(() =>
+                {
+                    HeaderView.DataContext = data;
+                    T_PowerChart.Update(data.ProcessDatas);
+                });
+                index++;
+            }, 10000, 1000, true, "数据回放");
         }
 
         private void Rfid2_TestFinish(object sender, TestFinishEventArgs e)