|
@@ -94,21 +94,11 @@ namespace PDF_Master.Views.PageEdit
|
|
|
|
|
|
private PageEditContentViewModel viewModel;
|
|
|
|
|
|
- public PageEditContent()
|
|
|
- {
|
|
|
- InitializeComponent();
|
|
|
|
|
|
- }
|
|
|
|
|
|
- private void PageEditItems_CollectionChanged(object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e)
|
|
|
+ public PageEditContent()
|
|
|
{
|
|
|
- //BOTA缩略图里 插入子项时,刷新子项大小
|
|
|
- if (GridBOTAHeader.Visibility == Visibility.Visible&&e.Action == System.Collections.Specialized.NotifyCollectionChangedAction.Add)
|
|
|
- {
|
|
|
- ItemSuitAcutalWidth(this.ActualWidth);
|
|
|
- }
|
|
|
- //页面总数变化后用于通知BOTA面板进行数据集刷新
|
|
|
- eventor.GetEvent<PageEditNotifyEvent>().Publish(new PageEditNotifyEventArgs(unicode,NotifyType.PageCountChanged));
|
|
|
+ InitializeComponent();
|
|
|
}
|
|
|
|
|
|
public PageEditContent(IEventAggregator eventAggregator) : this()
|
|
@@ -129,11 +119,6 @@ namespace PDF_Master.Views.PageEdit
|
|
|
eventAggregator.GetEvent<CleanSelectAllEvent>().Subscribe(CleanSelectAll, e => e.Unicode == unicode);
|
|
|
}
|
|
|
|
|
|
- private void CleanSelectAll(CleanSelectAllArgs obj)
|
|
|
- {
|
|
|
- ListPageEdit.SelectedItems.Clear();
|
|
|
- ListPageEdit.SelectedIndex = viewModel.PDFViewer.CurrentIndex;
|
|
|
- }
|
|
|
|
|
|
private void Timer_Tick(object sender, EventArgs e)
|
|
|
{
|
|
@@ -141,15 +126,28 @@ namespace PDF_Master.Views.PageEdit
|
|
|
timer?.Stop();
|
|
|
}
|
|
|
|
|
|
+ private void PageEditItems_CollectionChanged(object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e)
|
|
|
+ {
|
|
|
+ //BOTA缩略图里 插入子项时,刷新子项大小
|
|
|
+ if (GridBOTAHeader.Visibility == Visibility.Visible && e.Action == System.Collections.Specialized.NotifyCollectionChangedAction.Add)
|
|
|
+ {
|
|
|
+ ItemSuitAcutalWidth(this.ActualWidth);
|
|
|
+ }
|
|
|
+ //页面总数变化后用于通知BOTA面板进行数据集刷新
|
|
|
+ eventor.GetEvent<PageEditNotifyEvent>().Publish(new PageEditNotifyEventArgs(unicode, NotifyType.PageCountChanged));
|
|
|
+ }
|
|
|
+
|
|
|
private void OneNotifyEvent(PageEditNotifyEventArgs e)
|
|
|
{
|
|
|
|
|
|
switch (e.Type)
|
|
|
{
|
|
|
case NotifyType.RefreshPage:
|
|
|
+ //计算当前区域的页面范围后传递回VM
|
|
|
PulishEvent();
|
|
|
break;
|
|
|
case NotifyType.SelectItems:
|
|
|
+ //根据Vm的参数选中部分页面
|
|
|
if (e.PageRange.Count == 1)
|
|
|
{
|
|
|
ListPageEdit.SelectedIndex = e.PageRange[0] - 1;
|
|
@@ -167,6 +165,13 @@ namespace PDF_Master.Views.PageEdit
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ private void CleanSelectAll(CleanSelectAllArgs obj)
|
|
|
+ {
|
|
|
+ ListPageEdit.SelectedItems.Clear();
|
|
|
+ ListPageEdit.SelectedIndex = viewModel.PDFViewer.CurrentIndex;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
|
|
|
#region UI事件
|
|
|
/// <summary>
|