public SshKeyPushFailedException(
     string message,
     IHelpTopic helpTopic)
     : base(message)
 {
     this.Help = helpTopic;
 }
Example #2
0
 public OsLoginSshKeyImportFailedException(
     string message,
     IHelpTopic helpTopic)
     : base(message)
 {
     this.Help = helpTopic;
 }
 public UnsupportedLegacySshKeyEncounteredException(
     string message,
     IHelpTopic helpTopic)
     : base(message)
 {
     this.Help = helpTopic;
 }
Example #4
0
 public IapRdpConnectionFailedException(
     string message,
     IHelpTopic helpTopic,
     Exception innerException)
     : base(message, innerException)
 {
     this.Help = helpTopic;
 }
Example #5
0
 public ResourceAccessDeniedException(
     string message,
     IHelpTopic helpTopic,
     Exception inner)
     : base(message, inner)
 {
     this.Help = helpTopic;
 }
 public void OpenTopic(IHelpTopic topic)
 {
     using (Process.Start(new ProcessStartInfo()
     {
         UseShellExecute = true,
         Verb = "open",
         FileName = topic.Address.ToString()
     }))
     { };
 }
        private void ShowErrorDialogWithHelp(
            IWin32Window parent,
            string caption,
            string message,
            string details,
            IHelpTopic helpTopic)
        {
            Debug.Assert(!(parent is Control) || !((Control)parent).InvokeRequired);

            using (ApplicationTraceSources.Default.TraceMethod().WithParameters(caption, message, details))
            {
                var config = new UnsafeNativeMethods.TASKDIALOGCONFIG()
                {
                    cbSize                 = (uint)Marshal.SizeOf(typeof(UnsafeNativeMethods.TASKDIALOGCONFIG)),
                    hwndParent             = parent?.Handle ?? IntPtr.Zero,
                    dwFlags                = 0,
                    dwCommonButtons        = UnsafeNativeMethods.TASKDIALOG_COMMON_BUTTON_FLAGS.TDCBF_OK_BUTTON,
                    pszWindowTitle         = "An error occured",
                    MainIcon               = TaskDialogIcons.TD_ERROR_ICON,
                    pszMainInstruction     = caption,
                    pszContent             = message,
                    pszExpandedInformation = details.ToString()
                };

                if (helpTopic != null)
                {
                    //
                    // Add hyperlinked footer text.
                    //

                    config.FooterIcon = TaskDialogIcons.TD_INFORMATION_ICON;
                    config.dwFlags   |= UnsafeNativeMethods.TASKDIALOG_FLAGS.TDF_EXPAND_FOOTER_AREA |
                                        UnsafeNativeMethods.TASKDIALOG_FLAGS.TDF_ENABLE_HYPERLINKS;
                    config.pszFooter  = $"For more information, see <A HREF=\"#\">{helpTopic.Title}</A>";
                    config.pfCallback = (hwnd, notification, wParam, lParam, refData) =>
                    {
                        if (notification == UnsafeNativeMethods.TASKDIALOG_NOTIFICATIONS.TDN_HYPERLINK_CLICKED)
                        {
                            this.serviceProvider.GetService <HelpService>().OpenTopic(helpTopic);
                        }

                        return(0); // S_OK;
                    };
                }

                UnsafeNativeMethods.TaskDialogIndirect(
                    ref config,
                    out int buttonPressed,
                    out int radioButtonPressed,
                    out bool verificationFlagPressed);
            }
        }
 public PasswordResetException(string message, IHelpTopic helpTopic)
     : base(message)
 {
     this.Help = helpTopic;
 }
Example #9
0
 public ConnectionFailedException(
     string message,
     IHelpTopic helpTopic) : base(message)
 {
     this.Help = helpTopic;
 }