FindMyFiles

FindMyFiles.Views

ServiceManagerDialog Class

Wiring only: the gear menu's "Manage service…" dialog. State and the elevated mutations live in ServiceManagerViewModel; the buttons fire-and-forget its async actions through the sanctioned Forget(this Task, string) funnel (CLAUDE.md convention).

public sealed class ServiceManagerDialog : Microsoft.UI.Xaml.Controls.ContentDialog, Microsoft.UI.Xaml.Markup.IComponentConnector

Inheritance System.ObjectMicrosoft.UI.Xaml.DependencyObjectMicrosoft.UI.Xaml.UIElementMicrosoft.UI.Xaml.FrameworkElementMicrosoft.UI.Xaml.Controls.ControlMicrosoft.UI.Xaml.Controls.ContentControlMicrosoft.UI.Xaml.Controls.ContentDialog → ServiceManagerDialog

Implements Microsoft.UI.Xaml.Markup.IComponentConnector

Constructors

ServiceManagerDialog() Constructor

Creates the ViewModel and runs the initial state `Refresh`. The only public entry point is OpenAsync(); direct constructor calls are not expected.

public ServiceManagerDialog();

Properties

ServiceManagerDialog.VM Property

ViewModel for service state and elevation-requiring operations (register/uninstall/start/stop/restart). Each button fires this instance's async actions via `Forget`.

public FindMyFiles.ViewModels.ServiceManagerViewModel VM { get; }

Property Value

ServiceManagerViewModel

Methods

ServiceManagerDialog.Connect(int, object) Method

Connect()

public void Connect(int connectionId, object target);

Parameters

connectionId System.Int32

target System.Object

Implements Connect(int, object)

ServiceManagerDialog.GetBindingConnector(int, object) Method

GetBindingConnector(int connectionId, object target)

public Microsoft.UI.Xaml.Markup.IComponentConnector GetBindingConnector(int connectionId, object target);

Parameters

connectionId System.Int32

target System.Object

Implements GetBindingConnector(int, object)

Returns

Microsoft.UI.Xaml.Markup.IComponentConnector

ServiceManagerDialog.InitializeComponent() Method

InitializeComponent()

public void InitializeComponent();

ServiceManagerDialog.OpenAsync() Method

The single entry point that opens the manager (the gear menu). Resolves a XamlRoot from the main window and guards against a second instance (ContentDialog allows only one open at a time). Named OpenAsync, not ShowAsync, to avoid hiding the inherited Microsoft.UI.Xaml.Controls.ContentDialog.ShowAsync.

public static System.Threading.Tasks.Task OpenAsync();

Returns

System.Threading.Tasks.Task
A System.Threading.Tasks.Task that completes when the dialog closes.