Initialize
This commit is contained in:
commit
793b560bef
BIN
.vs/DeleteFileFolder.git/v16/.suo
Normal file
BIN
.vs/DeleteFileFolder.git/v16/.suo
Normal file
Binary file not shown.
31
DeleteFileFolder.git.sln
Normal file
31
DeleteFileFolder.git.sln
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
|
||||||
|
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||||
|
# Visual Studio Version 16
|
||||||
|
VisualStudioVersion = 16.0.30621.155
|
||||||
|
MinimumVisualStudioVersion = 10.0.40219.1
|
||||||
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DeleteFileFolder", "DeleteFileFolder\DeleteFileFolder.csproj", "{9E1E89BE-2500-4B00-8179-6FCED03F07C9}"
|
||||||
|
EndProject
|
||||||
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Test_DeleteFileFolder", "Test_DeleteFileFolder\Test_DeleteFileFolder.csproj", "{E3AEAD97-B7B5-4DDE-92E6-06EBB0430676}"
|
||||||
|
EndProject
|
||||||
|
Global
|
||||||
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
|
Debug|Any CPU = Debug|Any CPU
|
||||||
|
Release|Any CPU = Release|Any CPU
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||||
|
{9E1E89BE-2500-4B00-8179-6FCED03F07C9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{9E1E89BE-2500-4B00-8179-6FCED03F07C9}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{9E1E89BE-2500-4B00-8179-6FCED03F07C9}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{9E1E89BE-2500-4B00-8179-6FCED03F07C9}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{E3AEAD97-B7B5-4DDE-92E6-06EBB0430676}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{E3AEAD97-B7B5-4DDE-92E6-06EBB0430676}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{E3AEAD97-B7B5-4DDE-92E6-06EBB0430676}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{E3AEAD97-B7B5-4DDE-92E6-06EBB0430676}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
|
HideSolutionNode = FALSE
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||||
|
SolutionGuid = {96FCD157-EBD9-4BF6-8695-DBBFCA29707F}
|
||||||
|
EndGlobalSection
|
||||||
|
EndGlobal
|
||||||
530
DeleteFileFolder/DeleteFileFolder.cs
Normal file
530
DeleteFileFolder/DeleteFileFolder.cs
Normal file
@ -0,0 +1,530 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.IO;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Reflection;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
|
||||||
|
namespace Eugen.ESystem
|
||||||
|
{
|
||||||
|
public class DeleteFileFolder
|
||||||
|
{
|
||||||
|
#region Version und Copyright
|
||||||
|
// Version und Copyright
|
||||||
|
string dllName = Path.GetFileNameWithoutExtension(System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase); //Den Programmnamen auslesen
|
||||||
|
string dllVersion = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString();
|
||||||
|
static object[] attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyCopyrightAttribute), false);
|
||||||
|
string copyright = GenerateCopyright();
|
||||||
|
string icon = Application.StartupPath + "\\Info.bmp";
|
||||||
|
//Assembly Datum und Zeit
|
||||||
|
static DateTime value = AssemblyDateTime();
|
||||||
|
string date = value.ToShortDateString();
|
||||||
|
string time = value.ToLongTimeString();
|
||||||
|
private static DateTime AssemblyDateTime()
|
||||||
|
{
|
||||||
|
var version = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version;
|
||||||
|
var buildDateTime = new DateTime(2000, 1, 1).Add(new TimeSpan(TimeSpan.TicksPerDay * version.Build + TimeSpan.TicksPerSecond * 2 * version.Revision));
|
||||||
|
//Tage seit dem 1. Januar 2000 und Sekunden seit Mitternacht, (multiplizier mit 2 ergibt das Original)
|
||||||
|
return buildDateTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static string CurrentYear()
|
||||||
|
{
|
||||||
|
DateTime dtn = DateTime.Now;
|
||||||
|
return dtn.Year.ToString();
|
||||||
|
}
|
||||||
|
|
||||||
|
private static string StartYear()
|
||||||
|
{
|
||||||
|
string startYear = "";
|
||||||
|
if (((AssemblyCopyrightAttribute)attributes[0]).Copyright.Contains("Copyright © "))
|
||||||
|
{
|
||||||
|
startYear = ((AssemblyCopyrightAttribute)attributes[0]).Copyright.Replace("Copyright © ", "");
|
||||||
|
while (startYear.StartsWith(" "))
|
||||||
|
{
|
||||||
|
startYear = startYear.Remove(0, 1);
|
||||||
|
}
|
||||||
|
startYear = startYear.Remove(startYear.IndexOf(" "));
|
||||||
|
return startYear;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
DateTime dtn = DateTime.Now;
|
||||||
|
return dtn.Year.ToString();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private static string GenerateCopyright()
|
||||||
|
{
|
||||||
|
string startYear = StartYear();
|
||||||
|
string currentYear = CurrentYear();
|
||||||
|
|
||||||
|
if (startYear == currentYear)
|
||||||
|
{
|
||||||
|
return ((AssemblyCopyrightAttribute)attributes[0]).Copyright;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return ((AssemblyCopyrightAttribute)attributes[0]).Copyright.Replace(startYear, String.Concat(startYear, "-", currentYear));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region DLL-Info
|
||||||
|
/// <summary>
|
||||||
|
/// Contains the name of the program file
|
||||||
|
/// </summary>
|
||||||
|
public static string DllName { set; get; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Contains the version of the program file
|
||||||
|
/// </summary>
|
||||||
|
public static string DllVersion { set; get; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Contains the copyright notice
|
||||||
|
/// </summary>
|
||||||
|
public static string Copyright { set; get; }
|
||||||
|
|
||||||
|
private void SetDllInfo()
|
||||||
|
{
|
||||||
|
//Name, Version und Copyright setzen
|
||||||
|
DllName = dllName;
|
||||||
|
DllVersion = dllVersion;
|
||||||
|
Copyright = copyright;
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
public DeleteFileFolder()
|
||||||
|
{
|
||||||
|
SetDllInfo();
|
||||||
|
|
||||||
|
Dir = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
List<string> undeletableFiles = new List<string>(); //Liste der unlöschbaren Dateien
|
||||||
|
|
||||||
|
private long FileCounter { set; get; } //Anzahl der abgearbeiteten Dateien
|
||||||
|
private long DirectoryCounter { set; get; } //Anzahl der abgearbeiteten Verzeichnisse
|
||||||
|
|
||||||
|
private long NumberOfFiles { set; get; } //Anzahl der Dateien
|
||||||
|
private long NumberOfDirectories { set; get; } //Anzahl der Verzeichnisse
|
||||||
|
public long PercentDone { set; get; } //Prozent abgeschlossen
|
||||||
|
private bool Dir { set; get; } //true = Verzeichnisse und Dateien; false = Nur Dateien
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Deletes a singel File.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="fileName">A valid filename with path.</param>
|
||||||
|
/// <returns>If the file was successfully deleted, 'null' is returned, otherwise the filename.</returns>
|
||||||
|
public string File(string fileName)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
FileCounter++; //Zähler hochzählen
|
||||||
|
|
||||||
|
System.IO.File.SetAttributes(fileName, FileAttributes.Normal); //Attribute zurücksetzen
|
||||||
|
System.IO.File.Delete(fileName); //Datei löschen
|
||||||
|
|
||||||
|
return null; //Wenn löschen möglich war
|
||||||
|
}
|
||||||
|
catch (Exception)
|
||||||
|
{
|
||||||
|
return fileName; //Wenn löschen nicht möglich war
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Deletes a singel File with the declared extension.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="fileName">A valid filename with path.</param>
|
||||||
|
/// <param name="searchPattern">A valid file extension, e.g.: .txt</param>
|
||||||
|
/// <returns>If the file was successfully deleted, 'null' is returned, otherwise the filename.</returns>
|
||||||
|
public string File(string fileName, string searchPattern)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
if (Path.GetExtension(fileName) != searchPattern)
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
FileCounter++; //Zähler hochzählen
|
||||||
|
PercentDone = 100 / NumberOfFiles * FileCounter;
|
||||||
|
|
||||||
|
System.IO.File.SetAttributes(fileName, FileAttributes.Normal); //Attribute zurücksetzen
|
||||||
|
System.IO.File.Delete(fileName); //Datei löschen
|
||||||
|
|
||||||
|
return null; //Wenn löschen möglich war
|
||||||
|
}
|
||||||
|
catch (Exception)
|
||||||
|
{
|
||||||
|
return fileName; //Wenn löschen nicht möglich war
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Delete all files in a specified folder.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="path">Full path of a folder.</param>
|
||||||
|
/// <returns>Returns a list of all undeletable files.</returns>
|
||||||
|
public List<string> AllFiles(string path)
|
||||||
|
{
|
||||||
|
NumberOfFiles = CountFiles(path); //Anzahl der löschbaren Dateien
|
||||||
|
|
||||||
|
FileCounter = 0; //Zähler zurücksetzen
|
||||||
|
string result = ""; //Rückgabewert
|
||||||
|
|
||||||
|
undeletableFiles.Clear();
|
||||||
|
|
||||||
|
foreach (var file in Directory.GetFiles(path))
|
||||||
|
{
|
||||||
|
result = File(file); //Dateien löschen
|
||||||
|
|
||||||
|
//Berechnen wie viel Prozenz bereits gelöscht sind
|
||||||
|
if (Dir)
|
||||||
|
{
|
||||||
|
//Dateien und Verzeichnisse werden berücksichtigt
|
||||||
|
PercentDone = Convert.ToInt32(100 / Convert.ToDouble(NumberOfFiles + NumberOfDirectories) * Convert.ToDouble(FileCounter + DirectoryCounter));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
//Nur Dateien werden berücksichtigt
|
||||||
|
PercentDone = Convert.ToInt32(100 / Convert.ToDouble(NumberOfFiles) * Convert.ToDouble(FileCounter));
|
||||||
|
OnEvent(PercentDone);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (result != null)
|
||||||
|
{
|
||||||
|
//Wenn ein Dateiname zurückgeliefert wird, dann in die Liste aufnehmen
|
||||||
|
undeletableFiles.Add(result);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return undeletableFiles; //Gibt die Liste der unlöschbaren Dateien zurück
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Delete all files in a specified folder and subfolders.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="path">Full path of a folder.</param>
|
||||||
|
/// <param name="subFolder">If true, then all files in all subdirectories are also deleted.</param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public List<string> AllFiles(string path, bool subFolder)
|
||||||
|
{
|
||||||
|
NumberOfFiles = CountFiles(path, subFolder); //Anzahl der löschbaren Dateien
|
||||||
|
|
||||||
|
FileCounter = 0; //Zähler zurücksetzen
|
||||||
|
|
||||||
|
undeletableFiles.Clear(); //Liste der unlöschbaren Dateien zurücksetzen
|
||||||
|
|
||||||
|
//Löscht alle Dateien und gibt die Liste der unlöschbaren Dateien zurück
|
||||||
|
return AllFilesInFolders(path, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Delete all files in a specified folder and subfolders with the declared extension.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="path">Full path of a folder.</param>
|
||||||
|
/// <param name="subFolder">If true, then all files in all subdirectories are also deleted.</param>
|
||||||
|
/// <param name="searchPattern">A valid file extension, e.g.: .txt</param>
|
||||||
|
/// <returns>Returns a list of all undeletable files.</returns>
|
||||||
|
public List<string> AllFiles(string path, bool subFolder, string searchPattern)
|
||||||
|
{
|
||||||
|
NumberOfFiles = CountFiles(path, subFolder); //Anzahl der löschbaren Dateien
|
||||||
|
|
||||||
|
FileCounter = 0; //Zähler zurücksetzen
|
||||||
|
|
||||||
|
undeletableFiles.Clear(); //Liste der unlöschbaren Dateien zurücksetzen
|
||||||
|
|
||||||
|
//Löscht alle Dateien und gibt die Liste der unlöschbaren Dateien zurück
|
||||||
|
return AllFilesInFolders(path, true, searchPattern);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private List<string> AllFilesInFolders(string path, bool subFolder)
|
||||||
|
{
|
||||||
|
string result = ""; //Rückgabewert
|
||||||
|
|
||||||
|
foreach (var file in Directory.GetFiles(path))
|
||||||
|
{
|
||||||
|
result = File(file); //Dateien löschen
|
||||||
|
|
||||||
|
//Berechnen wie viel Prozenz bereits gelöscht sind
|
||||||
|
if (Dir)
|
||||||
|
{
|
||||||
|
//Dateien un Verzeichnisse werden berücksichtigt
|
||||||
|
PercentDone = Convert.ToInt32(100 / Convert.ToDouble(NumberOfFiles + NumberOfDirectories) * Convert.ToDouble(FileCounter + DirectoryCounter));
|
||||||
|
OnEvent(PercentDone);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
//Nur Dateien werden berücksichtigt
|
||||||
|
PercentDone = Convert.ToInt32(100 / Convert.ToDouble(NumberOfFiles) * Convert.ToDouble(FileCounter));
|
||||||
|
OnEvent(PercentDone);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (result != null)
|
||||||
|
{
|
||||||
|
//Wenn ein Dateiname zurückgeliefert wird, dann in die Liste aufnehmen
|
||||||
|
undeletableFiles.Add(result);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (subFolder)
|
||||||
|
{
|
||||||
|
//Alle Dateien in den Unterverzeichnissen löschen
|
||||||
|
foreach (var sFolder in Directory.GetDirectories(path))
|
||||||
|
{
|
||||||
|
AllFilesInFolders(sFolder, true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return undeletableFiles; //Gibt die Liste der unlöschbaren Dateien zurück
|
||||||
|
}
|
||||||
|
|
||||||
|
private List<string> AllFilesInFolders(string path, bool subFolder, string searchPattern)
|
||||||
|
{
|
||||||
|
string result = ""; //Rückgabewert
|
||||||
|
|
||||||
|
foreach (var file in Directory.GetFiles(path))
|
||||||
|
{
|
||||||
|
result = File(file, searchPattern); //Dateien löschen
|
||||||
|
|
||||||
|
if (result != null)
|
||||||
|
{
|
||||||
|
//Wenn ein Dateiname zurückgeliefert wird, dann in die Liste aufnehmen
|
||||||
|
undeletableFiles.Add(result);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (subFolder)
|
||||||
|
{
|
||||||
|
//Alle Dateien in den Unterverzeichnissen löschen
|
||||||
|
foreach (var sFolder in Directory.GetDirectories(path))
|
||||||
|
{
|
||||||
|
AllFilesInFolders(sFolder, true, searchPattern);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return undeletableFiles; //Gibt die Liste der unlöschbaren Dateien zurück
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public string SingleDirectory(string path)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
DirectoryCounter++; //Zähler hochzählen
|
||||||
|
|
||||||
|
DirectoryInfo dirInfo = new DirectoryInfo(path);
|
||||||
|
dirInfo.Attributes = FileAttributes.Normal;
|
||||||
|
System.IO.Directory.Delete(path);
|
||||||
|
|
||||||
|
return null; //Wenn löschen möglich war
|
||||||
|
}
|
||||||
|
catch (Exception)
|
||||||
|
{
|
||||||
|
return path; //Wenn löschen nicht möglich war
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<string> AllDirectories(string path)
|
||||||
|
{
|
||||||
|
undeletableFiles.Clear();
|
||||||
|
|
||||||
|
if (!Directory.Exists(path))
|
||||||
|
{
|
||||||
|
undeletableFiles.Add(path);
|
||||||
|
return undeletableFiles;
|
||||||
|
}
|
||||||
|
|
||||||
|
Dir = true;
|
||||||
|
|
||||||
|
NumberOfFiles = CountFiles(path, true); //Anzahl der löschbaren Dateien
|
||||||
|
NumberOfDirectories = CountDirectories(path); //Anzahl der löschbaren Verzeichnsse
|
||||||
|
|
||||||
|
//Alle Dateien im Verzeichnis löschen
|
||||||
|
undeletableFiles.AddRange(AllFiles(path, true));
|
||||||
|
|
||||||
|
undeletableFiles = AllSubDirectories(path); //Alle Verzeichnisse löschen
|
||||||
|
|
||||||
|
string result = SingleDirectory(path);
|
||||||
|
if (!String.IsNullOrEmpty(result))
|
||||||
|
{
|
||||||
|
undeletableFiles.Add(result);
|
||||||
|
}
|
||||||
|
|
||||||
|
//Berechnen wie viel Prozenz bereits gelöscht sind
|
||||||
|
PercentDone = Convert.ToInt32(100 / Convert.ToDouble(NumberOfFiles + NumberOfDirectories) * Convert.ToDouble(FileCounter + DirectoryCounter));
|
||||||
|
OnEvent(PercentDone);
|
||||||
|
|
||||||
|
return undeletableFiles; //Gibt die Liste der unlöschbaren Dateien und Verzeichnisse zurück
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<string> AllSubDirectories(string path)
|
||||||
|
{
|
||||||
|
//Unterverzeichnisse löschen
|
||||||
|
foreach (var sFolder in Directory.GetDirectories(path))
|
||||||
|
{
|
||||||
|
undeletableFiles.AddRange(AllSubDirectories(sFolder));
|
||||||
|
|
||||||
|
SingleDirectory(sFolder);
|
||||||
|
|
||||||
|
//Berechnen wie viel Prozenz bereits gelöscht sind
|
||||||
|
PercentDone = Convert.ToInt32(100 / Convert.ToDouble(NumberOfFiles + NumberOfDirectories) * Convert.ToDouble(FileCounter + DirectoryCounter));
|
||||||
|
OnEvent(PercentDone);
|
||||||
|
}
|
||||||
|
|
||||||
|
return undeletableFiles; //Gibt die Liste der unlöschbaren Dateien und Verzeichnisse zurück
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Counts all files in a specified folder.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="path">Full path of a folder.</param>
|
||||||
|
/// <returns>The number of files.</returns>
|
||||||
|
public long CountFiles(string path)
|
||||||
|
{
|
||||||
|
long numberOfFiles = 0; //Anzahl der löschbaren Dateien
|
||||||
|
|
||||||
|
foreach (var file in Directory.GetFiles(path))
|
||||||
|
{
|
||||||
|
numberOfFiles++; //Zähler erhöhen
|
||||||
|
}
|
||||||
|
|
||||||
|
return numberOfFiles;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Counts all files in a specified folder and all subfolders.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="path">Full path of a folder.</param>
|
||||||
|
/// <param name="subFolder">If true, then all files in all subdirectories are also counted.</param>
|
||||||
|
/// <returns>The number of files.</returns>
|
||||||
|
public long CountFiles(string path, bool subFolder)
|
||||||
|
{
|
||||||
|
if (!Directory.Exists(path))
|
||||||
|
{
|
||||||
|
return 0; //Wenn das Verzeichnis nicht existiert, dann 0 zurückgeben
|
||||||
|
}
|
||||||
|
|
||||||
|
NumberOfFiles = 0; //Zähler zurücksetzen
|
||||||
|
|
||||||
|
NumberOfFiles = CountAllFiles(path, subFolder); //Die Zählfunktion aufrufen
|
||||||
|
return NumberOfFiles;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Counts all files in a specified folder and subfolder with the declared extension.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="path">Full path of a folder.</param>
|
||||||
|
/// <param name="subFolder">If true, then all files in all subdirectories are also counted.</param>
|
||||||
|
/// <param name="searchPattern">A valid file extension, e.g.: .txt</param>
|
||||||
|
/// <returns>The number of files.</returns>
|
||||||
|
private long CountFile(string path, bool subFolder, string searchPattern)
|
||||||
|
{
|
||||||
|
long numberOfFiles = 0; //Anzahl der löschbaren Dateien
|
||||||
|
|
||||||
|
foreach (var file in Directory.GetFiles(path))
|
||||||
|
{
|
||||||
|
if (Path.GetExtension(file) == searchPattern)
|
||||||
|
{
|
||||||
|
numberOfFiles++; //Zähler erhöhen
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (subFolder)
|
||||||
|
{
|
||||||
|
foreach (var sFolder in Directory.GetDirectories(path))
|
||||||
|
{
|
||||||
|
CountFile(sFolder, true, searchPattern);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return numberOfFiles;
|
||||||
|
}
|
||||||
|
|
||||||
|
private long CountAllFiles(string path, bool subFolder)
|
||||||
|
{
|
||||||
|
foreach (var file in Directory.GetFiles(path))
|
||||||
|
{
|
||||||
|
NumberOfFiles++; //Zähler erhöhen
|
||||||
|
}
|
||||||
|
if (subFolder)
|
||||||
|
{
|
||||||
|
foreach (var sFolder in Directory.GetDirectories(path))
|
||||||
|
{
|
||||||
|
CountAllFiles(sFolder, true); //Rekursiver Aufruf
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return NumberOfFiles;
|
||||||
|
}
|
||||||
|
|
||||||
|
private long CountAllFiles(string path, bool subFolder, string searchPattern)
|
||||||
|
{
|
||||||
|
foreach (var file in Directory.GetFiles(path))
|
||||||
|
{
|
||||||
|
if (Path.GetExtension(file) == searchPattern)
|
||||||
|
{
|
||||||
|
NumberOfFiles++; //Zähler erhöhen
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (subFolder)
|
||||||
|
{
|
||||||
|
foreach (var sFolder in Directory.GetDirectories(path))
|
||||||
|
{
|
||||||
|
CountAllFiles(sFolder, true, searchPattern); //Rekursiver Aufruf
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return NumberOfFiles;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Counts all directoreis in a specified folder and all subfolders.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="path">Full path of a folder.</param>
|
||||||
|
/// <returns>The number of directories.</returns>
|
||||||
|
public long CountDirectories(string path)
|
||||||
|
{
|
||||||
|
if (!Directory.Exists(path))
|
||||||
|
{
|
||||||
|
return 0; //Wenn das Verzeichnis nicht existiert, dann 0 zurückgeben
|
||||||
|
}
|
||||||
|
|
||||||
|
NumberOfDirectories = 0; //Zähler zurücksetzen
|
||||||
|
|
||||||
|
NumberOfDirectories = CountAllDirectories(path) + 1; //Für das Root-Verzeichnis 1 dazu zählen
|
||||||
|
return NumberOfDirectories;
|
||||||
|
}
|
||||||
|
|
||||||
|
private long CountAllDirectories(string path)
|
||||||
|
{
|
||||||
|
//Rekursive Aufruf
|
||||||
|
foreach (var sFolder in Directory.GetDirectories(path))
|
||||||
|
{
|
||||||
|
CountAllDirectories(sFolder);
|
||||||
|
NumberOfDirectories++;
|
||||||
|
}
|
||||||
|
|
||||||
|
return NumberOfDirectories;
|
||||||
|
}
|
||||||
|
|
||||||
|
#region Event Handler
|
||||||
|
// Der Delegat muß die gleiche Signatur aufweisen wie die Eventhandler-Methode.
|
||||||
|
public delegate void EventDelegate(long result);
|
||||||
|
|
||||||
|
// Das Event-Objekt ist vom Typ dieses Delegaten.
|
||||||
|
public event EventDelegate MyEvent;
|
||||||
|
|
||||||
|
public void OnEvent(long result)
|
||||||
|
{
|
||||||
|
// Prüft ob das Event überhaupt einen Abonnenten hat.
|
||||||
|
if (MyEvent != null)
|
||||||
|
{
|
||||||
|
MyEvent(result);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
||||||
49
DeleteFileFolder/DeleteFileFolder.csproj
Normal file
49
DeleteFileFolder/DeleteFileFolder.csproj
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||||
|
<PropertyGroup>
|
||||||
|
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||||
|
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||||
|
<ProjectGuid>{9E1E89BE-2500-4B00-8179-6FCED03F07C9}</ProjectGuid>
|
||||||
|
<OutputType>Library</OutputType>
|
||||||
|
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||||
|
<RootNamespace>DeleteFileFolder</RootNamespace>
|
||||||
|
<AssemblyName>DeleteFileFolder</AssemblyName>
|
||||||
|
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
|
||||||
|
<FileAlignment>512</FileAlignment>
|
||||||
|
<Deterministic>false</Deterministic>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||||
|
<DebugSymbols>true</DebugSymbols>
|
||||||
|
<DebugType>full</DebugType>
|
||||||
|
<Optimize>false</Optimize>
|
||||||
|
<OutputPath>bin\Debug\</OutputPath>
|
||||||
|
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||||
|
<ErrorReport>prompt</ErrorReport>
|
||||||
|
<WarningLevel>4</WarningLevel>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||||
|
<DebugType>pdbonly</DebugType>
|
||||||
|
<Optimize>true</Optimize>
|
||||||
|
<OutputPath>bin\Release\</OutputPath>
|
||||||
|
<DefineConstants>TRACE</DefineConstants>
|
||||||
|
<ErrorReport>prompt</ErrorReport>
|
||||||
|
<WarningLevel>4</WarningLevel>
|
||||||
|
</PropertyGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Reference Include="System" />
|
||||||
|
<Reference Include="System.Core" />
|
||||||
|
<Reference Include="System.Windows.Forms" />
|
||||||
|
<Reference Include="System.Xml.Linq" />
|
||||||
|
<Reference Include="System.Data.DataSetExtensions" />
|
||||||
|
<Reference Include="Microsoft.CSharp" />
|
||||||
|
<Reference Include="System.Data" />
|
||||||
|
<Reference Include="System.Net.Http" />
|
||||||
|
<Reference Include="System.Xml" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Compile Include="DeleteFileFolder.cs" />
|
||||||
|
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||||
|
</ItemGroup>
|
||||||
|
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||||
|
</Project>
|
||||||
36
DeleteFileFolder/Properties/AssemblyInfo.cs
Normal file
36
DeleteFileFolder/Properties/AssemblyInfo.cs
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
using System.Reflection;
|
||||||
|
using System.Runtime.CompilerServices;
|
||||||
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
|
// Allgemeine Informationen über eine Assembly werden über die folgenden
|
||||||
|
// Attribute gesteuert. Ändern Sie diese Attributwerte, um die Informationen zu ändern,
|
||||||
|
// die einer Assembly zugeordnet sind.
|
||||||
|
[assembly: AssemblyTitle("DeleteFileFolder")]
|
||||||
|
[assembly: AssemblyDescription("")]
|
||||||
|
[assembly: AssemblyConfiguration("")]
|
||||||
|
[assembly: AssemblyCompany("")]
|
||||||
|
[assembly: AssemblyProduct("DeleteFileFolder")]
|
||||||
|
[assembly: AssemblyCopyright("Copyright © 2020 by Eugen Höglinger")]
|
||||||
|
[assembly: AssemblyTrademark("")]
|
||||||
|
[assembly: AssemblyCulture("")]
|
||||||
|
|
||||||
|
// Durch Festlegen von ComVisible auf FALSE werden die Typen in dieser Assembly
|
||||||
|
// für COM-Komponenten unsichtbar. Wenn Sie auf einen Typ in dieser Assembly von
|
||||||
|
// COM aus zugreifen müssen, sollten Sie das ComVisible-Attribut für diesen Typ auf "True" festlegen.
|
||||||
|
[assembly: ComVisible(false)]
|
||||||
|
|
||||||
|
// Die folgende GUID bestimmt die ID der Typbibliothek, wenn dieses Projekt für COM verfügbar gemacht wird
|
||||||
|
[assembly: Guid("9e1e89be-2500-4b00-8179-6fced03f07c9")]
|
||||||
|
|
||||||
|
// Versionsinformationen für eine Assembly bestehen aus den folgenden vier Werten:
|
||||||
|
//
|
||||||
|
// Hauptversion
|
||||||
|
// Nebenversion
|
||||||
|
// Buildnummer
|
||||||
|
// Revision
|
||||||
|
//
|
||||||
|
// Sie können alle Werte angeben oder Standardwerte für die Build- und Revisionsnummern verwenden,
|
||||||
|
// indem Sie "*" wie unten gezeigt eingeben:
|
||||||
|
// [assembly: AssemblyVersion("1.0.*")]
|
||||||
|
[assembly: AssemblyVersion("1.0.*")]
|
||||||
|
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||||
BIN
DeleteFileFolder/bin/Debug/DeleteFileFolder.dll
Normal file
BIN
DeleteFileFolder/bin/Debug/DeleteFileFolder.dll
Normal file
Binary file not shown.
BIN
DeleteFileFolder/bin/Debug/DeleteFileFolder.pdb
Normal file
BIN
DeleteFileFolder/bin/Debug/DeleteFileFolder.pdb
Normal file
Binary file not shown.
@ -0,0 +1,4 @@
|
|||||||
|
// <autogenerated />
|
||||||
|
using System;
|
||||||
|
using System.Reflection;
|
||||||
|
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")]
|
||||||
@ -0,0 +1 @@
|
|||||||
|
99ea030e883342fe107d375c9fe986f9d159745f
|
||||||
@ -0,0 +1,6 @@
|
|||||||
|
H:\Programmieren\Git-Repository\VisualStudio\2017\_DLL\DeleteFileFolder.git\DeleteFileFolder\bin\Debug\DeleteFileFolder.dll
|
||||||
|
H:\Programmieren\Git-Repository\VisualStudio\2017\_DLL\DeleteFileFolder.git\DeleteFileFolder\bin\Debug\DeleteFileFolder.pdb
|
||||||
|
H:\Programmieren\Git-Repository\VisualStudio\2017\_DLL\DeleteFileFolder.git\DeleteFileFolder\obj\Debug\DeleteFileFolder.csprojAssemblyReference.cache
|
||||||
|
H:\Programmieren\Git-Repository\VisualStudio\2017\_DLL\DeleteFileFolder.git\DeleteFileFolder\obj\Debug\DeleteFileFolder.csproj.CoreCompileInputs.cache
|
||||||
|
H:\Programmieren\Git-Repository\VisualStudio\2017\_DLL\DeleteFileFolder.git\DeleteFileFolder\obj\Debug\DeleteFileFolder.dll
|
||||||
|
H:\Programmieren\Git-Repository\VisualStudio\2017\_DLL\DeleteFileFolder.git\DeleteFileFolder\obj\Debug\DeleteFileFolder.pdb
|
||||||
Binary file not shown.
BIN
DeleteFileFolder/obj/Debug/DeleteFileFolder.dll
Normal file
BIN
DeleteFileFolder/obj/Debug/DeleteFileFolder.dll
Normal file
Binary file not shown.
BIN
DeleteFileFolder/obj/Debug/DeleteFileFolder.pdb
Normal file
BIN
DeleteFileFolder/obj/Debug/DeleteFileFolder.pdb
Normal file
Binary file not shown.
Binary file not shown.
6
Test_DeleteFileFolder/App.config
Normal file
6
Test_DeleteFileFolder/App.config
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
|
<configuration>
|
||||||
|
<startup>
|
||||||
|
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
|
||||||
|
</startup>
|
||||||
|
</configuration>
|
||||||
266
Test_DeleteFileFolder/Form1.Designer.cs
generated
Normal file
266
Test_DeleteFileFolder/Form1.Designer.cs
generated
Normal file
@ -0,0 +1,266 @@
|
|||||||
|
namespace Test_DeleteFileFolder
|
||||||
|
{
|
||||||
|
partial class Form1
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Erforderliche Designervariable.
|
||||||
|
/// </summary>
|
||||||
|
private System.ComponentModel.IContainer components = null;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Verwendete Ressourcen bereinigen.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="disposing">True, wenn verwaltete Ressourcen gelöscht werden sollen; andernfalls False.</param>
|
||||||
|
protected override void Dispose(bool disposing)
|
||||||
|
{
|
||||||
|
if (disposing && (components != null))
|
||||||
|
{
|
||||||
|
components.Dispose();
|
||||||
|
}
|
||||||
|
base.Dispose(disposing);
|
||||||
|
}
|
||||||
|
|
||||||
|
#region Vom Windows Form-Designer generierter Code
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Erforderliche Methode für die Designerunterstützung.
|
||||||
|
/// Der Inhalt der Methode darf nicht mit dem Code-Editor geändert werden.
|
||||||
|
/// </summary>
|
||||||
|
private void InitializeComponent()
|
||||||
|
{
|
||||||
|
this.labelFileName = new System.Windows.Forms.Label();
|
||||||
|
this.textBoxFileName = new System.Windows.Forms.TextBox();
|
||||||
|
this.groupBoxOptions = new System.Windows.Forms.GroupBox();
|
||||||
|
this.groupBoxType = new System.Windows.Forms.GroupBox();
|
||||||
|
this.groupBoxFiles = new System.Windows.Forms.GroupBox();
|
||||||
|
this.radioButtonDirectory = new System.Windows.Forms.RadioButton();
|
||||||
|
this.radioButtonFileOnly = new System.Windows.Forms.RadioButton();
|
||||||
|
this.radioButtonSingleFile = new System.Windows.Forms.RadioButton();
|
||||||
|
this.radioButtonAllFiles = new System.Windows.Forms.RadioButton();
|
||||||
|
this.checkBoxSubdirectories = new System.Windows.Forms.CheckBox();
|
||||||
|
this.checkBoxCountOnly = new System.Windows.Forms.CheckBox();
|
||||||
|
this.labelDeletableFiles = new System.Windows.Forms.Label();
|
||||||
|
this.labelDeletableDirectories = new System.Windows.Forms.Label();
|
||||||
|
this.progressBar = new System.Windows.Forms.ProgressBar();
|
||||||
|
this.buttonDelete = new System.Windows.Forms.Button();
|
||||||
|
this.buttonCancel = new System.Windows.Forms.Button();
|
||||||
|
this.groupBoxOptions.SuspendLayout();
|
||||||
|
this.groupBoxType.SuspendLayout();
|
||||||
|
this.groupBoxFiles.SuspendLayout();
|
||||||
|
this.SuspendLayout();
|
||||||
|
//
|
||||||
|
// labelFileName
|
||||||
|
//
|
||||||
|
this.labelFileName.AutoSize = true;
|
||||||
|
this.labelFileName.Location = new System.Drawing.Point(12, 9);
|
||||||
|
this.labelFileName.Name = "labelFileName";
|
||||||
|
this.labelFileName.Size = new System.Drawing.Size(104, 13);
|
||||||
|
this.labelFileName.TabIndex = 0;
|
||||||
|
this.labelFileName.Text = "File-/Directory-Name";
|
||||||
|
//
|
||||||
|
// textBoxFileName
|
||||||
|
//
|
||||||
|
this.textBoxFileName.Location = new System.Drawing.Point(12, 25);
|
||||||
|
this.textBoxFileName.Name = "textBoxFileName";
|
||||||
|
this.textBoxFileName.Size = new System.Drawing.Size(260, 20);
|
||||||
|
this.textBoxFileName.TabIndex = 1;
|
||||||
|
this.textBoxFileName.TextChanged += new System.EventHandler(this.textBoxFileName_TextChanged);
|
||||||
|
//
|
||||||
|
// groupBoxOptions
|
||||||
|
//
|
||||||
|
this.groupBoxOptions.Controls.Add(this.checkBoxCountOnly);
|
||||||
|
this.groupBoxOptions.Controls.Add(this.checkBoxSubdirectories);
|
||||||
|
this.groupBoxOptions.Controls.Add(this.groupBoxFiles);
|
||||||
|
this.groupBoxOptions.Controls.Add(this.groupBoxType);
|
||||||
|
this.groupBoxOptions.Location = new System.Drawing.Point(12, 52);
|
||||||
|
this.groupBoxOptions.Name = "groupBoxOptions";
|
||||||
|
this.groupBoxOptions.Size = new System.Drawing.Size(260, 148);
|
||||||
|
this.groupBoxOptions.TabIndex = 2;
|
||||||
|
this.groupBoxOptions.TabStop = false;
|
||||||
|
this.groupBoxOptions.Text = "Options";
|
||||||
|
//
|
||||||
|
// groupBoxType
|
||||||
|
//
|
||||||
|
this.groupBoxType.Controls.Add(this.radioButtonFileOnly);
|
||||||
|
this.groupBoxType.Controls.Add(this.radioButtonDirectory);
|
||||||
|
this.groupBoxType.Location = new System.Drawing.Point(6, 19);
|
||||||
|
this.groupBoxType.Name = "groupBoxType";
|
||||||
|
this.groupBoxType.Size = new System.Drawing.Size(248, 47);
|
||||||
|
this.groupBoxType.TabIndex = 0;
|
||||||
|
this.groupBoxType.TabStop = false;
|
||||||
|
this.groupBoxType.Text = "Type";
|
||||||
|
//
|
||||||
|
// groupBoxFiles
|
||||||
|
//
|
||||||
|
this.groupBoxFiles.Controls.Add(this.radioButtonAllFiles);
|
||||||
|
this.groupBoxFiles.Controls.Add(this.radioButtonSingleFile);
|
||||||
|
this.groupBoxFiles.Location = new System.Drawing.Point(6, 72);
|
||||||
|
this.groupBoxFiles.Name = "groupBoxFiles";
|
||||||
|
this.groupBoxFiles.Size = new System.Drawing.Size(248, 47);
|
||||||
|
this.groupBoxFiles.TabIndex = 1;
|
||||||
|
this.groupBoxFiles.TabStop = false;
|
||||||
|
this.groupBoxFiles.Text = "Files";
|
||||||
|
//
|
||||||
|
// radioButtonDirectory
|
||||||
|
//
|
||||||
|
this.radioButtonDirectory.AutoSize = true;
|
||||||
|
this.radioButtonDirectory.Checked = true;
|
||||||
|
this.radioButtonDirectory.Location = new System.Drawing.Point(7, 20);
|
||||||
|
this.radioButtonDirectory.Name = "radioButtonDirectory";
|
||||||
|
this.radioButtonDirectory.Size = new System.Drawing.Size(67, 17);
|
||||||
|
this.radioButtonDirectory.TabIndex = 0;
|
||||||
|
this.radioButtonDirectory.TabStop = true;
|
||||||
|
this.radioButtonDirectory.Text = "Directory";
|
||||||
|
this.radioButtonDirectory.UseVisualStyleBackColor = true;
|
||||||
|
this.radioButtonDirectory.CheckedChanged += new System.EventHandler(this.radioButtonDirectory_CheckedChanged);
|
||||||
|
//
|
||||||
|
// radioButtonFileOnly
|
||||||
|
//
|
||||||
|
this.radioButtonFileOnly.AutoSize = true;
|
||||||
|
this.radioButtonFileOnly.Location = new System.Drawing.Point(138, 20);
|
||||||
|
this.radioButtonFileOnly.Name = "radioButtonFileOnly";
|
||||||
|
this.radioButtonFileOnly.Size = new System.Drawing.Size(62, 17);
|
||||||
|
this.radioButtonFileOnly.TabIndex = 1;
|
||||||
|
this.radioButtonFileOnly.TabStop = true;
|
||||||
|
this.radioButtonFileOnly.Text = "FileOnly";
|
||||||
|
this.radioButtonFileOnly.UseVisualStyleBackColor = true;
|
||||||
|
this.radioButtonFileOnly.CheckedChanged += new System.EventHandler(this.radioButtonFileOnly_CheckedChanged);
|
||||||
|
//
|
||||||
|
// radioButtonSingleFile
|
||||||
|
//
|
||||||
|
this.radioButtonSingleFile.AutoSize = true;
|
||||||
|
this.radioButtonSingleFile.Checked = true;
|
||||||
|
this.radioButtonSingleFile.Location = new System.Drawing.Point(7, 20);
|
||||||
|
this.radioButtonSingleFile.Name = "radioButtonSingleFile";
|
||||||
|
this.radioButtonSingleFile.Size = new System.Drawing.Size(70, 17);
|
||||||
|
this.radioButtonSingleFile.TabIndex = 0;
|
||||||
|
this.radioButtonSingleFile.TabStop = true;
|
||||||
|
this.radioButtonSingleFile.Text = "Single file";
|
||||||
|
this.radioButtonSingleFile.UseVisualStyleBackColor = true;
|
||||||
|
this.radioButtonSingleFile.CheckedChanged += new System.EventHandler(this.radioButtonSingleFile_CheckedChanged);
|
||||||
|
//
|
||||||
|
// radioButtonAllFiles
|
||||||
|
//
|
||||||
|
this.radioButtonAllFiles.AutoSize = true;
|
||||||
|
this.radioButtonAllFiles.Location = new System.Drawing.Point(138, 20);
|
||||||
|
this.radioButtonAllFiles.Name = "radioButtonAllFiles";
|
||||||
|
this.radioButtonAllFiles.Size = new System.Drawing.Size(57, 17);
|
||||||
|
this.radioButtonAllFiles.TabIndex = 1;
|
||||||
|
this.radioButtonAllFiles.TabStop = true;
|
||||||
|
this.radioButtonAllFiles.Text = "All files";
|
||||||
|
this.radioButtonAllFiles.UseVisualStyleBackColor = true;
|
||||||
|
this.radioButtonAllFiles.CheckedChanged += new System.EventHandler(this.radioButtonAllFiles_CheckedChanged);
|
||||||
|
//
|
||||||
|
// checkBoxSubdirectories
|
||||||
|
//
|
||||||
|
this.checkBoxSubdirectories.AutoSize = true;
|
||||||
|
this.checkBoxSubdirectories.Location = new System.Drawing.Point(6, 125);
|
||||||
|
this.checkBoxSubdirectories.Name = "checkBoxSubdirectories";
|
||||||
|
this.checkBoxSubdirectories.Size = new System.Drawing.Size(93, 17);
|
||||||
|
this.checkBoxSubdirectories.TabIndex = 2;
|
||||||
|
this.checkBoxSubdirectories.Text = "Subdirectories";
|
||||||
|
this.checkBoxSubdirectories.UseVisualStyleBackColor = true;
|
||||||
|
this.checkBoxSubdirectories.CheckedChanged += new System.EventHandler(this.checkBoxSubdirectories_CheckedChanged);
|
||||||
|
//
|
||||||
|
// checkBoxCountOnly
|
||||||
|
//
|
||||||
|
this.checkBoxCountOnly.AutoSize = true;
|
||||||
|
this.checkBoxCountOnly.Location = new System.Drawing.Point(144, 125);
|
||||||
|
this.checkBoxCountOnly.Name = "checkBoxCountOnly";
|
||||||
|
this.checkBoxCountOnly.Size = new System.Drawing.Size(76, 17);
|
||||||
|
this.checkBoxCountOnly.TabIndex = 3;
|
||||||
|
this.checkBoxCountOnly.Text = "Count only";
|
||||||
|
this.checkBoxCountOnly.UseVisualStyleBackColor = true;
|
||||||
|
this.checkBoxCountOnly.CheckedChanged += new System.EventHandler(this.checkBoxCountOnly_CheckedChanged);
|
||||||
|
//
|
||||||
|
// labelDeletableFiles
|
||||||
|
//
|
||||||
|
this.labelDeletableFiles.Location = new System.Drawing.Point(12, 210);
|
||||||
|
this.labelDeletableFiles.Name = "labelDeletableFiles";
|
||||||
|
this.labelDeletableFiles.Size = new System.Drawing.Size(260, 13);
|
||||||
|
this.labelDeletableFiles.TabIndex = 3;
|
||||||
|
this.labelDeletableFiles.Text = "Number of deletable files:";
|
||||||
|
//
|
||||||
|
// labelDeletableDirectories
|
||||||
|
//
|
||||||
|
this.labelDeletableDirectories.Location = new System.Drawing.Point(12, 237);
|
||||||
|
this.labelDeletableDirectories.Name = "labelDeletableDirectories";
|
||||||
|
this.labelDeletableDirectories.Size = new System.Drawing.Size(260, 23);
|
||||||
|
this.labelDeletableDirectories.TabIndex = 4;
|
||||||
|
this.labelDeletableDirectories.Text = "Number of deletable Directories";
|
||||||
|
//
|
||||||
|
// progressBar
|
||||||
|
//
|
||||||
|
this.progressBar.Location = new System.Drawing.Point(12, 263);
|
||||||
|
this.progressBar.Name = "progressBar";
|
||||||
|
this.progressBar.Size = new System.Drawing.Size(260, 23);
|
||||||
|
this.progressBar.Style = System.Windows.Forms.ProgressBarStyle.Continuous;
|
||||||
|
this.progressBar.TabIndex = 5;
|
||||||
|
//
|
||||||
|
// buttonDelete
|
||||||
|
//
|
||||||
|
this.buttonDelete.Location = new System.Drawing.Point(12, 296);
|
||||||
|
this.buttonDelete.Name = "buttonDelete";
|
||||||
|
this.buttonDelete.Size = new System.Drawing.Size(75, 23);
|
||||||
|
this.buttonDelete.TabIndex = 6;
|
||||||
|
this.buttonDelete.Text = "Delete";
|
||||||
|
this.buttonDelete.UseVisualStyleBackColor = true;
|
||||||
|
this.buttonDelete.Click += new System.EventHandler(this.buttonDelete_Click);
|
||||||
|
//
|
||||||
|
// buttonCancel
|
||||||
|
//
|
||||||
|
this.buttonCancel.Location = new System.Drawing.Point(198, 296);
|
||||||
|
this.buttonCancel.Name = "buttonCancel";
|
||||||
|
this.buttonCancel.Size = new System.Drawing.Size(75, 23);
|
||||||
|
this.buttonCancel.TabIndex = 7;
|
||||||
|
this.buttonCancel.Text = "Cancel";
|
||||||
|
this.buttonCancel.UseVisualStyleBackColor = true;
|
||||||
|
this.buttonCancel.Click += new System.EventHandler(this.buttonCancel_Click);
|
||||||
|
//
|
||||||
|
// Form1
|
||||||
|
//
|
||||||
|
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||||
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
|
this.ClientSize = new System.Drawing.Size(284, 331);
|
||||||
|
this.Controls.Add(this.buttonCancel);
|
||||||
|
this.Controls.Add(this.buttonDelete);
|
||||||
|
this.Controls.Add(this.progressBar);
|
||||||
|
this.Controls.Add(this.labelDeletableDirectories);
|
||||||
|
this.Controls.Add(this.labelDeletableFiles);
|
||||||
|
this.Controls.Add(this.groupBoxOptions);
|
||||||
|
this.Controls.Add(this.textBoxFileName);
|
||||||
|
this.Controls.Add(this.labelFileName);
|
||||||
|
this.Name = "Form1";
|
||||||
|
this.Text = "Test_DeleteFileFolder";
|
||||||
|
this.groupBoxOptions.ResumeLayout(false);
|
||||||
|
this.groupBoxOptions.PerformLayout();
|
||||||
|
this.groupBoxType.ResumeLayout(false);
|
||||||
|
this.groupBoxType.PerformLayout();
|
||||||
|
this.groupBoxFiles.ResumeLayout(false);
|
||||||
|
this.groupBoxFiles.PerformLayout();
|
||||||
|
this.ResumeLayout(false);
|
||||||
|
this.PerformLayout();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
private System.Windows.Forms.Label labelFileName;
|
||||||
|
private System.Windows.Forms.TextBox textBoxFileName;
|
||||||
|
private System.Windows.Forms.GroupBox groupBoxOptions;
|
||||||
|
private System.Windows.Forms.CheckBox checkBoxCountOnly;
|
||||||
|
private System.Windows.Forms.CheckBox checkBoxSubdirectories;
|
||||||
|
private System.Windows.Forms.GroupBox groupBoxFiles;
|
||||||
|
private System.Windows.Forms.RadioButton radioButtonAllFiles;
|
||||||
|
private System.Windows.Forms.RadioButton radioButtonSingleFile;
|
||||||
|
private System.Windows.Forms.GroupBox groupBoxType;
|
||||||
|
private System.Windows.Forms.RadioButton radioButtonFileOnly;
|
||||||
|
private System.Windows.Forms.RadioButton radioButtonDirectory;
|
||||||
|
private System.Windows.Forms.Label labelDeletableFiles;
|
||||||
|
private System.Windows.Forms.Label labelDeletableDirectories;
|
||||||
|
private System.Windows.Forms.ProgressBar progressBar;
|
||||||
|
private System.Windows.Forms.Button buttonDelete;
|
||||||
|
private System.Windows.Forms.Button buttonCancel;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
236
Test_DeleteFileFolder/Form1.cs
Normal file
236
Test_DeleteFileFolder/Form1.cs
Normal file
@ -0,0 +1,236 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.ComponentModel;
|
||||||
|
using System.Data;
|
||||||
|
using System.Drawing;
|
||||||
|
using System.IO;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Reflection;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
using Eugen.ESystem;
|
||||||
|
|
||||||
|
namespace Test_DeleteFileFolder
|
||||||
|
{
|
||||||
|
public partial class Form1 : Form
|
||||||
|
{
|
||||||
|
#region Version und Copyright
|
||||||
|
// Version und Copyright
|
||||||
|
string programName = Path.GetFileNameWithoutExtension(System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase); //Den Programmnamen auslesen
|
||||||
|
string programVersion = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString();
|
||||||
|
static object[] attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyCopyrightAttribute), false);
|
||||||
|
string copyright = GenerateCopyright();
|
||||||
|
string icon = Application.StartupPath + "\\Info.bmp";
|
||||||
|
//Assembly Datum und Zeit
|
||||||
|
static DateTime value = AssemblyDateTime();
|
||||||
|
string date = value.ToShortDateString();
|
||||||
|
string time = value.ToLongTimeString();
|
||||||
|
private static DateTime AssemblyDateTime()
|
||||||
|
{
|
||||||
|
var version = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version;
|
||||||
|
var buildDateTime = new DateTime(2000, 1, 1).Add(new TimeSpan(TimeSpan.TicksPerDay * version.Build + TimeSpan.TicksPerSecond * 2 * version.Revision));
|
||||||
|
//Tage seit dem 1. Januar 2000 und Sekunden seit Mitternacht, (multiplizier mit 2 ergibt das Original)
|
||||||
|
return buildDateTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static string CurrentYear()
|
||||||
|
{
|
||||||
|
DateTime dtn = DateTime.Now;
|
||||||
|
return dtn.Year.ToString();
|
||||||
|
}
|
||||||
|
|
||||||
|
private static string StartYear()
|
||||||
|
{
|
||||||
|
//string startYear = ((AssemblyCopyrightAttribute)attributes[0]).Copyright;
|
||||||
|
//return startYear.Remove(0, startYear.LastIndexOf(" ") + 1);
|
||||||
|
string startYear = "";
|
||||||
|
if (((AssemblyCopyrightAttribute)attributes[0]).Copyright.Contains("Copyright © "))
|
||||||
|
{
|
||||||
|
startYear = ((AssemblyCopyrightAttribute)attributes[0]).Copyright.Replace("Copyright © ", "");
|
||||||
|
while (startYear.StartsWith(" "))
|
||||||
|
{
|
||||||
|
startYear = startYear.Remove(0, 1);
|
||||||
|
}
|
||||||
|
startYear = startYear.Remove(startYear.IndexOf(" "));
|
||||||
|
return startYear;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
DateTime dtn = DateTime.Now;
|
||||||
|
return dtn.Year.ToString();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private static string GenerateCopyright()
|
||||||
|
{
|
||||||
|
string startYear = StartYear();
|
||||||
|
string currentYear = CurrentYear();
|
||||||
|
|
||||||
|
if (startYear == currentYear)
|
||||||
|
{
|
||||||
|
return ((AssemblyCopyrightAttribute)attributes[0]).Copyright;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
//return String.Concat(((AssemblyCopyrightAttribute)attributes[0]).Copyright, "-", currentYear);
|
||||||
|
return ((AssemblyCopyrightAttribute)attributes[0]).Copyright.Replace(startYear, String.Concat(startYear, "-", currentYear));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Programm-Info
|
||||||
|
/// <summary>
|
||||||
|
/// Contains the name of the program file
|
||||||
|
/// </summary>
|
||||||
|
public static string ProgramName { set; get; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Contains the version of the program file
|
||||||
|
/// </summary>
|
||||||
|
public static string ProgramVersion { set; get; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Contains the copyright notice
|
||||||
|
/// </summary>
|
||||||
|
public static string Copyright { set; get; }
|
||||||
|
|
||||||
|
private void SetProgramInfo()
|
||||||
|
{
|
||||||
|
//Name, Version und Copyright setzen
|
||||||
|
ProgramName = programName;
|
||||||
|
ProgramVersion = programVersion;
|
||||||
|
Copyright = copyright;
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
public Form1()
|
||||||
|
{
|
||||||
|
SetProgramInfo();
|
||||||
|
InitializeComponent();
|
||||||
|
}
|
||||||
|
|
||||||
|
string fileName = "";
|
||||||
|
bool allFiles = false;
|
||||||
|
bool folders = false;
|
||||||
|
bool subFolders = false;
|
||||||
|
bool countOnly = false;
|
||||||
|
|
||||||
|
private void buttonCancel_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
this.Close();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void buttonDelete_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
string undeletableFile = "";
|
||||||
|
List<string> undeletableFiles = new List<string>();
|
||||||
|
string message = "";
|
||||||
|
|
||||||
|
//In diesem Bereich wird das Löschen ausgeführt ---------------------
|
||||||
|
DeleteFileFolder Del = new DeleteFileFolder();
|
||||||
|
// Hier wird das Event abonniert.
|
||||||
|
// Das kann jede Klasse auf die gleiche Weise machen.
|
||||||
|
Del.MyEvent += new DeleteFileFolder.EventDelegate(EventHandler);
|
||||||
|
|
||||||
|
if (checkBoxCountOnly.Checked)
|
||||||
|
{
|
||||||
|
labelDeletableFiles.Text = "Number of deletable Files: " + Del.CountFiles(textBoxFileName.Text, checkBoxSubdirectories.Checked);
|
||||||
|
labelDeletableDirectories.Text = "Number of deletable Directories: \t" + Del.CountDirectories(textBoxFileName.Text);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (radioButtonFileOnly.Checked)
|
||||||
|
{
|
||||||
|
//Dateien löschen
|
||||||
|
if (radioButtonSingleFile.Checked)
|
||||||
|
{
|
||||||
|
undeletableFile = Del.File(textBoxFileName.Text); //Eine einzelen Datei löschen
|
||||||
|
progressBar.Value = 100;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (!checkBoxSubdirectories.Checked)
|
||||||
|
{
|
||||||
|
undeletableFiles = Del.AllFiles(textBoxFileName.Text); //Alle Dateien eines Verzeichnisses löschen
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
undeletableFiles = Del.AllFiles(textBoxFileName.Text, true); //Alle Dateien eines Verzeichnisses und aller Unterverzeichnisse löschen
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
undeletableFiles = Del.AllDirectories(textBoxFileName.Text);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//Nicht löschbare Dateien und Verzeichnisse anzeigen
|
||||||
|
if (undeletableFiles != null & undeletableFiles.Any())
|
||||||
|
{
|
||||||
|
message = "Undeleteable elements:\n";
|
||||||
|
|
||||||
|
foreach (var element in undeletableFiles)
|
||||||
|
{
|
||||||
|
message += element + "\n";
|
||||||
|
}
|
||||||
|
MessageBox.Show(message);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void textBoxFileName_TextChanged(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
ClearProgressBar();
|
||||||
|
fileName = textBoxFileName.Text;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void radioButtonDirectory_CheckedChanged(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
ClearProgressBar();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void radioButtonFileOnly_CheckedChanged(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
ClearProgressBar();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void radioButtonSingleFile_CheckedChanged(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
ClearProgressBar();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void radioButtonAllFiles_CheckedChanged(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
ClearProgressBar();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void checkBoxSubdirectories_CheckedChanged(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
ClearProgressBar();
|
||||||
|
subFolders = !subFolders;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void checkBoxCountOnly_CheckedChanged(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
ClearProgressBar();
|
||||||
|
countOnly = !countOnly;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void ClearProgressBar()
|
||||||
|
{
|
||||||
|
//Setzt die Progressbar auf 0% zurück
|
||||||
|
progressBar.Value = 0;
|
||||||
|
progressBar.Refresh();
|
||||||
|
}
|
||||||
|
|
||||||
|
#region Event Handler
|
||||||
|
void EventHandler(long value)
|
||||||
|
{
|
||||||
|
//Die ProgressBar updaten
|
||||||
|
progressBar.Value = Convert.ToInt32(value);
|
||||||
|
progressBar.Refresh();
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
||||||
120
Test_DeleteFileFolder/Form1.resx
Normal file
120
Test_DeleteFileFolder/Form1.resx
Normal file
@ -0,0 +1,120 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<root>
|
||||||
|
<!--
|
||||||
|
Microsoft ResX Schema
|
||||||
|
|
||||||
|
Version 2.0
|
||||||
|
|
||||||
|
The primary goals of this format is to allow a simple XML format
|
||||||
|
that is mostly human readable. The generation and parsing of the
|
||||||
|
various data types are done through the TypeConverter classes
|
||||||
|
associated with the data types.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
... ado.net/XML headers & schema ...
|
||||||
|
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||||
|
<resheader name="version">2.0</resheader>
|
||||||
|
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||||
|
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||||
|
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||||
|
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||||
|
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||||
|
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||||
|
<comment>This is a comment</comment>
|
||||||
|
</data>
|
||||||
|
|
||||||
|
There are any number of "resheader" rows that contain simple
|
||||||
|
name/value pairs.
|
||||||
|
|
||||||
|
Each data row contains a name, and value. The row also contains a
|
||||||
|
type or mimetype. Type corresponds to a .NET class that support
|
||||||
|
text/value conversion through the TypeConverter architecture.
|
||||||
|
Classes that don't support this are serialized and stored with the
|
||||||
|
mimetype set.
|
||||||
|
|
||||||
|
The mimetype is used for serialized objects, and tells the
|
||||||
|
ResXResourceReader how to depersist the object. This is currently not
|
||||||
|
extensible. For a given mimetype the value must be set accordingly:
|
||||||
|
|
||||||
|
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||||
|
that the ResXResourceWriter will generate, however the reader can
|
||||||
|
read any of the formats listed below.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.binary.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.soap.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||||
|
value : The object must be serialized into a byte array
|
||||||
|
: using a System.ComponentModel.TypeConverter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
-->
|
||||||
|
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||||
|
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||||
|
<xsd:element name="root" msdata:IsDataSet="true">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:choice maxOccurs="unbounded">
|
||||||
|
<xsd:element name="metadata">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="assembly">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:attribute name="alias" type="xsd:string" />
|
||||||
|
<xsd:attribute name="name" type="xsd:string" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="data">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="resheader">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:choice>
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:schema>
|
||||||
|
<resheader name="resmimetype">
|
||||||
|
<value>text/microsoft-resx</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="version">
|
||||||
|
<value>2.0</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="reader">
|
||||||
|
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="writer">
|
||||||
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
</root>
|
||||||
22
Test_DeleteFileFolder/Program.cs
Normal file
22
Test_DeleteFileFolder/Program.cs
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
|
||||||
|
namespace Test_DeleteFileFolder
|
||||||
|
{
|
||||||
|
static class Program
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Der Haupteinstiegspunkt für die Anwendung.
|
||||||
|
/// </summary>
|
||||||
|
[STAThread]
|
||||||
|
static void Main()
|
||||||
|
{
|
||||||
|
Application.EnableVisualStyles();
|
||||||
|
Application.SetCompatibleTextRenderingDefault(false);
|
||||||
|
Application.Run(new Form1());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
36
Test_DeleteFileFolder/Properties/AssemblyInfo.cs
Normal file
36
Test_DeleteFileFolder/Properties/AssemblyInfo.cs
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
using System.Reflection;
|
||||||
|
using System.Runtime.CompilerServices;
|
||||||
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
|
// Allgemeine Informationen über eine Assembly werden über die folgenden
|
||||||
|
// Attribute gesteuert. Ändern Sie diese Attributwerte, um die Informationen zu ändern,
|
||||||
|
// die einer Assembly zugeordnet sind.
|
||||||
|
[assembly: AssemblyTitle("Test_DeleteFileFolder")]
|
||||||
|
[assembly: AssemblyDescription("")]
|
||||||
|
[assembly: AssemblyConfiguration("")]
|
||||||
|
[assembly: AssemblyCompany("")]
|
||||||
|
[assembly: AssemblyProduct("Test_DeleteFileFolder")]
|
||||||
|
[assembly: AssemblyCopyright("Copyright © 2020 by Eugen Höglinger")]
|
||||||
|
[assembly: AssemblyTrademark("")]
|
||||||
|
[assembly: AssemblyCulture("")]
|
||||||
|
|
||||||
|
// Durch Festlegen von ComVisible auf FALSE werden die Typen in dieser Assembly
|
||||||
|
// für COM-Komponenten unsichtbar. Wenn Sie auf einen Typ in dieser Assembly von
|
||||||
|
// COM aus zugreifen müssen, sollten Sie das ComVisible-Attribut für diesen Typ auf "True" festlegen.
|
||||||
|
[assembly: ComVisible(false)]
|
||||||
|
|
||||||
|
// Die folgende GUID bestimmt die ID der Typbibliothek, wenn dieses Projekt für COM verfügbar gemacht wird
|
||||||
|
[assembly: Guid("e3aead97-b7b5-4dde-92e6-06ebb0430676")]
|
||||||
|
|
||||||
|
// Versionsinformationen für eine Assembly bestehen aus den folgenden vier Werten:
|
||||||
|
//
|
||||||
|
// Hauptversion
|
||||||
|
// Nebenversion
|
||||||
|
// Buildnummer
|
||||||
|
// Revision
|
||||||
|
//
|
||||||
|
// Sie können alle Werte angeben oder Standardwerte für die Build- und Revisionsnummern verwenden,
|
||||||
|
// indem Sie "*" wie unten gezeigt eingeben:
|
||||||
|
// [assembly: AssemblyVersion("1.0.*")]
|
||||||
|
[assembly: AssemblyVersion("1.0.*")]
|
||||||
|
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||||
71
Test_DeleteFileFolder/Properties/Resources.Designer.cs
generated
Normal file
71
Test_DeleteFileFolder/Properties/Resources.Designer.cs
generated
Normal file
@ -0,0 +1,71 @@
|
|||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <auto-generated>
|
||||||
|
// Dieser Code wurde von einem Tool generiert.
|
||||||
|
// Laufzeitversion: 4.0.30319.42000
|
||||||
|
//
|
||||||
|
// Änderungen an dieser Datei können fehlerhaftes Verhalten verursachen und gehen verloren, wenn
|
||||||
|
// der Code neu generiert wird.
|
||||||
|
// </auto-generated>
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
namespace Test_DeleteFileFolder.Properties
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Eine stark typisierte Ressourcenklasse zum Suchen von lokalisierten Zeichenfolgen usw.
|
||||||
|
/// </summary>
|
||||||
|
// Diese Klasse wurde von der StronglyTypedResourceBuilder-Klasse
|
||||||
|
// über ein Tool wie ResGen oder Visual Studio automatisch generiert.
|
||||||
|
// Um einen Member hinzuzufügen oder zu entfernen, bearbeiten Sie die .ResX-Datei und führen dann ResGen
|
||||||
|
// mit der Option /str erneut aus, oder erstellen Sie Ihr VS-Projekt neu.
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
|
||||||
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||||
|
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||||
|
internal class Resources
|
||||||
|
{
|
||||||
|
|
||||||
|
private static global::System.Resources.ResourceManager resourceMan;
|
||||||
|
|
||||||
|
private static global::System.Globalization.CultureInfo resourceCulture;
|
||||||
|
|
||||||
|
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||||
|
internal Resources()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gibt die zwischengespeicherte ResourceManager-Instanz zurück, die von dieser Klasse verwendet wird.
|
||||||
|
/// </summary>
|
||||||
|
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||||
|
internal static global::System.Resources.ResourceManager ResourceManager
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
if ((resourceMan == null))
|
||||||
|
{
|
||||||
|
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Test_DeleteFileFolder.Properties.Resources", typeof(Resources).Assembly);
|
||||||
|
resourceMan = temp;
|
||||||
|
}
|
||||||
|
return resourceMan;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Überschreibt die CurrentUICulture-Eigenschaft des aktuellen Threads für alle
|
||||||
|
/// Ressourcenlookups, die diese stark typisierte Ressourcenklasse verwenden.
|
||||||
|
/// </summary>
|
||||||
|
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||||
|
internal static global::System.Globalization.CultureInfo Culture
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return resourceCulture;
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
resourceCulture = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
117
Test_DeleteFileFolder/Properties/Resources.resx
Normal file
117
Test_DeleteFileFolder/Properties/Resources.resx
Normal file
@ -0,0 +1,117 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<root>
|
||||||
|
<!--
|
||||||
|
Microsoft ResX Schema
|
||||||
|
|
||||||
|
Version 2.0
|
||||||
|
|
||||||
|
The primary goals of this format is to allow a simple XML format
|
||||||
|
that is mostly human readable. The generation and parsing of the
|
||||||
|
various data types are done through the TypeConverter classes
|
||||||
|
associated with the data types.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
... ado.net/XML headers & schema ...
|
||||||
|
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||||
|
<resheader name="version">2.0</resheader>
|
||||||
|
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||||
|
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||||
|
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||||
|
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||||
|
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||||
|
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||||
|
<comment>This is a comment</comment>
|
||||||
|
</data>
|
||||||
|
|
||||||
|
There are any number of "resheader" rows that contain simple
|
||||||
|
name/value pairs.
|
||||||
|
|
||||||
|
Each data row contains a name, and value. The row also contains a
|
||||||
|
type or mimetype. Type corresponds to a .NET class that support
|
||||||
|
text/value conversion through the TypeConverter architecture.
|
||||||
|
Classes that don't support this are serialized and stored with the
|
||||||
|
mimetype set.
|
||||||
|
|
||||||
|
The mimetype is used for serialized objects, and tells the
|
||||||
|
ResXResourceReader how to depersist the object. This is currently not
|
||||||
|
extensible. For a given mimetype the value must be set accordingly:
|
||||||
|
|
||||||
|
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||||
|
that the ResXResourceWriter will generate, however the reader can
|
||||||
|
read any of the formats listed below.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.binary.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Serialization.Formatters.Binary.BinaryFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.soap.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||||
|
value : The object must be serialized into a byte array
|
||||||
|
: using a System.ComponentModel.TypeConverter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
-->
|
||||||
|
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||||
|
<xsd:element name="root" msdata:IsDataSet="true">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:choice maxOccurs="unbounded">
|
||||||
|
<xsd:element name="metadata">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="assembly">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:attribute name="alias" type="xsd:string" />
|
||||||
|
<xsd:attribute name="name" type="xsd:string" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="data">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="resheader">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:choice>
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:schema>
|
||||||
|
<resheader name="resmimetype">
|
||||||
|
<value>text/microsoft-resx</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="version">
|
||||||
|
<value>2.0</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="reader">
|
||||||
|
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="writer">
|
||||||
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
</root>
|
||||||
30
Test_DeleteFileFolder/Properties/Settings.Designer.cs
generated
Normal file
30
Test_DeleteFileFolder/Properties/Settings.Designer.cs
generated
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <auto-generated>
|
||||||
|
// This code was generated by a tool.
|
||||||
|
// Runtime Version:4.0.30319.42000
|
||||||
|
//
|
||||||
|
// Changes to this file may cause incorrect behavior and will be lost if
|
||||||
|
// the code is regenerated.
|
||||||
|
// </auto-generated>
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
namespace Test_DeleteFileFolder.Properties
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
|
||||||
|
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
|
||||||
|
{
|
||||||
|
|
||||||
|
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
|
||||||
|
|
||||||
|
public static Settings Default
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return defaultInstance;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
7
Test_DeleteFileFolder/Properties/Settings.settings
Normal file
7
Test_DeleteFileFolder/Properties/Settings.settings
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
<?xml version='1.0' encoding='utf-8'?>
|
||||||
|
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">
|
||||||
|
<Profiles>
|
||||||
|
<Profile Name="(Default)" />
|
||||||
|
</Profiles>
|
||||||
|
<Settings />
|
||||||
|
</SettingsFile>
|
||||||
89
Test_DeleteFileFolder/Test_DeleteFileFolder.csproj
Normal file
89
Test_DeleteFileFolder/Test_DeleteFileFolder.csproj
Normal file
@ -0,0 +1,89 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||||
|
<PropertyGroup>
|
||||||
|
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||||
|
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||||
|
<ProjectGuid>{E3AEAD97-B7B5-4DDE-92E6-06EBB0430676}</ProjectGuid>
|
||||||
|
<OutputType>WinExe</OutputType>
|
||||||
|
<RootNamespace>Test_DeleteFileFolder</RootNamespace>
|
||||||
|
<AssemblyName>Test_DeleteFileFolder</AssemblyName>
|
||||||
|
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
|
||||||
|
<FileAlignment>512</FileAlignment>
|
||||||
|
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||||
|
<Deterministic>false</Deterministic>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||||
|
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||||
|
<DebugSymbols>true</DebugSymbols>
|
||||||
|
<DebugType>full</DebugType>
|
||||||
|
<Optimize>false</Optimize>
|
||||||
|
<OutputPath>bin\Debug\</OutputPath>
|
||||||
|
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||||
|
<ErrorReport>prompt</ErrorReport>
|
||||||
|
<WarningLevel>4</WarningLevel>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||||
|
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||||
|
<DebugType>pdbonly</DebugType>
|
||||||
|
<Optimize>true</Optimize>
|
||||||
|
<OutputPath>bin\Release\</OutputPath>
|
||||||
|
<DefineConstants>TRACE</DefineConstants>
|
||||||
|
<ErrorReport>prompt</ErrorReport>
|
||||||
|
<WarningLevel>4</WarningLevel>
|
||||||
|
</PropertyGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Reference Include="System" />
|
||||||
|
<Reference Include="System.Core" />
|
||||||
|
<Reference Include="System.Xml.Linq" />
|
||||||
|
<Reference Include="System.Data.DataSetExtensions" />
|
||||||
|
<Reference Include="Microsoft.CSharp" />
|
||||||
|
<Reference Include="System.Data" />
|
||||||
|
<Reference Include="System.Deployment" />
|
||||||
|
<Reference Include="System.Drawing" />
|
||||||
|
<Reference Include="System.Net.Http" />
|
||||||
|
<Reference Include="System.Windows.Forms" />
|
||||||
|
<Reference Include="System.Xml" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Compile Include="Form1.cs">
|
||||||
|
<SubType>Form</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Form1.Designer.cs">
|
||||||
|
<DependentUpon>Form1.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Program.cs" />
|
||||||
|
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||||
|
<EmbeddedResource Include="Form1.resx">
|
||||||
|
<DependentUpon>Form1.cs</DependentUpon>
|
||||||
|
</EmbeddedResource>
|
||||||
|
<EmbeddedResource Include="Properties\Resources.resx">
|
||||||
|
<Generator>ResXFileCodeGenerator</Generator>
|
||||||
|
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
</EmbeddedResource>
|
||||||
|
<Compile Include="Properties\Resources.Designer.cs">
|
||||||
|
<AutoGen>True</AutoGen>
|
||||||
|
<DependentUpon>Resources.resx</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<None Include="Properties\Settings.settings">
|
||||||
|
<Generator>SettingsSingleFileGenerator</Generator>
|
||||||
|
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
|
||||||
|
</None>
|
||||||
|
<Compile Include="Properties\Settings.Designer.cs">
|
||||||
|
<AutoGen>True</AutoGen>
|
||||||
|
<DependentUpon>Settings.settings</DependentUpon>
|
||||||
|
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
||||||
|
</Compile>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<None Include="App.config" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="..\DeleteFileFolder\DeleteFileFolder.csproj">
|
||||||
|
<Project>{9e1e89be-2500-4b00-8179-6fced03f07c9}</Project>
|
||||||
|
<Name>DeleteFileFolder</Name>
|
||||||
|
</ProjectReference>
|
||||||
|
</ItemGroup>
|
||||||
|
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||||
|
</Project>
|
||||||
BIN
Test_DeleteFileFolder/bin/Debug/DeleteFileFolder.dll
Normal file
BIN
Test_DeleteFileFolder/bin/Debug/DeleteFileFolder.dll
Normal file
Binary file not shown.
BIN
Test_DeleteFileFolder/bin/Debug/DeleteFileFolder.pdb
Normal file
BIN
Test_DeleteFileFolder/bin/Debug/DeleteFileFolder.pdb
Normal file
Binary file not shown.
BIN
Test_DeleteFileFolder/bin/Debug/Test_DeleteFileFolder.exe
Normal file
BIN
Test_DeleteFileFolder/bin/Debug/Test_DeleteFileFolder.exe
Normal file
Binary file not shown.
@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
|
<configuration>
|
||||||
|
<startup>
|
||||||
|
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
|
||||||
|
</startup>
|
||||||
|
</configuration>
|
||||||
BIN
Test_DeleteFileFolder/bin/Debug/Test_DeleteFileFolder.pdb
Normal file
BIN
Test_DeleteFileFolder/bin/Debug/Test_DeleteFileFolder.pdb
Normal file
Binary file not shown.
@ -0,0 +1,4 @@
|
|||||||
|
// <autogenerated />
|
||||||
|
using System;
|
||||||
|
using System.Reflection;
|
||||||
|
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")]
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1 @@
|
|||||||
|
c4e283fec1f90225d9f29e25f0d7741febda89d6
|
||||||
@ -0,0 +1,13 @@
|
|||||||
|
H:\Programmieren\Git-Repository\VisualStudio\2017\_DLL\DeleteFileFolder.git\Test_DeleteFileFolder\obj\Debug\Test_DeleteFileFolder.csprojAssemblyReference.cache
|
||||||
|
H:\Programmieren\Git-Repository\VisualStudio\2017\_DLL\DeleteFileFolder.git\Test_DeleteFileFolder\obj\Debug\Test_DeleteFileFolder.Form1.resources
|
||||||
|
H:\Programmieren\Git-Repository\VisualStudio\2017\_DLL\DeleteFileFolder.git\Test_DeleteFileFolder\obj\Debug\Test_DeleteFileFolder.Properties.Resources.resources
|
||||||
|
H:\Programmieren\Git-Repository\VisualStudio\2017\_DLL\DeleteFileFolder.git\Test_DeleteFileFolder\obj\Debug\Test_DeleteFileFolder.csproj.GenerateResource.cache
|
||||||
|
H:\Programmieren\Git-Repository\VisualStudio\2017\_DLL\DeleteFileFolder.git\Test_DeleteFileFolder\obj\Debug\Test_DeleteFileFolder.csproj.CoreCompileInputs.cache
|
||||||
|
H:\Programmieren\Git-Repository\VisualStudio\2017\_DLL\DeleteFileFolder.git\Test_DeleteFileFolder\bin\Debug\Test_DeleteFileFolder.exe.config
|
||||||
|
H:\Programmieren\Git-Repository\VisualStudio\2017\_DLL\DeleteFileFolder.git\Test_DeleteFileFolder\bin\Debug\Test_DeleteFileFolder.exe
|
||||||
|
H:\Programmieren\Git-Repository\VisualStudio\2017\_DLL\DeleteFileFolder.git\Test_DeleteFileFolder\bin\Debug\Test_DeleteFileFolder.pdb
|
||||||
|
H:\Programmieren\Git-Repository\VisualStudio\2017\_DLL\DeleteFileFolder.git\Test_DeleteFileFolder\bin\Debug\DeleteFileFolder.dll
|
||||||
|
H:\Programmieren\Git-Repository\VisualStudio\2017\_DLL\DeleteFileFolder.git\Test_DeleteFileFolder\bin\Debug\DeleteFileFolder.pdb
|
||||||
|
H:\Programmieren\Git-Repository\VisualStudio\2017\_DLL\DeleteFileFolder.git\Test_DeleteFileFolder\obj\Debug\Test_DeleteFileFolder.csproj.CopyComplete
|
||||||
|
H:\Programmieren\Git-Repository\VisualStudio\2017\_DLL\DeleteFileFolder.git\Test_DeleteFileFolder\obj\Debug\Test_DeleteFileFolder.exe
|
||||||
|
H:\Programmieren\Git-Repository\VisualStudio\2017\_DLL\DeleteFileFolder.git\Test_DeleteFileFolder\obj\Debug\Test_DeleteFileFolder.pdb
|
||||||
Binary file not shown.
Binary file not shown.
BIN
Test_DeleteFileFolder/obj/Debug/Test_DeleteFileFolder.exe
Normal file
BIN
Test_DeleteFileFolder/obj/Debug/Test_DeleteFileFolder.exe
Normal file
Binary file not shown.
BIN
Test_DeleteFileFolder/obj/Debug/Test_DeleteFileFolder.pdb
Normal file
BIN
Test_DeleteFileFolder/obj/Debug/Test_DeleteFileFolder.pdb
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user