| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283 | using MECF.Framework.Common.ProcessCell;using MECF.Framework.Common.Reservior;using PunkHPX8_Core;using System;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;namespace PunkHPX8_Themes.UserControls{    /// <summary>    /// ReserviorControl.xaml 的交互逻辑    /// </summary>    public partial class ReserviorControl : UserControl    {        public ReserviorControl()        {            InitializeComponent();        }        public static readonly DependencyProperty ReserviorWidthProperty = DependencyProperty.Register("ReserviorWidth", typeof(int), typeof(ReserviorControl));        /// <summary>        /// 宽度        /// </summary>        public int ReserviorWidth        {            get            {                return (int)this.GetValue(ReserviorWidthProperty);            }            set            {                this.SetValue(ReserviorWidthProperty, value);            }        }        public static readonly DependencyProperty ReserviorNameProperty = DependencyProperty.Register("ReserviorName", typeof(string), typeof(ReserviorControl));        /// <summary>        /// 名称        /// </summary>        public string ReserviorName        {            get            {                return (string)this.GetValue(ReserviorNameProperty);            }            set            {                this.SetValue(ReserviorNameProperty, value);            }        }        public static readonly DependencyProperty ReserviorInfoProperty = DependencyProperty.Register("ReserviorInfo", typeof(ReserviorInfo), typeof(ReserviorControl),            new FrameworkPropertyMetadata(null, FrameworkPropertyMetadataOptions.AffectsRender));        /// <summary>        /// Reservior对象        /// </summary>        public ReserviorInfo ReserviorInfo        {            get            {                return (ReserviorInfo)this.GetValue(ReserviorInfoProperty);            }            set            {                this.SetValue(ReserviorInfoProperty, value);            }        }        private void Canvas_MouseLeftButtonUp(object sender, MouseButtonEventArgs e)        {            GlobalEvents.OnSwitchFixedTabItem("HardWare", "Reservoirs", $"{ReserviorName}");        }    }}
 |