Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// Copyright (c) Richasy. All rights reserved.
// Modified 2026-10-21 by Codex: complete the existing PR correction.

using Richasy.WinUIKernel.Share.Toolkits;
using RodelAgent.UI.Models.Constants;
Expand Down Expand Up @@ -38,7 +39,7 @@ private void OnUnloaded(object sender, RoutedEventArgs e)
Unloaded -= OnUnloaded;
}

private void OnPrimaryButtonClick(ContentDialog sender, ContentDialogButtonClickEventArgs args)
private async void OnPrimaryButtonClick(ContentDialog sender, ContentDialogButtonClickEventArgs args)
{
var name = NameBox.Text;
var commandStr = CommandBox.Text.Trim();
Expand Down Expand Up @@ -75,11 +76,11 @@ private void OnPrimaryButtonClick(ContentDialog sender, ContentDialogButtonClick

if (_source != null)
{
await _source.DisconnectCommand.ExecuteAsync(default);
_source.Data = config;
_source.Id = name;
_source.IsEnabled = config.IsEnabled ?? true;
_source.SaveCommand.Execute(default);
_source.DisconnectCommand.Execute(default);
await _source.SaveCommand.ExecuteAsync(default);
}
else
{
Expand Down