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;
///
/// 风场名称
///
public string StationName
{
get { return stationName; }
set
{
lblStationName.Text = value;
stationName = value;
}
}
private string allCount;
///
/// 装机总数
///
public string AllCount
{
get { return allCount; }
set
{
lblAllCount.Text = value;
allCount = value;
}
}
private string onlineCount;
///
/// 运行总数(并网总数)
///
public string OnlineCount
{
get { return onlineCount; }
set
{
lblOnlineCount.Text = value;
onlineCount = value;
}
}
private string standbyCount;
///
/// 待机总数
///
public string StandByCount
{
get { return standbyCount; }
set
{
lblStandbyCount.Text = value;
standbyCount = value;
}
}
private string faultCount;
///
/// 故障总数
///
public string FaultCount
{
get { return faultCount; }
set
{
lblFaultCount.Text = value;
faultCount = value;
}
}
private string maintainCount;
///
/// 维护总数
///
public string MaintainCount
{
get { return maintainCount; }
set
{
lblMaintainCount.Text = value;
maintainCount = value;
}
}
private string offlineCount;
///
/// 离线总数
///
public string OfflineCount
{
get { return offlineCount; }
set
{
lblOfflineCount.Text = value;
offlineCount = value;
}
}
private string startCount;
///
/// 启动总数
///
public string StartCount
{
get { return startCount; }
set
{
lblStartCount.Text = value;
startCount = value;
}
}
private string stopCount;
///
/// 停机总数
///
public string StopCount
{
get { return stopCount; }
set
{
lblStopCount.Text = value;
stopCount = value;
}
}
private string onPowerCount;
///
/// 上电台数
///
public string OnPowerCount
{
get { return onPowerCount; }
set
{
lblOnPowerCount.Text = value;
onPowerCount = value;
}
}
private string powerSum;
///
/// 总发电量
///
public string PowerSum
{
get { return powerSum; }
set
{
lblZFDL.Text = value;
powerSum = value;
}
}
private string powerSumYear;
///
/// 年发电量
///
public string PowerSumYear
{
get { return powerSumYear; }
set
{
lblNFDL.Text = value;
powerSumYear = value;
}
}
private string powerSumMonth;
///
/// 月发电量
///
public string PowerSumMonth
{
get { return powerSumMonth; }
set
{
lblYFDL.Text = value;
powerSumMonth = value;
}
}
private string powerSumDay;
///
/// 日发电量
///
public string PowerSumDay
{
get { return powerSumDay; }
set
{
lblRFDL.Text = value;
powerSumDay = value;
}
}
private string power;
///
/// 功率
///
public string Power
{
get { return power; }
set
{
lblPower.Text = value;
power = value;
}
}
private string speed;
///
/// 风速
///
public string Speed
{
get { return speed; }
set
{
lblWindSpeed.Text = value;
speed = value;
}
}
///
/// 绑定数据方法
///
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)
//{
//}
}
}
}