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); }
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); } }