Skip to content

EventTree

Class in Oadm.Sdk.Client.Controls · Oadm.Sdk.Client.dll

The events of an event picker as a tree (the folders each event declares, EventTypeInfo.Folders) in one flat, virtualized list of rows: folders in the catalog’s order, a folder’s subfolders before its events. The search shows only the events whose name or folders contain the text, their folders open. Building and filtering are O(n).

public sealed class EventTree : ObservableObject

Inherits ObservableObject

EventTree(IEnumerable<EventChoice> options)

The tree of options, every folder closed.

bool IsEmpty { get; private set; }

The search found nothing.

string Query { get; set; }

The search text; empty shows the folders as opened.

RangeObservableCollection<EventTreeRow> Rows { get; }

The rows to show now (one Reset per change).

static IReadOnlyList<string> Folders(EventChoice option)

The event’s folders, top first; none: its name is its folder.

static string PathText(EventChoice option)

The event’s folders and name as the closed picker shows them (“Devices › Selected devices › Device unreachable”).

EventTreeEvent? Reveal(EventChoice? option)

Opens the folders of an event (the chosen one, when the picker opens) and returns its row.

static string TextIn(EventChoice option, string folder)

The event’s name in its folder: without the folder’s name it starts with (“Any device: unreachable” in “Any device” is “Unreachable”), “(turned off)” when its plugin is off.

void Toggle(EventTreeFolder folder)

Opens or closes a folder (no effect while searching: every match shows).

const string Separator = " › "

Joins the folder names of a path (“Devices › Any device”).