This repository has been archived on 2024-08-06. You can view files and clone it, but cannot push or open issues or pull requests.
linear-app-launcher/Windows/Forms/HeadingPanel.cs

39 lines
852 B
C#
Raw Normal View History

2020-03-29 14:28:38 +00:00
using System.ComponentModel;
2020-03-28 22:48:06 +00:00
using System.Windows.Forms;
namespace AppLauncher.Windows.Forms
{
public partial class HeadingPanel : UserControl
{
2020-03-29 14:28:38 +00:00
protected bool isChecked = false;
2020-03-28 22:48:06 +00:00
public HeadingPanel()
{
InitializeComponent();
2020-03-29 14:28:38 +00:00
this.Checked = false;
2020-03-28 22:48:06 +00:00
}
2020-03-29 14:28:38 +00:00
[Category("Appearance"), Browsable(true)]
public string TitleText
2020-03-28 22:48:06 +00:00
{
2020-03-29 14:28:38 +00:00
get => label1.Text;
set => label1.Text = value;
2020-03-28 22:48:06 +00:00
}
2020-03-29 14:28:38 +00:00
[Category("Appearance"), Browsable(true)]
public bool Checked
2020-03-28 22:48:06 +00:00
{
2020-03-29 14:28:38 +00:00
get => isChecked;
set
2020-03-28 22:48:06 +00:00
{
2020-03-29 14:28:38 +00:00
isChecked = value;
2020-03-28 22:48:06 +00:00
2020-03-29 14:28:38 +00:00
pictureBox1.BackgroundImage = (value) ? Properties.Resources.toggle_right_ea_16 : Properties.Resources.toggle_left_ea_16;
2020-03-28 22:48:06 +00:00
}
}
}
}