Darp.Utils.Dialog 1.7.4

There is a newer version of this package available.
See the version list below for details.
dotnet add package Darp.Utils.Dialog --version 1.7.4                
NuGet\Install-Package Darp.Utils.Dialog -Version 1.7.4                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Darp.Utils.Dialog" Version="1.7.4" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Darp.Utils.Dialog --version 1.7.4                
#r "nuget: Darp.Utils.Dialog, 1.7.4"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Darp.Utils.Dialog as a Cake Addin
#addin nuget:?package=Darp.Utils.Dialog&version=1.7.4

// Install Darp.Utils.Dialog as a Cake Tool
#tool nuget:?package=Darp.Utils.Dialog&version=1.7.4                

Darp.Utils

Test (and publish) License

This repository bundles all open source c# helper modules of 'rosslight GmbH'. To extend, add a new project and test project.

Darp.Utils.Assets

NuGet Downloads

A collection of simple interfaces for app assets targeting desktop apps.

Currently implemented:

  • AppDataAssetsService: Read or write to the ApplicationData. The relativePath might be e.g. the app name.

Example:

ServiceProvider provider = new ServiceCollection()
    .AddAppDataAssetsService("RelativePath")
    .BuildServiceProvider();

IAppDataAssetsService service = provider.GetRequiredService<IAppDataAssetsService>();
await service.SerializeJsonAsync("test.json", new { Prop1 = "value" });

Darp.Utils.Configuration

NuGet Downloads

A writable configuration service. Can be registered using DI and injected into target services. Usage might include reading, writing and listening to changes via the INotifyPropertyChanged interface.

Example:

ServiceProvider provider = new ServiceCollection()
    .AddAppDataAssetsService("RelativePath")
    .AddConfigurationFile<TestConfig, IAppDataAssetsService>("config.json")
    .BuildServiceProvider();

IConfigurationService<TestConfig> service = provider.GetRequiredService<IConfigurationService<TestConfig>>();
TestConfig config = await service.LoadConfigurationAsync();
await service.WriteConfigurationAsync(config with { Setting = "NewValue" });

Darp.Utils.Dialog

NuGet Downloads

A lightweight dialog service which allows for opening dialogs from the ViewModel.

Implementation Description
NuGet Implementation based on FluentAvalonia

Example:

ServiceProvider provider = new ServiceCollection()
    .AddSingleton<IDialogService, AvaloniaDialogService>()
    .BuildServiceProvider();

IDialogService dialogService = provider.GetRequiredService<IDialogService>();
await _dialogService.CreateMessageBoxDialog("Title", "Message").ShowAsync();

// Assumes you have registered a view for 'SomeViewModel' in a ViewLocator
// Works with any kind of content
var viewModel = new SomeViewModel();
await _dialogService.CreateContentDialog("Title", viewModel)
    .SetDefaultButton(ContentDialogButton.Primary)
    .SetCloseButton("Close")
    .SetPrimaryButton("Ok", onClick: model => model.IsModelValid)
    .ShowAsync();

Darp.Utils.ResxSourceGenerator

A source generator for generating strongly typed singleton resource classes from .resx files. Based on the Microsoft.CodeAnalysis.ResxSourceGenerator.

Usage

YourProject.csproj

<Project>
    <PropertyGroup>
        <SkipShowResxFilesInHierarchy>false</SkipShowResxFilesInHierarchy>
    </PropertyGroup>
    <ItemGroup>
        <PackageReference Include="Darp.Utils.ResxSourceGenerator" Version="X.Y.Z" PrivateAssets="all"/>
    </ItemGroup>
    <ItemGroup>
        
        <AdditionalFiles Include="Localization\Resources1.resx"/>
        
        <AdditionalFiles Include="Localization\Resources2.resx"
                         GenerateSource="true"
                         RelativeDir=""
                         ClassName=""
                         EmitFormatMethods="false"
                         EmitObserveMethods="false"
                         Public="false"/>
    </ItemGroup>
</Project>
Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Darp.Utils.Dialog:

Package Downloads
Darp.Utils.Dialog.FluentAvalonia

Implementation of Darp.Utils.Dialog compatible with Avalonia

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.10.0 139 10/21/2024
1.9.2 151 10/19/2024
1.9.1 129 10/19/2024
1.9.0 121 9/30/2024
1.8.0 121 9/26/2024
1.7.4 102 9/23/2024
1.7.3 88 9/22/2024
1.7.2 98 9/22/2024
1.7.1 100 9/22/2024
1.7.0 87 9/22/2024
1.6.3 196 9/10/2024
1.6.2 137 9/9/2024
1.6.1 107 9/9/2024
1.6.0 116 9/9/2024
1.5.1 112 9/7/2024
1.5.0 130 9/5/2024