38 lines
1.0 KiB
C#
38 lines
1.0 KiB
C#
using System;
|
|
using System.Windows;
|
|
using System.Windows.Input;
|
|
|
|
namespace WatchDog.WPF
|
|
{
|
|
/// <summary>
|
|
/// FileSelected.xaml 的交互逻辑
|
|
/// </summary>
|
|
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);
|
|
}
|
|
}
|
|
}
|