using ImTools; using PDF_Master.CustomControl; using PDF_Master.Helper; using PDF_Master.Model.Dialog.ToolsDialogs; using PDF_Master.ViewModels.Dialog.ToolsDialogs; using System; using System.Collections.Generic; using System.Data; using System.Diagnostics; using System.IO; using System.Linq; using System.Text; using System.Text.RegularExpressions; using System.Threading.Tasks; using System.Windows; using System.Windows.Controls; using System.Windows.Data; using System.Windows.Documents; using System.Windows.Input; using System.Windows.Media; using System.Windows.Media.Imaging; using System.Windows.Navigation; using System.Windows.Shapes; namespace PDF_Master.Views.Dialog.ToolsDialogs { /// /// MergeDialog.xaml 的交互逻辑 /// public partial class MergeDialog : UserControl { /// /// 当前显示了线段的Item /// private ListViewItem listViewItem = null; private bool IsFile = false; public MergeDialog() { InitializeComponent(); } private void Delete_Click(object sender, RoutedEventArgs e) { (DataContext as MergeDialogViewModel).DeleteItem((sender as Button).DataContext as MergeObject); } private void MergeView_PreviewMouseMove(object sender, MouseEventArgs e) { if (e.LeftButton == MouseButtonState.Pressed) { var pos = e.GetPosition(MergeView); HitTestResult result = VisualTreeHelper.HitTest(MergeView, pos); if (result == null) { return; } //点击删除按钮 Button Button = CommonHelper.FindVisualParent