Advertisement
Guest User

Untitled

a guest
Nov 21st, 2017
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 11.44 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel;
  4. using System.Data;
  5. using System.Diagnostics;
  6. using System.Drawing;
  7. using System.IO;
  8. using System.IO.Compression;
  9. using System.Linq;
  10. using System.Reflection;
  11. using System.Text;
  12. using System.Threading.Tasks;
  13. using System.Windows.Forms;
  14.  
  15. namespace NDSinjector
  16. {
  17. public partial class Form1 : Form
  18. {
  19. public Form1()
  20. {
  21. InitializeComponent();
  22. }
  23.  
  24. private void button2_Click(object sender, EventArgs e)
  25. {
  26. string c = "D7B0";
  27. string txt = textBox1.Text;
  28. if (txt.Contains(c))
  29. {
  30. string ckeylocation = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), @"TOOLS\Storage\CKEY");
  31. using (System.IO.StreamWriter writetext = new System.IO.StreamWriter(ckeylocation))
  32. {
  33. writetext.WriteLine(txt);
  34. }
  35.  
  36. MessageBox.Show("The commonkey is correct");
  37. }
  38. else
  39. {
  40. MessageBox.Show("The commonkey is incorrect");
  41. }
  42. }
  43.  
  44. private void textBox1_TextChanged(object sender, EventArgs e)
  45. {
  46.  
  47. }
  48.  
  49. private void button3_Click(object sender, EventArgs e)
  50. {
  51. string c = "1337";
  52. string txt = textBox2.Text;
  53. if (txt.Contains(c))
  54. {
  55. string tklocation = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), @"TOOLS\Storage\WWEUTK");
  56.  
  57. using (System.IO.StreamWriter writetext = new System.IO.StreamWriter(tklocation))
  58. {
  59. writetext.WriteLine(txt);
  60. }
  61. MessageBox.Show("The Titlekey is correct");
  62.  
  63. }
  64. else
  65. {
  66. MessageBox.Show("The Titlekey is incorrect");
  67. }
  68. }
  69.  
  70. private void button1_Click(object sender, EventArgs e)
  71. {
  72. string batch = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), @"TOOLS\JNUSTOOL\WWEU.bat");
  73. Process JNUSTOOL = new Process();
  74. JNUSTOOL.StartInfo.FileName = batch;
  75. JNUSTOOL.Start();
  76. label2.Enabled = false;
  77. label2.Visible = false;
  78. label3.Enabled = false;
  79. label3.Visible = false;
  80. textBox2.Enabled = false;
  81. textBox1.Enabled = false;
  82. textBox1.Visible = false;
  83. textBox2.Visible = false;
  84. button1.Visible = false;
  85. button2.Visible = false;
  86. button3.Visible = false;
  87. button1.Enabled = false;
  88. button2.Enabled = false;
  89. button3.Enabled = false;
  90. download.Enabled = true;
  91. download.Visible = true;
  92. DWLNDcon.Enabled = true;
  93. DWLNDcon.Visible = true;
  94. }
  95.  
  96. private void button4_Click_1(object sender, EventArgs e)
  97. {
  98. string ckeylocation = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), @"TOOLS\Storage\CKEY");
  99. string ckey = File.ReadAllText(ckeylocation);
  100. string ckeycheck = "D7B0";
  101. string tklocation = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), @"TOOLS\Storage\WWEUTK");
  102. string tkey = File.ReadAllText(tklocation);
  103. string tkeycheck = "1337";
  104. if (ckey.Contains(ckeycheck))
  105. {
  106. textBox1.Text = ckey;
  107. }
  108. else
  109. {
  110. textBox1.Text = "";
  111. }
  112. if (tkey.Contains(tkeycheck))
  113. {
  114. textBox2.Text = tkey;
  115. }
  116. else
  117. {
  118. textBox2.Text = "";
  119. }
  120. label1.Visible = false;
  121. label1.Enabled = false;
  122. label2.Enabled = true;
  123. label2.Visible = true;
  124. label3.Enabled = true;
  125. label3.Visible = true;
  126. textBox2.Enabled = true;
  127. textBox1.Enabled = true;
  128. textBox1.Visible = true;
  129. textBox2.Visible = true;
  130. button1.Visible = true;
  131. button2.Visible = true;
  132. button3.Visible = true;
  133. button4.Visible = false;
  134. button1.Enabled = true;
  135. button2.Enabled = true;
  136. button3.Enabled = true;
  137. button4.Enabled = false;
  138. }
  139.  
  140. private void button5_Click(object sender, EventArgs e)
  141. {
  142. FolderBrowserDialog browser = new FolderBrowserDialog();
  143. string tempPath = "";
  144.  
  145. if (openFileDialog1.ShowDialog(this) == DialogResult.OK)
  146. {
  147. tempPath = openFileDialog1.InitialDirectory + openFileDialog1.FileName;
  148. string sourcefile = tempPath;
  149. string newfile = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), @"TOOLS\JNUSTOOL\WarioWare Touched! [DAGP01]\content\0010\WUP-N-DAGP.srl");
  150. string oldromzip = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), @"TOOLS\JNUSTOOL\WarioWare Touched! [DAGP01]\content\0010\rom.zip");
  151. string desfile = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), @"TOOLS\JNUSTOOL\WarioWare Touched! [DAGP01]\content\0010\rom.nds");
  152. string rompath = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), @"TOOLS\JNUSTOOL\WarioWare Touched! [DAGP01]\content\0010\");
  153. string ziping = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), @"TOOLS\7ZIP\7zipwweu.bat");
  154. System.IO.File.Copy(sourcefile, desfile);
  155. File.Move(desfile, newfile);
  156. File.Delete(oldromzip);
  157. Process zip = new Process();
  158. zip.StartInfo.FileName = ziping;
  159. zip.Start();
  160. button5.Enabled = false;
  161. button5.Visible = false;
  162. label4.Visible = false;
  163. label5.Visible = false;
  164. label6.Visible = false;
  165. label4.Enabled = false;
  166. label5.Enabled = false;
  167. label6.Enabled = false;
  168. label7.Enabled = false;
  169. label7.Visible = true;
  170. button6.Enabled = true;
  171. button6.Visible = true;
  172. }
  173. }
  174.  
  175. private void button6_Click(object sender, EventArgs e)
  176. {
  177. string newfile = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), @"TOOLS\JNUSTOOL\WarioWare Touched! [DAGP01]\content\0010\WUP-N-DAGP.srl");
  178. File.Delete(newfile);
  179. label7.Enabled = false;
  180. label7.Visible = false;
  181. button6.Enabled = false;
  182. button6.Enabled = false;
  183. label8.Enabled = true;
  184. label8.Visible = true;
  185. button7.Enabled = true;
  186. button7.Visible = true;
  187. }
  188.  
  189. private void button5_Click_1(object sender, EventArgs e)
  190. {
  191. FolderBrowserDialog browser = new FolderBrowserDialog();
  192. string tempPath = "";
  193.  
  194. if (openFileDialog1.ShowDialog(this) == DialogResult.OK)
  195. {
  196. tempPath = openFileDialog1.InitialDirectory + openFileDialog1.FileName;
  197. string sourcefile = tempPath;
  198. string newfile = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), @"TOOLS\JNUSTOOL\WarioWare Touched! [DAGP01]\content\0010\WUP-N-DAGP.srl");
  199. string oldromzip = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), @"TOOLS\JNUSTOOL\WarioWare Touched! [DAGP01]\content\0010\rom.zip");
  200. string desfile = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), @"TOOLS\JNUSTOOL\WarioWare Touched! [DAGP01]\content\0010\rom.nds");
  201. string rompath = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), @"TOOLS\JNUSTOOL\WarioWare Touched! [DAGP01]\content\0010\");
  202. string ziping = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), @"TOOLS\7ZIP\7zipwweu.bat");
  203. System.IO.File.Copy(sourcefile, desfile);
  204. File.Move(desfile, newfile);
  205. File.Delete(oldromzip);
  206. Process zip = new Process();
  207. zip.StartInfo.FileName = ziping;
  208. zip.Start();
  209. button5.Enabled = false;
  210. button5.Visible = false;
  211. label4.Visible = false;
  212. label5.Visible = false;
  213. label6.Visible = false;
  214. label4.Enabled = false;
  215. label5.Enabled = false;
  216. label6.Enabled = false;
  217. label7.Enabled = false;
  218. label7.Visible = true;
  219. button6.Enabled = true;
  220. button6.Visible = true;
  221. }
  222. }
  223.  
  224. private void DWLNDcon_Click(object sender, EventArgs e)
  225. {
  226. button5.Enabled = true;
  227. button5.Visible = true;
  228. label4.Visible = true;
  229. label5.Visible = true;
  230. label6.Visible = true;
  231. label4.Enabled = true;
  232. label5.Enabled = true;
  233. label6.Enabled = true;
  234. download.Enabled = false;
  235. download.Visible = false;
  236. DWLNDcon.Enabled = false;
  237. DWLNDcon.Visible = false;
  238. }
  239.  
  240. private void button6_Click_1(object sender, EventArgs e)
  241. {
  242. string newfile = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), @"TOOLS\JNUSTOOL\WarioWare Touched! [DAGP01]\content\0010\WUP-N-DAGP.srl");
  243. File.Delete(newfile);
  244. label7.Enabled = false;
  245. label7.Visible = false;
  246. button6.Enabled = false;
  247. button6.Visible = false;
  248. label8.Enabled = true;
  249. label8.Visible = true;
  250. button7.Enabled = true;
  251. button7.Visible = true;
  252. }
  253.  
  254. private void button7_Click(object sender, EventArgs e)
  255. {
  256. string packing = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), @"TOOLS\NUSPACKER\Pack.bat");
  257. Process pack = new Process();
  258. pack.StartInfo.FileName = packing;
  259. pack.Start();
  260. label8.Enabled = false;
  261. label8.Visible = false;
  262. button7.Enabled = false;
  263. button7.Visible = false;
  264. label9.Visible = true;
  265. label9.Enabled = true;
  266. button8.Enabled = true;
  267. button8.Visible = true;
  268. }
  269.  
  270. private void button8_Click(object sender, EventArgs e)
  271. {
  272. label9.Visible = false;
  273. label9.Enabled = false;
  274. label10.Visible = true;
  275. label10.Enabled = true;
  276. button8.Visible = false;
  277. button8.Enabled = false;
  278. button9.Visible = true;
  279. button9.Enabled = true;
  280. }
  281.  
  282. private void button9_Click(object sender, EventArgs e)
  283. {
  284. Application.Exit();
  285. }
  286. }
  287. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement