ComponentFactory.Krypton.Toolkit.KryptonRadioButton.AutoUpdateOthers C# (CSharp) Method

AutoUpdateOthers() private method

private AutoUpdateOthers ( ) : void
return void
        private void AutoUpdateOthers()
        {
            // Only uncheck others if we are checked and in auto check
            if (AutoCheck && Checked)
            {
                Control parent = Parent;
                if (parent != null)
                {
                    // Search all sibling controls
                    foreach (Control c in parent.Controls)
                    {
                        // If another radio button found, that is not us
                        if ((c != this) && (c is KryptonRadioButton))
                        {
                            // Cast to correct type
                            KryptonRadioButton rb = (KryptonRadioButton)c;

                            // If target allows auto check changed and is currently checked
                            if (rb.AutoCheck && rb.Checked)
                            {
                                // Set back to not checked
                                rb.Checked = false;
                            }
                        }
                    }
                }
            }
        }