This repository has been archived by the owner on Sep 30, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathOptions.xaml.cs
73 lines (71 loc) · 2.4 KB
/
Options.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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
using System.Windows;
namespace rhythm_games_converter
{
/// <summary>
/// Interaction logic for Window1.xaml
/// </summary>
public partial class Options : Window
{
public Options()
{
InitializeComponent();
if (((MainWindow)Application.Current.MainWindow).osuSelection.Text == "0")
{
osuBox.IsChecked = false;
}
if (((MainWindow)Application.Current.MainWindow).maniaSelection.Text == "0")
{
maniaBox.IsChecked = false;
}
if (((MainWindow)Application.Current.MainWindow).taikoSelection.Text == "0")
{
taikoBox.IsChecked = false;
}
if (((MainWindow)Application.Current.MainWindow).ctbSelection.Text == "0")
{
ctbBox.IsChecked = false;
}
}
private void Apply_Click(object sender, RoutedEventArgs e)
{
if (osuBox.IsChecked == false && maniaBox.IsChecked == false && taikoBox.IsChecked == false && ctbBox.IsChecked == false)
{
MessageBox.Show("You have to select at least one gamemode.", "Error");
return;
}
if (osuBox.IsChecked == true)
{
((MainWindow)Application.Current.MainWindow).osuSelection.Text = "1";
}
else
{
((MainWindow)Application.Current.MainWindow).osuSelection.Text = "0";
}
if (maniaBox.IsChecked == true)
{
((MainWindow)Application.Current.MainWindow).maniaSelection.Text = "1";
}
else
{
((MainWindow)Application.Current.MainWindow).maniaSelection.Text = "0";
}
if (taikoBox.IsChecked == true)
{
((MainWindow)Application.Current.MainWindow).taikoSelection.Text = "1";
}
else
{
((MainWindow)Application.Current.MainWindow).taikoSelection.Text = "0";
}
if (ctbBox.IsChecked == true)
{
((MainWindow)Application.Current.MainWindow).ctbSelection.Text = "1";
}
else
{
((MainWindow)Application.Current.MainWindow).ctbSelection.Text = "0";
}
Close();
}
}
}