增加了初始弹窗,但是没有成功

更改了CAN和LIN协调
更改了配置程序的名称顺序
This commit is contained in:
2025-01-11 12:04:34 +08:00
parent 620c5e8178
commit e49a48fb25
53 changed files with 5118 additions and 131 deletions

View File

@@ -13,7 +13,7 @@ namespace CapMachine.Core
/// </summary>
public class DialogViewModel : BindableBase, IDialogAware
{
public string Title { get; set; }
public string? Title { get; set; }
public event Action<IDialogResult>? RequestClose;
@@ -40,9 +40,22 @@ namespace CapMachine.Core
/// </summary>
public void OnDialogClosed()
{
OnDialogClosed(ButtonResult.OK);
}
public void OnDialogClosed(ButtonResult result)
{
RequestClose?.Invoke(new DialogResult(result));
}
public void OnDialogClosed(IDialogResult dialogResult)
{
RequestClose?.Invoke(dialogResult);
}
//public void OnDialogClosed() => OnDialogClosed(ButtonResult.OK);
/// <summary>
/// 打开时触发
/// </summary>
@@ -51,5 +64,31 @@ namespace CapMachine.Core
{
}
public bool IsNotBusy => !IsBusy;
private bool isBusy;
public bool IsBusy
{
get => isBusy;
set
{
isBusy = value;
RaisePropertyChanged();
RaisePropertyChanged(nameof(IsNotBusy));
}
}
public virtual async Task SetBusyAsync(Func<Task> func, string loadingMessage = null)
{
IsBusy = true;
try
{
await func();
}
finally
{
IsBusy = false;
}
}
}
}