public void RefreshDataGridView() { OleDbConnection connection = null; OleDbDataReader dataReader = null; try { this.dataGridView1.Rows.Clear(); int inum = 0; try { connection = new OleDbConnection(); connection.ConnectionString = this.gLineTestProcessor.dbPathStr; connection.Open(); dataReader = new OleDbCommand("select * from TEquipmentFaultRecord order by ID desc", connection).ExecuteReader(); this.dataGridView1.AllowUserToAddRows = true; while (dataReader.Read()) { this.dataGridView1.Rows.Add(1); int num = inum + 1; this.dataGridView1.Rows[inum].Cells[0].Value = System.Convert.ToString(num); this.dataGridView1.Rows[inum].Cells[1].Value = dataReader["EFaultTime"].ToString(); this.dataGridView1.Rows[inum].Cells[2].Value = dataReader["EFaultContent"].ToString(); inum = num; if (inum >= ctFormErrorQuery.MAX_SHOW_NUM) { break; } } this.dataGridView1.AllowUserToAddRows = false; dataReader.Close(); dataReader = null; connection.Close(); connection = null; if (this.dataGridView1.Rows.Count > 0) { this.dataGridView1.Rows[0].Selected = false; } } catch (System.Exception ex) { this.dataGridView1.AllowUserToAddRows = false; KLineTestProcessor.ExceptionRecordFunc(ex.StackTrace); if (dataReader != null) { dataReader.Close(); dataReader = null; } if (connection != null) { connection.Close(); connection = null; } } } catch (System.Exception ex2) { KLineTestProcessor.ExceptionRecordFunc(ex2.StackTrace); } }
public void DGVClickFunc() { try { if (this.dataGridView1.SelectedRows.Count > 0 && this.dataGridView1.Rows.Count > 0) { if (this.dataGridView1.SelectedRows[0].Cells[0].Value != null) { int iPIDIndex = System.Convert.ToInt32(this.dataGridView1.SelectedRows[0].Cells[0].Value.ToString()); if (this.userIDStrList[iPIDIndex - 1] == this.loginUser) { this.btnDelRecord.Visible = true; } else { this.btnDelRecord.Visible = false; } } } } catch (System.Exception arg_B4_0) { KLineTestProcessor.ExceptionRecordFunc(arg_B4_0.StackTrace); } }
private void ctFormBatchAddPin_Load(object sender, System.EventArgs e) { try { this.iAddCount = 0; if (this.bSetAllowMaxCountFlag) { decimal maximum = System.Convert.ToDecimal(this.iAllowMaxCount); this.numericUpDown_pinNum.Maximum = maximum; } else { decimal e2 = System.Convert.ToDecimal(this.gLineTestProcessor.SELF_MAX_COUNT); this.numericUpDown_pinNum.Maximum = e2; } decimal sender2 = this.numericUpDown_pinNum.Maximum; this.numericUpDown_pinNum.Value = sender2; decimal this2 = this.numericUpDown_pinNum.Maximum; this.label_qzfw.Text = "(0~" + System.Convert.ToString(this2) + ")"; } catch (System.Exception arg_91_0) { KLineTestProcessor.ExceptionRecordFunc(arg_91_0.StackTrace); } }
private void btnExportPinRelation_Click(object sender, System.EventArgs e) { try { string orfn = Application.StartupPath; FolderBrowserDialog folderBrowserDialog = new FolderBrowserDialog(); this.folderBrowserDialog1 = folderBrowserDialog; folderBrowserDialog.Description = "目录选择"; if (DialogResult.OK == this.folderBrowserDialog1.ShowDialog()) { orfn = this.folderBrowserDialog1.SelectedPath; System.ValueType dt = System.DateTime.Now; string tt = System.Convert.ToString(((System.DateTime)dt).Year); tt += System.Convert.ToString(((System.DateTime)dt).Month); tt += System.Convert.ToString(((System.DateTime)dt).Day); string ttms = System.Convert.ToString(((System.DateTime)dt).Hour); ttms += System.Convert.ToString(((System.DateTime)dt).Minute); ttms += System.Convert.ToString(((System.DateTime)dt).Second); string xlsxFn = orfn + "\\短路连接关系_" + tt + "_" + ttms + ".xlsx"; if (this.SaveToExcelFileFunc(xlsxFn)) { MessageBox.Show("导出成功!", "提示", MessageBoxButtons.OK); } else { MessageBox.Show("导出失败!", "提示", MessageBoxButtons.OK); } } } catch (System.Exception arg_126_0) { KLineTestProcessor.ExceptionRecordFunc(arg_126_0.StackTrace); } }
private void btn_HVAC_QUERY_Click(object sender, System.EventArgs e) { try { if (!this.gLineTestProcessor.bIsConnSuccFlag) { MessageBox.Show("设备未连接!", "提示", MessageBoxButtons.OK); } else { double dTemp = System.Convert.ToDouble(this.numericUpDown_HV_AC.Value); this.gLineTestProcessor.DYCL_HVACFunc(dTemp); System.Threading.Thread.Sleep(500); this.label_QTC.Text = "查询计时: 0 秒"; this.timer_r.Enabled = true; this.iTimeCount = 0; this.iQueryType = 3; this.bSuccFlag = false; this.textBox_HVAC_RV.Text = ""; this.gLineTestProcessor.mbKeepRun = true; this.gLineTestProcessor.mpDevComm.mParseCmd.bHVAC_RFlag = false; this.gLineTestProcessor.mpDevComm.mParseCmd.bHVAC_RFlag = false; this.gLineTestProcessor.DYCL_HVAC_QUERYFunc(); } } catch (System.Exception arg_D0_0) { KLineTestProcessor.ExceptionRecordFunc(arg_D0_0.StackTrace); } }
public ctFormBatchAddABC(KLineTestProcessor gltProcessor) { try { this.InitializeComponent(); try { this.gLineTestProcessor = gltProcessor; this.iLastZJTPin = 0; int i = 0; while (true) { int num = i + 2; if (num > this.gLineTestProcessor.SELF_MAX_COUNT) { break; } int gltProcessor2 = i + 1; string tempStr = System.Convert.ToString(gltProcessor2) + "," + System.Convert.ToString(num); this.comboBox_csyzdh_FourWire.Items.Add(tempStr); i = gltProcessor2; i++; } } catch (System.Exception arg_70_0) { KLineTestProcessor.ExceptionRecordFunc(arg_70_0.StackTrace); } } catch { base.Dispose(true); throw; } }
private void ctFormAddConverter_Load(object sender, System.EventArgs e) { try { this.textBox_name.Text = ""; this.textBox_ConverterType.Text = ""; this.textBox_Remark.Text = ""; this.bAddSuccFlag = false; } catch (System.Exception arg_39_0) { KLineTestProcessor.ExceptionRecordFunc(arg_39_0.StackTrace); } try { if (this.gLineTestProcessor.iUIDisplayMode == 0) { base.WindowState = FormWindowState.Normal; } } catch (System.Exception arg_5C_0) { KLineTestProcessor.ExceptionRecordFunc(arg_5C_0.StackTrace); } }
public void SetDGVWidthSizeFunc() { try { if (base.WindowState != FormWindowState.Minimized) { int iw = this.dataGridView1.Width - 316; if (iw <= 0) { iw = 0; } this.dataGridView1.Columns[0].Width = 74; int width = iw + 130; this.dataGridView1.Columns[1].Width = width; this.dataGridView1.Columns[2].Width = 90; this.dataGridView2.Columns[0].Width = 74; this.dataGridView2.Columns[1].Width = width; this.dataGridView2.Columns[2].Width = 90; } } catch (System.Exception arg_BC_0) { KLineTestProcessor.ExceptionRecordFunc(arg_BC_0.StackTrace); } }
private void btnSubmit_Click(object sender, System.EventArgs e) { try { this.plugList.Clear(); this.plugPinNumList.Clear(); for (int i = 0; i < this.dataGridView1.Rows.Count; i++) { if (this.dataGridView1.Rows[i].Cells[1].Value != null) { string plugNameStr = this.dataGridView1.Rows[i].Cells[1].Value.ToString(); string tempStr = "0"; if (this.dataGridView1.Rows[i].Cells[2].Value != null) { tempStr = this.dataGridView1.Rows[i].Cells[2].Value.ToString(); } this.plugPinNumList.Add(tempStr); this.plugList.Add(plugNameStr); } } } catch (System.Exception arg_FE_0) { KLineTestProcessor.ExceptionRecordFunc(arg_FE_0.StackTrace); } this.bSubmitFlag = true; base.Close(); }
public ctFormConverterInterfaceManage(KLineTestProcessor gltProcessor, string lUser, System.Collections.Generic.List <string> plugTempList, System.Collections.Generic.List <string> pinNumTempList) { try { this.InitializeComponent(); try { this.gLineTestProcessor = gltProcessor; this.loginUser = lUser; this.plugList = new System.Collections.Generic.List <string>(); this.plugPinNumList = new System.Collections.Generic.List <string>(); this.strIDArray = new string[5000]; for (int i = 0; i < plugTempList.Count; i++) { this.plugList.Add(plugTempList[i]); } for (int j = 0; j < pinNumTempList.Count; j++) { this.plugPinNumList.Add(pinNumTempList[j]); } } catch (System.Exception arg_8A_0) { KLineTestProcessor.ExceptionRecordFunc(arg_8A_0.StackTrace); } } catch { base.Dispose(true); throw; } }
private void ctFormConverterInterfaceManage_Load(object sender, System.EventArgs e) { try { this.dataGridView1.Rows.Clear(); this.dataGridView2.Rows.Clear(); this.label_EditCableBH.Text = this.strEditXsbh; this.bSubmitFlag = false; this.RefreshDataGridView2(); for (int i = 0; i < this.dataGridView1.Columns.Count; i++) { this.dataGridView1.Columns[i].HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter; this.dataGridView1.Columns[i].DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter; } for (int j = 0; j < this.dataGridView1.Columns.Count; j++) { this.dataGridView1.Columns[j].SortMode = DataGridViewColumnSortMode.NotSortable; } for (int k = 0; k < this.dataGridView2.Columns.Count; k++) { this.dataGridView2.Columns[k].HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter; this.dataGridView2.Columns[k].DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter; } for (int l = 0; l < this.dataGridView2.Columns.Count; l++) { this.dataGridView2.Columns[l].SortMode = DataGridViewColumnSortMode.NotSortable; } if (this.plugList != null) { int num; for (int m = 0; m < this.plugList.Count; m = num) { this.dataGridView1.AllowUserToAddRows = true; this.dataGridView1.Rows.Add(1); num = m + 1; this.dataGridView1.Rows[m].Cells[0].Value = System.Convert.ToString(num); this.dataGridView1.Rows[m].Cells[1].Value = this.plugList[m]; this.dataGridView1.Rows[m].Cells[2].Value = this.plugPinNumList[m]; this.dataGridView1.AllowUserToAddRows = false; } } } catch (System.Exception arg_240_0) { this.dataGridView1.AllowUserToAddRows = false; KLineTestProcessor.ExceptionRecordFunc(arg_240_0.StackTrace); } try { if (this.gLineTestProcessor.iUIDisplayMode == 0) { base.WindowState = FormWindowState.Normal; } } catch (System.Exception arg_263_0) { KLineTestProcessor.ExceptionRecordFunc(arg_263_0.StackTrace); } this.SetDGVWidthSizeFunc(); }
private void btn_submit_Click(object sender, System.EventArgs e) { OleDbConnection connection = null; OleDbDataReader dataReader = null; try { if (!this.bIsAdminFlag) { base.Close(); return; } string str_DLCSY_Model = this.textBox_DLCSY_Model.Text.ToString().Trim(); string str_DLCSY_SN = this.textBox_DLCSY_SN.Text.ToString().Trim(); if (string.IsNullOrEmpty(str_DLCSY_Model) || string.IsNullOrEmpty(str_DLCSY_SN)) { MessageBox.Show("输入的设备信息不完整,请重新输入!", "提示", MessageBoxButtons.OK); return; } string dbpath = Application.StartupPath + "\\ctsdb.mdb"; try { connection = new OleDbConnection(); connection.ConnectionString = this.gLineTestProcessor.dbPathStr; connection.Open(); string sqlcommand = "select * from TTestEquipmentInfo"; OleDbCommand cmd = new OleDbCommand(sqlcommand, connection); dataReader = cmd.ExecuteReader(); if (dataReader.Read()) { } dataReader.Close(); dataReader = null; sqlcommand = "update TTestEquipmentInfo set TestEquipmentModel='" + str_DLCSY_Model + "',TestEquipmentSN='" + str_DLCSY_SN + "'"; cmd = new OleDbCommand(sqlcommand, connection); cmd.ExecuteNonQuery(); connection.Close(); connection = null; } catch (System.Exception arg_10D_0) { if (dataReader != null) { dataReader.Close(); dataReader = null; } if (connection != null) { connection.Close(); connection = null; } KLineTestProcessor.ExceptionRecordFunc(arg_10D_0.StackTrace); } } catch (System.Exception arg_12E_0) { KLineTestProcessor.ExceptionRecordFunc(arg_12E_0.StackTrace); } base.Close(); }
public ctFormBatchEditCoreRelation(KLineTestProcessor gltProcessor, string lUser, string[] strCRArray) { try { this.InitializeComponent(); this.dbpath = Application.StartupPath + "\\ctsdb.mdb"; this.gLineTestProcessor = gltProcessor; this.loginUser = lUser; if (strCRArray != null) { this.strCoreArray = new string[strCRArray.Length]; int i = 0; if (0 < strCRArray.Length) { do { this.strCoreArray[i] = strCRArray[i]; i++; }while (i < strCRArray.Length); } } } catch { base.Dispose(true); throw; } }
private void ctFormErrorQuery_Load(object sender, System.EventArgs e) { try { for (int i = 0; i < this.dataGridView1.Columns.Count; i++) { this.dataGridView1.Columns[i].HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter; this.dataGridView1.Columns[i].DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter; } for (int j = 0; j < this.dataGridView1.Columns.Count; j++) { this.dataGridView1.Columns[j].SortMode = DataGridViewColumnSortMode.NotSortable; } this.RefreshDataGridView(); } catch (System.Exception arg_94_0) { KLineTestProcessor.ExceptionRecordFunc(arg_94_0.StackTrace); } try { if (this.gLineTestProcessor.iUIDisplayMode == 0) { base.WindowState = FormWindowState.Normal; } } catch (System.Exception arg_B7_0) { KLineTestProcessor.ExceptionRecordFunc(arg_B7_0.StackTrace); } this.SetDGVWidthSizeFunc(); }
private void btnSubmit_Click(object sender, System.EventArgs e) { try { if (!this.DealwithSubmitFunc()) { return; } string newPNStr = this.textBox_copyPN.Text.ToString().Trim(); string newXSStr = this.textBox_CopyXS.Text.ToString().Trim(); string oldPNStr = this.textBox_yxmmc.Text.ToString().Trim(); string oldXSStr = this.textBox_ybcxs.Text.ToString().Trim(); this.CopyProjectDisposeFunc(oldPNStr, newPNStr, oldXSStr, newXSStr); if (this.bCopySuccFlag) { MessageBox.Show("项目复制成功!", "提示", MessageBoxButtons.OK); } else { MessageBox.Show("项目复制失败!", "提示", MessageBoxButtons.OK); } } catch (System.Exception arg_9D_0) { KLineTestProcessor.ExceptionRecordFunc(arg_9D_0.StackTrace); } base.Close(); }
private void btnDel_Click(object sender, System.EventArgs e) { try { if (this.dataGridView1.Rows.Count > 0 && this.dataGridView1.SelectedRows.Count > 0) { string tempStr = this.dataGridView1.SelectedRows[0].Cells[0].Value.ToString(); this.dataGridView1.Rows.RemoveAt(System.Convert.ToInt32(tempStr) - 1); int inum = this.dataGridView1.Rows.Count; int sender2; for (int i = 0; i < inum; i = sender2) { sender2 = i + 1; this.dataGridView1.Rows[i].Cells[0].Value = System.Convert.ToString(sender2); } } else { MessageBox.Show("没有选中需要移除的接口!", "提示", MessageBoxButtons.OK); } } catch (System.Exception arg_C6_0) { KLineTestProcessor.ExceptionRecordFunc(arg_C6_0.StackTrace); } }
public void SetDGVWidthSizeFunc() { try { if (base.WindowState != FormWindowState.Minimized) { int iw = this.dataGridView1.Width - 737; int iy = 0; if (iw > 0) { iw /= 2; iy = iw % 2; } this.dataGridView1.Columns[0].Width = iy + 63; int width = iw + 140; this.dataGridView1.Columns[1].Width = width; this.dataGridView1.Columns[2].Width = width; this.dataGridView1.Columns[3].Width = 130; this.dataGridView1.Columns[4].Width = 120; this.dataGridView1.Columns[5].Width = 120; } } catch (System.Exception arg_C9_0) { KLineTestProcessor.ExceptionRecordFunc(arg_C9_0.StackTrace); } }
private void btnAddAll_Click(object sender, System.EventArgs e) { try { this.dataGridView1.Rows.Clear(); this.dataGridView1.AllowUserToAddRows = true; for (int i = 0; i < this.dataGridView2.Rows.Count; i++) { if (this.dataGridView2.Rows[i].Cells[1].Value != null && this.dataGridView2.Rows[i].Cells[2].Value != null) { string xxStr = this.dataGridView2.Rows[i].Cells[1].Value.ToString(); string gsStr = this.dataGridView2.Rows[i].Cells[2].Value.ToString(); this.dataGridView1.Rows.Add(1); this.dataGridView1.Rows[i].Cells[0].Value = System.Convert.ToString(i + 1); this.dataGridView1.Rows[i].Cells[1].Value = xxStr; this.dataGridView1.Rows[i].Cells[2].Value = gsStr; } } this.dataGridView1.AllowUserToAddRows = false; } catch (System.Exception arg_17A_0) { this.dataGridView1.AllowUserToAddRows = false; KLineTestProcessor.ExceptionRecordFunc(arg_17A_0.StackTrace); } }
public bool UpdateUserDealwithFun(string uStr, string sStr, string nStr) { OleDbConnection connection = null; bool uStr2; try { connection = new OleDbConnection(); connection.ConnectionString = this.gLineTestProcessor.dbPathStr; connection.Open(); new OleDbCommand("update TUser set UNAME='" + nStr + "',UPWD='" + sStr + "' where UEID='" + uStr + "' and UEnabled = 1", connection).ExecuteNonQuery(); connection.Close(); connection = null; return(true); } catch (System.Exception arg_75_0) { if (connection != null) { connection.Close(); } KLineTestProcessor.ExceptionRecordFunc(arg_75_0.StackTrace); uStr2 = false; } return(uStr2); }
private void ctFormInterfaceModelConnectorManage_Load(object sender, System.EventArgs e) { try { this.bSubmitFlag = false; this.textBox_name.Text = this.currConnectorNameStr; this.RefreshDataGridView(); for (int i = 0; i < this.dataGridView1.Columns.Count; i++) { this.dataGridView1.Columns[i].HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter; this.dataGridView1.Columns[i].DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter; } for (int j = 0; j < this.dataGridView1.Columns.Count; j++) { this.dataGridView1.Columns[j].SortMode = DataGridViewColumnSortMode.NotSortable; } this.dataGridView1.ClearSelection(); } catch (System.Exception arg_B7_0) { KLineTestProcessor.ExceptionRecordFunc(arg_B7_0.StackTrace); } try { if (this.gLineTestProcessor.iUIDisplayMode == 0) { base.WindowState = FormWindowState.Normal; } } catch (System.Exception arg_DA_0) { KLineTestProcessor.ExceptionRecordFunc(arg_DA_0.StackTrace); } this.SetDGVWidthSizeFunc(); }
private void ctFormWait_Load(object sender, System.EventArgs e) { try { this.bRelayFlag = true; this.timer1.Enabled = true; switch (this.iShowType) { case 1: this.uiShowStr = "生成报表中,请稍等.."; goto IL_201; case 2: this.uiShowStr = "打印报表中,请稍等.."; goto IL_201; case 3: this.uiShowStr = "项目复制中,请稍等.."; goto IL_201; case 100: this.uiShowStr = "正在更新数据库,请稍等.."; this.timer1.Interval = 3000; goto IL_201; } this.uiShowStr = "请稍等.."; IL_201: this.label_ShowStr.Text = this.uiShowStr; } catch (System.Exception arg_214_0) { KLineTestProcessor.ExceptionRecordFunc(arg_214_0.StackTrace); } }
public void GCCollectFunc() { try { Process myPro = new Process(); Process[] proc = Process.GetProcesses(); for (int i = 0; i < proc.Length; i++) { myPro = proc[i]; if (0 == myPro.ProcessName.ToUpper().CompareTo("WORD")) { myPro.Kill(); System.Threading.Thread.Sleep(50); break; } } System.GC.Collect(); System.GC.WaitForPendingFinalizers(); System.GC.Collect(); System.GC.WaitForPendingFinalizers(); } catch (System.Exception arg_5A_0) { KLineTestProcessor.ExceptionRecordFunc(arg_5A_0.StackTrace); } }
public void SetDGVWidthSizeFunc() { try { if (base.WindowState != FormWindowState.Minimized) { int iw = this.dataGridView1.Width - 746; int iy = 0; int ia = 0; if (iw > 0) { ia = iw / 4; iy = iw % 4; } this.dataGridView1.Columns[0].Width = iy + 72; int width = ia + 170; this.dataGridView1.Columns[1].Width = width; int width2 = ia + 155; this.dataGridView1.Columns[2].Width = width2; this.dataGridView1.Columns[3].Width = width; this.dataGridView1.Columns[4].Width = width2; } } catch (System.Exception arg_B9_0) { KLineTestProcessor.ExceptionRecordFunc(arg_B9_0.StackTrace); } }
public void SetDGVWidthSizeFunc() { try { if (base.WindowState != FormWindowState.Minimized) { int iw = this.dataGridView1.Width - 768; int iy = 0; int ia = 0; if (iw > 0) { ia = iw / 2; iy = iw % 2; } this.dataGridView1.Columns[0].Width = iy + 76; this.dataGridView1.Columns[1].Width = ia + 190; this.dataGridView1.Columns[2].Width = ia + 180; this.dataGridView1.Columns[3].Width = 150; this.dataGridView1.Columns[4].Width = 150; } } catch (System.Exception arg_BA_0) { KLineTestProcessor.ExceptionRecordFunc(arg_BA_0.StackTrace); } }
public void SetDGVWidthSizeFunc() { try { if (base.WindowState != FormWindowState.Minimized) { int iw = this.dataGridView1.Width - 768; int iy = 0; int ia = 0; if (iw > 0) { int num = iw / 3; ia = num; iy = iw - num * 3; } this.dataGridView1.Columns[0].Width = iy + 60; int width = ia + 120; this.dataGridView1.Columns[1].Width = width; this.dataGridView1.Columns[2].Width = width; this.dataGridView1.Columns[3].Width = ia + 100; this.dataGridView1.Columns[4].Width = 164; this.dataGridView1.Columns[5].Width = 90; this.dataGridView1.Columns[6].Width = 90; } } catch (System.Exception arg_E9_0) { KLineTestProcessor.ExceptionRecordFunc(arg_E9_0.StackTrace); } }
public void SetDGVWidthSizeFunc() { try { if (base.WindowState != FormWindowState.Minimized) { int iw = this.dataGridView1.Width - 382; int arg_2F_0 = 0; int ia = 0; if (iw > 0) { ia = iw / 4; arg_2F_0 = iw % 4; } int width = arg_2F_0 + 60; this.dataGridView1.Columns[0].Width = width; int this2 = ia + 75; this.dataGridView1.Columns[1].Width = this2; this.dataGridView1.Columns[2].Width = this2; this.dataGridView1.Columns[3].Width = this2; this.dataGridView1.Columns[4].Width = this2; this.dataGridView2.Columns[0].Width = width; this.dataGridView2.Columns[1].Width = this2; this.dataGridView2.Columns[2].Width = this2; this.dataGridView2.Columns[3].Width = this2; this.dataGridView2.Columns[4].Width = this2; } } catch (System.Exception arg_11E_0) { KLineTestProcessor.ExceptionRecordFunc(arg_11E_0.StackTrace); } }
public void SetDGVWidthSizeFunc() { try { if (base.WindowState != FormWindowState.Minimized) { int iw = this.dataGridView1.Width - 418; int ia; if (iw > 0) { ia = iw / 2; } else { ia = 0; } int width = ia + 199; this.dataGridView1.Columns[0].Width = width; this.dataGridView1.Columns[1].Width = width; } } catch (System.Exception arg_61_0) { KLineTestProcessor.ExceptionRecordFunc(arg_61_0.StackTrace); } }
private void btnImport_Click(object sender, System.EventArgs e) { try { OpenFileDialog sender2 = new OpenFileDialog(); this.openFileDialog1 = sender2; sender2.Filter = "补偿表|*.xlsx;*.xls;"; this.openFileDialog1.RestoreDirectory = true; this.openFileDialog1.FilterIndex = 1; if (DialogResult.OK == this.openFileDialog1.ShowDialog(this)) { string readfn = this.openFileDialog1.FileName; string expr_4F = readfn; string expr_61 = expr_4F.Substring(expr_4F.LastIndexOf("\\") + 1); string fkzm = expr_61.Substring(expr_61.LastIndexOf(".") + 1).ToUpper(); if (this.AsposeCellsReadConfigFileFunc(readfn, fkzm)) { MessageBox.Show("导入成功!", "提示", MessageBoxButtons.OK); } else { this.dataGridView1.Rows.Clear(); MessageBox.Show("导入失败,请确保文件格式及内容真实有效!", "提示", MessageBoxButtons.OK); } } } catch (System.Exception arg_B9_0) { KLineTestProcessor.ExceptionRecordFunc(arg_B9_0.StackTrace); } }
private void btnImport_Click(object sender, System.EventArgs e) { try { if (this.comboBox_it.Items.Count < 0) { MessageBox.Show("未选择连接器型号!", "提示", MessageBoxButtons.OK); return; } string itTypeStr = this.comboBox_it.Text.ToString(); if (string.IsNullOrEmpty(itTypeStr)) { MessageBox.Show("未选择连接器型号!", "提示", MessageBoxButtons.OK); return; } if (this.radioButton_Pin_TwoWire.Checked) { this.measMethodStr = this.radioButton_Pin_TwoWire.Text.ToString(); } else if (this.radioButton_Pin_FourWire.Checked) { this.measMethodStr = this.radioButton_Pin_FourWire.Text.ToString(); } this.bBCKFlag = this.checkBox_BCK.Checked; this.interFaceNoStr = itTypeStr; } catch (System.Exception arg_BA_0) { KLineTestProcessor.ExceptionRecordFunc(arg_BA_0.StackTrace); } base.Close(); }
public void ShowAllPinRelationFunc() { try { this.dataGridView1.Rows.Clear(); int iIndex = 0; this.dataGridView1.AllowUserToAddRows = true; for (int ii = 0; ii < this.gLineTestProcessor.gDLPinConnectInfoSelf2Array.Count; ii++) { string temp5Str = this.gLineTestProcessor.gDLPinConnectInfoSelf2Array[ii].mALJQName; string temp6Str = this.gLineTestProcessor.gDLPinConnectInfoSelf2Array[ii].mnALJQPinNum; string temp7Str = this.gLineTestProcessor.gDLPinConnectInfoSelf2Array[ii].mBLJQName; string temp8Str = this.gLineTestProcessor.gDLPinConnectInfoSelf2Array[ii].mnBLJQPinNum; this.dataGridView1.Rows.Add(1); int num = iIndex + 1; this.dataGridView1.Rows[iIndex].Cells[0].Value = System.Convert.ToString(num); this.dataGridView1.Rows[iIndex].Cells[1].Value = temp5Str; this.dataGridView1.Rows[iIndex].Cells[2].Value = temp6Str; this.dataGridView1.Rows[iIndex].Cells[3].Value = temp7Str; this.dataGridView1.Rows[iIndex].Cells[4].Value = temp8Str; iIndex = num; } this.dataGridView1.AllowUserToAddRows = false; } catch (System.Exception arg_196_0) { this.dataGridView1.AllowUserToAddRows = false; KLineTestProcessor.ExceptionRecordFunc(arg_196_0.StackTrace); } }