| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256 | using LiveCharts;using MECF.Framework.Common.OperationCenter;using System;using System.Collections.Generic;using System.ComponentModel;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;namespace CyberX8_Themes.UserControls{    /// <summary>    /// LoaderWaferHolderFlowControl.xaml 的交互逻辑    /// </summary>    public partial class LoaderWaferHolderFlowControl : UserControl    {        #region 属性        public static readonly DependencyProperty ModuleNameProperty = DependencyProperty.Register("ModuleName", typeof(string), typeof(LoaderWaferHolderFlowControl),          new FrameworkPropertyMetadata("", FrameworkPropertyMetadataOptions.AffectsRender));        /// <summary>        /// 模块名称        /// </summary>        public string ModuleName        {            get            {                return (string)this.GetValue(ModuleNameProperty);            }            set            {                this.SetValue(ModuleNameProperty, value);            }        }        public static readonly DependencyProperty LeakFlowProperty = DependencyProperty.Register(       "LeakFlow", typeof(double), typeof(LoaderWaferHolderFlowControl), new FrameworkPropertyMetadata(0.00, FrameworkPropertyMetadataOptions.AffectsRender));        /// <summary>        /// LeakFlow        /// </summary>        public double LeakFlow        {            get            {                return (double)this.GetValue(LeakFlowProperty);            }            set            {                this.SetValue(LeakFlowProperty, value);            }        }        public static readonly DependencyProperty LeakVacuumValueProperty = DependencyProperty.Register(      "LeakVacuumValue", typeof(double), typeof(LoaderWaferHolderFlowControl), new FrameworkPropertyMetadata(0.00, FrameworkPropertyMetadataOptions.AffectsRender));        /// <summary>        /// LeakVacuumValue        /// </summary>        public double LeakVacuumValue        {            get            {                return (double)this.GetValue(LeakVacuumValueProperty);            }            set            {                this.SetValue(LeakVacuumValueProperty, value);            }        }        public static readonly DependencyProperty LeakFlowClampProperty = DependencyProperty.Register(           "LeakFlowClamp", typeof(bool), typeof(LoaderWaferHolderFlowControl), new FrameworkPropertyMetadata(false, FrameworkPropertyMetadataOptions.AffectsRender));        /// <summary>        /// LeakFlowClamp        /// </summary>        public bool LeakFlowClamp        {            get            {                return (bool)this.GetValue(LeakFlowClampProperty);            }            set            {                this.SetValue(LeakFlowClampProperty, value);            }        }        public static readonly DependencyProperty LeakVacuumProperty = DependencyProperty.Register(        "LeakVacuum", typeof(bool), typeof(LoaderWaferHolderFlowControl), new FrameworkPropertyMetadata(false, FrameworkPropertyMetadataOptions.AffectsRender));        /// <summary>        /// LeakVacuum        /// </summary>        public bool LeakVacuum        {            get            {                return (bool)this.GetValue(LeakVacuumProperty);            }            set            {                this.SetValue(LeakVacuumProperty, value);            }        }        public static readonly DependencyProperty LeakStatusProperty = DependencyProperty.Register(        "LeakStatus", typeof(string), typeof(LoaderWaferHolderFlowControl), new FrameworkPropertyMetadata("", FrameworkPropertyMetadataOptions.AffectsRender));        /// <summary>        /// LeakStatus        /// </summary>        public string LeakStatus        {            get            {                return (string)this.GetValue(LeakStatusProperty);            }            set            {                this.SetValue(LeakStatusProperty, value);            }        }        public static readonly DependencyProperty LeakMajorProperty = DependencyProperty.Register("LeakMajor", typeof(double), typeof(LoaderWaferHolderFlowControl));        /// <summary>        /// LeakMajor        /// </summary>        public double LeakMajor        {            get            {                return (double)this.GetValue(LeakMajorProperty);            }            set            {                this.SetValue(LeakMajorProperty, value);            }        }        public static readonly DependencyProperty LeakMinorProperty = DependencyProperty.Register("LeakMinor", typeof(double), typeof(LoaderWaferHolderFlowControl));        /// <summary>        /// LeakMinor        /// </summary>        public double LeakMinor        {            get            {                return (double)this.GetValue(LeakMinorProperty);            }            set            {                this.SetValue(LeakMinorProperty, value);            }        }        public static readonly DependencyProperty ValueSeriesProperty = DependencyProperty.Register("ValueSeries", typeof(ChartValues<double>), typeof(LoaderWaferHolderFlowControl),            new FrameworkPropertyMetadata(new ChartValues<double>(), FrameworkPropertyMetadataOptions.AffectsRender));        /// <summary>        /// ValueSeries        /// </summary>        public ChartValues<double> ValueSeries        {            get            {                return (ChartValues<double>)this.GetValue(ValueSeriesProperty);            }            set            {                this.SetValue(ValueSeriesProperty, value);            }        }        public static readonly DependencyProperty LabelSeriesProperty = DependencyProperty.Register("LabelSeries", typeof(ChartValues<string>), typeof(LoaderWaferHolderFlowControl),            new FrameworkPropertyMetadata(new ChartValues<string>(), FrameworkPropertyMetadataOptions.AffectsRender));        /// <summary>        /// LabelSeries        /// </summary>        public ChartValues<string> LabelSeries        {            get            {                return (ChartValues<string>)this.GetValue(LabelSeriesProperty);            }            set            {                this.SetValue(LabelSeriesProperty, value);            }        }        public static readonly DependencyProperty IsFlowStartEnabledProperty = DependencyProperty.Register("IsFlowStartEnabled", typeof(bool), typeof(LoaderWaferHolderFlowControl),            new FrameworkPropertyMetadata(true, FrameworkPropertyMetadataOptions.AffectsRender));        /// <summary>        /// IsFlowStartEnabled        /// </summary>        public bool IsFlowStartEnabled        {            get            {                return (bool)this.GetValue(IsFlowStartEnabledProperty);            }            set            {                this.SetValue(IsFlowStartEnabledProperty, value);            }        }        public static readonly DependencyProperty IsFlowStopEnabledProperty = DependencyProperty.Register("IsFlowStopEnabled", typeof(bool), typeof(LoaderWaferHolderFlowControl),           new FrameworkPropertyMetadata(false, FrameworkPropertyMetadataOptions.AffectsRender));        /// <summary>        /// IsFlowStopEnabled        /// </summary>        public bool IsFlowStopEnabled        {            get { return (bool)this.GetValue(IsFlowStopEnabledProperty);}            set { this.SetValue(IsFlowStopEnabledProperty,value);}        }        #endregion        public LoaderWaferHolderFlowControl()        {            InitializeComponent();        }        #region 按钮        private void FlowClampOn_Click(object sender, RoutedEventArgs e)        {            InvokeClient.Instance.Service.DoOperation($"{ModuleName}.LeakFlowClampOn");        }        private void FlowClampOff_Click(object sender, RoutedEventArgs e)        {            InvokeClient.Instance.Service.DoOperation($"{ModuleName}.LeakFlowClampOff");        }        private void VacuumOn_Click(object sender, RoutedEventArgs e)        {            InvokeClient.Instance.Service.DoOperation($"{ModuleName}.LeakVacuumOn");        }        private void VacuumOff_Click(object sender, RoutedEventArgs e)        {            InvokeClient.Instance.Service.DoOperation($"{ModuleName}.LeakVacuumOff");        }        private void StartFlow_Click(object sender, RoutedEventArgs e)        {            ValueSeries.Clear();            InvokeClient.Instance.Service.DoOperation($"{ModuleName}.StartFlowTest");        }        private void StopFlow_Click(object sender, RoutedEventArgs e)        {            InvokeClient.Instance.Service.DoOperation($"{ModuleName}.StopFlowTest");        }        #endregion    }}
 |