TempControl.xaml.cs 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  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 CyberX8_Themes.UserControls
  16. {
  17. /// <summary>
  18. /// TempControl.xaml 的交互逻辑
  19. /// </summary>
  20. public partial class TempControl : UserControl
  21. {
  22. public TempControl()
  23. {
  24. InitializeComponent();
  25. }
  26. public static readonly DependencyProperty ModuleNameProperty = DependencyProperty.Register(
  27. "ModuleName", typeof(string), typeof(TempControl));
  28. public string ModuleName
  29. {
  30. get { return (string)this.GetValue(ModuleNameProperty); }
  31. set { this.SetValue(ModuleNameProperty, value); }
  32. }
  33. public static readonly DependencyProperty TempValueProperty = DependencyProperty.Register(
  34. "TempValue", typeof(string), typeof(TempControl));
  35. public string TempValue
  36. {
  37. get { return (string)this.GetValue(TempValueProperty); }
  38. set { this.SetValue(TempValueProperty, value); }
  39. }
  40. public static readonly DependencyProperty DisableStatusProperty = DependencyProperty.Register(
  41. "DisableStatus", typeof(string), typeof(TempControl), new FrameworkPropertyMetadata("Disabled", FrameworkPropertyMetadataOptions.AffectsRender));
  42. /// <summary>
  43. /// 可用性状态
  44. /// </summary>
  45. public string DisableStatus
  46. {
  47. get
  48. {
  49. return (string)this.GetValue(DisableStatusProperty);
  50. }
  51. set
  52. {
  53. this.SetValue(DisableStatusProperty, value);
  54. }
  55. }
  56. public static readonly DependencyProperty StatusProperty = DependencyProperty.Register(
  57. "Status", typeof(string), typeof(TempControl), new FrameworkPropertyMetadata("UnInitialized", FrameworkPropertyMetadataOptions.AffectsRender));
  58. /// <summary>
  59. /// 状态
  60. /// </summary>
  61. public string Status
  62. {
  63. get
  64. {
  65. return (string)this.GetValue(StatusProperty);
  66. }
  67. set
  68. {
  69. this.SetValue(StatusProperty, value);
  70. }
  71. }
  72. }
  73. }