示例#1
0
文件: Form1.cs 项目: lXabba/Antivirus
        private void MonitorPanelButton_Click(object sender, EventArgs e)
        {
            foreach (var temp in lformElementsMonitorings)
            {
                temp.DeletePanel(flowLayoutPanelMonitor);
            }
            List <string> tempList = AntivirusLibrary.DataBaseMethods.DataBaseGetAllNotes("Monitoring");

            foreach (var file in tempList)
            {
                var panelTemp = new FormElementsMonitoring(flowLayoutPanelMonitor);
                var tempData  = new AntivirusLibrary.DataReportMonitoring(file);
                panelTemp.textBoxMonitor.Text   = tempData.path;
                panelTemp.DataMonitorLabel.Text = tempData.date;
                panelTemp.TimeMonitorLabel.Text = tempData.time;
                if (tempData.operation.Equals("QUARANTINE"))
                {
                    panelTemp.ChangesMonitorLabel.Checked = false;
                }
                else if (tempData.operation.Equals("DELETE"))
                {
                    panelTemp.ChangesMonitorLabel.Checked = true;
                }

                lformElementsMonitorings.Add(panelTemp);
            }

            OffAll();
            MonitorPanel.Visible         = true;
            MonitorPanel.Location        = new System.Drawing.Point(179, 13);
            MonitorPanelButton.BackColor = Color.LightBlue;
        }
示例#2
0
文件: Form1.cs 项目: lXabba/Antivirus
        private void ReportPanelButton_Click(object sender, EventArgs e)
        {
            List <string> temp = AntivirusLibrary.DataBaseMethods.DataBaseGetAllNotes("MonitoringReport");

            if (temp.Count > 100)
            {
                for (int i = 0; i < temp.Count - 100; i++)
                {
                    AntivirusLibrary.DataBaseMethods.DataBaseDeleteNote(temp[i].Split('?')[1], "MonitoringReport");
                }
            }

            List <string> tempList = AntivirusLibrary.DataBaseMethods.DataBaseGetAllNotes("MonitoringReport");

            foreach (var path in tempList)
            {
                var tempDate = new AntivirusLibrary.DataReportMonitoring(path);
                FormElementsReportMonitoring tempForm = new FormElementsReportMonitoring(flowLayoutPanelReportMonitoring);
                tempForm.ReportMonitoringtextBox.Text = tempDate.path;
                tempForm.ReportMonitoringDate.Text    = tempDate.date;
                tempForm.ReportMonitoringTime.Text    = tempDate.time;
                tempForm.ReportMonitoringChange.Text  = tempDate.virusType + " " + tempDate.operation;
                lformElementsReportMonitorings.Add(tempForm);
            }

            OffAll();
            PanelReportMonitor.Visible         = true;
            PanelReportMonitor.Location        = new System.Drawing.Point(179, 13);
            MonitorReportPanelButton.BackColor = Color.LightBlue;
        }