Table of Contents

Interface IDialogService

Namespace
McServerLauncher.ViewModels
Assembly
McServerLauncher.dll

The questions and notices a view model puts to the user, behind an interface so what it does with the answer can be run without a window.

public interface IDialogService

Remarks

View models used to call MessageBox directly, which tied every "are you sure?" to a real window: the decision that follows it could only be tried by clicking. They now go through Current, which shows the real dialog unless a test has put a stand-in there.

Methods

ConfirmAsync(string, string, Window?)

Asks a yes/no question. True when the user accepts.

Task<bool> ConfirmAsync(string message, string title, Window? owner = null)

Parameters

message string
title string
owner Window

Returns

Task<bool>

ShowAsync(string, string, Window?)

Tells the user something and waits for it to be dismissed.

Task ShowAsync(string message, string title, Window? owner = null)

Parameters

message string
title string
owner Window

Returns

Task