using System; using System.Windows; using System.Windows.Input; namespace WatchDog.WPF { /// /// FileSelected.xaml 的交互逻辑 /// public partial class FileSelected : Window { private FileSelectedVM _fileSelectedVM; public FileSelected(FileSelectedVM vm) { InitializeComponent(); this.Closing += this.FileSelected_Closing; this.DataContext = vm; _fileSelectedVM = vm; } private void FileSelected_Closing(object sender, System.ComponentModel.CancelEventArgs e) { e.Cancel = true; this.Hide(); } private void ListView_MouseDoubleClick(object sender, MouseButtonEventArgs e) { Console.WriteLine(e); _fileSelectedVM.ExpandDirectory.Execute(null); } private void Label_MouseDoubleClick(object sender, MouseButtonEventArgs e) { _fileSelectedVM.ExpandCurrentDirectory.Execute(null); } } }