|
@@ -2,6 +2,7 @@
|
|
|
using PDF_Office.Helper;
|
|
|
using PDF_Office.Model.PDFTool;
|
|
|
using PDF_Office.ViewModels.HomePanel;
|
|
|
+using PDFSettings;
|
|
|
using System;
|
|
|
using System.Collections.Generic;
|
|
|
using System.IO;
|
|
@@ -496,34 +497,34 @@ namespace PDF_Office.Views.HomePanel.PDFTools
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- /// <summary>
|
|
|
- /// 扩展收缩UI
|
|
|
- /// </summary>
|
|
|
- /// <param name="IsShowConciseContent">是否收缩</param>
|
|
|
- private void ShowToolsUI(ListBoxEx list,bool IsShowConciseContent)
|
|
|
- {
|
|
|
- foreach (var item in list.Items)
|
|
|
- {
|
|
|
+ ///// <summary>
|
|
|
+ ///// 扩展收缩UI
|
|
|
+ ///// </summary>
|
|
|
+ ///// <param name="IsShowConciseContent">是否收缩</param>
|
|
|
+ //private void ShowToolsUI(ListBoxEx list,bool IsShowConciseContent)
|
|
|
+ //{
|
|
|
+ // foreach (var item in list.Items)
|
|
|
+ // {
|
|
|
|
|
|
- var listBoxItem = list.ItemContainerGenerator.ContainerFromItem(item) as ListBoxItem;
|
|
|
- if (listBoxItem != null)
|
|
|
- {
|
|
|
+ // var listBoxItem = list.ItemContainerGenerator.ContainerFromItem(item) as ListBoxItem;
|
|
|
+ // if (listBoxItem != null)
|
|
|
+ // {
|
|
|
|
|
|
- var viewItem = listBoxItem.ContentTemplate;
|
|
|
- var myContentPresenter = CommonHelper.FindVisualChild<ContentPresenter>(listBoxItem);
|
|
|
- var obj = viewItem.FindName("data", myContentPresenter);
|
|
|
+ // var viewItem = listBoxItem.ContentTemplate;
|
|
|
+ // var myContentPresenter = CommonHelper.FindVisualChild<ContentPresenter>(listBoxItem);
|
|
|
+ // var obj = viewItem.FindName("data", myContentPresenter);
|
|
|
|
|
|
- var checkNum = obj as PDFToolItem;
|
|
|
+ // var checkNum = obj as PDFToolItem;
|
|
|
|
|
|
- if (checkNum != null)
|
|
|
- {
|
|
|
- checkNum.IsShowConciseContent = IsShowConciseContent;
|
|
|
- }
|
|
|
+ // if (checkNum != null)
|
|
|
+ // {
|
|
|
+ // checkNum.IsShowConciseContent = IsShowConciseContent;
|
|
|
+ // }
|
|
|
|
|
|
- }
|
|
|
- }
|
|
|
+ // }
|
|
|
+ // }
|
|
|
|
|
|
- }
|
|
|
+ //}
|
|
|
|
|
|
|
|
|
private void ListBoxShortCuts_SizeChanged(object sender, SizeChangedEventArgs e)
|
|
@@ -566,27 +567,16 @@ namespace PDF_Office.Views.HomePanel.PDFTools
|
|
|
|
|
|
private void BtnTools_Click(object sender, RoutedEventArgs e)
|
|
|
{
|
|
|
-
|
|
|
+
|
|
|
}
|
|
|
|
|
|
- bool isExtend = false;
|
|
|
- private void BtnMore_Click(object sender, RoutedEventArgs e)
|
|
|
+
|
|
|
+ private void BtnExptend_Click(object sender, RoutedEventArgs e)
|
|
|
{
|
|
|
- if(isExtend)
|
|
|
- {
|
|
|
- isExtend = false;
|
|
|
- ShowToolsUI(ListShortCuts, false);
|
|
|
- ShowToolsUI(ListMoreCuts, false);
|
|
|
- }
|
|
|
- else
|
|
|
+ foreach (var item in allTools)
|
|
|
{
|
|
|
- isExtend = true;
|
|
|
- ShowToolsUI(ListShortCuts, true);
|
|
|
- ShowToolsUI(ListMoreCuts, true);
|
|
|
+ item.IsShowConciseContent = (bool)BtnExptend.IsChecked;
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
}
|
|
|
|
|
|
|