Exemple #1
0
        private void button8_Click(object sender, EventArgs e)
        {
            using (OpenFileDialog openFileDialog = new OpenFileDialog())
            {
                if (openFileDialog.ShowDialog() == DialogResult.OK)
                {
                    string filePath = openFileDialog.FileName;
                    if (filePath.Equals(null) || filePath.Equals(""))
                    {
                        return;
                    }

                    string time = string.Format("{0:00}", Hourse.Value) + ":" + string.Format("{0:00}", Minutes.Value);
                    string date = DateTime.Now.ToString("MM/dd/yyyy");
                    DataBaseMethods.AddNote("Schedule", "'PATH','TIME','DATE'", $"'{filePath}','{time}','{date}'");

                    FormElementsToScheduleScan tempPanel = new FormElementsToScheduleScan(flowLayoutPaneltoSScan);
                    tempPanel.DateToToScheduleScan.Text  = date;
                    tempPanel.TimeToScheduleScan.Text    = time;
                    tempPanel.TextBoxToScheduleScan.Text = filePath;

                    lformElementsShedules.Add(tempPanel);
                }
            }
        }
Exemple #2
0
        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;
        }
Exemple #3
0
        private void button7_Click(object sender, EventArgs e)
        {
            operationDone = false;
            using (var fbd = new FolderBrowserDialog())
            {
                DialogResult result = fbd.ShowDialog();

                if (result == DialogResult.OK && !string.IsNullOrWhiteSpace(fbd.SelectedPath))
                {
                    string time = string.Format("{0:00}", Hourse.Value) + ":" + string.Format("{0:00}", Minutes.Value);
                    string date = DateTime.Now.ToString("MM/dd/yyyy");
                    DataBaseMethods.AddNote("Schedule", "'PATH','TIME','DATE'", $"'{fbd.SelectedPath}','{time}','{date}'");

                    FormElementsToScheduleScan tempPanel = new FormElementsToScheduleScan(flowLayoutPaneltoSScan);
                    tempPanel.DateToToScheduleScan.Text  = date;
                    tempPanel.TimeToScheduleScan.Text    = time;
                    tempPanel.TextBoxToScheduleScan.Text = fbd.SelectedPath;

                    lformElementsShedules.Add(tempPanel);
                }
            }
        }