Exemple #1
0
        void UpdateButtonCheckImages()
        {
            var current = new ColorValue(CurrentValue.Red, CurrentValue.Green, CurrentValue.Blue);

            foreach (var control in Controls)
            {
                Button button = control as Button;
                if (button != null)
                {
                    if (button.Tag != null && button.Tag is ColorValue)
                    {
                        ColorValue color = (ColorValue)button.Tag;

                        if (color.Equals(current, .001f))
                        {
                            button.Image = EditorResourcesCache.GetImage("Check_12");
                        }
                        else
                        {
                            button.Image = null;
                        }
                    }
                }
            }
        }