123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141 |
- using System;
- using System.Collections.Concurrent;
- 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;
- using Venus_Themes.CustomControls;
- namespace Venus_MainPages.Views
- {
- /// <summary>
- /// TMView.xaml 的交互逻辑
- /// </summary>
- public partial class TMView : UserControl
- {
- BlockingCollection<WaferRobotTAction> blockingCollection = new BlockingCollection<WaferRobotTAction>();
- public TMView()
- {
- InitializeComponent();
-
- //消费
- //Task.Run(() =>
- //{
- // while (true)
- // {
- // if (blockingCollection.Count > 0)
- // {
- // this.Dispatcher.Invoke(new Action(() =>
- // {
- // WaferRobotTAction waferRobotTAction=blockingCollection.Take();
- // robot.RobotTAction = waferRobotTAction;
- // }));
- // }
- // System.Threading.Thread.Sleep(1000);
- // }
- //});
- }
- //private void XCWButton_Click(object sender, RoutedEventArgs e)
- //{
- // robot.RobotXAction = WaferRobotXAction.Extend;
- //}
- //private void XCCWButton_Click(object sender, RoutedEventArgs e)
- //{
- // robot.RobotXAction = WaferRobotXAction.Retract;
- //}
- //private void TCWButton_Click(object sender, RoutedEventArgs e)
- //{
- // robot.RobotTAction = WaferRobotTAction.PMA;
- //}
- //private void TCCWButton_Click(object sender, RoutedEventArgs e)
- //{
- // robot.RobotTAction = WaferRobotTAction.PMB;
- //}
- //private async void AutoButton_Click(object sender, RoutedEventArgs e)
- //{
- // robot.RobotTAction = WaferRobotTAction.LLA;
- // await Task.Delay(1000);
- // robot.RobotXAction = WaferRobotXAction.Extend;
- // await Task.Delay(2000);
- // //robot.Wafer = 1;
- // await Task.Delay(200);
- // robot.RobotXAction = WaferRobotXAction.Retract;
- // await Task.Delay(2000);
- // robot.RobotTAction = WaferRobotTAction.PMC;
- // await Task.Delay(1000);
- // robot.RobotXAction = WaferRobotXAction.Extend;
- // await Task.Delay(2000);
- // //robot.Wafer = 0;
- // await Task.Delay(200);
- // robot.RobotXAction = WaferRobotXAction.Retract;
- // await Task.Delay(2000);
- // robot.RobotTAction = WaferRobotTAction.T_Origin;
- // //blockingCollection.Add(WaferRobotTAction.PMA);
- // //blockingCollection.Add(WaferRobotTAction.PMB);
- // //blockingCollection.Add(WaferRobotTAction.PMC);
- // //blockingCollection.Add(WaferRobotTAction.PMD);
- // //blockingCollection.Add(WaferRobotTAction.PMC);
- // //blockingCollection.Add(WaferRobotTAction.PMB);
- // //blockingCollection.Add(WaferRobotTAction.PMA);
- // //blockingCollection.Add(WaferRobotTAction.PMB);
- // //blockingCollection.Add(WaferRobotTAction.PMC);
- // //blockingCollection.Add(WaferRobotTAction.PMD);
- //}
- //private void Button_Click(object sender, RoutedEventArgs e)
- //{
- // robot.RobotTAction = WaferRobotTAction.PMC;
- //}
- //private void Button_Click_1(object sender, RoutedEventArgs e)
- //{
- // robot.RobotTAction = WaferRobotTAction.PMD;
- //}
- //private void Button_Click_2(object sender, RoutedEventArgs e)
- //{
- // robot.RobotTAction = WaferRobotTAction.LLA;
- //}
- //private void Button_Click_3(object sender, RoutedEventArgs e)
- //{
- // robot.RobotTAction = WaferRobotTAction.LLB;
- //}
- //private void Original_Click(object sender, RoutedEventArgs e)
- //{
- // robot.RobotTAction = WaferRobotTAction.T_Origin;
- // //await Task.Delay(1000);
- // robot.RobotXAction = WaferRobotXAction.Retract;
- //}
- //private void Button_Click_4(object sender, RoutedEventArgs e)
- //{
- // //PMA.DoorIsOpen = !PMA.DoorIsOpen;
- //}
- }
- }
|