From a4210cbd897c54c3615554b56fb338396815d20d Mon Sep 17 00:00:00 2001 From: RKrom Date: Mon, 8 Dec 2014 09:29:12 +0100 Subject: [PATCH] BUG-1719: Although it's more a feature... I made the parsing respect HTML color NAMES. --- Greenshot/Forms/ColorDialog.Designer.cs | 4 +- Greenshot/Forms/ColorDialog.cs | 230 +++++++++++++----------- 2 files changed, 123 insertions(+), 111 deletions(-) diff --git a/Greenshot/Forms/ColorDialog.Designer.cs b/Greenshot/Forms/ColorDialog.Designer.cs index dd4cb9a66..15c946717 100644 --- a/Greenshot/Forms/ColorDialog.Designer.cs +++ b/Greenshot/Forms/ColorDialog.Designer.cs @@ -75,7 +75,7 @@ namespace Greenshot { this.btnTransparent.TabStop = false; this.btnTransparent.Text = "Transparent"; this.btnTransparent.UseVisualStyleBackColor = false; - this.btnTransparent.Click += new System.EventHandler(this.btnTransparentClick); + this.btnTransparent.Click += new System.EventHandler(this.BtnTransparentClick); // // colorPanel // @@ -225,7 +225,7 @@ namespace Greenshot { this.pipette.Name = "pipette"; this.pipette.Size = new System.Drawing.Size(33, 23); this.pipette.TabIndex = 13; - this.pipette.PipetteUsed += new System.EventHandler(this.pipetteUsed); + this.pipette.PipetteUsed += new System.EventHandler(this.PipetteUsed); // // ColorDialog // diff --git a/Greenshot/Forms/ColorDialog.cs b/Greenshot/Forms/ColorDialog.cs index 57beb84cf..f98a7a2bc 100644 --- a/Greenshot/Forms/ColorDialog.cs +++ b/Greenshot/Forms/ColorDialog.cs @@ -18,6 +18,10 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ + +using Greenshot.Configuration; +using Greenshot.Controls; +using Greenshot.IniFile; using System; using System.Collections.Generic; using System.Drawing; @@ -25,10 +29,6 @@ using System.Globalization; using System.Threading; using System.Windows.Forms; -using Greenshot.Configuration; -using Greenshot.Controls; -using Greenshot.IniFile; - namespace Greenshot { /// /// Description of ColorDialog. @@ -41,188 +41,200 @@ namespace Greenshot { SuspendLayout(); InitializeComponent(); SuspendLayout(); - createColorPalette(5,5,15,15); - createLastUsedColorButtonRow(5,190,15,15); + CreateColorPalette(5, 5, 15, 15); + CreateLastUsedColorButtonRow(5, 190, 15, 15); ResumeLayout(); - updateRecentColorsButtonRow(); + UpdateRecentColorsButtonRow(); } public static ColorDialog GetInstance() { - if(uniqueInstance == null) { + if (uniqueInstance == null) { uniqueInstance = new ColorDialog(); } return uniqueInstance; } - - private List