SOMS/test/YoloV5ImageLableWpfApp/FileSelected.xaml.cs

38 lines
1.0 KiB
C#
Raw Permalink Normal View History

2024-07-15 10:31:26 +08:00
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);
}
}
}