Skip to content

Commit

Permalink
0.142
Browse files Browse the repository at this point in the history
  • Loading branch information
derco0n committed Nov 22, 2018
1 parent 4e34f5a commit 578d265
Show file tree
Hide file tree
Showing 61 changed files with 449 additions and 114 deletions.
10 changes: 10 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,13 @@
################################################################################

/.vs/CSearch
/Co0nSearchC/bin/Debug/Speedtest1
/Co0nSearchC/bin/Debug/Speedtest2
/Co0nSearchC/bin/Debug/Speedtest3
/Co0nSearchC/bin/Debug
/Co0nSearchC/bin/Release/app.publish
/Co0nSearchC/bin/Release/Co0nUtilZ.pdb
/Co0nSearchC/bin/Release/CSearch.application
/Co0nSearchC/bin/Release/CSearch.exe.config
/Co0nSearchC/bin/Release/CSearch.exe.manifest
/Co0nSearchC/bin/Release/CSearch.pdb
24 changes: 2 additions & 22 deletions CSearch.sln
Original file line number Diff line number Diff line change
@@ -1,49 +1,29 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
# Visual Studio Express 15 for Windows Desktop
VisualStudioVersion = 15.0.27703.2026
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CSearch", "Co0nSearchC\CSearch.csproj", "{C965BC14-83D0-40D5-A055-3C2BE8210691}"
ProjectSection(ProjectDependencies) = postProject
{4DE7935F-7954-4329-B40A-E0F03762D696} = {4DE7935F-7954-4329-B40A-E0F03762D696}
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Co0nUtilZ", "..\Co0nUtilZ\derco0n\coonutils\Co0nUtilZ\Co0nUtilZ.csproj", "{4DE7935F-7954-4329-B40A-E0F03762D696}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Co0nUtilZ", "..\..\..\..\..\mitgebrachtes\Entwicklungen\C#\Co0nUtilZ\Co0nUtilZ\Co0nUtilZ.csproj", "{4DE7935F-7954-4329-B40A-E0F03762D696}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Debug|x64 = Debug|x64
Release|Any CPU = Release|Any CPU
Release|x64 = Release|x64
x64|Any CPU = x64|Any CPU
x64|x64 = x64|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{C965BC14-83D0-40D5-A055-3C2BE8210691}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C965BC14-83D0-40D5-A055-3C2BE8210691}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C965BC14-83D0-40D5-A055-3C2BE8210691}.Debug|x64.ActiveCfg = Debug|x64
{C965BC14-83D0-40D5-A055-3C2BE8210691}.Debug|x64.Build.0 = Debug|x64
{C965BC14-83D0-40D5-A055-3C2BE8210691}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C965BC14-83D0-40D5-A055-3C2BE8210691}.Release|Any CPU.Build.0 = Release|Any CPU
{C965BC14-83D0-40D5-A055-3C2BE8210691}.Release|x64.ActiveCfg = Release|x64
{C965BC14-83D0-40D5-A055-3C2BE8210691}.Release|x64.Build.0 = Release|x64
{C965BC14-83D0-40D5-A055-3C2BE8210691}.x64|Any CPU.ActiveCfg = Debug|Any CPU
{C965BC14-83D0-40D5-A055-3C2BE8210691}.x64|Any CPU.Build.0 = Debug|Any CPU
{C965BC14-83D0-40D5-A055-3C2BE8210691}.x64|x64.ActiveCfg = Debug|Any CPU
{C965BC14-83D0-40D5-A055-3C2BE8210691}.x64|x64.Build.0 = Debug|Any CPU
{4DE7935F-7954-4329-B40A-E0F03762D696}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4DE7935F-7954-4329-B40A-E0F03762D696}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4DE7935F-7954-4329-B40A-E0F03762D696}.Debug|x64.ActiveCfg = Debug|Any CPU
{4DE7935F-7954-4329-B40A-E0F03762D696}.Debug|x64.Build.0 = Debug|Any CPU
{4DE7935F-7954-4329-B40A-E0F03762D696}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4DE7935F-7954-4329-B40A-E0F03762D696}.Release|Any CPU.Build.0 = Release|Any CPU
{4DE7935F-7954-4329-B40A-E0F03762D696}.Release|x64.ActiveCfg = Release|Any CPU
{4DE7935F-7954-4329-B40A-E0F03762D696}.Release|x64.Build.0 = Release|Any CPU
{4DE7935F-7954-4329-B40A-E0F03762D696}.x64|Any CPU.ActiveCfg = x64|Any CPU
{4DE7935F-7954-4329-B40A-E0F03762D696}.x64|Any CPU.Build.0 = x64|Any CPU
{4DE7935F-7954-4329-B40A-E0F03762D696}.x64|x64.ActiveCfg = x64|Any CPU
{4DE7935F-7954-4329-B40A-E0F03762D696}.x64|x64.Build.0 = x64|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
14 changes: 8 additions & 6 deletions Co0nSearchC/CSearch.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -23,21 +23,22 @@
<UpdateRequired>false</UpdateRequired>
<MapFileExtensions>true</MapFileExtensions>
<AutorunEnabled>true</AutorunEnabled>
<ApplicationRevision>1</ApplicationRevision>
<ApplicationVersion>0.1.2.1</ApplicationVersion>
<ApplicationRevision>2</ApplicationRevision>
<ApplicationVersion>0.1.4.2</ApplicationVersion>
<UseApplicationTrust>false</UseApplicationTrust>
<PublishWizardCompleted>true</PublishWizardCompleted>
<BootstrapperEnabled>true</BootstrapperEnabled>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>x64</PlatformTarget>
<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>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
Expand All @@ -47,6 +48,7 @@
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup>
<SignAssembly>false</SignAssembly>
Expand Down Expand Up @@ -82,10 +84,10 @@
<DefineConstants>TRACE</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x64</PlatformTarget>
<PlatformTarget>AnyCPU</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>true</Prefer32Bit>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup>
<ApplicationIcon>logo_small.ico</ApplicationIcon>
Expand Down Expand Up @@ -174,7 +176,7 @@
<Content Include="logo_small.ico" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\Co0nUtilZ\derco0n\coonutils\Co0nUtilZ\Co0nUtilZ.csproj">
<ProjectReference Include="..\..\..\..\..\..\mitgebrachtes\Entwicklungen\C#\Co0nUtilZ\Co0nUtilZ\Co0nUtilZ.csproj">
<Project>{4de7935f-7954-4329-b40a-e0f03762d696}</Project>
<Name>Co0nUtilZ</Name>
</ProjectReference>
Expand Down
3 changes: 3 additions & 0 deletions Co0nSearchC/CSearch.csproj.user
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,7 @@
<PropertyGroup>
<EnableSecurityDebugging>false</EnableSecurityDebugging>
</PropertyGroup>
<PropertyGroup>
<ReferencePath>C:\mitgebrachtes\Entwicklungen\C#\Co0nUtilZ\</ReferencePath>
</PropertyGroup>
</Project>
20 changes: 12 additions & 8 deletions Co0nSearchC/C_Settings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,17 +45,16 @@ public List<String> BaseDirs
/// </summary>
private void dropAllBaseDirs()
{
foreach (String Value in this._baseDirs)
List<String> result = this._regHelper.ListValues(this._Instancename);

foreach (String res in result)
{
try
{
this._regHelper.dropValue(this._Instancename, Value);
}
catch (Exception ex)
if (res.StartsWith(this._BaseDirPrefix)) // Wenn der gefundene Schlüssel mit dem gesuchten Präfix übereinstimmt.
{

this._regHelper.dropValue(this._Instancename, res);
}
}

}

/// <summary>
Expand Down Expand Up @@ -135,11 +134,16 @@ public void getAllBaseDirs()
/// </summary>
public void putAllBaseDirs()
{

if (this._baseDirs.Count > 0)
{
this.dropAllBaseDirs();
this._baseDirs.Sort();
this.dropAllBaseDirs(); //... und dort löschen.

//Anschließend die aktuelle definierten, zwischengepseicherten in die Registry schreiben.
int counter=0;
foreach (String Value in this._baseDirs)
//foreach (String Value in currentbasedirs)
{
this._regHelper.WriteSettingToRegistry(this._Instancename, this._BaseDirPrefix+counter.ToString(), Value);
counter++;
Expand Down
2 changes: 1 addition & 1 deletion Co0nSearchC/F_About.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public F_About()
InitializeComponent();
}

private String abouttext = Program.APPNAME + " Version: " + Program.VERSION.ToString() + " ("+Program.VERSIONDATE+")" + "\r\n\r\nDieses Programm dient der rekursiven Suche nach Dateien und Ordnern in verschiedenen Basisordnern.\r\nDas Ziel ist es, eine schnelle Suche in verschiedenenn Ordnerstrukturen gleichzeitig zu ermöglichen\r\nund dabei ein besseres Handling als die integrierte Windowssuche zu bieten.\r\n\r\nDies ist freie Software, welche unter der GPLv3 lizenziert ist.\r\n\r\nQuellcode unter:\r\nhttps://github.com/derco0n/CSearch";
private String abouttext = Program.APPNAME + " Version: " + Program.VERSION.ToString() + " ("+Program.VERSIONDATE+")" + "\r\n\r\nCSearch: dient der rekursiven multithreaded Suche nach Dateien und Ordnern in verschiedenen Basisordnern.\r\nDas Ziel ist es, eine schnelle Suche in verschiedenenn Ordnerstrukturen gleichzeitig zu ermöglichen\r\nund dabei ein besseres Handling als die integrierte Windowssuche zu bieten.\r\n\r\nCopyright (C) <2018> <Dennis Marx>\r\n\r\n This program is free software: you can redistribute it and/or modify\r\n it under the terms of the GNU General Public License as published by\r\n the Free Software Foundation, either version 3 of the License, or\r\n (at your option) any later version.\r\n\r\n This program is distributed in the hope that it will be useful,\r\n but WITHOUT ANY WARRANTY; without even the implied warranty of\r\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r\n GNU General Public License for more details.\r\n\r\n You should have received a copy of the GNU General Public License\r\n along with this program. If not, see <https://www.gnu.org/licenses/>.\r\n\r\nQuellcode unter:\r\nhttps://github.com/derco0n/CSearch";

private void F_About_Load(object sender, EventArgs e)
{
Expand Down
59 changes: 38 additions & 21 deletions Co0nSearchC/F_Main.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ public F_Main()
private int _items = 0;
private int _runningthreads = 0;



private void HandleFolderProcessed(object sender)
{// Aktualisiert die Anzeige der berabeiteten Ordner
int processedfolders = 0;
Expand All @@ -55,18 +57,28 @@ private void HandleItemsFound(object sender, List<C_FilesIndexerElement> newitem
this.updateFileListAndLabels(false, newitems, "Bisher " + processedfolders + " Ordner durchsucht -> " + this._items.ToString() + " Elemente gefunden...", "Suche läuft (in " + this._runningthreads.ToString() + " Basisordnern):");
}

private void HandleSearchAborted(object sender)
{//Der Thread des Suchers wurde abgebrochen...
this._runningthreads--;
}

private void HandleSearchfinished(object sender, String msg)
{ // Wird aufgerufen wenn ein Sucher fertig ist.

this._runningthreads -= 1;
this._runningthreads--;


Boolean stillonerunning = false; //Mindestens ein Sucher läuft noch
//prüfen ob noch mindestens ein Sucher läuft...
//prüfen ob noch mindestens ein Sucher läuft...
String state = "";
if (this._runningthreads > 0)
{
stillonerunning = true;
String state = "Suche läuft(in " + this._runningthreads.ToString() + " Basisordnern):";
state = "Suche läuft(in " + this._runningthreads.ToString() + " Basisordnern):";
}
else
{
state = "Suche beendet - Bereite Ergebnis auf:";
}


Expand All @@ -76,7 +88,8 @@ private void HandleSearchfinished(object sender, String msg)
this.SearchEnded = DateTime.Now;
TimeSpan ts = this.SearchEnded - this.SearchStarted;

String state = "Suche beendet - Ausführungsdauer (" + ts.TotalSeconds.ToString() + " Sekunden):";
state = "Suche beendet - Ausführungsdauer (" + Math.Round(ts.TotalSeconds, 2).ToString() + " Sekunden):";
//state = "Suche beendet - Ausführungsdauer (" + ts.TotalSeconds.ToString() + " Sekunden):";

int processedfolders = 0;

Expand All @@ -101,6 +114,8 @@ private void HandleSearchfinished(object sender, String msg)
private void HandleSearchStarted(object sender, String msg)
{
this.SearchStarted = DateTime.Now;

this._runningthreads++;
}

delegate void updateFileListAndLabelsCallback(bool clearlist, List<C_FilesIndexerElement> items, string resultmsg, string statemsg);
Expand Down Expand Up @@ -165,11 +180,12 @@ private void updateCountLabel(string msg)
private void startSearch(String searchfor)
{
this.lstFiles.Items.Clear();
this._items = 0;

foreach (C_FilesIndexer indexer in this.indexers)
{

this._runningthreads += 1;
//this._runningthreads += 1;
indexer.FindItems(searchfor, true);
}

Expand Down Expand Up @@ -215,6 +231,7 @@ private void intializeIndexers()
indexer.OnSearchFinished += this.HandleSearchfinished;
indexer.OnSearchStarted += this.HandleSearchStarted;
indexer.OnFolderProcessed += this.HandleFolderProcessed;
indexer.OnSearchAborted += this.HandleSearchAborted;
}

}
Expand All @@ -236,14 +253,19 @@ private void lstFiles_SelectedIndexChanged(object sender, EventArgs e)

private void StopSeachers()
{//Beendet laufende Suchen

this.updateCountLabel("Bisher keine Daten.");
this.updateStateLabel("Suche inaktiv: Bitte mindestens 2 Zeichen eingeben.");

if (this.indexers != null)
{
this._runningthreads = 0;
//this._runningthreads = 0;
foreach (C_FilesIndexer indexer in this.indexers)
{
if (indexer != null)
{
indexer.StopSearch();
//this._runningthreads -= 1;
}
}

Expand All @@ -270,31 +292,25 @@ private void DeRegisterEvents()
private void txtSearch_TextChanged(object sender, EventArgs e)
{
this.StopSeachers();


if (this.txtSearch.Text.Length > 3)
{
this.lblCount.Text = "Neue Suche...";
if (this.txtSearch.Text.Length >= 2)
{
this.updateCountLabel("Bisher keine Daten.");
this.updateStateLabel("Suche beginnt...");
this.startSearch(this.txtSearch.Text);
}

}


private void beendenToolStripMenuItem_Click(object sender, EventArgs e)
{
MessageBoxButtons buttons = MessageBoxButtons.YesNo;
DialogResult result;

result = MessageBox.Show("Programm wirklich beeenden?", "Beenden?", buttons);

if (result == System.Windows.Forms.DialogResult.Yes)
{
this.StopSeachers();
this.Close();
}
this.Close();
}

private void Form1_FormClosing(object sender, FormClosingEventArgs e)
{
{// Catches the Form closing Event to ask the user to really quit.
MessageBoxButtons buttons = MessageBoxButtons.YesNo;
DialogResult result;

Expand Down Expand Up @@ -324,8 +340,9 @@ private void openSettingsDialog()
//SettingsForm.Show(); // Als separate Form. Andere Forms können gleichzeitig bedient werden.

if (this.ShouldReInitializeAfterSettingsChange)
{
{
this.intializeIndexers(); //Sucher neu intialisieren
this.txtSearch.Text = ""; //Reset Textfield, due to Basefolder change
}

}
Expand Down
5 changes: 5 additions & 0 deletions Co0nSearchC/F_Settings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,11 @@ private void F_Settings_FormClosing(object sender, FormClosingEventArgs e)
{
this.caller.settings.putAllBaseDirs(); //Änderungen wirklich in die Registry schreiben
this.caller.ShouldReInitializeAfterSettingsChange = true;

}
else
{
this.caller.settings.getAllBaseDirs(); //Ursprünglichen Stand aus der Registry neu laden.
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions Co0nSearchC/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ namespace Co0nSearchC
public static class Program
{
public static String APPNAME = "CSearch";
public static float VERSION = 0.121f;
public static String VERSIONDATE = "20181120";
public static float VERSION = 0.142f;
public static String VERSIONDATE = "20181122";
/// <summary>
/// Der Haupteinstiegspunkt für die Anwendung.
/// </summary>
Expand Down
Binary file added Co0nSearchC/bin/Release/CSearch.exe
Binary file not shown.
Binary file added Co0nSearchC/bin/Release/Co0nUtilZ.dll
Binary file not shown.
Binary file not shown.
12 changes: 12 additions & 0 deletions Co0nSearchC/obj/Debug/CSearch.TrustInfo.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?><trustInfo xmlns="urn:schemas-microsoft-com:asm.v2" xmlns:asmv2="urn:schemas-microsoft-com:asm.v2"><security><applicationRequestMinimum><PermissionSet version="1" class="System.Security.NamedPermissionSet" Name="LocalIntranet" Description="Default rights given to applications on the local intranet" Unrestricted="true" ID="Custom" SameSite="site" /><defaultAssemblyRequest permissionSetReference="Custom" /></applicationRequestMinimum><requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3"><!-- UAC-Manifestoptionen
Wenn Sie die Ebene der Benutzerkontensteuerung für Windows ändern möchten, ersetzen Sie den
Knoten "requestedExecutionLevel" wie folgt.
<requestedExecutionLevel level="asInvoker" uiAccess="false" />
<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />
<requestedExecutionLevel level="highestAvailable" uiAccess="false" />
Durch Angabe des Elements "requestedExecutionLevel" wird die Datei- und Registrierungsvirtualisierung deaktiviert.
Entfernen Sie dieses Element, wenn diese Virtualisierung aus Gründen der Abwärtskompatibilität
für die Anwendung erforderlich ist.
--><requestedExecutionLevel level="asInvoker" uiAccess="false" /></requestedPrivileges></security></trustInfo>
Loading

0 comments on commit 578d265

Please sign in to comment.