章政 7 yıl önce
ebeveyn
işleme
27335ba082
1 değiştirilmiş dosya ile 2 ekleme ve 17 silme
  1. 2 17
      UAS_DeviceMonitor/Main.cs

+ 2 - 17
UAS_DeviceMonitor/Main.cs

@@ -30,8 +30,6 @@ namespace UAS_DeviceMonitor
             dh = new DataHelper();
             SystemInf.dh = dh;
             InitializeComponent();
-            PanelDeviceStatus.VerticalScroll.Enabled = true;
-            PanelDeviceStatus.VerticalScroll.Visible = true;
             dpc_enableCheckEdit.QueryCheckStateByValue += CheckedEdit_QueryCheckStateByValue;
             CommandSetRepositoryItemComboBox1.ParseEditValue += CommandSetRepositoryItemComboBox1_ParseEditValue;
             CheckEditCommandSet.QueryCheckStateByValue += CheckedEdit_QueryCheckStateByValue;
@@ -318,7 +316,6 @@ namespace UAS_DeviceMonitor
                 {
                     dh.UpdateByCondition("DEVICEPOLLINGCONFIG", "dpc_status='Stop'", "dpc_decode='" + Decode + "' and dpc_dccode='" + Dccode + "'");
                 }
-                //mbt.Returnvalue = "";
             }
         }
 
@@ -360,24 +357,12 @@ namespace UAS_DeviceMonitor
                     pl.DeviceCode = GridViewPollSetting.GetRowCellValue(e.RowHandle, "DPC_DECODE").ToString();
                     pl.Interval = int.Parse(GridViewPollSetting.GetRowCellValue(e.RowHandle, "DPC_INTERVAL").ToString());
                     pl.Enable = GridViewPollSetting.GetRowCellValue(e.RowHandle, "DPC_ENABLE").ToString() != "0";
+                    pl.Dh = new DataHelper();
                     if (pl.Enable)
                         pt.AddTask(RunTask, pl);
                     PollSettingPaintRowIndex.Add(e.RowHandle);
                 }
             }
-            ////选择业务方案时带出指令编号
-            //if (e.Column.FieldName == "DPC_PLCODE")
-            //{
-            //    string pqf01 = e.Value.ToString();
-            //    DataTable dt = (DataTable)PollSettingItemSearchLookUpEdit.DataSource;
-            //    DataRow[] rows = dt.Select(string.Format("PL_CODE='{0}'", pqf01));
-            //    if (rows != null && rows.Length > 0)
-            //    {
-            //        DataRow row = rows[0];
-            //        GridViewPollSetting.SetRowCellValue(e.RowHandle, "DPC_DCCODE", row["PL_DCCODE"].ToString());
-            //        GridViewPollSetting.SetRowCellValue(e.RowHandle, "DPC_PLNAME", row["PL_NAME"].ToString());
-            //    }
-            //}
         }
 
         /// <summary>
@@ -415,7 +400,7 @@ namespace UAS_DeviceMonitor
             int RightPadding = PanelDeviceStatus.Width % 110;
             int Count = dt.Rows.Count;
             int RowCount = Count % CountPerRow == 0 ? Count / CountPerRow : Count / CountPerRow + 1;
-            PanelDeviceStatus.VerticalScroll.Enabled = true;
+            PanelDeviceStatus.Controls.Clear();
             for (int i = 0; i < (CountPerRow < dt.Rows.Count ? CountPerRow : dt.Rows.Count); i++)
             {
                 for (int j = 0; j < RowCount; j++)