123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102 |
- 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; }
- }
- /// <summary>
- /// 点名
- /// </summary>
- private string pointName;
- public string PointName
- {
- set
- {
- lblPLCName.Text = value;
- pointName = value;
- }
- get { return pointName; }
- }
- /// <summary>
- /// plc点名
- /// </summary>
- private string plcName;
- public string PLCName
- {
- set
- {
- lblPointName.Text = value;
- plcName = value;
- }
- get { return plcName; }
- }
- /// <summary>
- /// 点值
- /// </summary>
- 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; }
- }
- }
- }
|