Commit aa01f838 authored by 潘栩锋's avatar 潘栩锋 🚴

修复 FLY.Thick.Base.UI 不使用 mahapp 的 dialog

parent 3ba68a2a
......@@ -471,21 +471,10 @@ namespace FLY.Thick.Base.UI
if (SeriesInfos.All(s => s.ADs.Count() == 0))
{
await metroWindow.ShowMessageAsync("输出失败", "没有任何数据");
MessageBox.Show("没有任何数据", "输出失败", MessageBoxButton.OK, MessageBoxImage.Error);
return;
}
var controller = await metroWindow.ShowProgressAsync("请等待...", "开始导出",
settings: new MetroDialogSettings()
{
NegativeButtonText = "停止",
AnimateShow = false,
AnimateHide = false,
});
//controller.SetCancelable(true);
controller.SetIndeterminate();
var ret = await Task.Factory.StartNew(() =>
{
try
......@@ -503,21 +492,10 @@ namespace FLY.Thick.Base.UI
return false;
}
});
controller.SetProgress(1);
if (ret)
{
controller.SetTitle("输出成功");
controller.SetMessage($"导出到{filePath}");
}
if(ret==true)
MessageBox.Show($"导出到{filePath}", "输出成功", MessageBoxButton.OK, MessageBoxImage.Information);
else
{
controller.SetTitle("输出失败");
controller.SetMessage($"文件写入失败");
}
await Task.Delay(1000);
await controller.CloseAsync();
MessageBox.Show($"未知错误", "输出失败", MessageBoxButton.OK, MessageBoxImage.Error);
}
void SaveToXlsxAD(ExcelPackage p)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment