Ejemplo n.º 1
0
        public void RefreshConnectionSettingsFields(ConnectionParams conPrms)
        {
            tbDBFileName.Text          = conPrms.strDbFilename;
            tbDumpDirectory.Text       = conPrms.strDumpDirectory;
            tbDumpPrefix.Text          = conPrms.strDumpPrefix;
            tbRadioModuleIp.Text       = conPrms.strIpRadioModule;
            tbRetranslatorAddress.Text = conPrms.strRetranslatorAddr;

            cbRetranslatorMode.Checked = conPrms.bUseRetranslator;
            UseRetranslator            = connectionParams.bUseRetranslator;
            UseTCP = connectionParams.bUseTcp;

            tbRParam.Text       = conPrms.strRParam;
            tbMeterAddress.Text = conPrms.strMeterAddr;

            numReadRecordsCount.Value = conPrms.iReadRecordsCount;
        }
Ejemplo n.º 2
0
 public void FillConnectionSettingsStructure(ref ConnectionParams conPrms, bool setWithDefault = false)
 {
     if (setWithDefault)
     {
         conPrms.strIpRadioModule    = "192.168.0.20";
         conPrms.strMeterAddr        = "9a0f50";
         conPrms.strDbFilename       = AppDomain.CurrentDomain.BaseDirectory + BatchConnection.FolderNameLib + "\\4rmd.gdb";
         conPrms.strDumpDirectory    = defaultDumpsDirectory;
         conPrms.strDumpPrefix       = "dump";
         conPrms.bUseRetranslator    = true;
         conPrms.strRetranslatorAddr = "00FD450800FF4220";
         conPrms.strRParam           = "4220";
         conPrms.iReadRecordsCount   = 10;
         conPrms.strRDSLibPath       = pathToRdsUtil;
         conPrms.bUseTcp             = true;
     }
 }
Ejemplo n.º 3
0
 private void btnRestoreDefaultConnSettings_Click(object sender, EventArgs e)
 {
     connectionParams = defaultConnectionParams;
     RefreshConnectionSettingsFields(connectionParams);
 }