|
1 | 1 | using System; |
2 | 2 | using System.Collections.Generic; |
3 | 3 | using System.ComponentModel; |
| 4 | +using System.Data; |
4 | 5 | using System.Drawing; |
5 | 6 | using System.IO; |
6 | 7 | using System.Linq; |
7 | | -using System.Reflection; |
| 8 | +using System.Text; |
8 | 9 | using System.Threading.Tasks; |
9 | 10 | using System.Windows.Forms; |
10 | 11 |
|
11 | 12 | namespace XexToolGUI |
12 | 13 | { |
13 | | - partial class About : Form |
14 | | - { |
15 | | - System.Media.SoundPlayer player { get; set; } |
| 14 | + public partial class About : Form |
| 15 | + { |
| 16 | + System.Media.SoundPlayer player { get; set; } |
16 | 17 | public About() |
17 | 18 | { |
18 | 19 | InitializeComponent(); |
19 | 20 | player = new System.Media.SoundPlayer(new MemoryStream(Properties.Resources.About_sound)); |
20 | 21 | player.PlayLooping(); |
21 | | - Text = "Info XexTool GUI"; |
22 | | - labelProductName.Text = "XexToolGUI for xorloser's xextool"; |
23 | | - labelVersion.Text = String.Format("Version {0}", AssemblyVersion); |
24 | | - labelCopyright.Text = "Copyright © Serenity 2022"; |
25 | | - labelCompanyName.Text = "Thanks to:"; |
26 | | - textBoxDescription.Text = "Made By mLoaD \r\n xorloser for your Program and your Hard work \r\n Open Sourced By Serenity."; |
27 | 22 | } |
28 | 23 |
|
29 | | - #region Assembly Attribute Accessors |
30 | | - |
31 | | - public string AssemblyTitle |
| 24 | + private void XClose_Click(object sender, EventArgs e) |
32 | 25 | { |
33 | | - get |
| 26 | + if (player != null) |
34 | 27 | { |
35 | | - object[] attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyTitleAttribute), false); |
36 | | - if (attributes.Length > 0) |
37 | | - { |
38 | | - AssemblyTitleAttribute titleAttribute = (AssemblyTitleAttribute)attributes[0]; |
39 | | - if (titleAttribute.Title != "") |
40 | | - { |
41 | | - return titleAttribute.Title; |
42 | | - } |
43 | | - } |
44 | | - return System.IO.Path.GetFileNameWithoutExtension(Assembly.GetExecutingAssembly().CodeBase); |
| 28 | + player.Stop(); |
| 29 | + player = null; |
45 | 30 | } |
46 | | - } |
| 31 | + Close(); |
| 32 | + checker(); |
47 | 33 |
|
48 | | - public string AssemblyVersion |
49 | | - { |
50 | | - get |
51 | | - { |
52 | | - return Assembly.GetExecutingAssembly().GetName().Version.ToString(); |
53 | | - } |
54 | 34 | } |
55 | | - |
56 | | - public string AssemblyProduct |
| 35 | + void checker() |
57 | 36 | { |
58 | | - get |
| 37 | + if(Program.IDCScript != null) |
59 | 38 | { |
60 | | - object[] attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyProductAttribute), false); |
61 | | - if (attributes.Length == 0) |
62 | | - { |
63 | | - return ""; |
64 | | - } |
65 | | - return ((AssemblyProductAttribute)attributes[0]).Product; |
| 39 | + Program.IDCScript.Show(); |
66 | 40 | } |
67 | | - } |
68 | | - |
69 | | - public string AssemblyCopyright |
70 | | - { |
71 | | - get |
| 41 | + else if(Program.xml != null) |
72 | 42 | { |
73 | | - object[] attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyCopyrightAttribute), false); |
74 | | - if (attributes.Length == 0) |
75 | | - { |
76 | | - return ""; |
77 | | - } |
78 | | - return ((AssemblyCopyrightAttribute)attributes[0]).Copyright; |
| 43 | + Program.xml.Show(); |
79 | 44 | } |
80 | | - } |
81 | | - |
82 | | - public string AssemblyCompany |
83 | | - { |
84 | | - get |
| 45 | + else if (Program.Dump != null) |
85 | 46 | { |
86 | | - object[] attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyCompanyAttribute), false); |
87 | | - if (attributes.Length == 0) |
88 | | - { |
89 | | - return ""; |
90 | | - } |
91 | | - return ((AssemblyCompanyAttribute)attributes[0]).Company; |
| 47 | + Program.Dump.Show(); |
92 | 48 | } |
93 | | - } |
94 | | - #endregion |
95 | | - |
96 | | - private void okButton_Click(object sender, EventArgs e) |
97 | | - { |
98 | | - Close(); |
99 | | - Program.xexgui.Show(); |
100 | | - Program.About = null; |
101 | | - if(player != null) |
| 49 | + if(Program.IDCScript == null && Program.xml == null && Program.Dump == null) |
102 | 50 | { |
103 | | - player.Stop(); |
104 | | - player = null; |
| 51 | + Program.xexgui.Show(); |
| 52 | + Program.Info = null; |
105 | 53 | } |
106 | 54 | } |
107 | | - |
108 | | - private void About_FormClosing(object sender, FormClosingEventArgs e) |
| 55 | + private void info_FormClosing(object sender, FormClosingEventArgs e) |
109 | 56 | { |
110 | | - Program.xexgui.Show(); |
111 | | - Program.About = null; |
112 | | - |
113 | 57 | if (player != null) |
114 | 58 | { |
115 | 59 | player.Stop(); |
116 | 60 | player = null; |
117 | 61 | } |
| 62 | + checker(); |
118 | 63 | } |
119 | 64 | } |
120 | 65 | } |
0 commit comments