-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathMainWindow.DataSetSignalInventory.cs
More file actions
40 lines (34 loc) · 1.34 KB
/
Copy pathMainWindow.DataSetSignalInventory.cs
File metadata and controls
40 lines (34 loc) · 1.34 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
using ArIED61850Tester.Models;
using ArIED61850Tester.Services;
namespace ArIED61850Tester;
public partial class MainWindow
{
internal void RegisterRecoveredDataSetSignals(
Iec61850MonitorDevice device,
Iec61850DataSetSignalInventoryMergeResult merge)
{
ArgumentNullException.ThrowIfNull(device);
ArgumentNullException.ThrowIfNull(merge);
foreach (var signal in merge.AddedSignals)
{
// The wizard can recover a row after the normal discovery collection has
// already been registered with MainWindow. Bring that row under the same
// application lifecycle without changing its user-selection state.
signal.PropertyChanged -= Signal_PropertyChanged;
signal.PropertyChanged += Signal_PropertyChanged;
_signalOwners[signal] = device;
}
if (merge.AddedCount == 0 && merge.EnrichedExistingCount == 0)
return;
device.RecountSelectedSignals();
device.RefreshComputed();
RaiseWorkspaceCounts();
if (merge.AddedCount > 0)
{
AddLog(
"INFO",
device.Name,
$"ARIEC DataSet authority restored {merge.AddedCount} mandatory primary signal(s) to the selection inventory; user selection was not changed.");
}
}
}