From 058bbd3060833e751727db778a121a9c16467edb Mon Sep 17 00:00:00 2001 From: Pavel Kovalenko Date: Sun, 19 Oct 2014 20:17:00 +0400 Subject: [PATCH] Override OnLoad instead of subsribing to Load event in ColorPicker control. --- .../xrSdkControls/Controls/ColorPicker/ColorPicker.Designer.cs | 1 - src/editors/xrSdkControls/Controls/ColorPicker/ColorPicker.cs | 3 ++- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/editors/xrSdkControls/Controls/ColorPicker/ColorPicker.Designer.cs b/src/editors/xrSdkControls/Controls/ColorPicker/ColorPicker.Designer.cs index d2686dcf35d..d07c7aaad5a 100644 --- a/src/editors/xrSdkControls/Controls/ColorPicker/ColorPicker.Designer.cs +++ b/src/editors/xrSdkControls/Controls/ColorPicker/ColorPicker.Designer.cs @@ -217,7 +217,6 @@ private void InitializeComponent() this.MinimumSize = new System.Drawing.Size(256, 144); this.Name = "ColorPicker"; this.Size = new System.Drawing.Size(256, 144); - this.Load += new System.EventHandler(this.ColorPicker_Load); this.ResumeLayout(false); this.PerformLayout(); diff --git a/src/editors/xrSdkControls/Controls/ColorPicker/ColorPicker.cs b/src/editors/xrSdkControls/Controls/ColorPicker/ColorPicker.cs index bc571ab9b63..773cf079d92 100644 --- a/src/editors/xrSdkControls/Controls/ColorPicker/ColorPicker.cs +++ b/src/editors/xrSdkControls/Controls/ColorPicker/ColorPicker.cs @@ -50,8 +50,9 @@ public bool Hexadecimal } } - private void ColorPicker_Load(object sender, EventArgs e) + protected override void OnLoad(EventArgs e) { + base.OnLoad(e); nslRed.ValueChanged += (obj, args) => UpdateColor(); nslGreen.ValueChanged += (obj, args) => UpdateColor(); nslBlue.ValueChanged += (obj, args) => UpdateColor();