CPF/CPF.ReoGrid/CellTypes/RadioButtonGroup.cs

43 lines
725 B
C#
Raw Normal View History

2024-06-24 10:15:59 +08:00
using System;
using System.Collections.Generic;
namespace CPF.ReoGrid.CellTypes
{
[Serializable]
public class RadioButtonGroup
{
public virtual void AddRadioButton(RadioButtonCell cell)
{
bool flag = cell == null;
if (!flag)
{
bool flag2 = !this.radios.Contains(cell);
if (flag2)
{
this.radios.Add(cell);
}
bool flag3 = cell.RadioGroup != this;
if (flag3)
{
cell.RadioGroup = this;
}
}
}
public List<RadioButtonCell> RadioButtons
{
get
{
return this.radios;
}
}
public virtual bool Contains(RadioButtonCell cell)
{
return this.radios.Contains(cell);
}
private List<RadioButtonCell> radios = new List<RadioButtonCell>();
}
}