TLStateInfoUserControl.xaml.cs 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. using System.Windows;
  7. using System.Windows.Controls;
  8. using System.Windows.Data;
  9. using System.Windows.Documents;
  10. using System.Windows.Input;
  11. using System.Windows.Media;
  12. using System.Windows.Media.Imaging;
  13. using System.Windows.Navigation;
  14. using System.Windows.Shapes;
  15. namespace ivf_tl_Manage.UserControls
  16. {
  17. /// <summary>
  18. /// TLStateInfoUserControl.xaml 的交互逻辑
  19. /// </summary>
  20. public partial class TLStateInfoUserControl : UserControl
  21. {
  22. public TLStateInfoUserControl()
  23. {
  24. InitializeComponent();
  25. //var aa = new SolidColorBrush((Color)ColorConverter.ConvertFromString(""));
  26. }
  27. /// <summary>
  28. /// 0离线 1在线 2解绑 3待初始化
  29. /// </summary>
  30. public int State
  31. {
  32. get { return (int)GetValue(StateProperty); }
  33. set { SetValue(StateProperty, value); }
  34. }
  35. // Using a DependencyProperty as the backing store for State. This enables animation, styling, binding, etc...
  36. public static readonly DependencyProperty StateProperty =
  37. DependencyProperty.Register("State", typeof(int), typeof(TLStateInfoUserControl), new PropertyMetadata(1));
  38. public string TlName
  39. {
  40. get { return (string)GetValue(TlNameProperty); }
  41. set { SetValue(TlNameProperty, value); }
  42. }
  43. // Using a DependencyProperty as the backing store for TlName. This enables animation, styling, binding, etc...
  44. public static readonly DependencyProperty TlNameProperty =
  45. DependencyProperty.Register("TlName", typeof(string), typeof(TLStateInfoUserControl), new PropertyMetadata("1号机"));
  46. public decimal Pre
  47. {
  48. get { return (decimal)GetValue(PreProperty); }
  49. set { SetValue(PreProperty, value); }
  50. }
  51. // Using a DependencyProperty as the backing store for Pre. This enables animation, styling, binding, etc...
  52. public static readonly DependencyProperty PreProperty =
  53. DependencyProperty.Register("Pre", typeof(decimal), typeof(TLStateInfoUserControl), new PropertyMetadata(0m));
  54. }
  55. }