|
@@ -155,7 +155,18 @@ namespace PDF_Master.ViewModels.Dialog.ToolsDialogs
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
-
|
|
|
|
|
|
+ private bool _AddOpenFileIsEn = false;
|
|
|
|
+ /// <summary>
|
|
|
|
+ /// 添加已打开文件是否置灰
|
|
|
|
+ /// </summary>
|
|
|
|
+ public bool AddOpenFileIsEn
|
|
|
|
+ {
|
|
|
|
+ get { return _AddOpenFileIsEn; }
|
|
|
|
+ set
|
|
|
|
+ {
|
|
|
|
+ SetProperty(ref _AddOpenFileIsEn, value);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
private string inputHeight;
|
|
private string inputHeight;
|
|
|
|
|
|
public string InputHeight
|
|
public string InputHeight
|
|
@@ -265,6 +276,7 @@ namespace PDF_Master.ViewModels.Dialog.ToolsDialogs
|
|
{
|
|
{
|
|
MergeObjectlist[i].ItemIndex = i + 1;
|
|
MergeObjectlist[i].ItemIndex = i + 1;
|
|
}
|
|
}
|
|
|
|
+ AddOpenFileIsEnChange();
|
|
}
|
|
}
|
|
|
|
|
|
private void Cancel()
|
|
private void Cancel()
|
|
@@ -324,6 +336,41 @@ namespace PDF_Master.ViewModels.Dialog.ToolsDialogs
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ /// <summary>
|
|
|
|
+ /// 改变添加已打开文件按钮置灰状态
|
|
|
|
+ /// </summary>
|
|
|
|
+ private void AddOpenFileIsEnChange()
|
|
|
|
+ {
|
|
|
|
+ if(MergeObjectlist.Count> App.OpenedFileList.Count)
|
|
|
|
+ {
|
|
|
|
+ AddOpenFileIsEn = true;
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ for(int i=0;i<App.OpenedFileList.Count; i++)
|
|
|
|
+ {
|
|
|
|
+ for(int j=0;j<MergeObjectlist.Count; j++)
|
|
|
|
+ {
|
|
|
|
+ if(App.OpenedFileList[i]==MergeObjectlist[j].FilePath)
|
|
|
|
+ {
|
|
|
|
+ break;
|
|
|
|
+ }
|
|
|
|
+ if(j==MergeObjectlist.Count)
|
|
|
|
+ {
|
|
|
|
+ AddOpenFileIsEn = false;
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ if(i==App.OpenedFileList.Count)
|
|
|
|
+ {
|
|
|
|
+ AddOpenFileIsEn = true;
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
private string[] OpenFileFolder()
|
|
private string[] OpenFileFolder()
|
|
{
|
|
{
|
|
System.Windows.Forms.FolderBrowserDialog openFile = new System.Windows.Forms.FolderBrowserDialog();
|
|
System.Windows.Forms.FolderBrowserDialog openFile = new System.Windows.Forms.FolderBrowserDialog();
|
|
@@ -564,6 +611,7 @@ namespace PDF_Master.ViewModels.Dialog.ToolsDialogs
|
|
private void Clear()
|
|
private void Clear()
|
|
{
|
|
{
|
|
MergeObjectlist.Clear();
|
|
MergeObjectlist.Clear();
|
|
|
|
+ AddOpenFileIsEn = false;
|
|
}
|
|
}
|
|
|
|
|
|
private void SetPageSizeType(object button)
|
|
private void SetPageSizeType(object button)
|