tangxu
2025-01-13 4f7cb65b079d88d5a829688b24d26d5145c5df47
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
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; }
    }
}