using System;
|
using System.ComponentModel;
|
using System.Drawing;
|
using System.Windows.Forms;
|
using System.Windows.Forms.Design;
|
|
namespace DPumpHydr.WinFrmUI.WenSkin.Controls
|
{
|
[ToolStripItemDesignerAvailability(ToolStripItemDesignerAvailability.All), DefaultEvent("ValueChanged")]
|
[Designer("System.Windows.Forms.Design.ToolStripItemDesigner")]
|
[ToolboxBitmap(typeof(RadioButton))]
|
public class ToolStripRadioButton : ToolStripControlHost
|
{
|
public ToolStripRadioButton() : base(new RadioButton())
|
{
|
RadioButton.Click += RadioButton_Click;
|
}
|
|
public new event EventHandler Click;
|
private void RadioButton_Click(object sender, EventArgs e)
|
{
|
Click?.Invoke(sender, e);
|
}
|
|
[Category("Wen"), Description("是否选中")]
|
public bool Checked { get => RadioButton.Checked; set => RadioButton.Checked = value; }
|
public RadioButton RadioButton { get => (RadioButton)Control; }
|
}
|
}
|