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

buttonCustomScannerTest_Click() private method

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

                string messageText = "";
                bool testPass = antiVirusSettings.TestCustomerScanner(textCustomScannerExecutable.Text, textCustomScannerReturnValue.Number, out messageText);

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

                ProcessVirusTestResult(testPass, messageText);
            }
        }