private async void ScriptServicesDataGrid_OnMouseDoubleClick(object sender, MouseButtonEventArgs e) { if (SelectedScriptService == null) return; var window = new ScriptServiceWindow(_dialogService, SelectedScriptService); var result = window.ShowDialog(); if (result.HasValue && result.Value) { SelectedScriptService.Name = window.ScriptName; SelectedScriptService.Code = window.Code; await _engine.UpdateEntity(SelectedScriptService); IsModified = true; } }
private async void AddButton_OnClick(object sender, RoutedEventArgs e) { var window = new ScriptServiceWindow(_dialogService); var result = window.ShowDialog(); if (result.HasValue && result.Value) { var scriptService = new ScriptService(); scriptService.Name = window.ScriptName; scriptService.Code = window.Code; await _engine.InsertEntity(scriptService); ScriptServices.Add(scriptService); IsModified = true; } }
private async void ScriptServicesDataGrid_OnMouseDoubleClick(object sender, MouseButtonEventArgs e) { if (SelectedScriptService == null) { return; } var window = new ScriptServiceWindow(_dialogService, SelectedScriptService); var result = window.ShowDialog(); if (result.HasValue && result.Value) { SelectedScriptService.Name = window.ScriptName; SelectedScriptService.Code = window.Code; await _engine.UpdateEntity(SelectedScriptService); IsModified = true; } }