1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- using System;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.Drawing;
- using System.Data;
- using System.Linq;
- using System.Text;
- using System.Threading;
- using System.Threading.Tasks;
- using System.Windows.Forms;
- using WisdomClient;
- using WisdomClient.data;
- namespace IntelligentControlForsx.MyControls.windturbine
- {
- /// <summary>
- /// 变桨
- /// </summary>
- public partial class ChangePaddleInfo : BaseControl
- {
- public ChangePaddleInfo()
- {
- InitializeComponent();
- }
- public override void Active(string stationId, string windturbineId, string modelId)
- {
- STATIONID = stationId;
- WINDTURBINEID = windturbineId;
- timer1.Enabled = true;
- Refresh();
- }
- public override void DeActive()
- {
- timer1.Enabled = false;
- }
- private void timer1_Tick(object sender, EventArgs e)
- {
- if (isRefreshOver)
- {
- isRefreshOver = false;
- //刷新数据线程
- Thread refreshThread = new Thread(Refresh);
- refreshThread.Start();
- isRefreshOver = true;
- }
- //绑定数据线程
- Thread bindDataThread = new Thread(BindData);
- bindDataThread.Start();
- }
- }
- }
|