123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566 |
- 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;
- namespace IntelligentControlForsx.MyControls.windturbine
- {
- public partial class LabelName : UserControl
- {
- public LabelName()
- {
- InitializeComponent();
- }
- private string lblName;
- public string LblName
- {
- set
- {
- lblName = value;
- lblNameString.Text = value;
- }
- get { return lblName; }
- }
- private bool warningValue;
- public bool WarningValue
- {
- set
- {
- if (value)
- {
- lblNameString.ForeColor = Color.FromArgb(255, 128, 0);
- }
- else
- {
- lblNameString.ForeColor = Color.FromArgb(255, 255, 255);
- }
- warningValue = value;
- }
- get { return warningValue; }
- }
- public event EventHandler MyClick;
- private void lblWindturbineName_Click(object sender, EventArgs e)
- {
- if (!this.DesignMode)
- {
- Label lable = (Label)sender;
- MyClick(this.Name, e);
- }
- }
- }
- }
|