左右眼文案调整
This commit is contained in:
@@ -225,7 +225,7 @@ Margin="200,0,0,0" Height="194"/>
|
|||||||
Width="120" Height="50" Background="#FF87CEFA" Foreground="White" Margin="5" Click="Button_Click_Reset" />
|
Width="120" Height="50" Background="#FF87CEFA" Foreground="White" Margin="5" Click="Button_Click_Reset" />
|
||||||
|
|
||||||
<!-- 左眼开 -->
|
<!-- 左眼开 -->
|
||||||
<Button Grid.Row="0" Grid.Column="1" Content="左眼开" FontSize="18"
|
<Button Grid.Row="0" Name="btnLeft" Grid.Column="1" Content="左眼开" FontSize="18"
|
||||||
Width="120" Height="50" Background="#FF87CEFA" Foreground="White" Margin="5" Click="Button_Click_left" />
|
Width="120" Height="50" Background="#FF87CEFA" Foreground="White" Margin="5" Click="Button_Click_left" />
|
||||||
|
|
||||||
<!-- 反转 -->
|
<!-- 反转 -->
|
||||||
@@ -234,7 +234,7 @@ Margin="200,0,0,0" Height="194"/>
|
|||||||
PreviewMouseLeftButtonUp="Button_Click_ResUp" />
|
PreviewMouseLeftButtonUp="Button_Click_ResUp" />
|
||||||
|
|
||||||
<!-- 右眼开 -->
|
<!-- 右眼开 -->
|
||||||
<Button Grid.Row="1" Grid.Column="1" Content="右眼开" FontSize="18"
|
<Button Grid.Row="1" Name="btnRight" Grid.Column="1" Content="右眼开" FontSize="18"
|
||||||
Width="120" Height="50" Background="#FF87CEFA" Foreground="White" Margin="5" Click="Button_Click_Right" />
|
Width="120" Height="50" Background="#FF87CEFA" Foreground="White" Margin="5" Click="Button_Click_Right" />
|
||||||
|
|
||||||
<!-- 正转 -->
|
<!-- 正转 -->
|
||||||
|
|||||||
@@ -33,6 +33,7 @@ namespace 头罩视野.Views
|
|||||||
private DispatcherTimer testTimer;
|
private DispatcherTimer testTimer;
|
||||||
// 保存上一条数据(用于去重)
|
// 保存上一条数据(用于去重)
|
||||||
private TestDataStore.TestRecord? _lastRecord;
|
private TestDataStore.TestRecord? _lastRecord;
|
||||||
|
private object btnLeftEye;
|
||||||
|
|
||||||
public PageTest()
|
public PageTest()
|
||||||
{
|
{
|
||||||
@@ -58,16 +59,49 @@ namespace 头罩视野.Views
|
|||||||
//复位btn
|
//复位btn
|
||||||
private void Button_Click_Reset(object sender, RoutedEventArgs e)
|
private void Button_Click_Reset(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
|
btnLeft.Content = "左眼开";
|
||||||
|
btnRight.Content = "右眼开";
|
||||||
ma.BtnClickFunction(Function.ButtonType.复归型, 90);
|
ma.BtnClickFunction(Function.ButtonType.复归型, 90);
|
||||||
}
|
}
|
||||||
//左开眼
|
//左开眼
|
||||||
private void Button_Click_left(object sender, RoutedEventArgs e)
|
private void Button_Click_left(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
|
// 切换文案:左眼开 ↔ 左眼关
|
||||||
|
if (btnLeft.Content.ToString() == "左眼开")
|
||||||
|
{
|
||||||
|
btnLeft.Content = "左眼关";
|
||||||
|
if (btnRight.Content.ToString() == "右眼关")
|
||||||
|
{
|
||||||
|
btnRight.Content = "右眼开";
|
||||||
|
ma.BtnClickFunction(Function.ButtonType.切换型, 1);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
btnLeft.Content = "左眼开";
|
||||||
|
}
|
||||||
ma.BtnClickFunction(Function.ButtonType.切换型, 0);
|
ma.BtnClickFunction(Function.ButtonType.切换型, 0);
|
||||||
}
|
}
|
||||||
//右开眼
|
//右开眼
|
||||||
private void Button_Click_Right(object sender, RoutedEventArgs e)
|
private void Button_Click_Right(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
// 切换文案:左眼开 ↔ 左眼关
|
||||||
|
if (btnRight.Content.ToString() == "右眼开")
|
||||||
|
{
|
||||||
|
btnRight.Content = "右眼关";
|
||||||
|
if (btnLeft.Content.ToString() == "左眼关")
|
||||||
|
{
|
||||||
|
btnLeft.Content = "左眼开";
|
||||||
|
ma.BtnClickFunction(Function.ButtonType.切换型, 0);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
btnRight.Content = "右眼开";
|
||||||
|
}
|
||||||
ma.BtnClickFunction(Function.ButtonType.切换型, 1);
|
ma.BtnClickFunction(Function.ButtonType.切换型, 1);
|
||||||
}
|
}
|
||||||
//反转
|
//反转
|
||||||
|
|||||||
Reference in New Issue
Block a user