Ejemplo n.º 1
0
            public bool IsSelect(ScRadioButton button)
            {
                var group = button.Group;

                if (string.IsNullOrEmpty(group))
                {
                    return(m_Select == button);
                }
                else if (m_GroupSelect != null && m_GroupSelect.ContainsKey(group))
                {
                    return(m_GroupSelect[group] == button);
                }
                return(false);
            }
Ejemplo n.º 2
0
 public void Select(ScRadioButton button)
 {
     if (string.IsNullOrEmpty(button.Group))
     {
         m_Select = button;
     }
     else
     {
         if (m_GroupSelect == null)
         {
             m_GroupSelect = new Dictionary <string, ScRadioButton>();
         }
         m_GroupSelect[button.Group] = button;
     }
     foreach (var b in m_Buttons)
     {
         if (button.Group == b.Group)
         {
             b.ChangeEvent(b == button);
         }
     }
     OnSelect?.Invoke(button);
 }
Ejemplo n.º 3
0
 public void Register(ScRadioButton button) => m_Buttons.Add(button);