diff --git a/Co0nSearchC/F_Main.Designer.cs b/Co0nSearchC/F_Main.Designer.cs index 8ceef64..5ec5306 100644 --- a/Co0nSearchC/F_Main.Designer.cs +++ b/Co0nSearchC/F_Main.Designer.cs @@ -33,14 +33,13 @@ private void InitializeComponent() this.components = new System.ComponentModel.Container(); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(F_Main)); this.lstFiles = new System.Windows.Forms.ListBox(); - //this.txtSearch = new System.Windows.Forms.TextBox(); - this.txtSearch = new Co0n_GUI.C_HintTextbox("Bitte mindestens zwei Zeichen eingeben und mit Enter bestätigen."); this.lblCount = new System.Windows.Forms.Label(); this.menuStrip1 = new System.Windows.Forms.MenuStrip(); this.programmToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.beendenToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.einstellungenToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.suchordnerToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.vorschauToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.überToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.überDiesesProgrammToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.changelogToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); @@ -50,7 +49,6 @@ private void InitializeComponent() this.lblState = new System.Windows.Forms.Label(); this.toolTip1 = new System.Windows.Forms.ToolTip(this.components); this.menuStrip1.SuspendLayout(); - this.grpSearch.SuspendLayout(); this.grpResults.SuspendLayout(); this.grpState.SuspendLayout(); this.SuspendLayout(); @@ -72,18 +70,6 @@ private void InitializeComponent() this.lstFiles.MouseHover += new System.EventHandler(this.lstFiles_MouseHover); this.lstFiles.MouseMove += new System.Windows.Forms.MouseEventHandler(this.lstFiles_MouseMove); // - // txtSearch - // - this.txtSearch.Dock = System.Windows.Forms.DockStyle.Fill; - this.txtSearch.Location = new System.Drawing.Point(3, 16); - this.txtSearch.Margin = new System.Windows.Forms.Padding(2); - this.txtSearch.Name = "txtSearch"; - this.txtSearch.Size = new System.Drawing.Size(1119, 20); - this.txtSearch.TabIndex = 1; - 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); - // // lblCount // this.lblCount.AutoSize = true; @@ -126,7 +112,8 @@ private void InitializeComponent() // einstellungenToolStripMenuItem // this.einstellungenToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.suchordnerToolStripMenuItem}); + this.suchordnerToolStripMenuItem, + this.vorschauToolStripMenuItem}); this.einstellungenToolStripMenuItem.Name = "einstellungenToolStripMenuItem"; this.einstellungenToolStripMenuItem.Size = new System.Drawing.Size(90, 20); this.einstellungenToolStripMenuItem.Text = "Einstellungen"; @@ -134,10 +121,17 @@ private void InitializeComponent() // suchordnerToolStripMenuItem // this.suchordnerToolStripMenuItem.Name = "suchordnerToolStripMenuItem"; - this.suchordnerToolStripMenuItem.Size = new System.Drawing.Size(135, 22); + this.suchordnerToolStripMenuItem.Size = new System.Drawing.Size(180, 22); this.suchordnerToolStripMenuItem.Text = "Suchordner"; this.suchordnerToolStripMenuItem.Click += new System.EventHandler(this.suchordnerToolStripMenuItem_Click); // + // vorschauToolStripMenuItem + // + this.vorschauToolStripMenuItem.Name = "vorschauToolStripMenuItem"; + this.vorschauToolStripMenuItem.Size = new System.Drawing.Size(180, 22); + this.vorschauToolStripMenuItem.Text = "Vorschau"; + this.vorschauToolStripMenuItem.Click += new System.EventHandler(this.vorschauToolStripMenuItem_Click); + // // überToolStripMenuItem // this.überToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { @@ -163,7 +157,6 @@ private void InitializeComponent() // // grpSearch // - this.grpSearch.Controls.Add(this.txtSearch); this.grpSearch.Dock = System.Windows.Forms.DockStyle.Top; this.grpSearch.Location = new System.Drawing.Point(0, 24); this.grpSearch.Name = "grpSearch"; @@ -227,8 +220,6 @@ private void InitializeComponent() this.Load += new System.EventHandler(this.Form1_Load); this.menuStrip1.ResumeLayout(false); this.menuStrip1.PerformLayout(); - this.grpSearch.ResumeLayout(false); - this.grpSearch.PerformLayout(); this.grpResults.ResumeLayout(false); this.grpState.ResumeLayout(false); this.grpState.PerformLayout(); @@ -240,7 +231,6 @@ private void InitializeComponent() #endregion private System.Windows.Forms.ListBox lstFiles; - private System.Windows.Forms.TextBox txtSearch; private System.Windows.Forms.Label lblCount; private System.Windows.Forms.MenuStrip menuStrip1; private System.Windows.Forms.ToolStripMenuItem programmToolStripMenuItem; @@ -255,6 +245,8 @@ private void InitializeComponent() private System.Windows.Forms.Label lblState; private System.Windows.Forms.ToolTip toolTip1; private System.Windows.Forms.ToolStripMenuItem changelogToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem vorschauToolStripMenuItem; + private Co0n_GUI.C_HintTextbox txtSearch; } } diff --git a/Co0nSearchC/F_Main.cs b/Co0nSearchC/F_Main.cs index ba48d68..f9f283b 100644 --- a/Co0nSearchC/F_Main.cs +++ b/Co0nSearchC/F_Main.cs @@ -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 indexers = new List(); @@ -36,7 +58,36 @@ public F_Main(bool showhiddenfiles) private int _runningthreads = 0; // private List filesfound = new List(); //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 @@ -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; + } @@ -192,8 +243,11 @@ private void updateFileListAndLabels(bool clearlist, List 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); @@ -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) @@ -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"; @@ -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) { diff --git a/Co0nSearchC/Program.cs b/Co0nSearchC/Program.cs index 34c07d1..50a54bf 100644 --- a/Co0nSearchC/Program.cs +++ b/Co0nSearchC/Program.cs @@ -10,8 +10,8 @@ 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"; /// /// Der Haupteinstiegspunkt für die Anwendung. /// @@ -19,16 +19,21 @@ public static class Program 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)); } } } diff --git a/Co0nSearchC/bin/Release/CSearch.exe b/Co0nSearchC/bin/Release/CSearch.exe index dc353d1..fc96121 100644 Binary files a/Co0nSearchC/bin/Release/CSearch.exe and b/Co0nSearchC/bin/Release/CSearch.exe differ diff --git a/Co0nSearchC/bin/Release/Co0nUtilZ.dll b/Co0nSearchC/bin/Release/Co0nUtilZ.dll index 6a2c9a6..67837db 100644 Binary files a/Co0nSearchC/bin/Release/Co0nUtilZ.dll and b/Co0nSearchC/bin/Release/Co0nUtilZ.dll differ diff --git a/Co0nSearchC/bin/Release/Co0n_GUI.dll b/Co0nSearchC/bin/Release/Co0n_GUI.dll index cd2b1cc..983bc64 100644 Binary files a/Co0nSearchC/bin/Release/Co0n_GUI.dll and b/Co0nSearchC/bin/Release/Co0n_GUI.dll differ diff --git a/Co0nSearchC/bin/Release/Co0n_GUI.pdb b/Co0nSearchC/bin/Release/Co0n_GUI.pdb index 77ec365..455e027 100644 Binary files a/Co0nSearchC/bin/Release/Co0n_GUI.pdb and b/Co0nSearchC/bin/Release/Co0n_GUI.pdb differ diff --git a/Co0nSearchC/obj/Debug/CSearch.application b/Co0nSearchC/obj/Debug/CSearch.application index d572de5..b60b861 100644 --- a/Co0nSearchC/obj/Debug/CSearch.application +++ b/Co0nSearchC/obj/Debug/CSearch.application @@ -14,7 +14,7 @@ - NkfZvzALoFK3mYSIsIZwCdmW6XmVAk7JBRbx6UbGDa4= + cAV7PQsCQk4eF1BPI/dPP/Tyyd3KeBY9n133l8BF62U= diff --git a/Co0nSearchC/obj/Debug/CSearch.csproj.CoreCompileInputs.cache b/Co0nSearchC/obj/Debug/CSearch.csproj.CoreCompileInputs.cache index c1cafc3..8890749 100644 --- a/Co0nSearchC/obj/Debug/CSearch.csproj.CoreCompileInputs.cache +++ b/Co0nSearchC/obj/Debug/CSearch.csproj.CoreCompileInputs.cache @@ -1 +1 @@ -31536de266d0f63ec8fd8dd74a6f4c25eea39566 +63bdd528a6d5a804eca4fd4ab71f4f93ada18fe6 diff --git a/Co0nSearchC/obj/Debug/CSearch.csproj.GenerateResource.cache b/Co0nSearchC/obj/Debug/CSearch.csproj.GenerateResource.cache index 445f676..b2f3542 100644 Binary files a/Co0nSearchC/obj/Debug/CSearch.csproj.GenerateResource.cache and b/Co0nSearchC/obj/Debug/CSearch.csproj.GenerateResource.cache differ diff --git a/Co0nSearchC/obj/Debug/CSearch.csprojAssemblyReference.cache b/Co0nSearchC/obj/Debug/CSearch.csprojAssemblyReference.cache index 3fc87cb..a306ebf 100644 Binary files a/Co0nSearchC/obj/Debug/CSearch.csprojAssemblyReference.cache and b/Co0nSearchC/obj/Debug/CSearch.csprojAssemblyReference.cache differ diff --git a/Co0nSearchC/obj/Debug/CSearch.exe b/Co0nSearchC/obj/Debug/CSearch.exe index 3ae729c..161f12a 100644 Binary files a/Co0nSearchC/obj/Debug/CSearch.exe and b/Co0nSearchC/obj/Debug/CSearch.exe differ diff --git a/Co0nSearchC/obj/Debug/CSearch.exe.manifest b/Co0nSearchC/obj/Debug/CSearch.exe.manifest index f28b65a..0187d82 100644 --- a/Co0nSearchC/obj/Debug/CSearch.exe.manifest +++ b/Co0nSearchC/obj/Debug/CSearch.exe.manifest @@ -62,19 +62,19 @@ - 8UHLgz8Ah4U/SFspIOdZWXweWf6u1qh0lvJJOdYm7wc= + bv9FN3c65pZgtUZ/SaxDXj+HRBkEX5WUmHRwyE68hz0= - + - iyykc3RRAaDvKwz7x7XG3uUGM47Iz/VJDztgyPkjPGs= + VaFteHfcRkHVLoypjqbEcbhRiEUxY3tq9XfhC17QBi0= diff --git a/Co0nSearchC/obj/Debug/CSearch.pdb b/Co0nSearchC/obj/Debug/CSearch.pdb index 5b3e6e2..73b60fd 100644 Binary files a/Co0nSearchC/obj/Debug/CSearch.pdb and b/Co0nSearchC/obj/Debug/CSearch.pdb differ diff --git a/Co0nSearchC/obj/Debug/DesignTimeResolveAssemblyReferences.cache b/Co0nSearchC/obj/Debug/DesignTimeResolveAssemblyReferences.cache index 6819bb4..67674fa 100644 Binary files a/Co0nSearchC/obj/Debug/DesignTimeResolveAssemblyReferences.cache and b/Co0nSearchC/obj/Debug/DesignTimeResolveAssemblyReferences.cache differ diff --git a/Co0nSearchC/obj/Release/CSearch.application b/Co0nSearchC/obj/Release/CSearch.application index 7150d89..15d3c99 100644 --- a/Co0nSearchC/obj/Release/CSearch.application +++ b/Co0nSearchC/obj/Release/CSearch.application @@ -14,7 +14,7 @@ - ueWYDXsgfOuAvGdrVwZLrrr8Zfeu7mA/Ak0zLO2fiTQ= + FrIzUzMgkGnK5kJOY7gPsyi6FpAGgZOktsYWDTrGmcI= diff --git a/Co0nSearchC/obj/Release/CSearch.csproj.CoreCompileInputs.cache b/Co0nSearchC/obj/Release/CSearch.csproj.CoreCompileInputs.cache index a895329..96fef0c 100644 --- a/Co0nSearchC/obj/Release/CSearch.csproj.CoreCompileInputs.cache +++ b/Co0nSearchC/obj/Release/CSearch.csproj.CoreCompileInputs.cache @@ -1 +1 @@ -6de84d8b29f9a2271451c3f6b7a78b951cb6e657 +315103f1776397619e93cba191b830da0d2b7f33 diff --git a/Co0nSearchC/obj/Release/CSearch.csproj.GenerateResource.cache b/Co0nSearchC/obj/Release/CSearch.csproj.GenerateResource.cache index ae55afd..b2f3542 100644 Binary files a/Co0nSearchC/obj/Release/CSearch.csproj.GenerateResource.cache and b/Co0nSearchC/obj/Release/CSearch.csproj.GenerateResource.cache differ diff --git a/Co0nSearchC/obj/Release/CSearch.csprojAssemblyReference.cache b/Co0nSearchC/obj/Release/CSearch.csprojAssemblyReference.cache index d701a41..2e4cf55 100644 Binary files a/Co0nSearchC/obj/Release/CSearch.csprojAssemblyReference.cache and b/Co0nSearchC/obj/Release/CSearch.csprojAssemblyReference.cache differ diff --git a/Co0nSearchC/obj/Release/CSearch.exe b/Co0nSearchC/obj/Release/CSearch.exe index dc353d1..fc96121 100644 Binary files a/Co0nSearchC/obj/Release/CSearch.exe and b/Co0nSearchC/obj/Release/CSearch.exe differ diff --git a/Co0nSearchC/obj/Release/CSearch.exe.manifest b/Co0nSearchC/obj/Release/CSearch.exe.manifest index 5092d88..b4157d0 100644 --- a/Co0nSearchC/obj/Release/CSearch.exe.manifest +++ b/Co0nSearchC/obj/Release/CSearch.exe.manifest @@ -50,7 +50,7 @@ - ZPlhvdTruoZWH8E7FVbmhYebCwXOmPW5gdxT1j5hdCU= + MToRJf+fLzZ6pYoLJmUXub5/M/OF+kPSzhZA2j5MYak= @@ -62,19 +62,19 @@ - GNbATPjKEbYx6HiFVgAwIBND/1GbETpMF0AzafdNZ8Y= + QHKdjML65LuddvOWXrxKJtUFXmr85zbvGLGlwhvDCZc= - + - GANnhwNUT/iwNbxaVg4VVD2y6A2HERGk0qo5iwtV/JY= + 3tafCRlsaVi/nzWUelrAxj8NKU1YtUOafExTPYWuvg4= diff --git a/Co0nSearchC/obj/Release/CSearch.pdb b/Co0nSearchC/obj/Release/CSearch.pdb index 82da3b4..28e4cba 100644 Binary files a/Co0nSearchC/obj/Release/CSearch.pdb and b/Co0nSearchC/obj/Release/CSearch.pdb differ diff --git a/Installer/Release/CSearch_0.160.0.msi b/Installer/Release/CSearch_0.160.0.msi index b3c2ede..fc388fa 100644 Binary files a/Installer/Release/CSearch_0.160.0.msi and b/Installer/Release/CSearch_0.160.0.msi differ