Beispiel #1
0
        private void notifyIcon_BalloonTipClicked(object sender, EventArgs e)
        {
            NotifyIcon ni = (NotifyIcon)sender;

            if (ni.Tag is PluginResult)
            {
                PluginResult pResult = (PluginResult)ni.Tag;

                ThreatInfo.Execute(pResult);
            }
        }
Beispiel #2
0
        public static bool Execute(PluginResult pluginResult)
        {
            if (pluginResult == null)
            {
                return(false);
            }

            using (var threatInfoForm = new ThreatInfo())
            {
                threatInfoForm.lblPluginNameAndVersion.Text = $"{pluginResult.PluginInfo.Name} {pluginResult.PluginInfo.Version}";
                threatInfoForm.lblPluginDescription.Text    = pluginResult.PluginInfo.Description;
                threatInfoForm.lblThreatObject.Text         = pluginResult.ScannedObjectString;
                threatInfoForm.lblRisk.Text     = pluginResult.RiskRate.ToString();
                threatInfoForm.lblMessage.Text  = pluginResult.Message;
                threatInfoForm.pbRiskRate.Image = pluginResult.RiskRate == ThreatRiskRates.HighRisk ? Resources.warning___red : Resources.warning___yellow;
                return(threatInfoForm.ShowDialog() == DialogResult.OK);
            }
        }