Ejemplo n.º 1
0
        }//end nudRSIMin_ValueChanged

        private void nudRSIMax_ValueChanged(object sender, EventArgs e)
        {
            if (!loadingSector)
            {
                if (cmbSector.SelectedIndex == 0 && !dontShowAgain)
                {
                    frmDontShowAgain frm = new frmDontShowAgain();
                    if (frm.ShowDialog() == DialogResult.OK)
                    {
                        dontShowAgain = frm.GetDontShowAgain();
                        errPreferences.SetError(pnlCustomRSI, "");
                        SetFilterValue(nudRSIMin, nudRSIMax, "rsi");
                    }//end 2x nested if
                }
                else
                {
                    errPreferences.SetError(pnlCustomRSI, "");
                    SetFilterValue(nudRSIMin, nudRSIMax, "rsi");
                }//end nested if-else
            }
        }//end nudRSIMax_ValueChanged
Ejemplo n.º 2
0
        }//end nudRSIMax_ValueChanged

        /// <summary>
        /// The essential function of each ComboBox.  Checks to make sure a valid index is selected and sets the value in
        /// the Preferences Dictionary if the Sector has already been loaded
        /// </summary>
        /// <param name="cmb">The ComboBox being changed</param>
        /// <param name="name">The name of the filter</param>
        /// <param name="filterIdentifier">The filter string used in the Dictionary.  Camel case with no special characters; ex. pe, currentRatio, sma20</param>
        private void ComboBoxIndexChanged(ComboBox cmb, string name, string filterIdentifier)
        {
            if (cmb.SelectedIndex < 1) { errPreferences.SetError(cmb, String.Format("Select a value for {0} filter from the dropdown menu!", name)); }
            else if (!loadingSector)
            {
                if(cmbSector.SelectedIndex == 0 && !dontShowAgain)
                {
                    frmDontShowAgain frm = new frmDontShowAgain();
                    if(frm.ShowDialog() == DialogResult.OK)
                    {
                        dontShowAgain = frm.GetDontShowAgain();
                        errPreferences.SetError(cmb, "");
                        SetFilterValue(cmb, filterIdentifier);
                        SetSectorFiltersSet(currentSector);
                    }//end 2x nested if
                } else
                {
                    errPreferences.SetError(cmb, "");
                    SetFilterValue(cmb, filterIdentifier);
                    SetSectorFiltersSet(currentSector);
                }//end nested if-else
            }//end if-else
        }