Dialogs/Dialog.cs
Method Show
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public ButtonBase? Show(nint hwnd)
{
if (CurrentPage.IsShown)
{
throw new InvalidOperationException("The dialog is already being shown.");
Method Callback
has 5 arguments (exceeds 4 allowed). Consider refactoring. Wontfix
Wontfix
protected HRESULT Callback(HWND hwnd, TaskDialogNotification msg, nint wParam, nint lParam, nint refData)
Incorrect end of line character(s) found. Open
Open
namespace Scover.Dialogs;
- Exclude checks
Incorrect end of line character(s) found. Open
Open
/// <summary>
- Exclude checks
Incorrect end of line character(s) found. Open
Open
/// </summary>
- Exclude checks
Incorrect end of line character(s) found. Open
Open
{
- Exclude checks
Incorrect end of line character(s) found. Open
Open
/// <value>
- Exclude checks
Incorrect end of line character(s) found. Open
Open
/// Could not show the dialog because Windows Task Dialogs require Windows Vista or later.
- Exclude checks
Incorrect end of line character(s) found. Open
Open
/// <inheritdoc cref="Show()"/>
- Exclude checks
Incorrect end of line character(s) found. Open
Open
/// <param name="hwnd">
- Exclude checks
Incorrect end of line character(s) found. Open
Open
- Exclude checks
Incorrect end of line character(s) found. Open
Open
CurrentPage.UpdateRequested += PerformUpdate;
- Exclude checks
Incorrect end of line character(s) found. Open
Open
}
- Exclude checks
Incorrect end of line character(s) found. Open
Open
/// <inheritdoc cref="TaskDialogCallbackProc"/>
- Exclude checks
Incorrect end of line character(s) found. Open
Open
- Exclude checks
Incorrect end of line character(s) found. Open
Open
/// <summary>Gets the current page.</summary>
- Exclude checks
Incorrect end of line character(s) found. Open
Open
/// cref="WindowLocation.CenterScreen"/>.
- Exclude checks
Incorrect end of line character(s) found. Open
Open
throw new PlatformNotSupportedException("Can't show the dialog becuase Windows Task Dialogs require Windows Vista or later.", e);
- Exclude checks
Incorrect end of line character(s) found. Open
Open
return CurrentPage.HandleNotification(notif);
- Exclude checks
Incorrect end of line character(s) found. Open
Open
public class Dialog
- Exclude checks
Incorrect end of line character(s) found. Open
Open
/// currently being displayed in the dialog.
- Exclude checks
Incorrect end of line character(s) found. Open
Open
/// <summary>Shows a modal dialog with the active window attached to the calling thread's message queue as a
- Exclude checks
Incorrect end of line character(s) found. Open
Open
/// <exception cref="PlatformNotSupportedException">
- Exclude checks
Incorrect end of line character(s) found. Open
Open
/// <exception cref="EntryPointNotFoundException">
- Exclude checks
Incorrect end of line character(s) found. Open
Open
/// One or more required <see langword="extern"/> functions could not be found.
- Exclude checks
Incorrect end of line character(s) found. Open
Open
{
- Exclude checks
Incorrect end of line character(s) found. Open
Open
- Exclude checks
Incorrect end of line character(s) found. Open
Open
- Exclude checks
Incorrect end of line character(s) found. Open
Open
/// features than a message box.
- Exclude checks
Incorrect end of line character(s) found. Open
Open
=> CurrentPage = page;
- Exclude checks
Incorrect end of line character(s) found. Open
Open
/// <summary>Forcefully closes this dialog, ignoring navigation.</summary>
- Exclude checks
Incorrect end of line character(s) found. Open
Open
/// When this method is called, the returned button of show methods will be <see cref="Button.Cancel"/>.
- Exclude checks
Incorrect end of line character(s) found. Open
Open
/// </param>
- Exclude checks
Incorrect end of line character(s) found. Open
Open
/// <inheritdoc cref="Show()"/>
- Exclude checks
Incorrect end of line character(s) found. Open
Open
CurrentPage.IsShown = true;
- Exclude checks
Incorrect end of line character(s) found. Open
Open
TaskDialogIndirect(config, out int pnButton, out _, out _).ThrowIfFailed();
- Exclude checks
Incorrect end of line character(s) found. Open
Open
}
- Exclude checks
Incorrect end of line character(s) found. Open
Open
{
- Exclude checks
Incorrect end of line character(s) found. Open
Open
/// A dialog box that displays information and receives simple input from the user. Like a message box, it
- Exclude checks
Incorrect end of line character(s) found. Open
Open
- Exclude checks
Incorrect end of line character(s) found. Open
Open
public nint Handle { get; protected set; }
- Exclude checks
Incorrect end of line character(s) found. Open
Open
public virtual void Close() => CurrentPage.Exit();
- Exclude checks
Incorrect end of line character(s) found. Open
Open
{
- Exclude checks
Incorrect end of line character(s) found. Open
Open
using Vanara.PInvoke;
- Exclude checks
Incorrect end of line character(s) found. Open
Open
using static Vanara.PInvoke.ComCtl32;
- Exclude checks
Incorrect end of line character(s) found. Open
Open
/// <value>
- Exclude checks
Incorrect end of line character(s) found. Open
Open
/// </value>
- Exclude checks
Incorrect end of line character(s) found. Open
Open
/// The <see cref="ButtonBase"/> that was clicked, or <see langword="null"/> if the dialog was closed
- Exclude checks
Incorrect end of line character(s) found. Open
Open
/// <exception cref="System.ComponentModel.Win32Exception">
- Exclude checks
Incorrect end of line character(s) found. Open
Open
- Exclude checks
Incorrect end of line character(s) found. Open
Open
/// <summary>Shows a dialog.</summary>
- Exclude checks
Incorrect end of line character(s) found. Open
Open
{
- Exclude checks
Incorrect end of line character(s) found. Open
Open
public Page CurrentPage { get; protected set; }
- Exclude checks
Incorrect end of line character(s) found. Open
Open
- Exclude checks
Incorrect end of line character(s) found. Open
Open
/// The location of the dialog window when it is first shown. Default value is <see
- Exclude checks
Incorrect end of line character(s) found. Open
Open
/// parent.</summary>
- Exclude checks
Incorrect end of line character(s) found. Open
Open
/// <returns>
- Exclude checks
Incorrect end of line character(s) found. Open
Open
/// programmatically.
- Exclude checks
Incorrect end of line character(s) found. Open
Open
/// </exception>
- Exclude checks
Incorrect end of line character(s) found. Open
Open
/// <param name="parent">The parent window to use.</param>
- Exclude checks
Incorrect end of line character(s) found. Open
Open
using (new ComCtlV6ActivationContext())
- Exclude checks
Incorrect end of line character(s) found. Open
Open
}
- Exclude checks
Incorrect end of line character(s) found. Open
Open
}
- Exclude checks
Incorrect end of line character(s) found. Open
Open
- Exclude checks
Incorrect end of line character(s) found. Open
Open
public ButtonBase? Show() => Show(ParentWindow.Active);
- Exclude checks
Incorrect end of line character(s) found. Open
Open
/// <summary>Shows a dialog.</summary>
- Exclude checks
Incorrect end of line character(s) found. Open
Open
if (CurrentPage.IsShown)
- Exclude checks
Incorrect end of line character(s) found. Open
Open
}
- Exclude checks
Incorrect end of line character(s) found. Open
Open
Notification notif = new(msg, wParam, lParam);
- Exclude checks
Incorrect end of line character(s) found. Open
Open
public const char MnemonicPrefix = '&';
- Exclude checks
Incorrect end of line character(s) found. Open
Open
public Dialog(Page page)
- Exclude checks
Incorrect end of line character(s) found. Open
Open
/// <remarks>
- Exclude checks
Incorrect end of line character(s) found. Open
Open
{
- Exclude checks
Incorrect end of line character(s) found. Open
Open
catch (EntryPointNotFoundException e) when (Environment.OSVersion.Platform != PlatformID.Win32NT || Environment.OSVersion.Version < new Version(6, 0, 6000))
- Exclude checks
Incorrect end of line character(s) found. Open
Open
finally
- Exclude checks
Incorrect end of line character(s) found. Open
Open
CurrentPage.UpdateRequested -= PerformUpdate;
- Exclude checks
Incorrect end of line character(s) found. Open
Open
/// </remarks>
- Exclude checks
Incorrect end of line character(s) found. Open
Open
public ButtonBase? Show(ParentWindow parent) => Show(parent.Hwnd);
- Exclude checks
Incorrect end of line character(s) found. Open
Open
protected HRESULT Callback(HWND hwnd, TaskDialogNotification msg, nint wParam, nint lParam, nint refData)
- Exclude checks
Incorrect end of line character(s) found. Open
Open
- Exclude checks
Incorrect end of line character(s) found. Open
Open
/// If the dialog has not yet been shown, the first page of the dialog, otherwise the page that is
- Exclude checks
Incorrect end of line character(s) found. Open
Open
public WindowLocation StartupLocation { get; set; }
- Exclude checks
Incorrect end of line character(s) found. Open
Open
{
- Exclude checks
Incorrect end of line character(s) found. Open
Open
return CurrentPage.GetClickedButton(pnButton);
- Exclude checks
Incorrect end of line character(s) found. Open
Open
/// <summary>
- Exclude checks
Incorrect end of line character(s) found. Open
Open
}
- Exclude checks
Incorrect end of line character(s) found. Open
Open
/// </summary>
- Exclude checks
Incorrect end of line character(s) found. Open
Open
protected void PerformUpdate(Page sender, Action<PageUpdateInfo> update) => update(new(Handle));
- Exclude checks
Incorrect end of line character(s) found. Open
Open
/// </exception>
- Exclude checks
Incorrect end of line character(s) found. Open
Open
/// </exception>
- Exclude checks
Incorrect end of line character(s) found. Open
Open
/// The parent window handle. The dialog will be modal if the value differs from 0.
- Exclude checks
Incorrect end of line character(s) found. Open
Open
}
- Exclude checks
Incorrect end of line character(s) found. Open
Open
/// <summary>The mnemonic (accelerator) prefix used by all dialog controls.</summary>
- Exclude checks
Incorrect end of line character(s) found. Open
Open
/// </value>
- Exclude checks
Incorrect end of line character(s) found. Open
Open
/// <exception cref="InvalidOperationException">The dialog is already being shown.</exception>
- Exclude checks
Incorrect end of line character(s) found. Open
Open
var config = CurrentPage.SetupConfig(Callback, hwnd, StartupLocation);
- Exclude checks
Incorrect end of line character(s) found. Open
Open
try
- Exclude checks
Incorrect end of line character(s) found. Open
Open
{
- Exclude checks
Incorrect end of line character(s) found. Open
Open
/// is formatted by the operating system according to parameters you set. However, a dialog has many more
- Exclude checks
Incorrect end of line character(s) found. Open
Open
- Exclude checks
Incorrect end of line character(s) found. Open
Open
/// <param name="page">The page of the dialog.</param>
- Exclude checks
Incorrect end of line character(s) found. Open
Open
/// Gets the window handle of the dialog, or 0 if the dialog is currently not being shown.
- Exclude checks
Incorrect end of line character(s) found. Open
Open
/// An error occured while displaying the dialog.
- Exclude checks
Incorrect end of line character(s) found. Open
Open
/// <summary>Performs an update using <see cref="Handle"/>.</summary>
- Exclude checks
Incorrect end of line character(s) found. Open
Open
- Exclude checks
Incorrect end of line character(s) found. Open
Open
/// <summary>Gets or sets the window startup location.</summary>
- Exclude checks
Incorrect end of line character(s) found. Open
Open
- Exclude checks
Incorrect end of line character(s) found. Open
Open
- Exclude checks
Incorrect end of line character(s) found. Open
Open
public ButtonBase? Show(nint hwnd)
- Exclude checks
Incorrect end of line character(s) found. Open
Open
}
- Exclude checks
Incorrect end of line character(s) found. Open
Open
Handle = hwnd.DangerousGetHandle();
- Exclude checks
Incorrect end of line character(s) found. Open
Open
/// </returns>
- Exclude checks
Incorrect end of line character(s) found. Open
Open
throw new InvalidOperationException("The dialog is already being shown.");
- Exclude checks
Incorrect end of line character(s) found. Open
Open
CurrentPage.IsShown = false;
- Exclude checks
Incorrect end of line character(s) found. Open
Open
- Exclude checks