12345678910111213141516171819202122232425262728293031 |
- using System.Windows;
- using System.Windows.Input;
- namespace MyTests
- {
- public partial class ConfirmationWindow : Window
- {
- public bool answer;
- public ConfirmationWindow(bool _answer = false)
- {
- InitializeComponent();
- Owner = Application.Current.MainWindow;
- answer = _answer;
- }
- private void YesButton(object sender, RoutedEventArgs e)
- {
- answer = true;
- this.Close();
- }
- private void NoButton(object sender, RoutedEventArgs e)
- {
- answer = false;
- this.Close();
- }
- private void Border_MouseDown(object sender, MouseButtonEventArgs e)
- {
- if (e.LeftButton == MouseButtonState.Pressed)
- DragMove();
- }
- }
- }
|