public static DialogResult ShowMessageBox(
     this IDialogController mainForm,
     IDialogParent?owner,
     string text,
     string?caption,
     MessageBoxButtons buttons,
     EMsgBoxIcon?icon)
 => MessageBox.Show(
     owner?.AsWinFormsHandle(),
     text,
     caption ?? string.Empty,
     buttons,
     icon switch
 {
     null => MessageBoxIcon.None,
コード例 #2
0
        public IDisposable AcquireVideoCodecToken(Config config)
        {
            var ret = new CodecToken();

            // load from config and sanitize
            int t = Math.Min(Math.Max(config.JmdThreads, 1), 6);

            int c = Math.Min(Math.Max(config.JmdCompression, NO_COMPRESSION), BEST_COMPRESSION);

            if (!JmdForm.DoCompressionDlg(ref t, ref c, 1, 6, NO_COMPRESSION, BEST_COMPRESSION, _dialogParent.AsWinFormsHandle()))
            {
                return(null);
            }

            config.JmdThreads     = ret.NumThreads = t;
            config.JmdCompression = ret.CompressionLevel = c;

            return(ret);
        }
 public static DialogResult ShowDialogWithTempMute(this IDialogParent dialogParent, Form dialog)
 => dialogParent.DialogController.DoWithTempMute(() => dialog.ShowDialog(dialogParent.AsWinFormsHandle()));
 public static DialogResult ShowDialogAsChild(this IDialogParent dialogParent, Form dialog)
 => dialog.ShowDialog(dialogParent.AsWinFormsHandle());