Ejemplo n.º 1
0
        /// <summary>
        /// Display a Don't Ask Again dialog, returns true if he clicked Yes.
        /// </summary>
        /// <param name="language">Language to use</param>
        /// <param name="labelValue">Label string</param>
        /// <param name="againValue">The current stored boolean and reference to the new one</param>
        /// <returns></returns>
        public static bool Show(Language language, string labelValue, ref bool dontShow)
        {
            if (dontShow)
                return true;

            using (var form = new DontAskAgain())
            {
                form.StartPosition = FormStartPosition.CenterParent;
                form.label1.Text = labelValue;

                form.ShowDialog();

                dontShow = form.checkBox1.Checked;

                return form.DialogResult == DialogResult.Yes;
            }
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Display a Don't Ask Again dialog, returns true if he clicked Yes.
        /// </summary>
        /// <param name="language">Language to use</param>
        /// <param name="labelValue">Label string</param>
        /// <param name="againValue">The current stored boolean and reference to the new one</param>
        /// <returns></returns>
        public static bool Show(Language language, string labelValue, ref bool dontShow)
        {
            if (dontShow)
            {
                return(true);
            }

            using (var form = new DontAskAgain())
            {
                form.StartPosition = FormStartPosition.CenterParent;
                form.label1.Text   = labelValue;

                form.ShowDialog();

                dontShow = form.checkBox1.Checked;

                return(form.DialogResult == DialogResult.Yes);
            }
        }