private void btnSaveChanged_Click(object sender, EventArgs e) { string dirLog = txtDirFolderLog.Text.Trim(); string dirOutLog = txtDirFolderOutLog.Text.Trim(); string processName = cboWindows.Text; string stationNo = cboStationNo.Text; if (dirLog.Length > 0) { SettingConfiguration.F_UpdateKey("PathInput", dirLog); } if (dirOutLog.Length > 0) { SettingConfiguration.F_UpdateKey("PathOutput", dirOutLog); } if (processName.Length > 0) { SettingConfiguration.F_UpdateKey("ProcessName", processName); } if (stationNo.Length > 0) { SettingConfiguration.F_UpdateKey("StationNo", stationNo); } MessageBox.Show("Save success!"); LoadSetting(); RefeshSettings(); }
private void btnSaveChanged_Click(object sender, EventArgs e) { string dirLog = txtFolderLogs.Text.Trim(); string dirOutLog = txtFolderOutLog.Text.Trim(); string processName = gridLookUpProcess.EditValue.ToString(); string stationNo = txtStationNo.Text; string barcodeLength = txtBarcodeLength.Text; if (dirLog.Length > 0) { SettingConfiguration.F_UpdateKey("PathInput", dirLog); } if (dirOutLog.Length > 0) { SettingConfiguration.F_UpdateKey("PathOutput", dirOutLog); } if (processName.Length > 0) { SettingConfiguration.F_UpdateKey("ProcessName", processName); } if (stationNo.Length > 0) { SettingConfiguration.F_UpdateKey("StationNo", stationNo); } if (barcodeLength.Length > 1) { SettingConfiguration.F_UpdateKey("BarcodeLength", barcodeLength); } MessageBox.Show("Cập nhật cấu hình thành công. Chương trình sẽ tự động tắt, vui lòng chạy lại!", "THÔNG BÁO", MessageBoxButtons.OK, MessageBoxIcon.Warning); Application.Exit(); }
private void Btn_ResetTotal_Click(object sender, EventArgs e) { SettingConfiguration.F_UpdateKey("PASS", 0.ToString()); Tbx_Pass.Text = Convert.ToDecimal(0).ToString("N0") + " "; SettingConfiguration.F_UpdateKey("NG", 0.ToString()); Tbx_NG.Text = Convert.ToDecimal(0).ToString("N0") + " "; SettingConfiguration.F_UpdateKey("TOTAL", 0.ToString()); Tbx_Total.Text = Convert.ToDecimal(0).ToString("N0") + " "; v_Total = v_Pass = v_NG = 0; }
private void Btn_SavePath_Click(object sender, EventArgs e) { if (Lbl_PathFolderInput.Text.Trim().Trim().Length > 0) { SettingConfiguration.F_UpdateKey("PathInput", Lbl_PathFolderInput.Text.Trim()); } if (Lbl_PathFolderOutput.Text.Trim().Trim().Length > 0) { SettingConfiguration.F_UpdateKey("PathOutput", Lbl_PathFolderOutput.Text.Trim()); } }
private void F_CountModelsChecked(string i_Status) { if (i_Status == "P") { v_Pass = v_Pass + 1; SettingConfiguration.F_UpdateKey("PASS", v_Pass.ToString()); Tbx_Pass.Text = Convert.ToDecimal(v_Pass).ToString("N0") + " "; } else if (i_Status == "F") { v_NG = v_NG + 1; SettingConfiguration.F_UpdateKey("NG", v_NG.ToString()); Tbx_NG.Text = Convert.ToDecimal(v_NG).ToString("N0") + " "; } v_Total = v_Total + 1; SettingConfiguration.F_UpdateKey("TOTAL", v_Total.ToString()); Tbx_Total.Text = Convert.ToDecimal(v_Total).ToString("N0") + " "; }