Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.Data;
- using System.Diagnostics;
- using System.Drawing;
- using System.IO;
- using System.IO.Compression;
- using System.Linq;
- using System.Reflection;
- using System.Text;
- using System.Threading.Tasks;
- using System.Windows.Forms;
- namespace NDSinjector
- {
- public partial class Form1 : Form
- {
- public Form1()
- {
- InitializeComponent();
- }
- private void button2_Click(object sender, EventArgs e)
- {
- string c = "D7B0";
- string txt = textBox1.Text;
- if (txt.Contains(c))
- {
- string ckeylocation = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), @"TOOLS\Storage\CKEY");
- using (System.IO.StreamWriter writetext = new System.IO.StreamWriter(ckeylocation))
- {
- writetext.WriteLine(txt);
- }
- MessageBox.Show("The commonkey is correct");
- }
- else
- {
- MessageBox.Show("The commonkey is incorrect");
- }
- }
- private void textBox1_TextChanged(object sender, EventArgs e)
- {
- }
- private void button3_Click(object sender, EventArgs e)
- {
- string c = "1337";
- string txt = textBox2.Text;
- if (txt.Contains(c))
- {
- string tklocation = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), @"TOOLS\Storage\WWEUTK");
- using (System.IO.StreamWriter writetext = new System.IO.StreamWriter(tklocation))
- {
- writetext.WriteLine(txt);
- }
- MessageBox.Show("The Titlekey is correct");
- }
- else
- {
- MessageBox.Show("The Titlekey is incorrect");
- }
- }
- private void button1_Click(object sender, EventArgs e)
- {
- string batch = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), @"TOOLS\JNUSTOOL\WWEU.bat");
- Process JNUSTOOL = new Process();
- JNUSTOOL.StartInfo.FileName = batch;
- JNUSTOOL.Start();
- label2.Enabled = false;
- label2.Visible = false;
- label3.Enabled = false;
- label3.Visible = false;
- textBox2.Enabled = false;
- textBox1.Enabled = false;
- textBox1.Visible = false;
- textBox2.Visible = false;
- button1.Visible = false;
- button2.Visible = false;
- button3.Visible = false;
- button1.Enabled = false;
- button2.Enabled = false;
- button3.Enabled = false;
- download.Enabled = true;
- download.Visible = true;
- DWLNDcon.Enabled = true;
- DWLNDcon.Visible = true;
- }
- private void button4_Click_1(object sender, EventArgs e)
- {
- string ckeylocation = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), @"TOOLS\Storage\CKEY");
- string ckey = File.ReadAllText(ckeylocation);
- string ckeycheck = "D7B0";
- string tklocation = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), @"TOOLS\Storage\WWEUTK");
- string tkey = File.ReadAllText(tklocation);
- string tkeycheck = "1337";
- if (ckey.Contains(ckeycheck))
- {
- textBox1.Text = ckey;
- }
- else
- {
- textBox1.Text = "";
- }
- if (tkey.Contains(tkeycheck))
- {
- textBox2.Text = tkey;
- }
- else
- {
- textBox2.Text = "";
- }
- label1.Visible = false;
- label1.Enabled = false;
- label2.Enabled = true;
- label2.Visible = true;
- label3.Enabled = true;
- label3.Visible = true;
- textBox2.Enabled = true;
- textBox1.Enabled = true;
- textBox1.Visible = true;
- textBox2.Visible = true;
- button1.Visible = true;
- button2.Visible = true;
- button3.Visible = true;
- button4.Visible = false;
- button1.Enabled = true;
- button2.Enabled = true;
- button3.Enabled = true;
- button4.Enabled = false;
- }
- private void button5_Click(object sender, EventArgs e)
- {
- FolderBrowserDialog browser = new FolderBrowserDialog();
- string tempPath = "";
- if (openFileDialog1.ShowDialog(this) == DialogResult.OK)
- {
- tempPath = openFileDialog1.InitialDirectory + openFileDialog1.FileName;
- string sourcefile = tempPath;
- string newfile = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), @"TOOLS\JNUSTOOL\WarioWare Touched! [DAGP01]\content\0010\WUP-N-DAGP.srl");
- string oldromzip = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), @"TOOLS\JNUSTOOL\WarioWare Touched! [DAGP01]\content\0010\rom.zip");
- string desfile = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), @"TOOLS\JNUSTOOL\WarioWare Touched! [DAGP01]\content\0010\rom.nds");
- string rompath = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), @"TOOLS\JNUSTOOL\WarioWare Touched! [DAGP01]\content\0010\");
- string ziping = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), @"TOOLS\7ZIP\7zipwweu.bat");
- System.IO.File.Copy(sourcefile, desfile);
- File.Move(desfile, newfile);
- File.Delete(oldromzip);
- Process zip = new Process();
- zip.StartInfo.FileName = ziping;
- zip.Start();
- button5.Enabled = false;
- button5.Visible = false;
- label4.Visible = false;
- label5.Visible = false;
- label6.Visible = false;
- label4.Enabled = false;
- label5.Enabled = false;
- label6.Enabled = false;
- label7.Enabled = false;
- label7.Visible = true;
- button6.Enabled = true;
- button6.Visible = true;
- }
- }
- private void button6_Click(object sender, EventArgs e)
- {
- string newfile = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), @"TOOLS\JNUSTOOL\WarioWare Touched! [DAGP01]\content\0010\WUP-N-DAGP.srl");
- File.Delete(newfile);
- label7.Enabled = false;
- label7.Visible = false;
- button6.Enabled = false;
- button6.Enabled = false;
- label8.Enabled = true;
- label8.Visible = true;
- button7.Enabled = true;
- button7.Visible = true;
- }
- private void button5_Click_1(object sender, EventArgs e)
- {
- FolderBrowserDialog browser = new FolderBrowserDialog();
- string tempPath = "";
- if (openFileDialog1.ShowDialog(this) == DialogResult.OK)
- {
- tempPath = openFileDialog1.InitialDirectory + openFileDialog1.FileName;
- string sourcefile = tempPath;
- string newfile = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), @"TOOLS\JNUSTOOL\WarioWare Touched! [DAGP01]\content\0010\WUP-N-DAGP.srl");
- string oldromzip = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), @"TOOLS\JNUSTOOL\WarioWare Touched! [DAGP01]\content\0010\rom.zip");
- string desfile = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), @"TOOLS\JNUSTOOL\WarioWare Touched! [DAGP01]\content\0010\rom.nds");
- string rompath = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), @"TOOLS\JNUSTOOL\WarioWare Touched! [DAGP01]\content\0010\");
- string ziping = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), @"TOOLS\7ZIP\7zipwweu.bat");
- System.IO.File.Copy(sourcefile, desfile);
- File.Move(desfile, newfile);
- File.Delete(oldromzip);
- Process zip = new Process();
- zip.StartInfo.FileName = ziping;
- zip.Start();
- button5.Enabled = false;
- button5.Visible = false;
- label4.Visible = false;
- label5.Visible = false;
- label6.Visible = false;
- label4.Enabled = false;
- label5.Enabled = false;
- label6.Enabled = false;
- label7.Enabled = false;
- label7.Visible = true;
- button6.Enabled = true;
- button6.Visible = true;
- }
- }
- private void DWLNDcon_Click(object sender, EventArgs e)
- {
- button5.Enabled = true;
- button5.Visible = true;
- label4.Visible = true;
- label5.Visible = true;
- label6.Visible = true;
- label4.Enabled = true;
- label5.Enabled = true;
- label6.Enabled = true;
- download.Enabled = false;
- download.Visible = false;
- DWLNDcon.Enabled = false;
- DWLNDcon.Visible = false;
- }
- private void button6_Click_1(object sender, EventArgs e)
- {
- string newfile = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), @"TOOLS\JNUSTOOL\WarioWare Touched! [DAGP01]\content\0010\WUP-N-DAGP.srl");
- File.Delete(newfile);
- label7.Enabled = false;
- label7.Visible = false;
- button6.Enabled = false;
- button6.Visible = false;
- label8.Enabled = true;
- label8.Visible = true;
- button7.Enabled = true;
- button7.Visible = true;
- }
- private void button7_Click(object sender, EventArgs e)
- {
- string packing = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), @"TOOLS\NUSPACKER\Pack.bat");
- Process pack = new Process();
- pack.StartInfo.FileName = packing;
- pack.Start();
- label8.Enabled = false;
- label8.Visible = false;
- button7.Enabled = false;
- button7.Visible = false;
- label9.Visible = true;
- label9.Enabled = true;
- button8.Enabled = true;
- button8.Visible = true;
- }
- private void button8_Click(object sender, EventArgs e)
- {
- label9.Visible = false;
- label9.Enabled = false;
- label10.Visible = true;
- label10.Enabled = true;
- button8.Visible = false;
- button8.Enabled = false;
- button9.Visible = true;
- button9.Enabled = true;
- }
- private void button9_Click(object sender, EventArgs e)
- {
- Application.Exit();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement