| | |
| | | |
| | | private void Button_Click(object sender, RoutedEventArgs e) |
| | | { |
| | | CountdownEvent c = new CountdownEvent(4); |
| | | while (c.CurrentCount > 0) { |
| | | Task.Run(() => |
| | | { |
| | | int i = c.CurrentCount; |
| | | c.Signal(); |
| | | for (int j = 0; j < 1000; j++) |
| | | { |
| | | tsExecution.AddTestData(i, $"{j},2,3,4,5,6,7"); |
| | | string status = (j % 2 == 0) ? "Passed" : "Failed"; |
| | | tsExecution.AddTestData(0, $"{j},2,3,4,5,6,{status}"); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | tsExecution.UpdatePositionStatus(0, "Passed"); |
| | | tsExecution.UpdatePositionProcessValue(0, 12); |
| | | tsExecution.PausePosition(0); |
| | | tsExecution.SetPositionBarcode(0, "123456789"); |
| | | |
| | | |
| | | //tsExecution.UpdatePositionStatus(1, "Failed"); |
| | | //tsExecution.UpdatePositionStatus(2, "Ready"); |
| | | //tsExecution.UpdatePositionStatus(3, "Testing"); |
| | | //tsExecution.UpdatePositionProcessValue(1, 50); |
| | | //tsExecution.UpdatePositionProcessValue(2, 100); |
| | | //tsExecution.UpdatePositionProcessValue(3, 99); |
| | | |
| | | |
| | | //client = new PipeClient2("DAService"); |
| | | ////client.OnData += Client_OnData1; |
| | | //client.Connect(); |
| | |
| | | |
| | | private void Window_Loaded(object sender, RoutedEventArgs e) |
| | | { |
| | | var plugin = new DataBoard(); |
| | | var plugin = new TsExecution(); |
| | | HandlePlugin(plugin); |
| | | border.Child = plugin; |
| | | dataBoard = plugin; |
| | | tsExecution = plugin; |
| | | this.Loaded -= Window_Loaded; |
| | | } |
| | | } |