Ejemplo n.º 1
0
        private void Initialize_Radios()
        {
            // Set the checked changed for each radio button
            foreach (GroupBox gbx in this.Controls.OfType <GroupBox>())
            {
                foreach (RadioButton rdo in gbx.Controls.OfType <RadioButton>())
                {
                    rdo.CheckedChanged += rdo_CheckChanged;
                }
            }

            // Instantiate each frequency radio
            QFreqRdo   = new FrequencyRadio(this, rdoQuarterly, "Quarterly", gbxQuarterly);
            SAFreqRdo  = new FrequencyRadio(this, rdoSemiAnnual, "SA", gbxSA);
            AFreqRdo   = new FrequencyRadio(this, rdoAnnual, "Annual", gbxAnnual);
            OFreqRdo   = new FrequencyRadio(this, rdoOther);
            AllFreqRdo = new FrequencyRadio(this, rdoAllFrequency, "Annual", gbxAnnual);

            // Set default client type of AUM
            rdoAUM.Checked = true;

            // Set default client frequency of quarterly
            QFreqRdo.FormRdo.Checked = true;

            // Set default client rotation based on the current month
            QFreqRdo.Show_Months();
        }
Ejemplo n.º 2
0
        private void Frequency_Changed(RadioButton rdo)
        {
            // Get the FrequencyRadio that was checked
            FrequencyRadio freqRdo = Get_Checked_Frequency_Radio(rdo);

            if (freqRdo == null)
            {
                // No frequency radio was found; do nothing
                return;
            }

            // Show the corresponding rotation group box for the checked frequency
            // and get the checked rotation radio from the visible group box
            RadioButton checkedRotation = freqRdo.Show_Months();

            formCheckedRotation = checkedRotation == null ? "" : checkedRotation.Text;

            // Change the checked frequency variable
            formCheckedFrequency = rdo.Text;
        }