Exemplo n.º 1
0
        private void FormColorPalette_Load(object sender, EventArgs e)
        {
            this.Blueprint.LoadBlocks();
            this.ColorPalettes = ColorPaletteList.Load();
            if (this.ColorPalettes == null)
            {
                this.ColorPalettes = new ColorPaletteList();
            }

            this.ViewColorPalettes(this.ColorPalettes);
        }
Exemplo n.º 2
0
        private void ViewColorPalettes(ColorPaletteList colorPalettes)
        {
            this.listPanel.Controls.Clear();
            var isExists = false;

            foreach (var item in colorPalettes.ColorPalettes)
            {
                var addedPanel = this.AddColorPalettePanel(item.Colors, true);

                if (item.Equals(new ColorPalette()
                {
                    Colors = this.Blueprint.Colors.ToList()
                }))
                {
                    SelectPalette(addedPanel);
                    isExists = true;
                }
            }

            {
                var addedPanel = this.AddColorPalettePanel(this.Blueprint.Colors, false);
                SelectPalette(addedPanel);
            }
        }