Exemplo n.º 1
0
        public ComboBoxPalette()
            : base()
        {
            DropDownStyle = ComboBoxStyle.DropDownList;

            string prefix;

            for (int i = 0; i < ColorTransformation.Palettes.Length; i++)
            {
                if (i < 10)
                {
                    prefix = "00";
                }
                else if (i < 100)
                {
                    prefix = "0";
                }
                else
                {
                    prefix = String.Empty;
                }

                Items.Add("(" + prefix + i.ToString() + ") - " + ColorTransformation.GetNameOfPalette((byte)i));
            }

            SelectedIndex = 0;
        }
        public ComboBoxPalette()
            : base()
        {
            DropDownStyle = ComboBoxStyle.DropDownList;

            string prefix;

            for (int i = 0; i < ColorTransformation.Palettes.Length; i++)
            {
                if (i < 10)
                {
                    prefix = "00";
                }
                else if (i < 100)
                {
                    prefix = "0";
                }
                else
                {
                    prefix = String.Empty;
                }

                Items.Add("(" + prefix + i.ToString() + ") - " + ColorTransformation.GetNameOfPalette((byte)i));
            }

            // add the special legacy vale palette last
            Items.Add("(999) - VALE OF SORROW)");

            SelectedIndex = 0;
        }