终端一体化运控平台
Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.
 
 
 

68 righe
1.9 KiB

  1. using BPASmartClient.Compiler;
  2. using BPASmartClient.SCADAControl;
  3. using System;
  4. using System.Collections.Generic;
  5. using System.Linq;
  6. using System.Text;
  7. using System.Threading.Tasks;
  8. using System.Windows;
  9. using System.Windows.Controls;
  10. using System.Windows.Data;
  11. using System.Windows.Documents;
  12. using System.Windows.Input;
  13. using System.Windows.Media;
  14. using System.Windows.Media.Imaging;
  15. using System.Windows.Navigation;
  16. using System.Windows.Shapes;
  17. namespace BPASmartClient.SCADAControl.CustomerControls
  18. {
  19. /// <summary>
  20. /// 正常进度条
  21. /// </summary>
  22. public class TheProgressBar:ProgressBar, IExecutable, IDisposable
  23. {
  24. public event EventHandler PropertyChange; //声明一个事件
  25. public TheProgressBar()
  26. {
  27. ResourceDictionary languageResDic = new ResourceDictionary();
  28. languageResDic.Source = new Uri(@"/BPASmartClient.SCADAControl;component/Themes/Generic.xaml",UriKind.RelativeOrAbsolute);
  29. this.Resources.MergedDictionaries.Add(languageResDic);
  30. SetCurrentValue(WidthProperty,200d);
  31. SetCurrentValue(HeightProperty,16d);
  32. SetCurrentValue(ValueProperty,50d);
  33. }
  34. static TheProgressBar()
  35. {
  36. DefaultStyleKeyProperty.OverrideMetadata(typeof(TheProgressBar),new FrameworkPropertyMetadata(typeof(TheProgressBar)));
  37. }
  38. public string ControlType => "控件";
  39. private bool isExecuteState;
  40. public bool IsExecuteState
  41. {
  42. get { return isExecuteState; }
  43. set
  44. {
  45. isExecuteState = value;
  46. if (IsExecuteState)
  47. {
  48. Register();
  49. //Style = null;
  50. }
  51. }
  52. }
  53. public void Register()
  54. {
  55. }
  56. public void Dispose()
  57. {
  58. }
  59. }
  60. }