From 718d0bc294fb3dd8fa634f40bbddaa73c28b9d3e Mon Sep 17 00:00:00 2001 From: mika Date: Fri, 23 Aug 2019 15:42:42 +0300 Subject: [PATCH 1/6] add force update key when launching project from explorer (hold shift key down) fixes #89, fix download button size in updates tab fixes #95, open update project form topmost --- UnityLauncher/Form1.Designer.cs | 36 ++++++++++++++---------------- UnityLauncher/Form1.cs | 19 ++++++++++++---- UnityLauncher/Form1.resx | 39 +++++++++++++++++++++++++++++++++ UnityLauncher/Form2.Designer.cs | 1 + 4 files changed, 72 insertions(+), 23 deletions(-) diff --git a/UnityLauncher/Form1.Designer.cs b/UnityLauncher/Form1.Designer.cs index 7f38ec3..322084d 100644 --- a/UnityLauncher/Form1.Designer.cs +++ b/UnityLauncher/Form1.Designer.cs @@ -64,6 +64,7 @@ private void InitializeComponent() this.label3 = new System.Windows.Forms.Label(); this.lstPackageFolders = new System.Windows.Forms.ListBox(); this.tabUpdates = new System.Windows.Forms.TabPage(); + this.btnDownloadNewUnity = new System.Windows.Forms.Button(); this.tbSearchUpdates = new System.Windows.Forms.TextBox(); this.btnOpenUpdateWebsite = new System.Windows.Forms.Button(); this.btnFetchUnityVersions = new System.Windows.Forms.Button(); @@ -100,7 +101,6 @@ private void InitializeComponent() this.statusStrip1 = new System.Windows.Forms.StatusStrip(); this.toolStripStatusLabel1 = new System.Windows.Forms.ToolStripStatusLabel(); this.backgroundWorker1 = new System.ComponentModel.BackgroundWorker(); - this.btnDownloadNewUnity = new System.Windows.Forms.Button(); this.tabControl1.SuspendLayout(); this.tabProjects.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.gridRecent)).BeginInit(); @@ -526,6 +526,19 @@ private void InitializeComponent() this.tabUpdates.Text = "Updates"; this.tabUpdates.UseVisualStyleBackColor = true; // + // btnDownloadNewUnity + // + this.btnDownloadNewUnity.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.btnDownloadNewUnity.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btnDownloadNewUnity.Location = new System.Drawing.Point(3, 511); + this.btnDownloadNewUnity.Name = "btnDownloadNewUnity"; + this.btnDownloadNewUnity.Size = new System.Drawing.Size(239, 35); + this.btnDownloadNewUnity.TabIndex = 25; + this.btnDownloadNewUnity.Text = "Download in Browser"; + this.toolTip1.SetToolTip(this.btnDownloadNewUnity, "Open Release Page"); + this.btnDownloadNewUnity.UseVisualStyleBackColor = true; + this.btnDownloadNewUnity.Click += new System.EventHandler(this.btnDownloadNewUnity_Click); + // // tbSearchUpdates // this.tbSearchUpdates.Location = new System.Drawing.Point(3, 5); @@ -536,8 +549,7 @@ private void InitializeComponent() // // btnOpenUpdateWebsite // - this.btnOpenUpdateWebsite.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); + this.btnOpenUpdateWebsite.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this.btnOpenUpdateWebsite.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.btnOpenUpdateWebsite.Location = new System.Drawing.Point(248, 511); this.btnOpenUpdateWebsite.Name = "btnOpenUpdateWebsite"; @@ -916,12 +928,12 @@ private void InitializeComponent() // // statusStrip1 // + // this next line keeps disappearing : this.statusStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {this.toolStripStatusLabel1}); + this.statusStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.toolStripStatusLabel1 }); this.statusStrip1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.statusStrip1.AutoSize = false; this.statusStrip1.Dock = System.Windows.Forms.DockStyle.None; - this.statusStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.toolStripStatusLabel1}); this.statusStrip1.Location = new System.Drawing.Point(0, 590); this.statusStrip1.Name = "statusStrip1"; this.statusStrip1.Size = new System.Drawing.Size(579, 22); @@ -937,20 +949,6 @@ private void InitializeComponent() this.toolStripStatusLabel1.Text = "toolStripStatusLabel1"; this.toolStripStatusLabel1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // - // btnDownloadNewUnity - // - this.btnDownloadNewUnity.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.btnDownloadNewUnity.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.btnDownloadNewUnity.Location = new System.Drawing.Point(3, 511); - this.btnDownloadNewUnity.Name = "btnDownloadNewUnity"; - this.btnDownloadNewUnity.Size = new System.Drawing.Size(239, 35); - this.btnDownloadNewUnity.TabIndex = 25; - this.btnDownloadNewUnity.Text = "Download in Browser"; - this.toolTip1.SetToolTip(this.btnDownloadNewUnity, "Open Release Page"); - this.btnDownloadNewUnity.UseVisualStyleBackColor = true; - this.btnDownloadNewUnity.Click += new System.EventHandler(this.btnDownloadNewUnity_Click); - // // Form1 // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); diff --git a/UnityLauncher/Form1.cs b/UnityLauncher/Form1.cs index 6d5ebfa..dee7448 100644 --- a/UnityLauncher/Form1.cs +++ b/UnityLauncher/Form1.cs @@ -61,6 +61,8 @@ void Start() return; } + + // check if received -projectPath argument (that means opening from explorer / cmdline) string[] args = Environment.GetCommandLineArgs(); if (args != null && args.Length > 2) @@ -89,8 +91,17 @@ void Start() commandLineArguments += " " + args[i]; } - // try launching it - LaunchProject(projectPathArgument, version, openProject: true, commandLineArguments: commandLineArguments); + // check if force-update button is down + if ((Control.ModifierKeys & Keys.Shift) != 0) + { + DisplayUpgradeDialog(version, projectPathArgument, launchProject: true, commandLineArguments: commandLineArguments); + } + else + { + // try launching it + LaunchProject(projectPathArgument, version, openProject: true, commandLineArguments: commandLineArguments); + } + // quit after launch if enabled in settings if (Properties.Settings.Default.closeAfterExplorer == true) @@ -1125,7 +1136,7 @@ void UpgradeProject() } } - void DisplayUpgradeDialog(string currentVersion, string projectPath, bool launchProject = true) + void DisplayUpgradeDialog(string currentVersion, string projectPath, bool launchProject = true, string commandLineArguments = "") { // display upgrade dialog (version selector) Form2 upgradeDialog = new Form2(); @@ -1138,7 +1149,7 @@ void DisplayUpgradeDialog(string currentVersion, string projectPath, bool launch case DialogResult.Ignore: // view release notes page Tools.OpenReleaseNotes(currentVersion); // display window again for now.. - DisplayUpgradeDialog(currentVersion, projectPath, launchProject); + DisplayUpgradeDialog(currentVersion, projectPath, launchProject, commandLineArguments); break; case DialogResult.Cancel: // cancelled SetStatus("Cancelled project upgrade"); diff --git a/UnityLauncher/Form1.resx b/UnityLauncher/Form1.resx index f629e1d..83ebd0f 100644 --- a/UnityLauncher/Form1.resx +++ b/UnityLauncher/Form1.resx @@ -138,6 +138,36 @@ True + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + True @@ -156,6 +186,15 @@ True + + True + + + True + + + 14, 20 + 111, 20 diff --git a/UnityLauncher/Form2.Designer.cs b/UnityLauncher/Form2.Designer.cs index 6293ff1..5f5e19c 100644 --- a/UnityLauncher/Form2.Designer.cs +++ b/UnityLauncher/Form2.Designer.cs @@ -133,6 +133,7 @@ private void InitializeComponent() this.Name = "Form2"; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; this.Text = "Missing Exact Unity Version"; + this.TopMost = true; this.Load += new System.EventHandler(this.Form2_Load); this.ResumeLayout(false); this.PerformLayout(); From d068675b412e9570f0b13d0929a293ed51e929ea Mon Sep 17 00:00:00 2001 From: mika Date: Wed, 28 Aug 2019 19:29:03 +0300 Subject: [PATCH 2/6] fix alpha, beta and patch release download in browser links fixes #93 --- UnityLauncher/Form1.cs | 68 ++++++++++++++++++++++++++++++++++-------- UnityLauncher/Tools.cs | 33 ++++++++++++++++---- 2 files changed, 83 insertions(+), 18 deletions(-) diff --git a/UnityLauncher/Form1.cs b/UnityLauncher/Form1.cs index dee7448..d4b22d4 100644 --- a/UnityLauncher/Form1.cs +++ b/UnityLauncher/Form1.cs @@ -542,30 +542,73 @@ bool CheckCrashBackupScene(string projectPath) // parse Unity installer exe from release page // thanks to https://github.com/softfruit - string GetDownloadUrlForUnityVersion(string version) + string ParseDownloadURLFromWebpage(string version) { string url = ""; using (WebClient client = new WebClient()) { - string htmlCode = client.DownloadString("https://unity3d.com/get-unity/download/archive"); - string[] lines = htmlCode.Split(new[] { "\r\n", "\r", "\n" }, StringSplitOptions.None); - - for (int i = 0; i < lines.Length; i++) + // get correct page url + string website = "https://unity3d.com/get-unity/download/archive"; + if (Tools.VersionIsPatch(version)) website = "https://unity3d.com/unity/qa/patch-releases"; + if (Tools.VersionIsBeta(version)) website = "https://unity3d.com/unity/beta/" + version; + if (Tools.VersionIsAlpha(version)) website = "https://unity3d.com/unity/alpha/" + version; + + // download html + string sourceHTML = client.DownloadString(website); + string[] lines = sourceHTML.Split(new[] { "\r\n", "\r", "\n" }, StringSplitOptions.None); + + // patch version download assistant finder + if (Tools.VersionIsPatch(version)) { - if (lines[i].Contains("UnitySetup64-" + version)) + for (int i = 0; i < lines.Length; i++) { - string line = lines[i - 1]; - int start = line.IndexOf('"') + 1; - int end = line.IndexOf('"', start); - url = @"https://unity3d.com/" + line.Substring(start, end - start); - break; + if (lines[i].Contains("UnityDownloadAssistant-" + version + ".exe")) + { + int start = lines[i].IndexOf('"') + 1; + int end = lines[i].IndexOf('"', start); + url = lines[i].Substring(start, end - start); + break; + } + } + } + else if (Tools.VersionIsArchived(version)) + { + // archived version download assistant finder + for (int i = 0; i < lines.Length; i++) + { + // find line where full installer is (from archive page) + if (lines[i].Contains("UnitySetup64-" + version)) + { + // take previous line, which contains download assistant url + string line = lines[i - 1]; + int start = line.IndexOf('"') + 1; + int end = line.IndexOf('"', start); + url = @"https://unity3d.com/" + line.Substring(start, end - start); + break; + } + } + } + else // alpha or beta version download assistant finder + { + for (int i = 0; i < lines.Length; i++) + { + if (lines[i].Contains("UnityDownloadAssistant.exe")) + { + int start = lines[i].IndexOf('"') + 1; + int end = lines[i].IndexOf('"', start); + url = lines[i].Substring(start, end - start) + "#version=" + version; + break; + } } } } + // didnt find installer if (string.IsNullOrEmpty(url)) + { SetStatus("Cannot find UnityDownloadAssistant.exe for this version."); + } return url; } @@ -576,7 +619,8 @@ string GetDownloadUrlForUnityVersion(string version) /// full url to installer void DownloadInBrowser(string url, string version) { - string exeURL = GetDownloadUrlForUnityVersion(version); + string exeURL = ParseDownloadURLFromWebpage(version); + if (string.IsNullOrEmpty(exeURL) == false) { SetStatus("Download installer in browser: " + exeURL); diff --git a/UnityLauncher/Tools.cs b/UnityLauncher/Tools.cs index 0ac7e94..1dc5e63 100644 --- a/UnityLauncher/Tools.cs +++ b/UnityLauncher/Tools.cs @@ -178,9 +178,7 @@ public static bool OpenReleaseNotes(string version) public static string GetUnityReleaseURL(string version) { string url = ""; - - - if (version.Contains("f")) // archived + if (VersionIsArchived(version)) { // remove f# version = Regex.Replace(version, @"f.", "", RegexOptions.IgnoreCase); @@ -199,24 +197,47 @@ public static string GetUnityReleaseURL(string version) url = "https://unity3d.com/unity/" + whatsnew + "/" + padding + version; } else - if (version.Contains("p")) // patch version + if (VersionIsPatch(version)) { url = "https://unity3d.com/unity/qa/patch-releases/" + version; } else - if (version.Contains("b")) // beta version + if (VersionIsBeta(version)) { url = "https://unity3d.com/unity/beta/" + version; } else - if (version.Contains("a")) // alpha version + if (VersionIsAlpha(version)) { url = "https://unity3d.com/unity/alpha/" + version; } + Console.WriteLine(url); + return url; } + // if version contains *f* its archived version + public static bool VersionIsArchived(string version) + { + return version.Contains("f"); + } + + public static bool VersionIsPatch(string version) + { + return version.Contains("p"); + } + + public static bool VersionIsBeta(string version) + { + return version.Contains("b"); + } + + public static bool VersionIsAlpha(string version) + { + return version.Contains("a"); + } + /// /// uninstall context menu item from registry /// From 72134229ef23ee7d969d2663c8ad1d71ec4a72ce Mon Sep 17 00:00:00 2001 From: mika Date: Wed, 28 Aug 2019 20:54:43 +0300 Subject: [PATCH 3/6] add button to open AppData\LocalLow, fixes #92 --- UnityLauncher/Form1.Designer.cs | 18 ++++++++++++++++-- UnityLauncher/Form1.cs | 13 +++++++++++++ 2 files changed, 29 insertions(+), 2 deletions(-) diff --git a/UnityLauncher/Form1.Designer.cs b/UnityLauncher/Form1.Designer.cs index 322084d..7c6a7ed 100644 --- a/UnityLauncher/Form1.Designer.cs +++ b/UnityLauncher/Form1.Designer.cs @@ -101,6 +101,7 @@ private void InitializeComponent() this.statusStrip1 = new System.Windows.Forms.StatusStrip(); this.toolStripStatusLabel1 = new System.Windows.Forms.ToolStripStatusLabel(); this.backgroundWorker1 = new System.ComponentModel.BackgroundWorker(); + this.btnPlayerLogFolder = new System.Windows.Forms.Button(); this.tabControl1.SuspendLayout(); this.tabProjects.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.gridRecent)).BeginInit(); @@ -621,6 +622,7 @@ private void InitializeComponent() // // tabSettings // + this.tabSettings.Controls.Add(this.btnPlayerLogFolder); this.tabSettings.Controls.Add(this.btnOpenLogcatCmd); this.tabSettings.Controls.Add(this.chkDarkSkin); this.tabSettings.Controls.Add(this.btnCheckUpdates); @@ -653,7 +655,7 @@ private void InitializeComponent() // btnOpenLogcatCmd // this.btnOpenLogcatCmd.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.btnOpenLogcatCmd.Location = new System.Drawing.Point(453, 311); + this.btnOpenLogcatCmd.Location = new System.Drawing.Point(453, 271); this.btnOpenLogcatCmd.Name = "btnOpenLogcatCmd"; this.btnOpenLogcatCmd.Size = new System.Drawing.Size(119, 23); this.btnOpenLogcatCmd.TabIndex = 42; @@ -766,7 +768,7 @@ private void InitializeComponent() // btnOpenLogFolder // this.btnOpenLogFolder.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.btnOpenLogFolder.Location = new System.Drawing.Point(453, 273); + this.btnOpenLogFolder.Location = new System.Drawing.Point(328, 271); this.btnOpenLogFolder.Name = "btnOpenLogFolder"; this.btnOpenLogFolder.Size = new System.Drawing.Size(119, 23); this.btnOpenLogFolder.TabIndex = 32; @@ -949,6 +951,17 @@ private void InitializeComponent() this.toolStripStatusLabel1.Text = "toolStripStatusLabel1"; this.toolStripStatusLabel1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // + // btnPlayerLogFolder + // + this.btnPlayerLogFolder.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.btnPlayerLogFolder.Location = new System.Drawing.Point(328, 300); + this.btnPlayerLogFolder.Name = "btnPlayerLogFolder"; + this.btnPlayerLogFolder.Size = new System.Drawing.Size(119, 23); + this.btnPlayerLogFolder.TabIndex = 43; + this.btnPlayerLogFolder.Text = "Player.log Folder"; + this.btnPlayerLogFolder.UseVisualStyleBackColor = true; + this.btnPlayerLogFolder.Click += new System.EventHandler(this.btnPlayerLogFolder_Click); + // // Form1 // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); @@ -1059,6 +1072,7 @@ private void InitializeComponent() private System.Windows.Forms.CheckBox chkDarkSkin; private System.Windows.Forms.Button btnOpenLogcatCmd; private System.Windows.Forms.Button btnDownloadNewUnity; + private System.Windows.Forms.Button btnPlayerLogFolder; } } diff --git a/UnityLauncher/Form1.cs b/UnityLauncher/Form1.cs index d4b22d4..bdbf983 100644 --- a/UnityLauncher/Form1.cs +++ b/UnityLauncher/Form1.cs @@ -1441,5 +1441,18 @@ private void btnDownloadNewUnity_Click(object sender, EventArgs e) } } + + // open LocalLow folder + private void btnPlayerLogFolder_Click(object sender, EventArgs e) + { + var logfolder = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData) + "/../LocalLow"); + if (Directory.Exists(logfolder) == true) + { + if (Tools.LaunchExplorer(logfolder) == false) + { + SetStatus("Error> Directory not found: " + logfolder); + } + } + } } // class Form } // namespace \ No newline at end of file From 547a97741ea7c6d4f9ff8761b5c9ed3cd55f2ac2 Mon Sep 17 00:00:00 2001 From: mika Date: Sat, 31 Aug 2019 14:23:03 +0300 Subject: [PATCH 4/6] add clear button to search bar, fixes #90 --- UnityLauncher/Form1.Designer.cs | 41 +++++++++++++++++++++++---------- UnityLauncher/Form1.cs | 21 +++++++++++++++++ 2 files changed, 50 insertions(+), 12 deletions(-) diff --git a/UnityLauncher/Form1.Designer.cs b/UnityLauncher/Form1.Designer.cs index 7c6a7ed..318d60b 100644 --- a/UnityLauncher/Form1.Designer.cs +++ b/UnityLauncher/Form1.Designer.cs @@ -32,6 +32,7 @@ private void InitializeComponent() System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Form1)); this.tabControl1 = new System.Windows.Forms.TabControl(); this.tabProjects = new System.Windows.Forms.TabPage(); + this.lblClearSearchField = new System.Windows.Forms.Label(); this.btnBrowseForProject = new System.Windows.Forms.Button(); this.btnRefreshProjectList = new System.Windows.Forms.Button(); this.tbSearchBar = new System.Windows.Forms.TextBox(); @@ -72,6 +73,7 @@ private void InitializeComponent() this._Date = new System.Windows.Forms.DataGridViewTextBoxColumn(); this._UnityUpdateVersion = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.tabSettings = new System.Windows.Forms.TabPage(); + this.btnPlayerLogFolder = new System.Windows.Forms.Button(); this.btnOpenLogcatCmd = new System.Windows.Forms.Button(); this.chkDarkSkin = new System.Windows.Forms.CheckBox(); this.btnCheckUpdates = new System.Windows.Forms.Button(); @@ -101,7 +103,6 @@ private void InitializeComponent() this.statusStrip1 = new System.Windows.Forms.StatusStrip(); this.toolStripStatusLabel1 = new System.Windows.Forms.ToolStripStatusLabel(); this.backgroundWorker1 = new System.ComponentModel.BackgroundWorker(); - this.btnPlayerLogFolder = new System.Windows.Forms.Button(); this.tabControl1.SuspendLayout(); this.tabProjects.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.gridRecent)).BeginInit(); @@ -133,6 +134,7 @@ private void InitializeComponent() // // tabProjects // + this.tabProjects.Controls.Add(this.lblClearSearchField); this.tabProjects.Controls.Add(this.btnBrowseForProject); this.tabProjects.Controls.Add(this.btnRefreshProjectList); this.tabProjects.Controls.Add(this.tbSearchBar); @@ -148,6 +150,20 @@ private void InitializeComponent() this.tabProjects.Text = "Projects"; this.tabProjects.UseVisualStyleBackColor = true; // + // lblClearSearchField + // + this.lblClearSearchField.AutoSize = true; + this.lblClearSearchField.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lblClearSearchField.ForeColor = System.Drawing.Color.DarkGray; + this.lblClearSearchField.Location = new System.Drawing.Point(448, 8); + this.lblClearSearchField.Name = "lblClearSearchField"; + this.lblClearSearchField.Size = new System.Drawing.Size(12, 13); + this.lblClearSearchField.TabIndex = 24; + this.lblClearSearchField.Text = "x"; + this.lblClearSearchField.Click += new System.EventHandler(this.lblClearSearchField_Click); + this.lblClearSearchField.MouseEnter += new System.EventHandler(this.lblClearSearchField_MouseEnter); + this.lblClearSearchField.MouseLeave += new System.EventHandler(this.lblClearSearchField_MouseLeave); + // // btnBrowseForProject // this.btnBrowseForProject.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); @@ -652,6 +668,17 @@ private void InitializeComponent() this.tabSettings.Text = "Settings"; this.tabSettings.UseVisualStyleBackColor = true; // + // btnPlayerLogFolder + // + this.btnPlayerLogFolder.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.btnPlayerLogFolder.Location = new System.Drawing.Point(328, 300); + this.btnPlayerLogFolder.Name = "btnPlayerLogFolder"; + this.btnPlayerLogFolder.Size = new System.Drawing.Size(119, 23); + this.btnPlayerLogFolder.TabIndex = 43; + this.btnPlayerLogFolder.Text = "Player.log Folder"; + this.btnPlayerLogFolder.UseVisualStyleBackColor = true; + this.btnPlayerLogFolder.Click += new System.EventHandler(this.btnPlayerLogFolder_Click); + // // btnOpenLogcatCmd // this.btnOpenLogcatCmd.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); @@ -951,17 +978,6 @@ private void InitializeComponent() this.toolStripStatusLabel1.Text = "toolStripStatusLabel1"; this.toolStripStatusLabel1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // - // btnPlayerLogFolder - // - this.btnPlayerLogFolder.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.btnPlayerLogFolder.Location = new System.Drawing.Point(328, 300); - this.btnPlayerLogFolder.Name = "btnPlayerLogFolder"; - this.btnPlayerLogFolder.Size = new System.Drawing.Size(119, 23); - this.btnPlayerLogFolder.TabIndex = 43; - this.btnPlayerLogFolder.Text = "Player.log Folder"; - this.btnPlayerLogFolder.UseVisualStyleBackColor = true; - this.btnPlayerLogFolder.Click += new System.EventHandler(this.btnPlayerLogFolder_Click); - // // Form1 // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); @@ -1073,6 +1089,7 @@ private void InitializeComponent() private System.Windows.Forms.Button btnOpenLogcatCmd; private System.Windows.Forms.Button btnDownloadNewUnity; private System.Windows.Forms.Button btnPlayerLogFolder; + private System.Windows.Forms.Label lblClearSearchField; } } diff --git a/UnityLauncher/Form1.cs b/UnityLauncher/Form1.cs index bdbf983..456283e 100644 --- a/UnityLauncher/Form1.cs +++ b/UnityLauncher/Form1.cs @@ -284,6 +284,7 @@ void FilterRecentProject(object sender, EventArgs e) { SetStatus("Filtering recent projects list ..."); string searchString = tbSearchBar.Text; + foreach (DataGridViewRow row in gridRecent.Rows) { if (row.Cells["_project"].Value.ToString().IndexOf(searchString, StringComparison.OrdinalIgnoreCase) > -1) @@ -295,6 +296,9 @@ void FilterRecentProject(object sender, EventArgs e) row.Visible = false; } } + + lblClearSearchField.Visible = tbSearchBar.Text.Length > 0; + } void FilterUnityUpdates(object sender, EventArgs e) @@ -846,6 +850,7 @@ private void Form1_KeyPress(object sender, KeyPressEventArgs e) if (tabControl1.SelectedIndex == 0 && tbSearchBar.Text != "") { tbSearchBar.Text = ""; + lblClearSearchField.Visible = false; } else if (tabControl1.SelectedIndex == 3 && tbSearchUpdates.Text != "") { @@ -864,6 +869,7 @@ private void Form1_KeyPress(object sender, KeyPressEventArgs e) tbSearchBar.Focus(); tbSearchBar.Text += e.KeyChar; tbSearchBar.Select(tbSearchBar.Text.Length, 0); + lblClearSearchField.Visible = tbSearchBar.Text.Length > 0; } break; } @@ -1454,5 +1460,20 @@ private void btnPlayerLogFolder_Click(object sender, EventArgs e) } } } + + private void lblClearSearchField_Click(object sender, EventArgs e) + { + tbSearchBar.Text = ""; + } + + private void lblClearSearchField_MouseEnter(object sender, EventArgs e) + { + ((Label)sender).ForeColor = Color.FromArgb(255, 0, 0, 0); + } + + private void lblClearSearchField_MouseLeave(object sender, EventArgs e) + { + ((Label)sender).ForeColor = Color.FromArgb(128, 128, 128, 128); + } } // class Form } // namespace \ No newline at end of file From cb34a01f1ba61ba2c3825940859567aaea07ad5f Mon Sep 17 00:00:00 2001 From: mika Date: Sun, 29 Dec 2019 16:14:28 +0200 Subject: [PATCH 5/6] Update README.md --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index a7a96cc..5103b05 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,5 @@ +** Note: New Dark Theme WPF version is coming up here, all new features will be available on that version only : https://github.com/unitycoder/UnityLauncherPro ** + # UnityLauncher Handle all your Unity versions and Projects easily! From 1b568e3f46bd9752e5bd41ba5b8386613b0d68d2 Mon Sep 17 00:00:00 2001 From: mika Date: Sat, 12 Sep 2020 14:12:22 +0300 Subject: [PATCH 6/6] Update README.md --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 5103b05..d4b68b0 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,6 @@ -** Note: New Dark Theme WPF version is coming up here, all new features will be available on that version only : https://github.com/unitycoder/UnityLauncherPro ** +# Note: New Dark Theme WPF version is here : https://github.com/unitycoder/UnityLauncherPro + +### this old winforms version is no longer updated! # UnityLauncher