063005fefa
- DriverTagPicker shell: modal chrome + per-driver picker body rendered as ChildContent. - 9 picker bodies (Modbus/AbCip/AbLegacy/S7/TwinCat/FOCAS/ OpcUaClient/Galaxy/Historian.Wonderware). 5 have computed builder logic + unit tests; 4 are free-text passthroughs (live browse for OPC UA + Galaxy is a documented follow-up). - Each typed driver page gets a "Pick address" button that opens the modal with the matching body. Picked address surfaces in the modal footer for manual copy — no JS interop in v1.
38 lines
1.1 KiB
Plaintext
38 lines
1.1 KiB
Plaintext
@* Static TwinCAT address builder: ADS variable name (free text) → verbatim *@
|
|
|
|
<div class="row g-3">
|
|
<div class="col-md-8">
|
|
<label class="form-label">ADS variable name</label>
|
|
<input type="text" class="form-control form-control-sm mono" placeholder="MAIN.fValue"
|
|
@bind="_varName" @bind:after="OnChangedAsync" />
|
|
<div class="form-text">
|
|
Full ADS symbol path, e.g. <code>MAIN.fValue</code> or <code>GVL.iCounter</code>.
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="mt-3">
|
|
<span class="text-muted small">Result:</span>
|
|
<code class="mono ms-2">@_built</code>
|
|
</div>
|
|
|
|
@code {
|
|
[Parameter] public string CurrentAddress { get; set; } = "";
|
|
[Parameter] public EventCallback<string> CurrentAddressChanged { get; set; }
|
|
|
|
private string _varName = "";
|
|
private string _built = "";
|
|
|
|
protected override void OnInitialized()
|
|
{
|
|
_built = _varName;
|
|
_ = CurrentAddressChanged.InvokeAsync(_built);
|
|
}
|
|
|
|
private async Task OnChangedAsync()
|
|
{
|
|
_built = _varName;
|
|
await CurrentAddressChanged.InvokeAsync(_built);
|
|
}
|
|
}
|