private void UpdateDataLoggerConfig()
        {
            if (dataLoggerConfig == null)
            {
                dataLoggerConfig = new DataLogger();
            }

            if (logLocally.Checked)
            {
                dataLoggerConfig.LogToLocalDisk();
            }
            else if (logViaFTP.Checked)
            {
                dataLoggerConfig.LogToFTP();
            }
            else if (logViaSFTP.Checked)
            {
                dataLoggerConfig.LogToSFTP();
            }

            if (compress.Checked)
            {
                dataLoggerConfig.CompressLogs = true;
            }
            if (archive.Checked)
            {
                dataLoggerConfig.ArchiveLogs = true;
            }
            if (limitArchive.Checked)
            {
                dataLoggerConfig.LimitArchive = true;
                if (Int32.TryParse(ArchiveLimitTextBox.Text, out int limitResult))
                {
                    dataLoggerConfig.LimitArchiveFileNum = limitResult;
                }
            }

            if (timeRotate.Checked)
            {
                dataLoggerConfig.RotateByMin();
            }
            else if (sizeRotate.Checked)
            {
                dataLoggerConfig.RotateByMB();
            }

            if (minutesTextBox.Enabled)
            {
                if (Int32.TryParse(minutesTextBox.Text, out int minuteResult))
                {
                    dataLoggerConfig.RotateMinutes = minuteResult;
                }
            }

            if (MBtextBox.Enabled)
            {
                if (Int32.TryParse(MBtextBox.Text, out int mBResult))
                {
                    dataLoggerConfig.RotateMB = mBResult;
                }
            }

            if (localDirTextBox.Enabled)
            {
                dataLoggerConfig.LocalDirectory = localDirTextBox.Text;
            }
            if (archiveDirTextBox.Enabled)
            {
                dataLoggerConfig.ArchiveDirectory = archiveDirTextBox.Text;
            }
            if (remoteHostTextBox.Enabled)
            {
                dataLoggerConfig.RemoteHost = remoteHostTextBox.Text;
            }

            if (remoteHostTextBox.Enabled)
            {
                if (Int32.TryParse(remotePortTextBox.Text, out int remotePortResult))
                {
                    dataLoggerConfig.RemotePort = remotePortResult;
                }
            }
            if (remoteDirTextBox.Enabled)
            {
                dataLoggerConfig.RemoteDirectory = remoteDirTextBox.Text;
            }
            if (usernameTextBox.Enabled)
            {
                dataLoggerConfig.Username = usernameTextBox.Text;
            }
            if (passwordTextBox.Enabled)
            {
                dataLoggerConfig.Password = passwordTextBox.Text;
            }
        }