/// <summary> /// Constructor /// </summary> /// <param name="itsDAL"> The instance of the DAL layer for accessing the DB functions. </param> public BL_Process(IDAL itsDAL) { this.itsDAL = itsDAL; currUser = null; dataLeakageTool = new DataLeakageTool(); fileCryptoTool = new FileCryptoTool(); }
//after clicking the "open file" vutton private void Open_File_Left_Button_Click(object sender, RoutedEventArgs e) { try { FolderBrowserDialog fbd = new FolderBrowserDialog(); DialogResult result = fbd.ShowDialog(); urlAdress = fbd.SelectedPath; DataLeakageTool dlt = new DataLeakageTool(); SortedDictionary <double, FileInfo> dictionary = null; dictionary = dlt.checkSensitivity(urlAdress); foreach (var item in dictionary.Reverse()) { double temp; if (item.Key <= 0) { temp = 0; } else { temp = item.Key; } DataFile currVar = new DataFile() { name = item.Value.Name, score = temp, text = "", url = urlAdress }; files.Add(currVar); } ; dlt = null; this.Files_List.ItemsSource = files; } catch (Exception exc) { System.Windows.MessageBox.Show("Error, please start-over"); string s = exc.Message; this.Run(); } }