예제 #1
0
파일: Form1.cs 프로젝트: lXabba/Antivirus
        private void button2_Click(object sender, EventArgs e)
        {
            int count = 0;

            string temp = "";

            foreach (var panel in lformElementsShedulesAfterScan)
            {
                if (panel.check)
                {
                    temp += panel.SheduleTextBox.Text;
                    temp += "?";
                    count++;
                    panel.DeletePanel(flowLayoutScanSchedule);
                    AntivirusLibrary.DataBaseMethods.DataBaseDeleteNoteWhereAnd($"WHERE PATH=('{panel.SheduleTextBox.Text}')", "ScheduleReport");
                }
            }

            temp = temp.Substring(0, temp.Length - 1);

            //AntivirusLibrary.MailSlotClientMethods.CreateServerConnection();
            //AntivirusLibrary.MailSlotClientMethods.SendQuest($"3|{count}?{temp}|0");
            AntivirusLibrary.SocketClientMethods.SocketClientWriteMessage($"3|{count}?{temp}|0");

            foreach (var temps in lformElementsShedulesAfterScan)
            {
                temps.DeletePanel(flowLayoutScanSchedule);
            }
            List <string> tempList2 = AntivirusLibrary.DataBaseMethods.DataBaseGetAllNotes("ScheduleReport");

            foreach (var file in tempList2)
            {
                var panelTemp = new FormElementsShedule(flowLayoutScanSchedule);

                panelTemp.SheduleTextBox.Text        = file.Split('?')[1];
                panelTemp.SheduleLabelDate.Text      = file.Split('?')[3];
                panelTemp.SheduleLabelTime.Text      = file.Split('?')[4];
                panelTemp.SheduleLabelVirusType.Text = file.Split('?')[2];
                lformElementsShedulesAfterScan.Add(panelTemp);
            }
        }
예제 #2
0
파일: Form1.cs 프로젝트: lXabba/Antivirus
        private void PlanPanelButton_Click(object sender, EventArgs e)
        {
            foreach (var temp in lformElementsShedules)
            {
                temp.DeletePanel(flowLayoutPaneltoSScan);
            }
            List <string> tempList = AntivirusLibrary.DataBaseMethods.DataBaseGetAllNotes("Schedule");

            foreach (var file in tempList)
            {
                var panelTemp = new FormElementsToScheduleScan(flowLayoutPaneltoSScan);

                panelTemp.TextBoxToScheduleScan.Text = file.Split('?')[1];
                panelTemp.TimeToScheduleScan.Text    = file.Split('?')[2];
                panelTemp.DateToToScheduleScan.Text  = file.Split('?')[3];
                lformElementsShedules.Add(panelTemp);
            }

            foreach (var temp in lformElementsShedulesAfterScan)
            {
                temp.DeletePanel(flowLayoutScanSchedule);
            }
            List <string> tempList2 = AntivirusLibrary.DataBaseMethods.DataBaseGetAllNotes("ScheduleReport");

            foreach (var file in tempList2)
            {
                var panelTemp = new FormElementsShedule(flowLayoutScanSchedule);

                panelTemp.SheduleTextBox.Text        = file.Split('?')[1];
                panelTemp.SheduleLabelDate.Text      = file.Split('?')[3];
                panelTemp.SheduleLabelTime.Text      = file.Split('?')[4];
                panelTemp.SheduleLabelVirusType.Text = file.Split('?')[2];
                lformElementsShedulesAfterScan.Add(panelTemp);
            }

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