This repository has been archived by the owner on Feb 2, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathChangeLyrics.xaml.cs
71 lines (67 loc) · 2.57 KB
/
ChangeLyrics.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
using System.Windows;
namespace UtaFormatix
{
/// <summary>
/// ChangeLyrics.xaml 的交互逻辑
/// </summary>
public partial class ChangeLyrics : Window
{
public ChangeLyrics()
{
InitializeComponent();
}
public Lyric.LyricType fromType = Lyric.LyricType.None;
public Lyric.LyricType ToType = Lyric.LyricType.None;
private void ButtonCancel_Click(object sender, RoutedEventArgs e)
{
DialogResult = true;
Close();
}
private void ButtonConfirm_Click(object sender, RoutedEventArgs e)
{
if (RadioButtonFrom1.IsChecked == true || RadioButtonFrom2.IsChecked == true || RadioButtonFrom3.IsChecked == true || RadioButtonFrom4.IsChecked == true)
{
if (RadioButtonTo1.IsChecked == true || RadioButtonTo2.IsChecked == true || RadioButtonTo3.IsChecked == true || RadioButtonTo4.IsChecked == true)
{
if (RadioButtonFrom1.IsChecked == true)
{
fromType = Lyric.LyricType.RomajiTandoku;
}
else if (RadioButtonFrom2.IsChecked == true)
{
fromType = Lyric.LyricType.RomajiRenzoku;
}
else if (RadioButtonFrom3.IsChecked == true)
{
fromType = Lyric.LyricType.KanaTandoku;
}
else if (RadioButtonFrom4.IsChecked == true)
{
fromType = Lyric.LyricType.KanaRenzoku;
}
if (RadioButtonTo1.IsChecked == true)
{
ToType = Lyric.LyricType.RomajiTandoku;
}
else if (RadioButtonTo2.IsChecked == true)
{
ToType = Lyric.LyricType.RomajiRenzoku;
}
else if (RadioButtonTo3.IsChecked == true)
{
ToType = Lyric.LyricType.KanaTandoku;
}
else if (RadioButtonTo4.IsChecked == true)
{
ToType = Lyric.LyricType.KanaRenzoku;
}
DialogResult = true;
Close();
return;
}
}
DialogResult = false;
MessageBox.Show("Please select the types correctly.", "Lyrics Transformation");
}
}
}