Skip to content

Commit

Permalink
Version 0.162 (20190927):
Browse files Browse the repository at this point in the history
=================
fixed Bugs:
Setting Labels to green when all (not just one) searchers are finished.

Added:
Massive speedup (about 295%) due to disabled Preview Preview toggleable in menu
  • Loading branch information
derco0n committed Sep 27, 2019
1 parent 587f464 commit 4789e9f
Show file tree
Hide file tree
Showing 23 changed files with 107 additions and 51 deletions.
34 changes: 13 additions & 21 deletions Co0nSearchC/F_Main.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

87 changes: 73 additions & 14 deletions Co0nSearchC/F_Main.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,36 @@ namespace CSearch
{
public partial class F_Main : Form
{
public F_Main(bool showhiddenfiles)
public F_Main(bool showhiddenfiles, bool preview)
{
this._showhiddenfiles = showhiddenfiles;
this._showhiddenfiles = showhiddenfiles;
this._showpreview = preview;
this.txtSearch = new Co0n_GUI.C_HintTextbox();
InitializeComponent();

//
// txtSearch
//
this.txtSearch.Dock = System.Windows.Forms.DockStyle.Fill;
this.txtSearch.ForeColor = System.Drawing.Color.Gray;
this.txtSearch.Location = new System.Drawing.Point(3, 16);
this.txtSearch.Margin = new System.Windows.Forms.Padding(2);
this.txtSearch.Name = "txtSearch";
this.txtSearch.PlaceHolderText = "Bitte mindestens zwei Zeichen eingeben und mit Enter bestätigen.";
this.txtSearch.Size = new System.Drawing.Size(1119, 20);
this.txtSearch.TabIndex = 1;
this.txtSearch.Text = "Bitte mindestens zwei Zeichen eingeben und mit Enter bestätigen.";
this.txtSearch.TextChanged += new System.EventHandler(this.txtSearch_TextChanged);
this.txtSearch.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txtSearch_KeyDown);
this.txtSearch.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.txtSearch_KeyPress);
this.grpSearch.Controls.Add(this.txtSearch);
}



private Color OriginalBackgroundColor;
private bool _showhiddenfiles = false; // Find hiddenfiles too...
private bool _showpreview = false;

public C_Settings settings;
private List<C_FilesIndexer> indexers = new List<C_FilesIndexer>();
Expand All @@ -36,7 +58,36 @@ public F_Main(bool showhiddenfiles)
private int _runningthreads = 0;

// private List<C_FilesIndexerElement> filesfound = new List<C_FilesIndexerElement>(); //DEBUG



private void setTitle() {
this.Text = Program.APPNAME + " Version: " + Program.VERSION.ToString() + " (" + Program.VERSIONDATE + ")";
if (this._showhiddenfiles)
{
this.Text += " (include hidden)";
}
if (this._showpreview)
{
this.Text += " (showing preview)";
}
else
{
this.Text += " (fast mode - no preview)";
}

}

private void setMenuPreview() {
if (this._showpreview)
{
this.vorschauToolStripMenuItem.Text = "Vorschau abschalten (schneller Modus)...";
}
else
{
this.vorschauToolStripMenuItem.Text = "Vorschau einschalten (langsam)...";
}

}

private void HandleFolderProcessed(object sender)
{// Aktualisiert die Anzeige der berabeiteten Ordner
Expand Down Expand Up @@ -157,11 +208,11 @@ private void HandleSearchfinished(object sender, String msg)

this.updateFileListAndLabels(true, totalitemsfound, result, state);


//Suchinfo's einfärben
this.lblState.BackColor = Color.LightGreen;
this.lblCount.BackColor = Color.LightGreen;
}
//Suchinfo's einfärben
this.lblState.BackColor = Color.LightGreen;
this.lblCount.BackColor = Color.LightGreen;


}

Expand Down Expand Up @@ -192,8 +243,11 @@ private void updateFileListAndLabels(bool clearlist, List<C_FilesIndexerElement>
this.lstFiles.Items.Clear();
}

this.lstFiles.Items.AddRange(items.ToArray());
this.lstFiles.ClearSelected();
if (this._showpreview || clearlist)
{//Wenn die Suche beendet ist oder der User Suchergebnisse angezeigt haben möchte
this.lstFiles.Items.AddRange(items.ToArray());
this.lstFiles.ClearSelected();
}

//Labels aktualisieren
this.updateCountLabel(resultmsg);
Expand Down Expand Up @@ -311,11 +365,8 @@ private void Form1_Load(object sender, EventArgs e)
intializeIndexers();
this.OriginalBackgroundColor = this.lblState.BackColor;

this.Text = Program.APPNAME + " Version: " + Program.VERSION.ToString() + " (" + Program.VERSIONDATE + ")";
if (this._showhiddenfiles)
{
this.Text += " (include hidden)";
}
this.setTitle();
this.setMenuPreview();
}

private void lstFiles_SelectedIndexChanged(object sender, EventArgs e)
Expand Down Expand Up @@ -528,6 +579,7 @@ private void changelogToolStripMenuItem_Click(object sender, EventArgs e)
{
String title = "Changelog:";
String msg = "";
msg += "Version 0.162 (20190927):\r\n=========================\r\n- fixed Bugs:\r\n\t- Setting Labels to green when all (not just one) searchers are finished.\r\n- Added:\r\n\t- Massive speedup (about 295%) due to disabled Preview\r\n\t- Preview toggleable in menu\r\n\r\n";
msg += "Version 0.160 (20190904):\r\n=========================\r\n- Added:\r\n\t- Averange folders per second\r\n\t- Colored Statustext while searching\r\n\t- Highlighting Listelement while pointing with Mouse\r\n\r\n";
msg += "Version 0.151 (20181126):\r\n=========================\r\n- fixed Bugs:\r\n\t- Stopping searchers (e.g. when changing folders) and waiting for them to finish \r\n\r\n";
msg += "Version 0.150 (20181126):\r\n=========================\r\n- Added:\r\n\t- En-/Disabling of Searchdirectories\r\n- fixed Bugs:\r\n\t- Fixed wrong namespaces in source code\r\n\r\n";
Expand All @@ -536,6 +588,13 @@ private void changelogToolStripMenuItem_Click(object sender, EventArgs e)
AboutForm.ShowDialog();
}

private void vorschauToolStripMenuItem_Click(object sender, EventArgs e)
{
this._showpreview = !this._showpreview; //Toggle Preview on/off
this.setTitle();
this.setMenuPreview();
}

private void lblCount_Click(object sender, EventArgs e)
{

Expand Down
15 changes: 10 additions & 5 deletions Co0nSearchC/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,25 +10,30 @@ public static class Program
{

public static String APPNAME = "CSearch";
public static float VERSION = 0.160f;
public static String VERSIONDATE = "20190904";
public static float VERSION = 0.162f;
public static String VERSIONDATE = "20190927";
/// <summary>
/// Der Haupteinstiegspunkt für die Anwendung.
/// </summary>
[STAThread]
static void Main(string[] args)
{
bool includehiddenfiles = false;
bool preview = false;

if (args.Contains("--hidden"))
{//this Parameter includes files and folders with "hidden-flag" in search result...
includehiddenfiles = true;
}

}

if (args.Contains("--preview"))
{//this Parameter includes files and folders with "hidden-flag" in search result...
preview = true;
}

Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new F_Main(includehiddenfiles));
Application.Run(new F_Main(includehiddenfiles, preview));
}
}
}
Binary file modified Co0nSearchC/bin/Release/CSearch.exe
Binary file not shown.
Binary file modified Co0nSearchC/bin/Release/Co0nUtilZ.dll
Binary file not shown.
Binary file modified Co0nSearchC/bin/Release/Co0n_GUI.dll
Binary file not shown.
Binary file modified Co0nSearchC/bin/Release/Co0n_GUI.pdb
Binary file not shown.
2 changes: 1 addition & 1 deletion Co0nSearchC/obj/Debug/CSearch.application
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
</dsig:Transforms>
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" />
<dsig:DigestValue>NkfZvzALoFK3mYSIsIZwCdmW6XmVAk7JBRbx6UbGDa4=</dsig:DigestValue>
<dsig:DigestValue>cAV7PQsCQk4eF1BPI/dPP/Tyyd3KeBY9n133l8BF62U=</dsig:DigestValue>
</hash>
</dependentAssembly>
</dependency>
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
31536de266d0f63ec8fd8dd74a6f4c25eea39566
63bdd528a6d5a804eca4fd4ab71f4f93ada18fe6
Binary file modified Co0nSearchC/obj/Debug/CSearch.csproj.GenerateResource.cache
Binary file not shown.
Binary file modified Co0nSearchC/obj/Debug/CSearch.csprojAssemblyReference.cache
Binary file not shown.
Binary file modified Co0nSearchC/obj/Debug/CSearch.exe
Binary file not shown.
6 changes: 3 additions & 3 deletions Co0nSearchC/obj/Debug/CSearch.exe.manifest
Original file line number Diff line number Diff line change
Expand Up @@ -62,19 +62,19 @@
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
</dsig:Transforms>
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" />
<dsig:DigestValue>8UHLgz8Ah4U/SFspIOdZWXweWf6u1qh0lvJJOdYm7wc=</dsig:DigestValue>
<dsig:DigestValue>bv9FN3c65pZgtUZ/SaxDXj+HRBkEX5WUmHRwyE68hz0=</dsig:DigestValue>
</hash>
</dependentAssembly>
</dependency>
<dependency>
<dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="CSearch.exe" size="70656">
<dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="CSearch.exe" size="72192">
<assemblyIdentity name="CSearch" version="0.1.5.1" language="neutral" processorArchitecture="msil" />
<hash>
<dsig:Transforms>
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
</dsig:Transforms>
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" />
<dsig:DigestValue>iyykc3RRAaDvKwz7x7XG3uUGM47Iz/VJDztgyPkjPGs=</dsig:DigestValue>
<dsig:DigestValue>VaFteHfcRkHVLoypjqbEcbhRiEUxY3tq9XfhC17QBi0=</dsig:DigestValue>
</hash>
</dependentAssembly>
</dependency>
Expand Down
Binary file modified Co0nSearchC/obj/Debug/CSearch.pdb
Binary file not shown.
Binary file modified Co0nSearchC/obj/Debug/DesignTimeResolveAssemblyReferences.cache
Binary file not shown.
2 changes: 1 addition & 1 deletion Co0nSearchC/obj/Release/CSearch.application
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
</dsig:Transforms>
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" />
<dsig:DigestValue>ueWYDXsgfOuAvGdrVwZLrrr8Zfeu7mA/Ak0zLO2fiTQ=</dsig:DigestValue>
<dsig:DigestValue>FrIzUzMgkGnK5kJOY7gPsyi6FpAGgZOktsYWDTrGmcI=</dsig:DigestValue>
</hash>
</dependentAssembly>
</dependency>
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
6de84d8b29f9a2271451c3f6b7a78b951cb6e657
315103f1776397619e93cba191b830da0d2b7f33
Binary file modified Co0nSearchC/obj/Release/CSearch.csproj.GenerateResource.cache
Binary file not shown.
Binary file modified Co0nSearchC/obj/Release/CSearch.csprojAssemblyReference.cache
Binary file not shown.
Binary file modified Co0nSearchC/obj/Release/CSearch.exe
Binary file not shown.
8 changes: 4 additions & 4 deletions Co0nSearchC/obj/Release/CSearch.exe.manifest
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
</dsig:Transforms>
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" />
<dsig:DigestValue>ZPlhvdTruoZWH8E7FVbmhYebCwXOmPW5gdxT1j5hdCU=</dsig:DigestValue>
<dsig:DigestValue>MToRJf+fLzZ6pYoLJmUXub5/M/OF+kPSzhZA2j5MYak=</dsig:DigestValue>
</hash>
</dependentAssembly>
</dependency>
Expand All @@ -62,19 +62,19 @@
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
</dsig:Transforms>
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" />
<dsig:DigestValue>GNbATPjKEbYx6HiFVgAwIBND/1GbETpMF0AzafdNZ8Y=</dsig:DigestValue>
<dsig:DigestValue>QHKdjML65LuddvOWXrxKJtUFXmr85zbvGLGlwhvDCZc=</dsig:DigestValue>
</hash>
</dependentAssembly>
</dependency>
<dependency>
<dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="CSearch.exe" size="69120">
<dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="CSearch.exe" size="70656">
<assemblyIdentity name="CSearch" version="0.1.5.1" language="neutral" processorArchitecture="msil" />
<hash>
<dsig:Transforms>
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
</dsig:Transforms>
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" />
<dsig:DigestValue>GANnhwNUT/iwNbxaVg4VVD2y6A2HERGk0qo5iwtV/JY=</dsig:DigestValue>
<dsig:DigestValue>3tafCRlsaVi/nzWUelrAxj8NKU1YtUOafExTPYWuvg4=</dsig:DigestValue>
</hash>
</dependentAssembly>
</dependency>
Expand Down
Binary file modified Co0nSearchC/obj/Release/CSearch.pdb
Binary file not shown.
Binary file modified Installer/Release/CSearch_0.160.0.msi
Binary file not shown.

0 comments on commit 4789e9f

Please sign in to comment.