Mdh.GraphicsInserts
1.0.2
See the version list below for details.
dotnet add package Mdh.GraphicsInserts --version 1.0.2
NuGet\Install-Package Mdh.GraphicsInserts -Version 1.0.2
<PackageReference Include="Mdh.GraphicsInserts" Version="1.0.2" />
<PackageVersion Include="Mdh.GraphicsInserts" Version="1.0.2" />
<PackageReference Include="Mdh.GraphicsInserts" />
paket add Mdh.GraphicsInserts --version 1.0.2
#r "nuget: Mdh.GraphicsInserts, 1.0.2"
#:package Mdh.GraphicsInserts@1.0.2
#addin nuget:?package=Mdh.GraphicsInserts&version=1.0.2
#tool nuget:?package=Mdh.GraphicsInserts&version=1.0.2
MDH Graphics Inserts — .NET client
MDH Graphics Inserts lets a production team and event organizers manage on-screen graphics ("inserts": name cards, info tags, tickers, countdowns…) online — organizers fill in the content from a share link, the operator takes them to air from the graphics machine. These packages put that library inside your own Windows graphics application, whatever render engine it drives.
| Package | Targets | What you get |
|---|---|---|
Mdh.GraphicsInserts |
.NET Standard 2.0 | Sign-in, the live-synced insert tree, offline cache, local editing with an outbox, preview upload, and the renderer contract you implement |
Mdh.GraphicsInserts.Wpf |
.NET Framework 4.8 · .NET 8 (Windows) | A ready-made operator panel (InsertsPanel): tree with folders, draw/edit/duplicate/move, sync status, on-air log, preview images; event picker; DPAPI token store |
dotnet add package Mdh.GraphicsInserts
dotnet add package Mdh.GraphicsInserts.Wpf
How it works
- Live, but never behind the operator's back. The client keeps a WebSocket to the event; a newer version of the tree arrives as a pending update and is applied only when the operator clicks Apply update. What is on screen never changes by itself.
- Works offline. The last applied tree is cached on disk and restored on start. Edits made in the panel (new graphic, changed texts, moves, deletes) go into a local outbox and are synced when the server is reachable again — the panel shows how many changes are waiting.
- Your engine, your rules. The library never touches your render engine
directly. You implement
IInsertRenderer(draw / take / clear / actions); optional interfaces add preview capture and on-air reporting. - Previews for the organizers. Every graphic the operator previews is captured and uploaded, so the people filling in the content see what their text looks like on screen. "Preview all" renders the whole tree in one go.
Quick start (WPF)
using Mdh.GraphicsInserts.Auth;
using Mdh.GraphicsInserts.Rendering;
using Mdh.GraphicsInserts.Sync;
using Mdh.GraphicsInserts.Wpf;
using Mdh.GraphicsInserts.Wpf.Controls;
var serverUrl = "https://inserts.example.com";
var dataDir = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), "MyApp", "inserts");
var tokenStore = new DpapiTokenStore(); // encrypted per Windows user
var auth = new OAuthAuthenticator(serverUrl, tokenStore);
var sync = new SyncClient(
() => tokenStore.Load(),
new SnapshotFileCache(dataDir), // offline copy of the tree
outboxStore: new OutboxFileStore(dataDir), // edits made while offline
previewCache: new PreviewFileCache(dataDir)); // preview images
// 1. Sign in through the system browser (PKCE); the token is stored for next time.
if (tokenStore.Load() == null) await auth.SignInAsync();
// 2. Let the operator pick the event this production is linked to.
var events = await sync.ListEventsAsync(serverUrl);
var picker = new EventPickerDialog(events, currentEventId: null);
if (picker.ShowDialog() != true) return;
// 3. Start syncing and show the panel.
await sync.StartAsync(serverUrl, picker.SelectedEvent!.Id);
IInsertRenderer renderer = new MyEngineRenderer(); // see below
var panel = new InsertsPanel
{
DataContext = new InsertsPanelViewModel(sync, renderer, serverUrl,
previewSource: renderer as IInsertPreviewSource, // optional
previewUploader: new PreviewUploader(() => tokenStore.Load())),
};
Put panel anywhere in your window — it lays itself out for a narrow dock
(editor under the tree) or a wide one (editor beside it).
Implementing the renderer
IInsertRenderer is the whole contract between the library and your engine.
An InsertGraphic carries the graphic's scene key and its values as
"node/property" → text, exactly as filled in online.
public sealed class MyEngineRenderer : IInsertRenderer, IInsertAirNotifier
{
public event EventHandler<InsertGraphicAirEventArgs>? TakenLive;
public Task DrawAsync(InsertGraphic insert, CancellationToken ct = default)
{
var scene = Engine.LoadScene(insert.SceneKey);
foreach (var slot in insert.Values) // "text_name/Text" → "Jane Doe"
scene.Set(slot.Key, slot.Value);
scene.Prepare(); // on preview, not on air
return Task.CompletedTask;
}
public Task TakeInAsync(CancellationToken ct = default) { Engine.Take(); return Task.CompletedTask; }
public Task TakeOutAsync(CancellationToken ct = default) { Engine.Clear(); return Task.CompletedTask; }
public Task ExecuteActionAsync(string action, CancellationToken ct = default)
{
Engine.CallAction(action); // scene-defined: "next page", "start crawl"…
return Task.CompletedTask;
}
}
Optional capabilities, each detected automatically by the panel:
| Interface | Adds |
|---|---|
IInsertAirNotifier |
Raise TakenLive when a graphic goes to air → the event's on-air log |
IInsertPreviewSource |
Render a graphic to an off-air preview channel and return a PNG → enables Preview all |
IInsertPreviewSnapshot |
Grab the preview channel as it is → the preview is uploaded after every draw |
IInsertPreviewCleanup |
Hide what a preview run drew, so nothing is left one take away from air |
Using the library without the WPF panel
Everything the panel does is available on SyncClient:
sync.UpdateAvailable += (_, e) => /* show "update available (v{e.Snapshot.Version})" */;
sync.SnapshotApplied += (_, e) => RebuildTree(e.Snapshot.Tree);
sync.ApplyPendingUpdate(); // the operator's choice
var node = sync.AddInsert(new NewInsertRequest
{
ParentId = folderId, Name = "Jane Doe", SceneKey = "NameCard",
Values = new Dictionary<string, string> { ["text_name/Text"] = "Jane Doe" },
});
sync.UpdateInsert(node.Id, new InsertPatch { Values = new Dictionary<string, string> { ["text_role/Text"] = "Referee" } });
sync.MoveInsertUp(node.Id);
await sync.FlushAsync(); // or let the client sync in the background
Requirements
- Windows for
Mdh.GraphicsInserts.Wpf(.NET Framework 4.8 or .NET 8);Mdh.GraphicsInsertsitself runs anywhere .NET Standard 2.0 does. - An MDH Graphics Inserts account with access to the event.
© MDH Technologies · https://mdh.technology
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. 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. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
| .NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
| .NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen40 was computed. tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- System.Text.Json (>= 8.0.5)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Mdh.GraphicsInserts:
| Package | Downloads |
|---|---|
|
Mdh.GraphicsInserts.Wpf
WPF controls for MDH Graphics Inserts: the inserts panel (tree, draw/take, apply-update gate, Preview All), event picker, sign-in flow, and a DPAPI token store. |
GitHub repositories
This package is not used by any popular GitHub repositories.