ParameterTop.cs 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel;
  4. using System.Drawing;
  5. using System.Data;
  6. using System.Linq;
  7. using System.Text;
  8. using System.Threading.Tasks;
  9. using System.Windows.Forms;
  10. using IntelligentControlForsx.Service.Control.FormInfo;
  11. namespace IntelligentControlForsx.MyControls
  12. {
  13. public partial class ParameterTop : UserControl
  14. {
  15. public ParameterTop()
  16. {
  17. InitializeComponent();
  18. }
  19. private string stationName;
  20. /// <summary>
  21. /// 风场名称
  22. /// </summary>
  23. public string StationName
  24. {
  25. get { return stationName; }
  26. set
  27. {
  28. lblStationName.Text = value;
  29. stationName = value;
  30. }
  31. }
  32. private string allCount;
  33. /// <summary>
  34. /// 装机总数
  35. /// </summary>
  36. public string AllCount
  37. {
  38. get { return allCount; }
  39. set
  40. {
  41. lblAllCount.Text = value;
  42. allCount = value;
  43. }
  44. }
  45. private string onlineCount;
  46. /// <summary>
  47. /// 运行总数(并网总数)
  48. /// </summary>
  49. public string OnlineCount
  50. {
  51. get { return onlineCount; }
  52. set
  53. {
  54. lblOnlineCount.Text = value;
  55. onlineCount = value;
  56. }
  57. }
  58. private string standbyCount;
  59. /// <summary>
  60. /// 待机总数
  61. /// </summary>
  62. public string StandByCount
  63. {
  64. get { return standbyCount; }
  65. set
  66. {
  67. lblStandbyCount.Text = value;
  68. standbyCount = value;
  69. }
  70. }
  71. private string faultCount;
  72. /// <summary>
  73. /// 故障总数
  74. /// </summary>
  75. public string FaultCount
  76. {
  77. get { return faultCount; }
  78. set
  79. {
  80. lblFaultCount.Text = value;
  81. faultCount = value;
  82. }
  83. }
  84. private string maintainCount;
  85. /// <summary>
  86. /// 维护总数
  87. /// </summary>
  88. public string MaintainCount
  89. {
  90. get { return maintainCount; }
  91. set
  92. {
  93. lblMaintainCount.Text = value;
  94. maintainCount = value;
  95. }
  96. }
  97. private string offlineCount;
  98. /// <summary>
  99. /// 离线总数
  100. /// </summary>
  101. public string OfflineCount
  102. {
  103. get { return offlineCount; }
  104. set
  105. {
  106. lblOfflineCount.Text = value;
  107. offlineCount = value;
  108. }
  109. }
  110. private string startCount;
  111. /// <summary>
  112. /// 启动总数
  113. /// </summary>
  114. public string StartCount
  115. {
  116. get { return startCount; }
  117. set
  118. {
  119. lblStartCount.Text = value;
  120. startCount = value;
  121. }
  122. }
  123. private string stopCount;
  124. /// <summary>
  125. /// 停机总数
  126. /// </summary>
  127. public string StopCount
  128. {
  129. get { return stopCount; }
  130. set
  131. {
  132. lblStopCount.Text = value;
  133. stopCount = value;
  134. }
  135. }
  136. private string onPowerCount;
  137. /// <summary>
  138. /// 上电台数
  139. /// </summary>
  140. public string OnPowerCount
  141. {
  142. get { return onPowerCount; }
  143. set
  144. {
  145. lblOnPowerCount.Text = value;
  146. onPowerCount = value;
  147. }
  148. }
  149. private string powerSum;
  150. /// <summary>
  151. /// 总发电量
  152. /// </summary>
  153. public string PowerSum
  154. {
  155. get { return powerSum; }
  156. set
  157. {
  158. lblZFDL.Text = value;
  159. powerSum = value;
  160. }
  161. }
  162. private string powerSumYear;
  163. /// <summary>
  164. /// 年发电量
  165. /// </summary>
  166. public string PowerSumYear
  167. {
  168. get { return powerSumYear; }
  169. set
  170. {
  171. lblNFDL.Text = value;
  172. powerSumYear = value;
  173. }
  174. }
  175. private string powerSumMonth;
  176. /// <summary>
  177. /// 月发电量
  178. /// </summary>
  179. public string PowerSumMonth
  180. {
  181. get { return powerSumMonth; }
  182. set
  183. {
  184. lblYFDL.Text = value;
  185. powerSumMonth = value;
  186. }
  187. }
  188. private string powerSumDay;
  189. /// <summary>
  190. /// 日发电量
  191. /// </summary>
  192. public string PowerSumDay
  193. {
  194. get { return powerSumDay; }
  195. set
  196. {
  197. lblRFDL.Text = value;
  198. powerSumDay = value;
  199. }
  200. }
  201. private string power;
  202. /// <summary>
  203. /// 功率
  204. /// </summary>
  205. public string Power
  206. {
  207. get { return power; }
  208. set
  209. {
  210. lblPower.Text = value;
  211. power = value;
  212. }
  213. }
  214. private string speed;
  215. /// <summary>
  216. /// 风速
  217. /// </summary>
  218. public string Speed
  219. {
  220. get { return speed; }
  221. set
  222. {
  223. lblWindSpeed.Text = value;
  224. speed = value;
  225. }
  226. }
  227. /// <summary>
  228. /// 绑定数据方法
  229. /// </summary>
  230. public void BindData(StatInfo info)
  231. {
  232. this.AllCount = info.LinkCount.ToString();
  233. this.OnlineCount = info.OnlineCount.ToString();
  234. this.StandByCount = info.StandByCount.ToString();
  235. this.FaultCount = info.FaultCount.ToString();
  236. this.MaintainCount = info.MaintainCount.ToString();
  237. this.StartCount = info.StartCount.ToString();
  238. this.OfflineCount = info.OfflineCount.ToString();
  239. this.StopCount = info.StopCount.ToString();
  240. this.OnPowerCount = info.OnPowerCount.ToString();
  241. this.PowerSum = info.PowerAll.HasValue ? info.PowerAll.Value.ToString("f2") : "0";
  242. this.PowerSumYear = info.PowerByYear.HasValue ? info.PowerByYear.Value.ToString("f2") : "0";
  243. this.PowerSumMonth = info.PowerByMonth.HasValue ? info.PowerByMonth.Value.ToString("f2") : "0";
  244. this.PowerSumDay = info.PowerByDay.HasValue ? info.PowerByDay.Value.ToString("f2") : "0";
  245. this.Power = info.Power.HasValue ? info.Power.Value.ToString("f2") : "0";
  246. this.Speed =info.Speed.HasValue? info.Speed.Value.ToString("f2"):"0";
  247. this.StationName = info.StationName;
  248. //switch (info.StationId)
  249. //{
  250. //}
  251. }
  252. }
  253. }