/
n1kolas
/
AdamusCleanCode
Обзор
Документация
Войти
/
n1kolas
/
AdamusCleanCode
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
codeCleanup
WpfApp2/SecondWindow.xaml.cs
45 строк
1 KB
Adam
'aksdfj'
14 окт 2025, 00:03
14 окт 2025, 00:03
cfc7608
Код
Авторство
О чём код?
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows; using System.Windows.Controls; using System.Windows.Data; using System.Windows.Documents; using System.Windows.Input; using System.Windows.Media; using System.Windows.Media.Imaging; using System.Windows.Shapes; using System.ComponentModel; namespace WpfApp2 { public partial class SecondWindow : Window { private int x = 0; private Window wc = new WindowCalc(); public SecondWindow() { InitializeComponent(); } private void SecondWindow_Closing(object sender, CancelEventArgs e) { var result = MessageBox.Show("Закрыть окно?", "Вопрос", MessageBoxButton.YesNo, MessageBoxImage.Question); if (result == MessageBoxResult.No) e.Cancel = true; else wc.Close(); } private void openCalculator(object sender, RoutedEventArgs e) { x += 1; if (x % 2 == 0) wc.Hide(); else wc.Show(); } } }