Skip to content

Commit

Permalink
Removed options button on language menu and hitting OK will now close…
Browse files Browse the repository at this point in the history
… the language window
  • Loading branch information
Sebski123 committed Mar 3, 2020
1 parent be5f133 commit 67fbd12
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 26 deletions.
10 changes: 1 addition & 9 deletions YARDT/ChooseLanguage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,6 @@
MouseLeftButtonDown="CollapseButton_MouseLeftButtonDown"
MouseEnter="CollapseButton_MouseEnter"
MouseLeave="CollapseButton_MouseLeave"/>
<Image x:Name="OptionsButton"
Source="/Resources/OptionsButton.bmp"
Width="16"
Height="16"
DockPanel.Dock="Right"
MouseLeftButtonDown="OptionsButton_MouseLeftButtonDown"
MouseEnter="OptionsButton_MouseEnter"
MouseLeave="OptionsButton_MouseLeave"/>
<TextBlock x:Name="WindowTitle" HorizontalAlignment="Center" Foreground="#FFEDECEC">YARDT</TextBlock>
</DockPanel>
<StackPanel x:Name="LanguageSettings"
Expand All @@ -81,7 +73,7 @@
<ComboBoxItem ToolTip="Japanese (Japan)">ja_jp</ComboBoxItem>
<ComboBoxItem ToolTip="Korean (Korea)">ko_kr</ComboBoxItem>
</ComboBox>
<Button x:Name="portApplyButton" Grid.Column="2" Width="50" Height="23" Content="Apply" Click="portApplyButton_Click"/>
<Button x:Name="portApplyButton" Grid.Column="2" Width="50" Height="23" Content="OK" Click="portApplyButton_Click"/>
</Grid>


Expand Down
18 changes: 1 addition & 17 deletions YARDT/ChooseLanguage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -77,28 +77,12 @@ private void CloseButton_MouseLeave(object sender, MouseEventArgs e)
CloseButton.Source = new BitmapImage(new Uri(@"/Resources/CloseButton.bmp", UriKind.Relative));
}

//OptionsButton Functions
private void OptionsButton_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
{
OptionsButton.Source = new BitmapImage(new Uri(@"/Resources/OptionsButtonClick.bmp", UriKind.Relative));
Height++;
}

private void OptionsButton_MouseEnter(object sender, MouseEventArgs e)
{
OptionsButton.Source = new BitmapImage(new Uri(@"/Resources/OptionsButtonHover.bmp", UriKind.Relative));
}

private void OptionsButton_MouseLeave(object sender, MouseEventArgs e)
{
OptionsButton.Source = new BitmapImage(new Uri(@"/Resources/OptionsButton.bmp", UriKind.Relative));
}

private void portApplyButton_Click(object sender, RoutedEventArgs e)
{
Properties.Settings.Default.Language = ((ComboBoxItem)choosenLanguage.SelectedItem).Content.ToString();
Properties.Settings.Default.LanguageChosen = true;
Properties.Settings.Default.Save();
Close();

}
}
Expand Down

0 comments on commit 67fbd12

Please sign in to comment.