hMailServer.Administrator.ucAntiVirus.LoadData C# (CSharp) Method

LoadData() public method

public LoadData ( ) : void
return void
        public void LoadData()
        {
            hMailServer.Settings settings = APICreator.Application.Settings;
            hMailServer.AntiVirus antiVirusSettings = settings.AntiVirus;

            radioDeleteEmail.Checked = antiVirusSettings.Action == eAntivirusAction.hDeleteEmail;
            radioDeleteAttachments.Checked = antiVirusSettings.Action == eAntivirusAction.hDeleteAttachments;
            checkNotifySender.Checked = antiVirusSettings.NotifySender;
            checkNotifyReceiver.Checked = antiVirusSettings.NotifyReceiver;
            textVirusScanMaxSize.Number = antiVirusSettings.MaximumMessageSize;

            checkUseClamWin.Checked = antiVirusSettings.ClamWinEnabled;
            textClamScanExecutable.Text = antiVirusSettings.ClamWinExecutable;
            textClamScanDatabase.Text = antiVirusSettings.ClamWinDBFolder;

            checkUseCustomScanner.Checked = antiVirusSettings.CustomScannerEnabled;
            textCustomScannerExecutable.Text = antiVirusSettings.CustomScannerExecutable;
            textCustomScannerReturnValue.Number = antiVirusSettings.CustomScannerReturnValue;

            checkBlockAttachmentsEnabled.Checked = antiVirusSettings.EnableAttachmentBlocking;

            textClamAVHostName.Text = antiVirusSettings.ClamAVHost;
            textClamAVPort.Number = antiVirusSettings.ClamAVPort;
            checkClamAVEnabled.Checked = antiVirusSettings.ClamAVEnabled;

            ListBlockedAttachments();

            EnableDisable();

            Marshal.ReleaseComObject(settings);
            Marshal.ReleaseComObject(antiVirusSettings);
        }