123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277 |
- using System;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.Drawing;
- using System.Data;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using System.Windows.Forms;
- using IntelligentControlForsx.Service.Control.FormInfo;
- namespace IntelligentControlForsx.MyControls
- {
- public partial class ParameterTop : UserControl
- {
- public ParameterTop()
- {
- InitializeComponent();
- }
- private string stationName;
- /// <summary>
- /// 风场名称
- /// </summary>
- public string StationName
- {
- get { return stationName; }
- set
- {
- lblStationName.Text = value;
- stationName = value;
- }
- }
- private string allCount;
- /// <summary>
- /// 装机总数
- /// </summary>
- public string AllCount
- {
- get { return allCount; }
- set
- {
- lblAllCount.Text = value;
- allCount = value;
- }
- }
- private string onlineCount;
- /// <summary>
- /// 运行总数(并网总数)
- /// </summary>
- public string OnlineCount
- {
- get { return onlineCount; }
- set
- {
- lblOnlineCount.Text = value;
- onlineCount = value;
- }
- }
- private string standbyCount;
- /// <summary>
- /// 待机总数
- /// </summary>
- public string StandByCount
- {
- get { return standbyCount; }
- set
- {
- lblStandbyCount.Text = value;
- standbyCount = value;
- }
- }
- private string faultCount;
- /// <summary>
- /// 故障总数
- /// </summary>
- public string FaultCount
- {
- get { return faultCount; }
- set
- {
- lblFaultCount.Text = value;
- faultCount = value;
- }
- }
- private string maintainCount;
- /// <summary>
- /// 维护总数
- /// </summary>
- public string MaintainCount
- {
- get { return maintainCount; }
- set
- {
- lblMaintainCount.Text = value;
- maintainCount = value;
- }
- }
- private string offlineCount;
- /// <summary>
- /// 离线总数
- /// </summary>
- public string OfflineCount
- {
- get { return offlineCount; }
- set
- {
- lblOfflineCount.Text = value;
- offlineCount = value;
- }
- }
- private string startCount;
- /// <summary>
- /// 启动总数
- /// </summary>
- public string StartCount
- {
- get { return startCount; }
- set
- {
- lblStartCount.Text = value;
- startCount = value;
- }
- }
- private string stopCount;
- /// <summary>
- /// 停机总数
- /// </summary>
- public string StopCount
- {
- get { return stopCount; }
- set
- {
- lblStopCount.Text = value;
- stopCount = value;
- }
- }
- private string onPowerCount;
- /// <summary>
- /// 上电台数
- /// </summary>
- public string OnPowerCount
- {
- get { return onPowerCount; }
- set
- {
- lblOnPowerCount.Text = value;
- onPowerCount = value;
- }
- }
- private string powerSum;
- /// <summary>
- /// 总发电量
- /// </summary>
- public string PowerSum
- {
- get { return powerSum; }
- set
- {
- lblZFDL.Text = value;
- powerSum = value;
- }
- }
- private string powerSumYear;
- /// <summary>
- /// 年发电量
- /// </summary>
- public string PowerSumYear
- {
- get { return powerSumYear; }
- set
- {
- lblNFDL.Text = value;
- powerSumYear = value;
- }
- }
- private string powerSumMonth;
- /// <summary>
- /// 月发电量
- /// </summary>
- public string PowerSumMonth
- {
- get { return powerSumMonth; }
- set
- {
- lblYFDL.Text = value;
- powerSumMonth = value;
- }
- }
- private string powerSumDay;
- /// <summary>
- /// 日发电量
- /// </summary>
- public string PowerSumDay
- {
- get { return powerSumDay; }
- set
- {
- lblRFDL.Text = value;
- powerSumDay = value;
- }
- }
- private string power;
- /// <summary>
- /// 功率
- /// </summary>
- public string Power
- {
- get { return power; }
- set
- {
- lblPower.Text = value;
- power = value;
- }
- }
- private string speed;
- /// <summary>
- /// 风速
- /// </summary>
- public string Speed
- {
- get { return speed; }
- set
- {
- lblWindSpeed.Text = value;
- speed = value;
- }
- }
-
- /// <summary>
- /// 绑定数据方法
- /// </summary>
- public void BindData(StatInfo info)
- {
- this.AllCount = info.LinkCount.ToString();
- this.OnlineCount = info.OnlineCount.ToString();
- this.StandByCount = info.StandByCount.ToString();
- this.FaultCount = info.FaultCount.ToString();
- this.MaintainCount = info.MaintainCount.ToString();
- this.StartCount = info.StartCount.ToString();
- this.OfflineCount = info.OfflineCount.ToString();
- this.StopCount = info.StopCount.ToString();
- this.OnPowerCount = info.OnPowerCount.ToString();
- this.PowerSum = info.PowerAll.HasValue ? info.PowerAll.Value.ToString("f2") : "0";
- this.PowerSumYear = info.PowerByYear.HasValue ? info.PowerByYear.Value.ToString("f2") : "0";
- this.PowerSumMonth = info.PowerByMonth.HasValue ? info.PowerByMonth.Value.ToString("f2") : "0";
- this.PowerSumDay = info.PowerByDay.HasValue ? info.PowerByDay.Value.ToString("f2") : "0";
- this.Power = info.Power.HasValue ? info.Power.Value.ToString("f2") : "0";
- this.Speed =info.Speed.HasValue? info.Speed.Value.ToString("f2"):"0";
- this.StationName = info.StationName;
- //switch (info.StationId)
- //{
-
- //}
- }
- }
- }
|