From 573a50e49c2074a56c69df7c1384bbf6527e1cfe Mon Sep 17 00:00:00 2001 From: wenjy Date: Thu, 7 Nov 2024 16:33:10 +0800 Subject: [PATCH] =?UTF-8?q?change=20-=20=E6=B7=BB=E5=8A=A0=E4=BA=91?= =?UTF-8?q?=E5=8F=B0=E6=8E=A7=E5=88=B6:=E5=8F=98=E5=80=8D=E3=80=81?= =?UTF-8?q?=E5=8F=98=E7=84=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- SlnMesnac.WPF/Page/IndexControl.xaml.cs | 101 ++++++++++++++---------- 1 file changed, 61 insertions(+), 40 deletions(-) diff --git a/SlnMesnac.WPF/Page/IndexControl.xaml.cs b/SlnMesnac.WPF/Page/IndexControl.xaml.cs index 1ddcab0..e35135c 100644 --- a/SlnMesnac.WPF/Page/IndexControl.xaml.cs +++ b/SlnMesnac.WPF/Page/IndexControl.xaml.cs @@ -64,7 +64,67 @@ namespace SlnMesnac.WPF.Page private void btnRight_MouseUp(object sender, MouseButtonEventArgs e) { indexControlViewModel.GimbalOperate("right", false); - } + } + + /// + /// 变倍 + + /// + /// + /// + private void btnZoomIn_MouseDown(object sender, MouseButtonEventArgs e) + { + indexControlViewModel.GimbalOperate("zoomIn", true); + } + + private void btnZoomIn_MouseUp(object sender, MouseButtonEventArgs e) + { + indexControlViewModel.GimbalOperate("zoomIn", false); + } + + /// + /// 变倍 + + /// + /// + /// + private void btnZoomOut_MouseDown(object sender, MouseButtonEventArgs e) + { + indexControlViewModel.GimbalOperate("zoomOut", true); + } + + private void btnZoomOut_MouseUp(object sender, MouseButtonEventArgs e) + { + indexControlViewModel.GimbalOperate("zoomOut", false); + } + + /// + /// 变焦 + /// + /// + /// + private void btnFocusFar_MouseDown(object sender, MouseButtonEventArgs e) + { + indexControlViewModel.GimbalOperate("focusFar", true); + } + + private void btnFocusFar_MouseUp(object sender, MouseButtonEventArgs e) + { + indexControlViewModel.GimbalOperate("focusFar", false); + } + + /// + /// 变焦 + /// + /// + /// + private void btnFocusNear_MouseDown(object sender, MouseButtonEventArgs e) + { + indexControlViewModel.GimbalOperate("focusNear", true); + } + + private void btnFocusNear_MouseUp(object sender, MouseButtonEventArgs e) + { + indexControlViewModel.GimbalOperate("focusNear", false); + } #endregion /// @@ -188,44 +248,5 @@ namespace SlnMesnac.WPF.Page } } - private void btnZoomIn_MouseDown(object sender, MouseButtonEventArgs e) - { - indexControlViewModel.GimbalOperate("zoomIn", true); - } - - private void btnZoomIn_MouseUp(object sender, MouseButtonEventArgs e) - { - indexControlViewModel.GimbalOperate("zoomIn", false); - } - - private void btnZoomOut_MouseDown(object sender, MouseButtonEventArgs e) - { - indexControlViewModel.GimbalOperate("zoomOut", true); - } - - private void btnZoomOut_MouseUp(object sender, MouseButtonEventArgs e) - { - indexControlViewModel.GimbalOperate("zoomOut", false); - } - - private void btnFocusFar_MouseDown(object sender, MouseButtonEventArgs e) - { - indexControlViewModel.GimbalOperate("focusFar", true); - } - - private void btnFocusFar_MouseUp(object sender, MouseButtonEventArgs e) - { - indexControlViewModel.GimbalOperate("focusFar", false); - } - - private void btnFocusNear_MouseDown(object sender, MouseButtonEventArgs e) - { - indexControlViewModel.GimbalOperate("focusNear", true); - } - - private void btnFocusNear_MouseUp(object sender, MouseButtonEventArgs e) - { - indexControlViewModel.GimbalOperate("focusNear", false); - } } }