Esempio n. 1
0
        /// <summary>
        /// Shows the form as a modal dialog box with the specified owner.
        /// </summary>
        /// <param name="owner">The owner of the modal dialog box.</param>
        /// <param name="licenseTerms">The license terms to display.</param>
        /// <param name="caption">The title of the dialog box to display.</param>
        /// <returns>The dialog result.</returns>
        public static DialogResult ShowDialog(IWin32Window owner, string licenseTerms, string caption = null)
        {
            using (var f = new LicenseBox())
            {
                f.LicenseTerms = licenseTerms;

                if (!string.IsNullOrEmpty(caption))
                {
                    f.Text = caption;
                }

                return(((System.Windows.Forms.Form)f).ShowDialog(owner));
            }
        }
Esempio n. 2
0
        /// <summary>
        /// Shows the form as a modal dialog box with the specified owner.
        /// </summary>
        /// <param name="owner">The owner of the modal dialog box.</param>
        /// <param name="licenseTerms">The license terms to display.</param>
        /// <param name="caption">The title of the dialog box to display.</param>
        /// <returns>The dialog result.</returns>
        public static DialogResult ShowDialog(IWin32Window owner, string licenseTerms, string caption = null)
        {
            using (var f = new LicenseBox())
            {
                f.LicenseTerms = licenseTerms;

                if (!string.IsNullOrEmpty(caption))
                {
                    f.Text = caption;
                }

                return ((System.Windows.Forms.Form)f).ShowDialog(owner);
            }
        }
Esempio n. 3
0
 private void licenseToolStripMenuItem_Click(object sender, EventArgs e)
 {
     LicenseBox.ShowDialog(this, Properties.Resources.LICENSE);
 }