|
@@ -33,7 +33,7 @@ namespace PDF_Master.Views.BOTA
|
|
|
/// <summary>
|
|
|
/// 上一个ListBoxItem,为选中状态做准备
|
|
|
/// </summary>
|
|
|
- private ListBoxItem histotyListBoxItem = null;
|
|
|
+ public ListBoxItem histotyListBoxItem = null;
|
|
|
|
|
|
private bool isAdd = false;
|
|
|
|
|
@@ -53,11 +53,10 @@ namespace PDF_Master.Views.BOTA
|
|
|
|
|
|
private void CleanSelectAll(CleanSelectAllArgs obj)
|
|
|
{
|
|
|
-
|
|
|
- foreach (var item in BookMarkListView.SelectedItems)
|
|
|
+ foreach (var item in BookMarkListView.Items)
|
|
|
{
|
|
|
ListViewItem listItem = (ListViewItem)(BookMarkListView.ItemContainerGenerator.ContainerFromItem(item));
|
|
|
- if(listItem != null)
|
|
|
+ if (listItem != null)
|
|
|
{
|
|
|
TextBlock textBlock = CommonHelper.FindVisualChild<TextBlock>(listItem);
|
|
|
//TextBox text = CommonHelper.FindVisualChild<TextBox>(listItem);
|
|
@@ -82,6 +81,7 @@ namespace PDF_Master.Views.BOTA
|
|
|
ListViewItem listBoxItem = (sender as ListViewItem);
|
|
|
if (e.LeftButton == MouseButtonState.Pressed)
|
|
|
{
|
|
|
+
|
|
|
if (e.ClickCount >= 2)
|
|
|
{
|
|
|
histotyListBoxItem = listBoxItem;
|
|
@@ -188,12 +188,13 @@ namespace PDF_Master.Views.BOTA
|
|
|
BookMarkListView.ItemContainerGenerator.StatusChanged -= ItemContainerGenerator_StatusChanged;
|
|
|
viewModel.LostFocusCommand.Execute(listItem);
|
|
|
|
|
|
+ //CleanSelectAll(null);
|
|
|
TextBlock textBlock = CommonHelper.FindVisualChild<TextBlock>(listItem);
|
|
|
TextBox text = CommonHelper.FindVisualChild<TextBox>(listItem);
|
|
|
|
|
|
if (textBlock.Visibility != Visibility.Visible)
|
|
|
{
|
|
|
- if (isAdd == false && isRename == false)
|
|
|
+ if (isAdd == false || isRename == false)
|
|
|
{
|
|
|
listItem.IsSelected = false;
|
|
|
}
|
|
@@ -215,10 +216,13 @@ namespace PDF_Master.Views.BOTA
|
|
|
//if (histotyListBoxItem != null)
|
|
|
//{
|
|
|
// histotyListBoxItem.IsSelected = false;
|
|
|
- // TextBlock textBlock = CommonHelper.FindVisualChild<TextBlock>(histotyListBoxItem);
|
|
|
- // textBlock.Visibility = Visibility.Visible;
|
|
|
- // textBlock.Focusable = true;
|
|
|
+ // TextBlock textBlock1 = CommonHelper.FindVisualChild<TextBlock>(histotyListBoxItem);
|
|
|
+ // textBlock1.Visibility = Visibility.Visible;
|
|
|
+ // textBlock1.Focusable = true;
|
|
|
//}
|
|
|
+
|
|
|
+ //TextBlock textBlock = CommonHelper.FindVisualChild<TextBlock>(listItem);
|
|
|
+ //TextBox text = CommonHelper.FindVisualChild<TextBox>(listItem);
|
|
|
//if (textBlock.Visibility == Visibility.Collapsed)
|
|
|
//{
|
|
|
// listItem.IsSelected = false;
|
|
@@ -353,7 +357,7 @@ namespace PDF_Master.Views.BOTA
|
|
|
{
|
|
|
TextBox textBox = CommonHelper.FindVisualChild<TextBox>(myListBoxItem);
|
|
|
TextBlock textBlock = CommonHelper.FindVisualChild<TextBlock>(myListBoxItem);
|
|
|
-
|
|
|
+ histotyListBoxItem = myListBoxItem;
|
|
|
SetSelectedStatus(myListBoxItem, textBox, textBlock);
|
|
|
}
|
|
|
}
|