protected override async Task OnParametersSetAsync() { if (Name == null) { return; } DbConfig = BusService !.FindByName(Name); if (DbConfig == null) { isNotNew = false; Config = new RigConf(); } else { isNotNew = true; Config = JsonSerializer.Deserialize <RigConf>(DbConfig.Configuration); Config.DataBits = 7; } StateHasChanged(); if (EC == null) { EC = new EditContext(Config); } EC.Validate(); }
// Methods public RigSettings() { Config = new RigConf(); }