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.WindturbineControl.Domain;
using log4net;
namespace IntelligentControlForsx.MyControls.windturbine
{
public partial class OutInLine : UserControl
{
private static ILog logger = LogManager.GetLogger("AppInfoLog");
public OutInLine()
{
InitializeComponent();
}
private string warningNum;
public string WarningNum
{
set
{
lblWarningNum.Text = value;
warningNum = value;
}
get { return warningNum; }
}
///
/// 点名
///
private string pointName;
public string PointName
{
set
{
lblPLCName.Text = value;
pointName = value;
}
get { return pointName; }
}
///
/// plc点名
///
private string plcName;
public string PLCName
{
set
{
lblPointName.Text = value;
plcName = value;
}
get { return plcName; }
}
///
/// 点值
///
private string pointValue;
public string PointValue
{
set
{
try
{
int num = Convert.ToInt32(value);
if (num == 0)
lblValue.Text = "正常";
else
{
lblValue.Text = "故障";
lblWarningNum.ForeColor = Color.FromArgb(255, 128, 0);
lblPLCName.ForeColor = Color.FromArgb(255, 128, 0);
lblPointName.ForeColor = Color.FromArgb(255, 128, 0);
lblValue.ForeColor = Color.FromArgb(255, 128, 0);
}
}
catch (Exception ex)
{
logger.Info("转换错误" + ex);
}
finally
{
lblValue.Text = "正常";
}
pointValue = value;
}
get { return pointValue; }
}
}
}