Esempio n. 1
0
 private void loadFiles_click(object sender, RoutedEventArgs e)
 {
     for (int i = 0; i < 2; i++)
     {
         Directories.CheckIfFolderExists(Directories.GetPath(i));
         Merger.GetFiles(Directories.GetPath(i), i);
     }
     if (listView_FileList.Items.Count > 0)
     {
         selectFolder.IsEnabled = false;
         loadFiles.IsEnabled    = false;
         flushFiles.IsEnabled   = true;
         saveFiles.IsEnabled    = true;
     }
 }
Esempio n. 2
0
        public static void CheckKnownBeFilesExists()
        {
            string dirPath = Directories.GetPath(666) + "\\knownBeFiles.txt";

            if (!File.Exists(dirPath))
            {
                // If config file doesn't exist we create it in the folder with .exe
                File.WriteAllLines(dirPath, knownBeFiles);
            }
            else
            {
                string[] tempKnownBeFiles = File.ReadAllLines(dirPath);
                // Add Additional File Names to the List if the file exists
                foreach (string tempKnownBeFile in tempKnownBeFiles)
                {
                    if (!knownBeFiles.Any(tempKnownBeFile.Contains) && System.IO.Path.GetExtension(tempKnownBeFile) == ".txt")
                    {
                        knownBeFiles.Add(tempKnownBeFile);
                    }
                }
            }
        }
Esempio n. 3
0
 private void saveFiles_click(object sender, RoutedEventArgs e)
 {
     Merger.SaveToFiles(Directories.GetPath(2));
 }