-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDifficultyChooseWindow.xaml.cs
59 lines (51 loc) · 1.36 KB
/
DifficultyChooseWindow.xaml.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
using System;
using System.Windows;
namespace NewSudoku
{
/// <summary>
/// 难度选择窗口
/// </summary>
public partial class DifficultyChooseWindow : Window
{
private int Difficulty=0;//难度标识,0为默认,1为容易,2为中等,3为困难
private bool NowClose;//窗口关闭标识
public DifficultyChooseWindow()
{
InitializeComponent();
}
public int getDifficulty()
{
return Difficulty;
}
public bool IsClosing()
{
return NowClose;
}
private void EasyButton_Click(object sender, RoutedEventArgs e)
{
Difficulty = 1;
NowClose = true;
Close();
}
private void HardButton_Click(object sender, RoutedEventArgs e)
{
Difficulty = 2;
NowClose = true;
Close();
}
private void VeryHardButton_Click(object sender, RoutedEventArgs e)
{
Difficulty = 3;
NowClose = true;
Close();
}
private void DifClosing(object sender, System.ComponentModel.CancelEventArgs e)
{
NowClose = true;
}
private void DifClosed(object sender, EventArgs e)
{
NowClose = true;
}
}
}