mirror of
https://github.com/denglihong2007/CRSim
synced 2026-08-13 04:55:43 +08:00
38 lines
1.0 KiB
C#
38 lines
1.0 KiB
C#
using CRSim.ScreenSimulator.ViewModels.Hanzhong;
|
|
using System.Windows;
|
|
using System.Windows.Input;
|
|
using System.Windows.Media;
|
|
|
|
namespace CRSim.ScreenSimulator.Views.Hanzhong
|
|
{
|
|
/// <summary>
|
|
/// SecondaryScreen.xaml 的交互逻辑
|
|
/// </summary>
|
|
public partial class PlatformScreenView : Window
|
|
{
|
|
public PlatformScreenViewModel ViewModel { get; }
|
|
public PlatformScreenView(PlatformScreenViewModel viewModel)
|
|
{
|
|
InitializeComponent();
|
|
RenderOptions.SetEdgeMode(this, EdgeMode.Aliased);
|
|
ViewModel = viewModel;
|
|
DataContext = viewModel;
|
|
}
|
|
private void Window_MouseDown(object sender, MouseButtonEventArgs e)
|
|
{
|
|
if (e.ChangedButton == MouseButton.Left)
|
|
{
|
|
DragMove();
|
|
}
|
|
}
|
|
|
|
private void Window_KeyDown(object sender, KeyEventArgs e)
|
|
{
|
|
if (e.Key == Key.Escape)
|
|
{
|
|
Close();
|
|
}
|
|
}
|
|
}
|
|
}
|