Esempio n. 1
0
 /// <summary>
 /// Initializes a new instance of the ColorPanel class.
 /// </summary>
 /// <remarks>
 /// The default constructor initializes all fields to their default values.
 /// </remarks>
 public ColorPanel()
 {
     colorWells = ColorWellHelper.GetColorWells(colorSet, colorSortOrder);
     ResetCustomColors();
     // This call is required by the Windows.Forms Form Designer.
     InitializeComponent();
     UpdateBorderSize();
     AutoSizePanel();
 }
Esempio n. 2
0
        /// <summary>
        /// Override OnSystemColorsChanged to that the System color palette
        /// can be updated when a user modifies the system colors.
        /// </summary>
        /// <param name="e"></param>
        protected override void OnSystemColorsChanged(System.EventArgs e)
        {
            base.OnSystemColorsChanged(e);

            if (colorSet == ColorSet.System)
            {
                // generate new set of system colors
                colorWells = ColorWellHelper.GetColorWells(colorSet, colorSortOrder);
                LayoutColorWells();

                UpdatePickColor();

                FireColorChanged();

                Refresh();
            }
        }