コード例 #1
0
        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;
            }
        }
コード例 #2
0
        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;
            }
        }
コード例 #3
0
        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;
            }
        }
コード例 #4
0
        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;
            }
        }