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

buttonClamWinTest_Click() private method

private buttonClamWinTest_Click ( object sender, EventArgs e ) : void
sender object
e System.EventArgs
return void
        private void buttonClamWinTest_Click(object sender, EventArgs e)
        {
            using (new WaitCursor())
            {
                hMailServer.Settings settings = APICreator.Application.Settings;
                hMailServer.AntiVirus antiVirusSettings = settings.AntiVirus;

                string messageText = "";
                bool testPass = antiVirusSettings.TestClamWinScanner(textClamScanExecutable.Text, textClamScanDatabase.Text, out messageText);

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

                ProcessVirusTestResult(testPass, messageText);
            }
        }