/// <summary> /// Click on color box from color palette /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void ColorBoxClick(object sender, EventArgs e) { // Get color box from sender MColorBox box = (MColorBox)sender; // Set tint Minimal.SetTint(this, box.Color); tintColor = box.Color; // Change track-bars trbRed.Value = box.Color.R; trbGreen.Value = box.Color.G; trbBlue.Value = box.Color.B; }
/// <summary> /// Update of tint color /// </summary> private void PaletteClick(object sender, EventArgs e) { // Get color MColorBox box = (MColorBox)sender; Minimal.SetTint(this, box.Color); // Update configuration Config c = User.GetConfig(); User.UpdateConfig(new Config(c.AppTheme, c.DrawerTheme, box.Color)); // Set tint color for homepage lblPasswordCount.Tint = lblGroupsCount.Tint = lblWarningsCount.Tint = Color.White; lblPasswords.Tint = lblGroups.Tint = lblWarnings.Tint = Color.White; btnAddPasswordShortcut.Tint = Color.FromArgb(76, 175, 80); btnAddGroupShortcut.Tint = Color.FromArgb(255, 152, 0); btnShowWarningsShortcut.Tint = Color.FromArgb(211, 47, 47); trbRed.Value = box.Color.R; trbGreen.Value = box.Color.G; trbBlue.Value = box.Color.B; }