private void LoadConfig() { ACBrETQ.ETQ_ConfigLer("".ToUTF8()); var bufferLen = 256; var pValue = new StringBuilder(bufferLen); var ret = ACBrETQ.ETQ_ConfigLerValor("ETQ".ToUTF8(), "Porta".ToUTF8(), pValue, ref bufferLen); ACBrETQ.CheckResult(ret); cbbPortas.SelectedItem = pValue.FromUTF8(); bufferLen = 256; pValue.Clear(); ret = ACBrETQ.ETQ_ConfigLerValor("ETQ".ToUTF8(), "Modelo".ToUTF8(), pValue, ref bufferLen); ACBrETQ.CheckResult(ret); comboBoxModelo.SelectedIndex = int.Parse(pValue.ToString()); bufferLen = 256; pValue.Clear(); ret = ACBrETQ.ETQ_ConfigLerValor("ETQ".ToUTF8(), "Temperatura".ToUTF8(), pValue, ref bufferLen); ACBrETQ.CheckResult(ret); numericUpDownTemperatura.Value = decimal.Parse(pValue.ToString()); bufferLen = 256; pValue.Clear(); ret = ACBrETQ.ETQ_ConfigLerValor("ETQ".ToUTF8(), "DPI".ToUTF8(), pValue, ref bufferLen); ACBrETQ.CheckResult(ret); comboBoxDPI.SelectedIndex = int.Parse(pValue.ToString()); bufferLen = 256; pValue.Clear(); ret = ACBrETQ.ETQ_ConfigLerValor("ETQ".ToUTF8(), "Velocidade".ToUTF8(), pValue, ref bufferLen); ACBrETQ.CheckResult(ret); numericUpDownVelocidade.Value = decimal.Parse(pValue.ToString()); bufferLen = 256; pValue.Clear(); ret = ACBrETQ.ETQ_ConfigLerValor("ETQ".ToUTF8(), "BackFeed".ToUTF8(), pValue, ref bufferLen); ACBrETQ.CheckResult(ret); comboBoxBackFeed.SelectedIndex = int.Parse(pValue.ToString()); bufferLen = 256; pValue.Clear(); ret = ACBrETQ.ETQ_ConfigLerValor("ETQ".ToUTF8(), "Avanco".ToUTF8(), pValue, ref bufferLen); ACBrETQ.CheckResult(ret); numericUpDownAvancoEtq.Value = decimal.Parse(pValue.ToString()); bufferLen = 256; pValue.Clear(); ret = ACBrETQ.ETQ_ConfigLerValor("ETQ".ToUTF8(), "LimparMemoria".ToUTF8(), pValue, ref bufferLen); ACBrETQ.CheckResult(ret); checkBoxLimparMemoria.Checked = Convert.ToBoolean(int.Parse(pValue.ToString())); }