|
@@ -93,7 +93,7 @@ namespace PDF_Office.ViewModels
|
|
|
/// <summary>
|
|
|
/// 从其他格式文件创建PDF
|
|
|
/// </summary>
|
|
|
- private void createFromOtherFile()
|
|
|
+ private async void createFromOtherFile()
|
|
|
{
|
|
|
string txt = Properties.Resources.txtex;
|
|
|
string word = Properties.Resources.wordex;
|
|
@@ -123,6 +123,8 @@ namespace PDF_Office.ViewModels
|
|
|
{
|
|
|
if (!App.OpenedFileList.Contains(fileList[i]))
|
|
|
{
|
|
|
+ //需要加一定延时 不然连续添加多个文件时会出现regionname重名的情况 因为多处导航是异步导航,可能绑定还没更新
|
|
|
+ await Task.Delay(20);
|
|
|
App.mainWindowViewModel.AddTabItem(fileList[i]);
|
|
|
}
|
|
|
ToolMethod.SetFileThumbImg(fileList[i]);
|
|
@@ -181,6 +183,8 @@ namespace PDF_Office.ViewModels
|
|
|
{
|
|
|
if (!App.OpenedFileList.Contains(fileList[i]))
|
|
|
{
|
|
|
+ //需要加一定延时 不然连续添加多个文件时会出现regionname重名的情况 因为多处导航是异步导航,可能绑定还没更新
|
|
|
+ await Task.Delay(20);
|
|
|
App.mainWindowViewModel.AddTabItem(fileList[i]);
|
|
|
}
|
|
|
ToolMethod.SetFileThumbImg(fileList[i]);
|