Skip to content

Commit

Permalink
Hide test buttons
Browse files Browse the repository at this point in the history
  • Loading branch information
poma committed Mar 15, 2016
1 parent 28affd5 commit b265fc1
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 deletions.
13 changes: 7 additions & 6 deletions StatsDisplay/Settings.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@
mc:Ignorable="d"
DataContext="{Binding RelativeSource={RelativeSource Self}}"
Title="Settings"
Height="334.988" Width="260.8"
Top="{Binding Settings.SettingsWindowTop, Mode=TwoWay}" Left="{Binding Settings.SettingsWindowLeft, Mode=TwoWay}">
Height="auto" Width="260.8" SizeToContent="Height"
Top="{Binding Settings.SettingsWindowTop, Mode=TwoWay}" Left="{Binding Settings.SettingsWindowLeft, Mode=TwoWay}"
KeyDown="Window_KeyDown">
<Grid>
<StackPanel Margin="20">
<CheckBox IsChecked="{Binding Settings.Enabled}" Content="Enabled" />
Expand All @@ -28,10 +29,10 @@
<TextBlock TextWrapping="Wrap" Margin="0, 0, 0, 8" Foreground="DimGray" FontSize="10">
Data is provided by <Hyperlink NavigateUri="http://www.hotslogs.com" RequestNavigate="Hyperlink_RequestNavigate">HotsLogs.com</Hyperlink>
</TextBlock>
</StackPanel>
<StackPanel Orientation="Horizontal" VerticalAlignment="Bottom" HorizontalAlignment="Right" Margin="20">
<Button Content="Test 1" Click="Test1_Click" Padding="8, 0" Margin="8, 0" />
<Button Content="Test 2" Click="Test2_Click" Padding="8, 0" />
<StackPanel Orientation="Horizontal" Margin="0, 0, 0, 8" x:Name="testButtons" Visibility="Collapsed">
<Button Content="Test 1" Click="Test1_Click" Padding="8, 0" Margin="0, 0, 8, 0" />
<Button Content="Test 2" Click="Test2_Click" Padding="8, 0" />
</StackPanel>
</StackPanel>
</Grid>
</Window>
7 changes: 7 additions & 0 deletions StatsDisplay/Settings.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -108,5 +108,12 @@ private void Hyperlink_RequestNavigate(object sender, System.Windows.Navigation.
Process.Start(new ProcessStartInfo(e.Uri.AbsoluteUri));
e.Handled = true;
}

private void Window_KeyDown(object sender, KeyEventArgs e)
{
if (e.Key == Key.T && Keyboard.Modifiers == ModifierKeys.Control) {
testButtons.Visibility = testButtons.IsVisible ? Visibility.Collapsed : Visibility.Visible;
}
}
}
}

0 comments on commit b265fc1

Please sign in to comment.