|
@@ -484,55 +484,55 @@ namespace PDF_Office.ViewModels.Form
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- private void InitMenu(CustomPopMenu customMenu,object sender)
|
|
|
+ private void InitMenu(CustomPopMenu customMenu)
|
|
|
{
|
|
|
int index= 0;
|
|
|
//属性
|
|
|
- customMenu.SetMenuBinding(index, sender, PropertyMenuCommand);
|
|
|
+ customMenu.SetMenuBinding(index, PropertyMenuCommand);
|
|
|
customMenu.SetTagProperty(index, "Property");
|
|
|
index++;
|
|
|
//复制
|
|
|
- customMenu.SetMenuBinding(index, sender, ApplicationCommands.Copy);
|
|
|
+ customMenu.SetMenuBinding(index, ApplicationCommands.Copy);
|
|
|
customMenu.SetTagProperty(index, "Copy");
|
|
|
index++;
|
|
|
//剪切
|
|
|
- customMenu.SetMenuBinding(index, sender, ApplicationCommands.Cut);
|
|
|
+ customMenu.SetMenuBinding(index, ApplicationCommands.Cut);
|
|
|
customMenu.SetTagProperty(index, "Cut");
|
|
|
index++;
|
|
|
//粘贴
|
|
|
- customMenu.SetMenuBinding(index, sender, ApplicationCommands.Paste);
|
|
|
+ customMenu.SetMenuBinding(index, ApplicationCommands.Paste);
|
|
|
customMenu.SetTagProperty(index, "Paste");
|
|
|
index++;
|
|
|
//删除
|
|
|
- customMenu.SetMenuBinding(index, sender, ApplicationCommands.Delete);
|
|
|
+ customMenu.SetMenuBinding(index, ApplicationCommands.Delete);
|
|
|
customMenu.SetTagProperty(index, "Delete");
|
|
|
index++;
|
|
|
//创建多个副本
|
|
|
- customMenu.SetMenuBinding(index, sender, ApplicationCommands.Delete);
|
|
|
+ customMenu.SetMenuBinding(index, ApplicationCommands.Delete);
|
|
|
customMenu.SetTagProperty(index, "CreateCopy");
|
|
|
index++;
|
|
|
//跨页复制
|
|
|
- customMenu.SetMenuBinding(index, sender, CrossPageMenuCommand);
|
|
|
+ customMenu.SetMenuBinding(index, CrossPageMenuCommand);
|
|
|
customMenu.SetTagProperty(index, "CrossPage");
|
|
|
index++;
|
|
|
//显示跳位编号
|
|
|
- customMenu.SetMenuBinding(index, sender, JumpPosMenuCommand);
|
|
|
+ customMenu.SetMenuBinding(index, JumpPosMenuCommand);
|
|
|
customMenu.SetTagProperty(index, "JumpPos");
|
|
|
index++;
|
|
|
//隐藏名称
|
|
|
- customMenu.SetMenuBinding(index, sender, HideNameMenuCommand);
|
|
|
+ customMenu.SetMenuBinding(index, HideNameMenuCommand);
|
|
|
customMenu.SetTagProperty(index, "HideName");
|
|
|
index++;
|
|
|
//查找
|
|
|
- customMenu.SetMenuBinding(index, sender, SearchFormMenuCommand);
|
|
|
+ customMenu.SetMenuBinding(index, SearchFormMenuCommand);
|
|
|
customMenu.SetTagProperty(index, "SearchForm");
|
|
|
index++;
|
|
|
//打印
|
|
|
- customMenu.SetMenuBinding(index, sender, PrintMenuCommand);
|
|
|
+ customMenu.SetMenuBinding(index, PrintMenuCommand);
|
|
|
customMenu.SetTagProperty(index, "print");
|
|
|
index++;
|
|
|
//设置当前属性为默认值
|
|
|
- customMenu.SetMenuBinding(index, sender, DefaultValueMenuCommand);
|
|
|
+ customMenu.SetMenuBinding(index, DefaultValueMenuCommand);
|
|
|
customMenu.SetTagProperty(index, "DefaultValue");
|
|
|
index++;
|
|
|
customMenu.AllMenuVisibility(true);
|
|
@@ -543,8 +543,8 @@ namespace PDF_Office.ViewModels.Form
|
|
|
private ContextMenu BlankReaMenu(object sender)
|
|
|
{
|
|
|
var popMenu = App.Current.FindResource("FormContentMenu") as ContextMenu;
|
|
|
- CustomPopMenu customMenu = new CustomPopMenu(popMenu);
|
|
|
- InitMenu(customMenu, sender);
|
|
|
+ CustomPopMenu customMenu = new CustomPopMenu(popMenu, sender);
|
|
|
+ InitMenu(customMenu);
|
|
|
customMenu.SetVisibilityProperty("Property", false);
|
|
|
customMenu.SetVisibilityProperty("Copy", false);
|
|
|
customMenu.SetVisibilityProperty("Cut", false);
|
|
@@ -559,8 +559,8 @@ namespace PDF_Office.ViewModels.Form
|
|
|
private ContextMenu SelectedFormMenu(object sender)
|
|
|
{
|
|
|
var popMenu = App.Current.FindResource("FormContentMenu") as ContextMenu;
|
|
|
- CustomPopMenu customMenu = new CustomPopMenu(popMenu);
|
|
|
- InitMenu(customMenu, sender);
|
|
|
+ CustomPopMenu customMenu = new CustomPopMenu(popMenu, sender);
|
|
|
+ InitMenu(customMenu);
|
|
|
customMenu.SetVisibilityProperty("SearchForm", false);
|
|
|
customMenu.SetVisibilityProperty("print", false);
|
|
|
return popMenu;
|
|
@@ -570,8 +570,8 @@ namespace PDF_Office.ViewModels.Form
|
|
|
private ContextMenu MultiSelectedFormMenu(object sender)
|
|
|
{
|
|
|
var popMenu = App.Current.FindResource("FormContentMenu") as ContextMenu;
|
|
|
- CustomPopMenu customMenu = new CustomPopMenu(popMenu);
|
|
|
- InitMenu(customMenu, sender);
|
|
|
+ CustomPopMenu customMenu = new CustomPopMenu(popMenu, sender);
|
|
|
+ InitMenu(customMenu);
|
|
|
customMenu.SetVisibilityProperty("CreateCopy", false);
|
|
|
customMenu.SetVisibilityProperty("DefaultValue", false);
|
|
|
customMenu.SetVisibilityProperty("SearchForm", false);
|