public void composeFlatDark() { ColorCalc colorMix = new ColorCalc(); colorMix.setBaseColor(this.MainColor); this.BackgroundControlColor = colorMix.DarkenBy(45); this.ForeGroundContentColor = colorMix.LightenBy(70); this.ButtonBackColor = colorMix.DarkenBy(50); this.ButtonForeColor = colorMix.LightenBy(50); this.LineColor = colorMix.LightenBy(40); this.ButtonStyle = FlatStyle.Flat; this.ElBackColor = colorMix.LightenBy(50); this.ELForeColor = colorMix.DarkenBy(60); this.ElBorderStyle = BorderStyle.FixedSingle; this.itemRowA = colorMix.LightenBy(60); this.itemRowB = colorMix.LightenBy(40); this.itemTextColor = colorMix.DarkenBy(70); }
private void defaultColors() { this.colorPanel.BackColor = this.profilColor; ColorCalc colCalc = new ColorCalc(); colCalc.setBaseColor(this.profilColor); if (this.Selected) { this.BackColor = colCalc.LightenBy(this.defaultPercent); this.HeadLabel.ForeColor = colCalc.DarkenBy(this.ForeDefaultPercent); this.Description.ForeColor = this.HeadLabel.ForeColor; } else { this.BackColor = colCalc.DarkenBy(this.defaultPercent); this.HeadLabel.ForeColor = colCalc.DarkenBy(this.ForeDefaultPercent); this.Description.ForeColor = this.HeadLabel.ForeColor; } }
private void animTimer_Tick(object sender, EventArgs e) { if (this.Selected) { this.defaultColors(); return; } if (growing) { if (this.currentPercent < this.defaultPercent - 4) { this.currentPercent += 4; this.ForeCurrentPercent -= 4; } else { this.animTimer.Enabled = false; this.defaultColors(); return; } } else { if (this.currentPercent > this.HighlightPercent - 15) { this.currentPercent -= 15; this.ForeCurrentPercent += 15; } else { this.animTimer.Enabled = false; } } ColorCalc colCalc = new ColorCalc(); colCalc.setBaseColor(this.profilColor); this.BackColor = colCalc.DarkenBy(this.currentPercent); this.HeadLabel.ForeColor = colCalc.DarkenBy(this.ForeCurrentPercent); this.Description.ForeColor = this.HeadLabel.ForeColor; }
private void selectExistsTables() { Profil dbProf = new Profil(); ColorCalc cCalc = new ColorCalc(); string groupId = groupName.Text; if (this.currentGroups.Contains(groupId)) { groupName.ForeColor = Color.DarkGreen; groupName.BackColor = Color.LightSeaGreen; List <string> members = Config.getListWidthDefault(PConfig.KEY_GROUPS_MEMBERS + "." + groupId, new List <string>()); for (int i = 0; i < this.GroupedDatabases.Items.Count; i++) { this.GroupedDatabases.Items[i].Checked = (members.Contains(this.GroupedDatabases.Items[i].Text)); dbProf.changeProfil(this.GroupedDatabases.Items[i].Text); if (dbProf.getProperty("set_bgcolor") != null && dbProf.getProperty("set_bgcolor").Length > 2) { Color rowCol = Color.FromArgb(int.Parse(dbProf.getProperty("set_bgcolor"))); cCalc.setBaseColor(rowCol); this.GroupedDatabases.Items[i].BackColor = cCalc.LightenBy(50); this.GroupedDatabases.Items[i].ForeColor = cCalc.DarkenBy(50); } } manipulateBtn.Image = Projector.Properties.Resources.delete_16; GroupedDatabases.Enabled = true; } else { groupName.ForeColor = Color.DarkRed; groupName.BackColor = Color.LightYellow; manipulateBtn.Image = Projector.Properties.Resources.add16; for (int i = 0; i < this.GroupedDatabases.Items.Count; i++) { this.GroupedDatabases.Items[i].Checked = false; } GroupedDatabases.Enabled = false; } }