| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826 |
- using System;
- using System.Collections;
- using System.ComponentModel;
- using System.Data;
- using System.Windows.Forms;
- using Infragistics.Win;
- using Infragistics.Win.Misc;
- namespace Core.StlMes.Client.LgCommon
- {
- public partial class ucTemperature : UserControl
- {
- private string _Caption = ""; //显示标题
- private bool _ExPanded = true; //是否展开
- private bool _Expandable = false; //是否可收缩
- private int _ExPandedHeight = 0; //展开高度
- private UIElementBorderStyle _BorderStyle = UIElementBorderStyle.InsetSoft;
- #region 属性
- /// <summary>
- /// 显示标题
- /// </summary>
- [Description("显示标题")]
- public string Caption
- {
- get { return _Caption; }
- set
- {
- if (!value.Equals(_Caption))
- {
- _Caption = value;
- MainContainer.Text = value;
- MainContainer.HeaderBorderStyle = (string.IsNullOrEmpty(value) ? UIElementBorderStyle.None : UIElementBorderStyle.Etched);
- }
- }
- }
- /// <summary>
- /// 展开状态
- /// </summary>
- [Description("展开状态")]
- public bool ExPanded
- {
- get { return _ExPanded; }
- set
- {
- if (!value && !_Expandable) value = true;
- if (value != _ExPanded)
- {
- _ExPanded = value;
- MainContainer.Expanded = value;
- }
- }
- }
- /// <summary>
- /// 是否可收缩
- /// </summary>
- [Description("是否可收缩")]
- public bool Expandable
- {
- get { return _Expandable; }
- set
- {
- if (value != _Expandable)
- {
- _Expandable = value;
- if (!value)
- {
- MainContainer.ExpansionIndicator = GroupBoxExpansionIndicator.None;
- MainContainer.HeaderClickAction = GroupBoxHeaderClickAction.None;
- ExPanded = true;
- }
- else
- {
- MainContainer.ExpansionIndicator = GroupBoxExpansionIndicator.Far;
- MainContainer.HeaderClickAction = GroupBoxHeaderClickAction.ToggleExpansion;
- if (string.IsNullOrEmpty(_Caption)) Caption = "温度(单位:℃)";
- if (value) _ExPanded = MainContainer.Expanded;
- }
- MainContainer.Invalidate();
- }
- }
- }
- [Description("展开高度")]
- public int ExPandedHeight
- {
- get { return _ExPandedHeight; }
- }
- [Description("边框样式")]
- public new UIElementBorderStyle BorderStyle
- {
- get { return _BorderStyle; }
- set
- {
- if (value != _BorderStyle)
- {
- _BorderStyle = value;
- MidContainer.BorderStyle = value;
- }
- }
- }
- #endregion
- #region 构造函数
- public ucTemperature()
- {
- InitializeComponent();
- try
- {
- this.Caption = "温度(单位:℃)";
- ultraGrid1.DisplayLayout.Override.ActiveRowAppearance.FontData.ResetBold();
- ultraGrid1.DisplayLayout.Override.RowSelectors = DefaultableBoolean.False;
- }
- catch { }
- }
- #endregion
- #region 生成框架
- #endregion
- #region 窗体公共调用
- public void ResetData()
- {
- if (dataTable1 != null && dataTable1.Rows.Count > 0) dataTable1.Rows.Clear();
- }
- private string TruncSampleTime(string strTime)
- {
- strTime = strTime.Trim();
- try
- {
- if (!string.IsNullOrEmpty(strTime) && strTime.Length >= 12)
- return strTime.Substring(10);
- }
- catch { }
- return strTime;
- }
- /// <summary>
- /// 填充温度信息界面数据
- /// </summary>
- public void FillTemperatureData_BOF(Hashtable htOptInfo, DataTable dtSample, DataTable dtStandard)
- {
- int iCurr = 0;
- if (ultraGrid1.ActiveRow != null) iCurr = ultraGrid1.ActiveRow.Index;
- ultraGrid1.BeginUpdate();
- try
- {
- lock (this)
- {
- int iRows = 2; // 加一条铁水温度、铸机要温
- DataRow[] dr = null;
- if (dtSample != null && dtSample.Rows.Count > 0)
- dr = dtSample.Select("SAMPLINGNAME = 'TEMPERATURE'", " SAMPLINGDATE");
- if (dr != null && dr.Length > 0)
- iRows += dr.Length;
- try
- {
- dataTable1.Rows.Clear();
- DataRow row = null;
- for (int i = 0; i < iRows; i++)
- {
- row = dataTable1.NewRow();
- dataTable1.Rows.Add(row);
- }
- }
- catch { }
- int idx = 0;
- #region " 铁水温度 "
- string strValue = "", strTime = "";
- if (htOptInfo != null && htOptInfo.Contains("IRONTEMPERATURE"))
- strValue = htOptInfo["IRONTEMPERATURE"].ToString();
- ClsBusinessPack.SetGridTemperature(this.dataTable1, "铁水温度", "", strValue, TruncSampleTime(strTime), idx);
- idx++;
- #endregion
- #region "铸机要温"
- strValue = "";
- strTime = "";
- if (htOptInfo != null && htOptInfo.Contains("CCMPLANTEMPT"))
- strValue = htOptInfo["CCMPLANTEMPT"].ToString();
- if (htOptInfo != null && htOptInfo.Contains("CCMPLANTEMPTTIME"))
- strTime = htOptInfo["CCMPLANTEMPTTIME"].ToString();
- ClsBusinessPack.SetGridTemperature(dataTable1, "铸机要温", "", strValue, TruncSampleTime(strTime), idx);
- idx++;
- #endregion
- #region " 实时值 "
- if (dr != null && dr.Length > 0)
- {
- string str = "";
- for (int i = 0; i < dr.Length; i++, idx++)
- {
- if (i == 0)
- str = "转炉一倒温度";
- else if (i == dr.Length - 1)
- str = "转炉终点温度";
- else
- str = "转炉过程温度";
- ClsBusinessPack.SetGridTemperature(dataTable1, str, "", dr[i]["SAMPLINGVALUE"].ToString(), TruncSampleTime(dr[i]["SAMPLINGDATE"].ToString()), idx);
- }
- }
- #endregion
- #region " 与标准进行比对 "
- if (dr != null && dr.Length > 0)
- {
- // 一倒温度
- ClsBusinessPack.CompareStandard(dtStandard, dataTable1, "L02001", ultraGrid1, 2);
- //二倒温度
- ClsBusinessPack.CompareStandard(dtStandard, dataTable1, "L02004", ultraGrid1, dr.Length + 1);
- }
- #endregion
- }
- }
- catch { }
- finally
- {
- ClsControlPack.RefreshAndAutoSize(ultraGrid1);
- if (iCurr > 0 && ultraGrid1.Rows.Count >= iCurr + 1)
- {
- ultraGrid1.Rows[iCurr].Activated = true;
- ultraGrid1.Rows[iCurr].Selected = false;
- }
- ultraGrid1.EndUpdate();
- }
- }
- /// <summary>
- /// 填充温度信息界面数据
- /// </summary>
- public void FillTemperatureData_CAS(Hashtable htOptInfo, DataTable dtSampleBOF, DataTable dtSampleCAS, DataTable dtStandard)
- {
- int iCurr = 0;
- if (ultraGrid1.ActiveRow != null) iCurr = ultraGrid1.ActiveRow.Index;
- ultraGrid1.BeginUpdate();
- try
- {
- lock (this)
- {
- int iRows = 1; // 加一条转炉出钢温度
- DataRow[] dr1 = null, dr2 = null;
- if (dtSampleBOF != null && dtSampleBOF.Rows.Count > 0)
- dr1 = dtSampleBOF.Select("SAMPLINGNAME = 'TEMPERATURE'", " SAMPLINGDATE DESC");
- if (dtSampleCAS != null && dtSampleCAS.Rows.Count > 0)
- dr2 = dtSampleCAS.Select("SAMPLINGNAME = 'TEMPERATURE'", " SAMPLINGDATE");
- if (dr2 != null && dr2.Length > 0)
- iRows += dr2.Length;
- try
- {
- dataTable1.Rows.Clear();
- DataRow row = null;
- for (int i = 0; i < iRows; i++)
- {
- row = dataTable1.NewRow();
- dataTable1.Rows.Add(row);
- }
- }
- catch { }
- int idx = 0;
- #region " 转炉出钢温度 "
- string strValue = "", strTime = "";
- if (dr1 != null && dr1.Length > 0)
- {
- strValue = dr1[0]["SAMPLINGVALUE"].ToString();
- strTime = dr1[0]["SAMPLINGDATE"].ToString();
- }
- ClsBusinessPack.SetGridTemperature(this.dataTable1, "转炉终点温度", "", strValue, TruncSampleTime(strTime), idx);
- idx++;
- #endregion
- #region " 实时值 "
- if (dr2 != null && dr2.Length > 0)
- {
- string str = "";
- for (int i = 0; i < dr2.Length; i++, idx++)
- {
- if (i == 0)
- str = "吹氩进站温度";
- else if (i == dr2.Length - 1)
- str = "吹氩出站温度";
- else
- str = "吹氩过程温度";
- ClsBusinessPack.SetGridTemperature(this.dataTable1, str, "", dr2[i]["SAMPLINGVALUE"].ToString(), TruncSampleTime(dr2[i]["SAMPLINGDATE"].ToString()), idx);
- }
- }
- #endregion
- #region " 与标准进行比对 "
- //出钢终点温度
- if (dr1 != null && dr1.Length > 0)
- ClsBusinessPack.CompareStandard(dtStandard, dataTable1, "L02001", ultraGrid1, 0);
- //吹氩站温度
- if (dr2 != null && dr2.Length > 0)
- {
- ClsBusinessPack.CompareStandard(dtStandard, dataTable1, "L02001", ultraGrid1, 1);
- ClsBusinessPack.CompareStandard(dtStandard, dataTable1, "L02001", ultraGrid1, dr2.Length);
- }
- #endregion
- }
- }
- catch { }
- finally
- {
- ClsControlPack.RefreshAndAutoSize(ultraGrid1);
- if (iCurr > 0 && ultraGrid1.Rows.Count >= iCurr + 1)
- {
- ultraGrid1.Rows[iCurr].Activated = true;
- ultraGrid1.Rows[iCurr].Selected = false;
- }
- ultraGrid1.EndUpdate();
- }
- }
- /// <summary>
- /// 填充温度信息界面数据精炼炉
- /// </summary>
- public void FillTemperatureData_LFS(Hashtable htOptInfo, DataTable dtSampleBOF, DataTable dtSampleCAS, DataTable dtSampleLFS, DataTable dtStandard)
- {
- int iCurr = 0;
- if (ultraGrid1.ActiveRow != null) iCurr = ultraGrid1.ActiveRow.Index;
- ultraGrid1.BeginUpdate();
- try
- {
- lock (this)
- {
- int iRows = 2; //加一条转炉出钢温度 和 吹氩站出站温度
- DataRow[] dr1 = null, dr2 = null, dr3 = null;
- if (dtSampleBOF != null && dtSampleBOF.Rows.Count > 0)
- dr1 = dtSampleBOF.Select("SAMPLINGNAME = 'TEMPERATURE'", " SAMPLINGDATE DESC");
- if (dtSampleCAS != null && dtSampleCAS.Rows.Count > 0)
- dr2 = dtSampleCAS.Select("SAMPLINGNAME = 'TEMPERATURE'", " SAMPLINGDATE DESC");
- if (dtSampleLFS != null && dtSampleLFS.Rows.Count > 0)
- dr3 = dtSampleLFS.Select("SAMPLINGNAME = 'TEMPERATURE1' or SAMPLINGNAME = 'TEMPERATURE2'", " SAMPLINGDATE ASC");
- if (dr3 != null && dr3.Length > 0)
- iRows += dr3.Length;
- try
- {
- dataTable1.Rows.Clear();
- DataRow row = null;
- for (int i = 0; i < iRows; i++)
- {
- row = dataTable1.NewRow();
- dataTable1.Rows.Add(row);
- }
- }
- catch { }
- int idx = 0;
- #region " 转炉出钢温度 "
- string strValue = "", strTime = "";
- if (dr1 != null && dr1.Length > 0)
- {
- strValue = dr1[0]["SAMPLINGVALUE"].ToString();
- strTime = dr1[0]["SAMPLINGDATE"].ToString();
- }
- ClsBusinessPack.SetGridTemperature(this.dataTable1, "转炉终点温度", "", strValue, TruncSampleTime(strTime), idx);
- idx++;
- #endregion
- #region " 吹氩站温度 "
- strValue = "";
- strTime = "";
- if (dr2 != null && dr2.Length > 0)
- {
- strValue = dr2[0]["SAMPLINGVALUE"].ToString();
- strTime = dr2[0]["SAMPLINGDATE"].ToString();
- }
- ClsBusinessPack.SetGridTemperature(this.dataTable1, "吹氩出站温度", "", strValue, TruncSampleTime(strTime), idx);
- idx++;
- #endregion
- #region " 实时值 "
- if (dr3 != null && dr3.Length > 0)
- {
- string str = "";
- for (int i = 0; i < dr3.Length; i++, idx++)
- {
- if (i == 0)
- str = "精炼炉进站温度";
- else if (idx == dr3.Length - 1)
- str = "精炼炉出站温度";
- else
- str = "精炼炉过程温度";
- ClsBusinessPack.SetGridTemperature(this.dataTable1, str, "", dr3[i]["SAMPLINGVALUE"].ToString(), TruncSampleTime(dr3[i]["SAMPLINGDATE"].ToString()), idx);
- }
- }
- #endregion
- #region " 与标准进行比对 "
- // 转炉终点温度
- if (dr1 != null && dr1.Length > 0)
- ClsBusinessPack.CompareStandard(dtStandard, dataTable1, "L02001", ultraGrid1, 0);
- // 吹氩站终点温度
- if (dr2 != null && dr2.Length > 0)
- ClsBusinessPack.CompareStandard(dtStandard, dataTable1, "L02001", ultraGrid1, 1);
- // 精炼炉温度
- if (dr3 != null && dr3.Length > 0)
- {
- ClsBusinessPack.CompareStandard(dtStandard, dataTable1, "L02001", ultraGrid1, 2);
- ClsBusinessPack.CompareStandard(dtStandard, dataTable1, "L02001", ultraGrid1, dr3.Length + 1);
- }
- #endregion
- }
- }
- catch { }
- finally
- {
- ClsControlPack.RefreshAndAutoSize(ultraGrid1);
- if (iCurr > 0 && ultraGrid1.Rows.Count >= iCurr + 1)
- {
- ultraGrid1.Rows[iCurr].Activated = true;
- ultraGrid1.Rows[iCurr].Selected = false;
- }
- ultraGrid1.EndUpdate();
- }
- }
- /// <summary>
- /// 填充温度信息界面数据
- /// </summary>
- public void FillTemperatureData_CCM(Hashtable htOptInfo, DataTable dtSampleBOF, DataTable dtSampleCAS, DataTable dtSampleLFS, DataTable dtSampleCCM, DataTable dtStandard)
- {
- int iCurr = 0;
- if (ultraGrid1.ActiveRow != null) iCurr = ultraGrid1.ActiveRow.Index;
- ultraGrid1.BeginUpdate();
- try
- {
- lock (this)
- {
- int iRows = 3; //加一条转炉出钢温度 吹氩站出站温度 精炼炉温度
- DataRow[] dr1 = null, dr2 = null, dr3 = null, dr4 = null;
- if (dtSampleBOF != null && dtSampleBOF.Rows.Count > 0)
- dr1 = dtSampleBOF.Select("SAMPLINGNAME = 'TEMPERATURE'", " SAMPLINGDATE DESC");
- if (dtSampleCAS != null && dtSampleCAS.Rows.Count > 0)
- dr2 = dtSampleCAS.Select("SAMPLINGNAME = 'TEMPERATURE'", " SAMPLINGDATE DESC");
- if (dtSampleLFS != null && dtSampleLFS.Rows.Count > 0)
- dr3 = dtSampleLFS.Select("SAMPLINGNAME = 'TEMPERATURE1' or SAMPLINGNAME = 'TEMPERATURE2'", " SAMPLINGDATE DESC");
- if (dtSampleCCM != null && dtSampleCCM.Rows.Count > 0)
- dr4 = dtSampleCCM.Select("SAMPLINGNAME = 'TUNDISHTEMP1' or SAMPLINGNAME = 'TUNDISHTEMP2' or SAMPLINGNAME = 'TUNDISHTEMP_H'", " SAMPLINGDATE ASC");
- if (dr4 != null && dr4.Length > 0)
- iRows += dr4.Length;
- try
- {
- dataTable1.Rows.Clear();
- DataRow row = null;
- for (int i = 0; i < iRows; i++)
- {
- row = dataTable1.NewRow();
- dataTable1.Rows.Add(row);
- }
- }
- catch { }
- int idx = 0;
- #region " 转炉出钢温度 "
- string strValue = "", strTime = "";
- if (dr1 != null && dr1.Length > 0)
- {
- strValue = dr1[0]["SAMPLINGVALUE"].ToString();
- strTime = dr1[0]["SAMPLINGDATE"].ToString();
- }
- ClsBusinessPack.SetGridTemperature(this.dataTable1, "转炉终点温度", "", strValue, TruncSampleTime(strTime), idx);
- idx++;
- #endregion
- #region " 吹氩站温度 "
- strValue = "";
- strTime = "";
- if (dr2 != null && dr2.Length > 0)
- {
- strValue = dr2[0]["SAMPLINGVALUE"].ToString();
- strTime = dr2[0]["SAMPLINGDATE"].ToString();
- }
- ClsBusinessPack.SetGridTemperature(this.dataTable1, "吹氩出站温度", "", strValue, TruncSampleTime(strTime), idx);
- idx++;
- #endregion
- #region " 精炼炉温度 "
- strValue = "";
- strTime = "";
- if (dr3 != null && dr3.Length > 0)
- {
- strValue = dr3[0]["SAMPLINGVALUE"].ToString();
- strTime = dr3[0]["SAMPLINGDATE"].ToString();
- }
- ClsBusinessPack.SetGridTemperature(this.dataTable1, "精炼炉出站温度", "", strValue, TruncSampleTime(strTime), idx);
- idx++;
- #endregion
- #region " 实时值 "
- if (dr4 != null && dr4.Length > 0)
- {
- string str = "连铸中包温度";
- for (int i = 0; i < dr4.Length; i++, idx++)
- {
- ClsBusinessPack.SetGridTemperature(this.dataTable1, str, "", dr4[i]["SAMPLINGVALUE"].ToString(), TruncSampleTime(dr4[i]["SAMPLINGDATE"].ToString()), idx);
- }
- }
- #endregion
- #region " 与标准进行比对 "
- // 转炉终点温度
- if (dr1 != null && dr1.Length > 0)
- ClsBusinessPack.CompareStandard(dtStandard, dataTable1, "L02001", ultraGrid1, 0);
- // 吹氩站终点温度
- if (dr2 != null && dr2.Length > 0)
- ClsBusinessPack.CompareStandard(dtStandard, dataTable1, "L02001", ultraGrid1, 1);
- // 精炼炉终点温度
- if (dr3 != null && dr3.Length > 0)
- ClsBusinessPack.CompareStandard(dtStandard, dataTable1, "L02001", ultraGrid1, 2);
- // 中包温度标准
- if (dr4 != null && dr4.Length > 0)
- {
- for (int i = 0; i < dr4.Length; i++)
- {
- ClsBusinessPack.CompareStandard(dtStandard, dataTable1, "L02001", ultraGrid1, i + 3);
- }
- }
- #endregion
- }
- }
- catch { }
- finally
- {
- ClsControlPack.RefreshAndAutoSize(ultraGrid1);
- if (iCurr > 0 && ultraGrid1.Rows.Count >= iCurr + 1)
- {
- ultraGrid1.Rows[iCurr].Activated = true;
- ultraGrid1.Rows[iCurr].Selected = false;
- }
- ultraGrid1.EndUpdate();
- }
- }
- /// <summary>
- /// 填充温度信息界面数据(实绩)
- /// </summary>
- public void FillTemperatureData_RES(LG_PROCESS PROCESS, DataTable dtSample)
- {
-
- ultraGrid1.BeginUpdate();
- try
- {
- lock (this)
- {
- DataRow[] dr = null;
- DataRow[] drC = null;
- DataRow[] drD = null;
- if (dtSample != null && dtSample.Rows.Count > 0)
- {
- dr = dtSample.Select("SAMPLINGNAME LIKE 'TEMPERATURE%' OR SAMPLINGNAME LIKE 'TUNDISHTEMP%' ", " SAMPLINGDATE");
- drC = dtSample.Select("(SAMPLINGNAME LIKE 'TEMPERATURE%' OR SAMPLINGNAME LIKE 'TUNDISHTEMP%') AND STATIONCODE LIKE 'C%' ", " SAMPLINGDATE");
- drD = dtSample.Select("(SAMPLINGNAME LIKE 'TEMPERATURE%' OR SAMPLINGNAME LIKE 'TUNDISHTEMP%') AND STATIONCODE LIKE 'D%' ", " SAMPLINGDATE");
- }
- int iRows = 0;
- if (dr != null && dr.Length > 0) iRows = dr.Length;
- try
- {
- dataTable1.Rows.Clear();
- DataRow row = null;
- for (int i = 0; i < iRows; i++)
- {
- row = dataTable1.NewRow();
- dataTable1.Rows.Add(row);
- }
- }
- catch { }
- #region " 实时值 "
- if (dr != null && dr.Length > 0)
- {
- string str = "";
- string station = "";
- int indexC = 0;
- int indexD = 0;
- for (int idx = 0; idx < dr.Length; idx++)
- {
- station = dr[idx]["STATIONCODE"].ToString();
- if (station.Substring(0, 1) == "C")
- {
- if (indexC == 0 && drC.Length > 1)
- {
- str = "电炉一倒温度";
- }
- else if (indexC == drC.Length - 1)
- {
- str = "电炉终点温度";
- }
- else
- {
- str = "电炉过程温度";
- }
- indexC++;
- }
- if (station.Substring(0, 1) == "D")
- {
- if (indexD == 0 && drD.Length > 1)
- {
- str = "进站温度";
- }
- else if (indexD == drD.Length - 1)
- {
- str = "出站温度";
- }
- else
- {
- str = "过程温度";
- }
- indexD++;
- }
- //if (idx == 0)
- //{
- // if (PROCESS == LG_PROCESS.BOF) str = "转炉一倒温度";
- // else if (PROCESS == LG_PROCESS.CCM) str = "中包第" + Convert.ToString(idx + 1) + "次测温";
- // else str = "进站温度";
- //}
- //else if (idx == dr.Length - 1)
- //{
- // if (PROCESS == LG_PROCESS.BOF) str = "转炉终点温度";
- // else if (PROCESS == LG_PROCESS.CCM) str = "中包第" + Convert.ToString(idx + 1) + "次测温";
- // else str = "出站温度";
- //}
- //else
- //{
- // if (PROCESS == LG_PROCESS.BOF) str = "转炉过程温度";
- // else if (PROCESS == LG_PROCESS.CCM) str = "中包第" + Convert.ToString(idx + 1) + "次测温";
- // else str = "过程温度";
- //}
- ClsBusinessPack.SetGridTemperature(dataTable1, str, "", dr[idx]["SAMPLINGVALUE"].ToString(), dr[idx]["SAMPLINGDATE"].ToString(), idx);
- }
- }
- #endregion
- }
- }
- catch { }
- finally
- {
- ClsControlPack.RefreshAndAutoSize(ultraGrid1);
- ultraGrid1.EndUpdate();
- }
- }
- /// <summary>
- /// 填充温度信息界面数据
- /// </summary>
- public void FillTemperatureData_Result(DataTable dtSample, DataTable dtStandard)
- {
- int iCurr = 0;
- if (ultraGrid1.ActiveRow != null) iCurr = ultraGrid1.ActiveRow.Index;
- ultraGrid1.BeginUpdate();
- try
- {
- lock (this)
- {
- //int iRows = 3; //加一条转炉出钢温度 吹氩站出站温度 精炼炉温度
- //try
- //{
- // dataTable1.Rows.Clear();
- // DataRow row = null;
- // for (int i = 0; i < iRows; i++)
- // {
- // row = dataTable1.NewRow();
- // dataTable1.Rows.Add(row);
- // }
- //}
- //catch { }
- dataTable1.Rows.Clear();
- DataRow row = null;
- int idx = 0;
- string strValue = "", strTime = "", strStation = "", strName = "";
- for (int i = 0; i < dtSample.Rows.Count; i++)
- {
- row = dataTable1.NewRow();
- dataTable1.Rows.Add(row);
- strStation = dtSample.Rows[i]["STATIONCODE"].ToString().Substring(0, 1);
- if (strStation == "C")
- {
- strName = "电炉终点温度";
- }
- else if (strStation == "D")
- {
- strName = "氩后大包温度";
- }
- else if (strStation == "E")
- {
- strName = "精炼终点温度";
- }
- else if (strStation == "F")
- {
- strName = "RH炉终点温度";
- }
- else if (strStation == "I")
- {
- strName = "VD炉终点温度";
- }
- else
- {
- strName = "连铸中包温度";
- }
- strValue = dtSample.Rows[i]["SAMPLINGVALUE"].ToString();
- strTime = dtSample.Rows[i]["SAMPLINGDATE"].ToString();
- ClsBusinessPack.SetGridTemperature(this.dataTable1, strName, "", strValue, TruncSampleTime(strTime), idx);
- idx++;
- }
- }
- }
- catch { }
- finally
- {
- ClsControlPack.RefreshAndAutoSize(ultraGrid1);
- ultraGrid1.EndUpdate();
- }
- }
- #endregion
- #region 事件
- private void SetDelegate()
- {
- this.Resize += new System.EventHandler(this.ucAdditive_Resize);
- this.MainContainer.ExpandedStateChanged += new System.EventHandler(this.ExpandedStateChanged);
- }
- private void ucAdditive_Resize(object sender, EventArgs e)
- {
- try
- {
- if (_Expandable && !_ExPanded)
- {
- this.Height = MainContainer.Height; //可收缩,处于收缩状态,不允许修改大小
- if (_ExPandedHeight == 0 && this.Parent != null) _ExPandedHeight = this.Parent.Height;
- }
- else if (_Expandable && _ExPanded) _ExPandedHeight = this.Height; //可收缩,处于展开状态,记录高度变化
- else if (!Expandable) _ExPandedHeight = this.Height; //不可收缩,记录高度变化
- }
- catch { }
- }
- private void ExpandedStateChanged(object sender, EventArgs e)
- {
- try
- {
- ExPanded = MainContainer.Expanded;
- if (MainContainer.Expanded) this.Height = _ExPandedHeight;
- else this.Height = MainContainer.Height;
- }
- catch { }
- }
- #endregion
- internal void FillTemperatureData_LFS()
- {
- throw new NotImplementedException();
- }
- }
- }
|