示例#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));
            }
        }
示例#2
0
文件: LicenseBox.cs 项目: adbre/cab42
        /// <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);
            }
        }
示例#3
0
 private void licenseToolStripMenuItem_Click(object sender, EventArgs e)
 {
     LicenseBox.ShowDialog(this, Properties.Resources.LICENSE);
 }