File name
Commit message
Commit date
File name
Commit message
Commit date
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace KHPANEL
{
public partial class FormHTPanel_1 : Form
{
public FormHTPanel_1()
{
InitializeComponent();
}
private void panel1_Paint(object sender, PaintEventArgs e)
{
}
private void timer_DataInput_Tick(object sender, EventArgs e)
{
if (DBConnectionSingleton.Instance().isConnect())
{
DataReading();
}
else
{
textBox_State.Text = "DB_Connected Error\r\n";
}
//ucTempControl1.LabelText = "HBT_1";
//ucTempControl2.LabelText = "HBT_2";
//ucTempControl3.LabelText = "HBT_3";
//ucTempControl4.LabelText = "HBT_5";
//ucTempControl5.LabelText = "HBT_6";
//ucTempControl6.LabelText = "HBT_7";
//ucTempControl7.LabelText = "HBT_8";
//ucTempControl8.LabelText = "HBT_9";
//ucTempControl9.LabelText = "HBT_10";
//ucTempControl10.LabelText = "HBT_11";
//ucTempControl11.LabelText = "HBT_12";
//ucTempControl12.LabelText = "HBT_14";
//ucTempControl13.LabelText = "HBT_15";
//ucTempControl14.LabelText = "HBT_16";
//ucTempControl15.LabelText = "HBT_17";
//ucTempControl16.LabelText = "HBT_18";
//ucTempControl17.LabelText = "HBT_19";
//ucTempControl18.LabelText = "HBT_20";
//ucTempControl19.LabelText = "HBT_21";
//ucTempControl20.LabelText = "HBT_24";
//ucTempControl21.LabelText = "HBT_?";
//ucTempControl1.Temp = "38";
//ucTempControl2.Temp = "39.4";
//ucTempControl3.Temp = "31.7";
//ucTempControl4.Temp = "31.5";
//ucTempControl5.Temp = "24.6";
//ucTempControl6.Temp = "37.9";
//ucTempControl7.Temp = "30.3";
//ucTempControl8.Temp = "19.9";
//ucTempControl9.Temp = "23.2";
//ucTempControl10.Temp = "30";
//ucTempControl11.Temp = "29";
//ucTempControl12.Temp = "21.8";
//ucTempControl13.Temp = "34.7";
//ucTempControl14.Temp = "31.6";
//ucTempControl15.Temp = "25.8";
//ucTempControl16.Temp = "45.2";
//ucTempControl17.Temp = "34";
//ucTempControl18.Temp = "0";
//ucTempControl19.Temp = "24.5";
//ucTempControl20.Temp = "29.3";
//ucTempControl21.Temp = "HBT_?";
//ucTempControl1.labelControl_SetTemp.Text = "38˚";
//ucTempControl2.labelControl_SetTemp.Text = "40˚";
//ucTempControl3.labelControl_SetTemp.Text = "32˚";
//ucTempControl4.labelControl_SetTemp.Text = "32˚";
//ucTempControl5.labelControl_SetTemp.Text = "0˚";
//ucTempControl6.labelControl_SetTemp.Text = "38˚";
//ucTempControl7.labelControl_SetTemp.Text = "30˚";
//ucTempControl8.labelControl_SetTemp.Text = "20˚";
//ucTempControl9.labelControl_SetTemp.Text = "24˚";
//ucTempControl10.labelControl_SetTemp.Text = "30˚";
//ucTempControl11.labelControl_SetTemp.Text = "30˚";
//ucTempControl12.labelControl_SetTemp.Text = "22˚";
//ucTempControl13.labelControl_SetTemp.Text = "35˚";
//ucTempControl14.labelControl_SetTemp.Text = "32˚";
//ucTempControl15.labelControl_SetTemp.Text = "30˚";
//ucTempControl16.labelControl_SetTemp.Text = "45˚";
//ucTempControl17.labelControl_SetTemp.Text = "0˚";
//ucTempControl18.labelControl_SetTemp.Text = "0˚";
//ucTempControl19.labelControl_SetTemp.Text = "30˚";
//ucTempControl20.labelControl_SetTemp.Text = "30˚";
//ucTempControl21.labelControl_SetTemp.Text = "HBT_?";
//ucTempControl1.Time = "15";
//ucTempControl2.Time = "454";
//ucTempControl3.Time = "225";
//ucTempControl4.Time = "299";
//ucTempControl5.Time = "0";
//ucTempControl6.Time = "372";
//ucTempControl7.Time = "362";
//ucTempControl8.Time = "361";
//ucTempControl9.Time = "328";
//ucTempControl10.Time = "355";
//ucTempControl11.Time = "355";
//ucTempControl12.Time = "146";
//ucTempControl13.Time = "355";
//ucTempControl14.Time = "489";
//ucTempControl15.Time = "36";
//ucTempControl16.Time = "217";
//ucTempControl17.Time = "0";
//ucTempControl18.Time = "0";
//ucTempControl19.Time = "453";
//ucTempControl20.Time = "363";
//ucTempControl21.Time = "HBT_?";
//ucTempControl1.labelControl_SetTime.Text = "600분";
//ucTempControl2.labelControl_SetTime.Text = "600분";
//ucTempControl3.labelControl_SetTime.Text = "600분";
//ucTempControl4.labelControl_SetTime.Text = "600분";
//ucTempControl5.labelControl_SetTime.Text = "0분";
//ucTempControl6.labelControl_SetTime.Text = "600분";
//ucTempControl7.labelControl_SetTime.Text = "600분";
//ucTempControl8.labelControl_SetTime.Text = "600분";
//ucTempControl9.labelControl_SetTime.Text = "1000분";
//ucTempControl10.labelControl_SetTime.Text = "1100분";
//ucTempControl11.labelControl_SetTime.Text = "400분";
//ucTempControl12.labelControl_SetTime.Text = "300분";
//ucTempControl13.labelControl_SetTime.Text = "500분";
//ucTempControl14.labelControl_SetTime.Text = "600분";
//ucTempControl15.labelControl_SetTime.Text = "120분";
//ucTempControl16.labelControl_SetTime.Text = "300분";
//ucTempControl17.labelControl_SetTime.Text = "0분";
//ucTempControl18.labelControl_SetTime.Text = "0분";
//ucTempControl19.labelControl_SetTime.Text = "600분";
//ucTempControl20.labelControl_SetTime.Text = "600분";
//ucTempControl21.labelControl_SetTime.Text = "HBT_?";
//ucTempControl1.labelControl_SetTemp.Visible = true;
//ucTempControl2.labelControl_SetTemp.Visible = true;
//ucTempControl3.labelControl_SetTemp.Visible = true;
//ucTempControl4.labelControl_SetTemp.Visible = true;
//ucTempControl5.labelControl_SetTemp.Visible = true;
//ucTempControl6.labelControl_SetTemp.Visible = true;
//ucTempControl7.labelControl_SetTemp.Visible = true;
//ucTempControl8.labelControl_SetTemp.Visible = true;
//ucTempControl9.labelControl_SetTemp.Visible = true;
//ucTempControl10.labelControl_SetTemp.Visible = true;
//ucTempControl11.labelControl_SetTemp.Visible = true;
//ucTempControl12.labelControl_SetTemp.Visible = true;
//ucTempControl13.labelControl_SetTemp.Visible = true;
//ucTempControl14.labelControl_SetTemp.Visible = true;
//ucTempControl15.labelControl_SetTemp.Visible = true;
//ucTempControl16.labelControl_SetTemp.Visible = true;
//ucTempControl17.labelControl_SetTemp.Visible = true;
//ucTempControl18.labelControl_SetTemp.Visible = true;
//ucTempControl19.labelControl_SetTemp.Visible = true;
//ucTempControl20.labelControl_SetTemp.Visible = true;
//ucTempControl21.labelControl_SetTemp.Visible = true;
//ucTempControl1.labelControl_SetTime.Visible = true;
//ucTempControl2.labelControl_SetTime.Visible = true;
//ucTempControl3.labelControl_SetTime.Visible = true;
//ucTempControl4.labelControl_SetTime.Visible = true;
//ucTempControl5.labelControl_SetTime.Visible = true;
//ucTempControl6.labelControl_SetTime.Visible = true;
//ucTempControl7.labelControl_SetTime.Visible = true;
//ucTempControl8.labelControl_SetTime.Visible = true;
//ucTempControl9.labelControl_SetTime.Visible = true;
//ucTempControl10.labelControl_SetTime.Visible = true;
//ucTempControl11.labelControl_SetTime.Visible = true;
//ucTempControl12.labelControl_SetTime.Visible = true;
//ucTempControl13.labelControl_SetTime.Visible = true;
//ucTempControl14.labelControl_SetTime.Visible = true;
//ucTempControl15.labelControl_SetTime.Visible = true;
//ucTempControl16.labelControl_SetTime.Visible = true;
//ucTempControl17.labelControl_SetTime.Visible = true;
//ucTempControl18.labelControl_SetTime.Visible = true;
//ucTempControl19.labelControl_SetTime.Visible = true;
//ucTempControl20.labelControl_SetTime.Visible = true;
//ucTempControl21.labelControl_SetTime.Visible = true;
}
public void DataReading()
{
if (!DBConnectionSingleton.Instance().isConnect())
{
textBox_State.Text = "DB_Connected Error\r\n";
return;
}
textBox_State.Text = "";
//DB 설비정보내에서 온도계 정보를 가져옵니다.[온도계는 CODE정보로 E03으로 저장되어있다]
DataTable dt = DBConnectionSingleton.Instance().GetSqlData("select r.MACH_CD,(r.REAL_DATA * m.VALUE_RATIO) REAL_DATA, m.MACH_NM, m.MACH_NO, c.WORK_ROUT_CD FROM T_HT_REAL_DATA r left join T_STD_MACH m on r.MACH_CD = m.MACH_CD and r.COMP_CD = m.COMP_CD" +
" left join T_STD_CODE c on c.NO_RMK = m.MACH_NO order by r.MACH_CD asc");
textBox_State.Text += "DataReading...\r\n";
if (dt == null) return;
for(int i = 0; i< dt.Rows.Count; i ++)
{
if(dt.Rows[i]["MACH_NO"].ToString() == "520")
{
ucTempControl1.LabelText = dt.Rows[i]["WORK_ROUT_CD"].ToString();
ucTempControl1.Temp = dt.Rows[i]["REAL_DATA"].ToString();
textBox_State.Text += "["+ dt.Rows[i]["MACH_NO"].ToString()+":"+ dt.Rows[i]["REAL_DATA"].ToString() + "]";
continue;
}
if (dt.Rows[i]["MACH_NO"].ToString() == "521")
{
ucTempControl2.LabelText = dt.Rows[i]["WORK_ROUT_CD"].ToString();
ucTempControl2.Temp = dt.Rows[i]["REAL_DATA"].ToString();
textBox_State.Text += "[" + dt.Rows[i]["MACH_NO"].ToString() + ":" + dt.Rows[i]["REAL_DATA"].ToString() + "]";
continue;
}
if (dt.Rows[i]["MACH_NO"].ToString() == "522")
{
ucTempControl3.LabelText = dt.Rows[i]["WORK_ROUT_CD"].ToString();
ucTempControl3.Temp = dt.Rows[i]["REAL_DATA"].ToString();
textBox_State.Text += "[" + dt.Rows[i]["MACH_NO"].ToString() + ":" + dt.Rows[i]["REAL_DATA"].ToString() + "]";
continue;
}
if (dt.Rows[i]["MACH_NO"].ToString() == "523")
{
ucTempControl4.LabelText = dt.Rows[i]["WORK_ROUT_CD"].ToString();
ucTempControl4.Temp = dt.Rows[i]["REAL_DATA"].ToString();
textBox_State.Text += "[" + dt.Rows[i]["MACH_NO"].ToString() + ":" + dt.Rows[i]["REAL_DATA"].ToString() + "]";
continue;
}
if (dt.Rows[i]["MACH_NO"].ToString() == "524")
{
ucTempControl5.LabelText = dt.Rows[i]["WORK_ROUT_CD"].ToString();
ucTempControl5.Temp = dt.Rows[i]["REAL_DATA"].ToString();
textBox_State.Text += "[" + dt.Rows[i]["MACH_NO"].ToString() + ":" + dt.Rows[i]["REAL_DATA"].ToString() + "]";
continue;
}
if (dt.Rows[i]["MACH_NO"].ToString() == "525")
{
ucTempControl6.LabelText = dt.Rows[i]["WORK_ROUT_CD"].ToString();
ucTempControl6.Temp = dt.Rows[i]["REAL_DATA"].ToString();
textBox_State.Text += "[" + dt.Rows[i]["MACH_NO"].ToString() + ":" + dt.Rows[i]["REAL_DATA"].ToString() + "]";
continue;
}
if (dt.Rows[i]["MACH_NO"].ToString() == "526")
{
ucTempControl7.LabelText = dt.Rows[i]["WORK_ROUT_CD"].ToString();
ucTempControl7.Temp = dt.Rows[i]["REAL_DATA"].ToString();
textBox_State.Text += "[" + dt.Rows[i]["MACH_NO"].ToString() + ":" + dt.Rows[i]["REAL_DATA"].ToString() + "]";
continue;
}
if (dt.Rows[i]["MACH_NO"].ToString() == "527")
{
ucTempControl8.LabelText = dt.Rows[i]["WORK_ROUT_CD"].ToString();
ucTempControl8.Temp = dt.Rows[i]["REAL_DATA"].ToString();
textBox_State.Text += "[" + dt.Rows[i]["MACH_NO"].ToString() + ":" + dt.Rows[i]["REAL_DATA"].ToString() + "]";
continue;
}
if (dt.Rows[i]["MACH_NO"].ToString() == "528")
{
ucTempControl9.LabelText = dt.Rows[i]["WORK_ROUT_CD"].ToString();
ucTempControl9.Temp = dt.Rows[i]["REAL_DATA"].ToString();
textBox_State.Text += "[" + dt.Rows[i]["MACH_NO"].ToString() + ":" + dt.Rows[i]["REAL_DATA"].ToString() + "]";
continue;
}
if (dt.Rows[i]["MACH_NO"].ToString() == "529")
{
ucTempControl10.LabelText = dt.Rows[i]["WORK_ROUT_CD"].ToString();
ucTempControl10.Temp = dt.Rows[i]["REAL_DATA"].ToString();
textBox_State.Text += "[" + dt.Rows[i]["MACH_NO"].ToString() + ":" + dt.Rows[i]["REAL_DATA"].ToString() + "]";
continue;
}
if (dt.Rows[i]["MACH_NO"].ToString() == "530")
{
ucTempControl11.LabelText = dt.Rows[i]["WORK_ROUT_CD"].ToString();
ucTempControl11.Temp = dt.Rows[i]["REAL_DATA"].ToString();
textBox_State.Text += "[" + dt.Rows[i]["MACH_NO"].ToString() + ":" + dt.Rows[i]["REAL_DATA"].ToString() + "]";
continue;
}
if (dt.Rows[i]["MACH_NO"].ToString() == "531")
{
ucTempControl12.LabelText = dt.Rows[i]["WORK_ROUT_CD"].ToString();
ucTempControl12.Temp = dt.Rows[i]["REAL_DATA"].ToString();
textBox_State.Text += "[" + dt.Rows[i]["MACH_NO"].ToString() + ":" + dt.Rows[i]["REAL_DATA"].ToString() + "]";
continue;
}
if (dt.Rows[i]["MACH_NO"].ToString() == "532")
{
ucTempControl13.LabelText = dt.Rows[i]["WORK_ROUT_CD"].ToString();
ucTempControl13.Temp = dt.Rows[i]["REAL_DATA"].ToString();
textBox_State.Text += "[" + dt.Rows[i]["MACH_NO"].ToString() + ":" + dt.Rows[i]["REAL_DATA"].ToString() + "]";
continue;
}
if (dt.Rows[i]["MACH_NO"].ToString() == "533")
{
ucTempControl14.LabelText = dt.Rows[i]["WORK_ROUT_CD"].ToString();
ucTempControl14.Temp = dt.Rows[i]["REAL_DATA"].ToString();
textBox_State.Text += "[" + dt.Rows[i]["MACH_NO"].ToString() + ":" + dt.Rows[i]["REAL_DATA"].ToString() + "]";
continue;
}
if (dt.Rows[i]["MACH_NO"].ToString() == "534")
{
ucTempControl15.LabelText = dt.Rows[i]["WORK_ROUT_CD"].ToString();
ucTempControl15.Temp = dt.Rows[i]["REAL_DATA"].ToString();
textBox_State.Text += "[" + dt.Rows[i]["MACH_NO"].ToString() + ":" + dt.Rows[i]["REAL_DATA"].ToString() + "]";
continue;
}
if (dt.Rows[i]["MACH_NO"].ToString() == "535")
{
ucTempControl16.LabelText = dt.Rows[i]["WORK_ROUT_CD"].ToString();
ucTempControl16.Temp = dt.Rows[i]["REAL_DATA"].ToString();
textBox_State.Text += "[" + dt.Rows[i]["MACH_NO"].ToString() + ":" + dt.Rows[i]["REAL_DATA"].ToString() + "]";
continue;
}
if (dt.Rows[i]["MACH_NO"].ToString() == "536")
{
ucTempControl17.LabelText = dt.Rows[i]["WORK_ROUT_CD"].ToString();
ucTempControl17.Temp = dt.Rows[i]["REAL_DATA"].ToString();
textBox_State.Text += "[" + dt.Rows[i]["MACH_NO"].ToString() + ":" + dt.Rows[i]["REAL_DATA"].ToString() + "]";
continue;
}
//if (dt.Rows[i]["MACH_NO"].ToString() == "537")
//{
// ucTempControl18.LabelText = dt.Rows[i]["WORK_ROUT_CD"].ToString();
// ucTempControl18.Temp = dt.Rows[i]["REAL_DATA"].ToString();
// continue;
//}
if (dt.Rows[i]["MACH_NO"].ToString() == "538")
{
ucTempControl19.LabelText = dt.Rows[i]["WORK_ROUT_CD"].ToString();
ucTempControl19.Temp = dt.Rows[i]["REAL_DATA"].ToString();
continue;
}
if (dt.Rows[i]["MACH_NO"].ToString() == "539")
{
ucTempControl20.LabelText = dt.Rows[i]["WORK_ROUT_CD"].ToString();
ucTempControl20.Temp = dt.Rows[i]["REAL_DATA"].ToString();
continue;
}
if (dt.Rows[i]["MACH_NO"].ToString() == "600")
{
ucTempControl1.Time = dt.Rows[i]["REAL_DATA"].ToString();
continue;
}
if (dt.Rows[i]["MACH_NO"].ToString() == "601")
{
ucTempControl2.Time = dt.Rows[i]["REAL_DATA"].ToString();
continue;
}
if (dt.Rows[i]["MACH_NO"].ToString() == "602")
{
ucTempControl3.Time = dt.Rows[i]["REAL_DATA"].ToString();
continue;
}
if (dt.Rows[i]["MACH_NO"].ToString() == "603")
{
ucTempControl4.Time = dt.Rows[i]["REAL_DATA"].ToString();
continue;
}
if (dt.Rows[i]["MACH_NO"].ToString() == "604")
{
ucTempControl5.Time = dt.Rows[i]["REAL_DATA"].ToString();
continue;
}
if (dt.Rows[i]["MACH_NO"].ToString() == "605")
{
ucTempControl6.Time = dt.Rows[i]["REAL_DATA"].ToString();
continue;
}
if (dt.Rows[i]["MACH_NO"].ToString() == "606")
{
ucTempControl7.Time = dt.Rows[i]["REAL_DATA"].ToString();
continue;
}
if (dt.Rows[i]["MACH_NO"].ToString() == "607")
{
ucTempControl8.Time = dt.Rows[i]["REAL_DATA"].ToString();
continue;
}
if (dt.Rows[i]["MACH_NO"].ToString() == "608")
{
ucTempControl9.Time = dt.Rows[i]["REAL_DATA"].ToString();
continue;
}
if (dt.Rows[i]["MACH_NO"].ToString() == "609")
{
ucTempControl10.Time = dt.Rows[i]["REAL_DATA"].ToString();
continue;
}
if (dt.Rows[i]["MACH_NO"].ToString() == "610")
{
ucTempControl11.Time = dt.Rows[i]["REAL_DATA"].ToString();
continue;
}
if (dt.Rows[i]["MACH_NO"].ToString() == "611")
{
ucTempControl12.Time = dt.Rows[i]["REAL_DATA"].ToString();
continue;
}
if (dt.Rows[i]["MACH_NO"].ToString() == "612")
{
ucTempControl13.Time = dt.Rows[i]["REAL_DATA"].ToString();
continue;
}
if (dt.Rows[i]["MACH_NO"].ToString() == "613")
{
ucTempControl14.Time = dt.Rows[i]["REAL_DATA"].ToString();
continue;
}
if (dt.Rows[i]["MACH_NO"].ToString() == "614")
{
ucTempControl15.Time = dt.Rows[i]["REAL_DATA"].ToString();
continue;
}
if (dt.Rows[i]["MACH_NO"].ToString() == "615")
{
ucTempControl16.Time = dt.Rows[i]["REAL_DATA"].ToString();
continue;
}
if (dt.Rows[i]["MACH_NO"].ToString() == "616")
{
ucTempControl17.Time = dt.Rows[i]["REAL_DATA"].ToString();
continue;
}
if (dt.Rows[i]["MACH_NO"].ToString() == "617")
{
ucTempControl19.Time = dt.Rows[i]["REAL_DATA"].ToString();
continue;
}
if (dt.Rows[i]["MACH_NO"].ToString() == "618")
{
ucTempControl20.Time = dt.Rows[i]["REAL_DATA"].ToString();
continue;
}
if (dt.Rows[i]["MACH_NO"].ToString() == "620.0")
{
try
{
ucTempControl1.State = Convert.ToInt32(dt.Rows[i]["REAL_DATA"].ToString()) >= 1?1:0;
}
catch (Exception ex) { }
continue;
}
if (dt.Rows[i]["MACH_NO"].ToString() == "620.1")
{
try
{
ucTempControl2.State = Convert.ToInt32(dt.Rows[i]["REAL_DATA"].ToString()) >= 1 ? 1 : 0;
}
catch (Exception ex) { }
continue;
}
if (dt.Rows[i]["MACH_NO"].ToString() == "620.2")
{
try
{
ucTempControl3.State = Convert.ToInt32(dt.Rows[i]["REAL_DATA"].ToString()) >= 1 ? 1 : 0;
}
catch (Exception ex) { }
continue;
}
if (dt.Rows[i]["MACH_NO"].ToString() == "620.3")
{
try
{
ucTempControl4.State = Convert.ToInt32(dt.Rows[i]["REAL_DATA"].ToString()) >= 1 ? 1 : 0;
}
catch (Exception ex) { }
continue;
}
if (dt.Rows[i]["MACH_NO"].ToString() == "620.4")
{
try
{
ucTempControl5.State = Convert.ToInt32(dt.Rows[i]["REAL_DATA"].ToString()) >= 1 ? 1 : 0;
}
catch (Exception ex) { }
continue;
}
if (dt.Rows[i]["MACH_NO"].ToString() == "620.5")
{
try
{
ucTempControl6.State = Convert.ToInt32(dt.Rows[i]["REAL_DATA"].ToString()) >= 1 ? 1 : 0;
}
catch (Exception ex) { }
continue;
}
if (dt.Rows[i]["MACH_NO"].ToString() == "620.6")
{
try
{
ucTempControl7.State = Convert.ToInt32(dt.Rows[i]["REAL_DATA"].ToString()) >= 1 ? 1 : 0;
}
catch (Exception ex) { }
continue;
}
if (dt.Rows[i]["MACH_NO"].ToString() == "620.7")
{
try
{
ucTempControl8.State = Convert.ToInt32(dt.Rows[i]["REAL_DATA"].ToString()) >= 1 ? 1 : 0;
}
catch (Exception ex) { }
continue;
}
if (dt.Rows[i]["MACH_NO"].ToString() == "620.8")
{
try
{
ucTempControl9.State = Convert.ToInt32(dt.Rows[i]["REAL_DATA"].ToString()) >= 1 ? 1 : 0;
}
catch (Exception ex) { }
continue;
}
if (dt.Rows[i]["MACH_NO"].ToString() == "620.9")
{
try
{
ucTempControl10.State = Convert.ToInt32(dt.Rows[i]["REAL_DATA"].ToString()) >= 1 ? 1 : 0;
}
catch (Exception ex) { }
continue;
}
if (dt.Rows[i]["MACH_NO"].ToString() == "620.10")
{
try
{
ucTempControl11.State = Convert.ToInt32(dt.Rows[i]["REAL_DATA"].ToString()) >= 1 ? 1 : 0;
}
catch (Exception ex) { }
continue;
}
if (dt.Rows[i]["MACH_NO"].ToString() == "620.11")
{
try
{
ucTempControl12.State = Convert.ToInt32(dt.Rows[i]["REAL_DATA"].ToString()) >= 1 ? 1 : 0;
}
catch (Exception ex) { }
continue;
}
if (dt.Rows[i]["MACH_NO"].ToString() == "620.12")
{
try
{
ucTempControl13.State = Convert.ToInt32(dt.Rows[i]["REAL_DATA"].ToString()) >= 1 ? 1 : 0;
}
catch (Exception ex) { }
continue;
}
if (dt.Rows[i]["MACH_NO"].ToString() == "620.13")
{
try
{
ucTempControl14.State = Convert.ToInt32(dt.Rows[i]["REAL_DATA"].ToString()) >= 1 ? 1 : 0;
}
catch (Exception ex) { }
continue;
}
if (dt.Rows[i]["MACH_NO"].ToString() == "620.14")
{
try
{
ucTempControl15.State = Convert.ToInt32(dt.Rows[i]["REAL_DATA"].ToString()) >= 1 ? 1 : 0;
}
catch (Exception ex) { }
continue;
}
if (dt.Rows[i]["MACH_NO"].ToString() == "620.15")
{
try
{
ucTempControl16.State = Convert.ToInt32(dt.Rows[i]["REAL_DATA"].ToString()) >= 1 ? 1 : 0;
}
catch (Exception ex) { }
continue;
}
if (dt.Rows[i]["MACH_NO"].ToString() == "621.0")
{
try
{
ucTempControl17.State = Convert.ToInt32(dt.Rows[i]["REAL_DATA"].ToString()) >= 1 ? 1 : 0;
}
catch (Exception ex) { }
continue;
}
if (dt.Rows[i]["MACH_NO"].ToString() == "621.1")
{
try
{
ucTempControl19.State = Convert.ToInt32(dt.Rows[i]["REAL_DATA"].ToString()) >= 1 ? 1 : 0;
}
catch (Exception ex) { }
continue;
}
if (dt.Rows[i]["MACH_NO"].ToString() == "621.2")
{
try
{
ucTempControl20.State = Convert.ToInt32(dt.Rows[i]["REAL_DATA"].ToString()) >= 1 ? 1 : 0;
}
catch (Exception ex) { }
continue;
}
}
}
private void timer_Time_Tick(object sender, EventArgs e)
{
label_Timer.Text = DateTime.Now.ToString("yyyy-MM-dd HH:mm");
}
}
}