private void create_panelSplitter() { gradientPanelSplitter = new Bunifu.Framework.UI.BunifuGradientPanel() { BackColor = Color.Gainsboro, Size = new Size(width: 719, height: 5), Dock = DockStyle.Top, GradientBottomLeft = Color.Gainsboro, GradientBottomRight = Color.Gainsboro, GradientTopLeft = Color.Silver, GradientTopRight = Color.DarkGray, Quality = 10 }; panelContainer.Controls.Add(gradientPanelSplitter); gradientPanelSplitter.BringToFront(); gradientPanelSplitter.Show(); }
private void create_panel() { gradientPanel = new Bunifu.Framework.UI.BunifuGradientPanel() { BackColor = Color.Gainsboro, Size = new Size(width: 719, height: 32), Dock = DockStyle.Top, GradientBottomLeft = Color.DodgerBlue, GradientBottomRight = Color.Aqua, GradientTopLeft = Color.DodgerBlue, GradientTopRight = Color.LightGray, Quality = 10, }; gradientPanel.MouseEnter += (s, e) => { panelOnEnter(s, e); }; gradientPanel.MouseLeave += (s, e) => { panelOnLeave(s, e); }; gradientPanel.MouseClick += (s, e) => { select_panel(s, e); }; panelContainer.Controls.Add(gradientPanel); gradientPanel.BringToFront(); gradientPanel.Show(); }
private void select_panel(object sender, MouseEventArgs e) { if (currentSelectedPanel != null) { unselect_panel(); } if (currentSelectedPanel != null) { if ((sender as Bunifu.Framework.UI.BunifuGradientPanel) == currentSelectedPanel) { currentSelectedPanel = null; return; } } currentSelectedPanel = (Bunifu.Framework.UI.BunifuGradientPanel)sender; (sender as Bunifu.Framework.UI.BunifuGradientPanel).GradientBottomLeft = Color.Gold; (sender as Bunifu.Framework.UI.BunifuGradientPanel).GradientBottomRight = Color.OrangeRed; (sender as Bunifu.Framework.UI.BunifuGradientPanel).GradientTopLeft = Color.Orange; (sender as Bunifu.Framework.UI.BunifuGradientPanel).GradientTopRight = Color.Gold; }