void Scanner_VirusFound(object sender, VirusFoundEventHandlerArgs e) { this.HandleInvoke(() => { tbxVirusesFound.Text = (++_virusCount).ToString(); var tipText = string.Format("{0}\nIn File: {1}", e.Virus.VirusName, Path.GetFileName(e.Virus.Path)); notifierIcon.ShowBalloonTip(15000, "Virus found", tipText, ToolTipIcon.Warning); }); }
/// <summary> /// When a virus is found /// </summary> /// <param name="sender">The class the triggered the event</param> /// <param name="e">The data transmitted with this event</param> void VirusScanner_VirusFound(object sender, VirusFoundEventHandlerArgs e) { FillListViewWithFoundViruses(); }