![]() |
VOOZH | about |
dotnet add package DoenaSoft.AbstractionLayer.UI --version 2.0.8
NuGet\Install-Package DoenaSoft.AbstractionLayer.UI -Version 2.0.8
<PackageReference Include="DoenaSoft.AbstractionLayer.UI" Version="2.0.8" />
<PackageVersion Include="DoenaSoft.AbstractionLayer.UI" Version="2.0.8" />Directory.Packages.props
<PackageReference Include="DoenaSoft.AbstractionLayer.UI" />Project file
paket add DoenaSoft.AbstractionLayer.UI --version 2.0.8
#r "nuget: DoenaSoft.AbstractionLayer.UI, 2.0.8"
#:package DoenaSoft.AbstractionLayer.UI@2.0.8
#addin nuget:?package=DoenaSoft.AbstractionLayer.UI&version=2.0.8Install as a Cake Addin
#tool nuget:?package=DoenaSoft.AbstractionLayer.UI&version=2.0.8Install as a Cake Tool
Common UI abstractions used by the WinForms and WPF projects. This library provides small interface definitions that mirror important surface area of framework UI types so that application code can depend on interfaces instead of concrete types.
Package Id: DoenaSoft.AbstractionLayer.UI
Targets: netstandard2.0, net472, net10.0
The AbstractionLayer.UI project exposes the following interfaces in the Contracts folder. These are the actual interfaces implemented and used by the platform-specific adapters.
IUIServices (namespace DoenaSoft.AbstractionLayer.UIServices) - The primary UI service interface. Provides methods to show message boxes and common file/folder dialogs:
ShowMessageBox - Display a message box with configurable text, caption, buttons, and iconShowOpenFileDialog - Show an open file dialog for single or multiple file selectionShowSaveFileDialog - Show a save file dialogShowFolderBrowserDialog - Show a folder browser dialogIClipboardServices (namespace DoenaSoft.AbstractionLayer.UIServices) - Clipboard operations:
ContainsText - Check if clipboard contains textGetText - Retrieve text from clipboardSetText - Set text to clipboardSetDataObject - Set data object to clipboard with retry logic and persistence optionsISynchronizer (namespace DoenaSoft.AbstractionLayer.UI.Contracts) - Invoke work on the UI thread:
Invoke(Action) - Synchronously invoke an action on the UI threadInvoke<T>(Func<T>) - Synchronously invoke a function on the UI thread and return its resultBeginInvoke(Action) - Asynchronously invoke an action on the UI threadIDispatcherOperation (namespace DoenaSoft.AbstractionLayer.UI.Contracts) - Represents a posted dispatcher operation and exposes:
Result - Gets the result after completionStatus - Gets the current status (Pending, Aborted, Completed, Executing)Task - Gets a Task that represents the operationFileDialogOptions - Base configuration for file dialogs (filter, initial folder, title)OpenFileDialogOptions - Configuration for open file dialogs (extends FileDialogOptions, adds multi-select support)SaveFileDialogOptions - Configuration for save file dialogs (extends FileDialogOptions, adds overwrite prompt)FolderBrowserDialogOptions - Configuration for folder browser dialogs (description, selected path)MessageButton - Message box button configuration (OK, YesNo, YesNoCancel)MessageIcon - Message box icon types (None, Information, Warning, Error, Question)Result - Dialog result values (OK, Cancel, Yes, No, etc.)DispatcherStatus - Dispatcher operation status (Pending, Aborted, Completed, Executing)Program against these interfaces (for example IUIServices and ISynchronizer) and use the platform-specific adapter implementations in the WinForms or WPF projects. In unit tests provide fakes or mocks for these interfaces to avoid showing UI and to verify interactions.
public class MyViewModel
{
private readonly DoenaSoft.AbstractionLayer.UIServices.IUIServices _uiServices;
public MyViewModel(DoenaSoft.AbstractionLayer.UIServices.IUIServices uiServices)
{
_uiServices = uiServices;
}
public void SaveFile(string content)
{
var options = new SaveFileDialogOptions
{
Filter = "Text Files (*.txt)|*.txt|All Files (*.*)|*.*",
Title = "Save File"
};
if (_uiServices.ShowSaveFileDialog(options, out string fileName))
{
// Save content to fileName
}
}
}
Reference this project from UI-specific packages (WinForms/WPF) or your application and program against the interfaces. Concrete adapter/extension types in the platform-specific projects map the real framework objects to these interfaces at runtime.
License: MIT
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 net5.0 was computed. net5.0-windows net5.0-windows was computed. net6.0 net6.0 was computed. net6.0-android net6.0-android was computed. net6.0-ios net6.0-ios was computed. net6.0-maccatalyst net6.0-maccatalyst was computed. net6.0-macos net6.0-macos was computed. net6.0-tvos net6.0-tvos was computed. net6.0-windows net6.0-windows was computed. net7.0 net7.0 was computed. net7.0-android net7.0-android was computed. net7.0-ios net7.0-ios was computed. net7.0-maccatalyst net7.0-maccatalyst was computed. net7.0-macos net7.0-macos was computed. net7.0-tvos net7.0-tvos was computed. net7.0-windows net7.0-windows was computed. net8.0 net8.0 was computed. net8.0-android net8.0-android was computed. net8.0-browser net8.0-browser was computed. net8.0-ios net8.0-ios was computed. net8.0-maccatalyst net8.0-maccatalyst was computed. net8.0-macos net8.0-macos was computed. net8.0-tvos net8.0-tvos was computed. net8.0-windows net8.0-windows was computed. net9.0 net9.0 was computed. net9.0-android net9.0-android was computed. net9.0-browser net9.0-browser was computed. net9.0-ios net9.0-ios was computed. net9.0-maccatalyst net9.0-maccatalyst was computed. net9.0-macos net9.0-macos was computed. net9.0-tvos net9.0-tvos was computed. net9.0-windows net9.0-windows was computed. net10.0 net10.0 is compatible. net10.0-android net10.0-android was computed. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
| .NET Core | netcoreapp2.0 netcoreapp2.0 was computed. netcoreapp2.1 netcoreapp2.1 was computed. netcoreapp2.2 netcoreapp2.2 was computed. netcoreapp3.0 netcoreapp3.0 was computed. netcoreapp3.1 netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 netstandard2.0 is compatible. netstandard2.1 netstandard2.1 was computed. |
| .NET Framework | net461 net461 was computed. net462 net462 was computed. net463 net463 was computed. net47 net47 was computed. net471 net471 was computed. net472 net472 is compatible. net48 net48 was computed. net481 net481 was computed. |
| MonoAndroid | monoandroid monoandroid was computed. |
| MonoMac | monomac monomac was computed. |
| MonoTouch | monotouch monotouch was computed. |
| Tizen | tizen40 tizen40 was computed. tizen60 tizen60 was computed. |
| Xamarin.iOS | xamarinios xamarinios was computed. |
| Xamarin.Mac | xamarinmac xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos xamarinwatchos was computed. |
Showing the top 5 NuGet packages that depend on DoenaSoft.AbstractionLayer.UI:
| Package | Downloads |
|---|---|
|
DoenaSoft.AbstractionLayer.WPF
WPF implementations of UI abstraction interfaces from DoenaSoft.AbstractionLayer.UI. Provides WindowUIServices (message boxes, dialogs), WindowClipboardServices (comprehensive clipboard operations including text, audio, images, file drop lists), and WindowSynchronizer for dispatcher invocation. |
|
|
DoenaSoft.AbstractionLayer.WinForms
Windows Forms implementations of UI abstraction interfaces from DoenaSoft.AbstractionLayer.UI. Provides FormUIServices (message boxes, dialogs), FormClipboardServices (comprehensive clipboard operations including text, audio, images, file drop lists), and FormSynchronizer for thread marshaling. |
|
|
DoenaSoft.AdaptBookFileNames
A .NET library for organizing and standardizing audiobook and e-book file names with consistent naming conventions. Supports MP3, M4A, MP4 audiobooks and EPUB, MOBI e-books with sequential numbering and chapter management. |
|
|
DoenaSoft.PillRefresh
A .NET library for calculating medication supply duration and generating calendar reminders with automatic weekend and holiday avoidance. Supports multiple target frameworks and generates iCalendar (.ics) files compatible with Outlook, Google Calendar, and other applications. |
|
|
DoenaSoft.CalculateAudioBookRunningTimes
A library for extracting and calculating audiobook metadata including running times, chapters, authors, and narrators. Supports MP3 and MP4 audiobook formats with customizable interaction handling. |
This package is not used by any popular GitHub repositories.