using ivf_tl_CustomControls; using ivf_tl_Entity.Entity.balance; 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 ivf_tl_Manage.UserControls { /// /// HouseInfoUserControl.xaml 的交互逻辑 /// public partial class HouseInfoUserControl : UserControl { public HouseInfoUserControl() { InitializeComponent(); IsEnabledChanged -= HouseInfoUserControl_IsEnabledChanged; IsEnabledChanged += HouseInfoUserControl_IsEnabledChanged; } private void HouseInfoUserControl_IsEnabledChanged(object sender, DependencyPropertyChangedEventArgs e) { if (IsEnabled) { this.maskHouse.Opacity = 0; } else { this.maskHouse.Opacity = 0.2; } } public int HouseSn { get { return (int)GetValue(HouseSnProperty); } set { SetValue(HouseSnProperty, value); } } // Using a DependencyProperty as the backing store for HouseSn. This enables animation, styling, binding, etc... public static readonly DependencyProperty HouseSnProperty = DependencyProperty.Register("HouseSn", typeof(int), typeof(HouseInfoUserControl), new PropertyMetadata(1)); /// /// 0离线 1在线 2解绑 3待初始化 /// public int State { get { return (int)GetValue(StateProperty); } set { SetValue(StateProperty, value); } } // Using a DependencyProperty as the backing store for State. This enables animation, styling, binding, etc... public static readonly DependencyProperty StateProperty = DependencyProperty.Register("State", typeof(int), typeof(HouseInfoUserControl), new PropertyMetadata(1)); public House HouseSource { get { return (House)GetValue(HouseSourceProperty); } set { SetValue(HouseSourceProperty, value); } } // Using a DependencyProperty as the backing store for HouseSource. This enables animation, styling, binding, etc... public static readonly DependencyProperty HouseSourceProperty = DependencyProperty.Register("HouseSource", typeof(House), typeof(HouseInfoUserControl), new PropertyMetadata(new House())); } }