public _64InjectCMD()
        {
            Cll.Log.SaveIn("64Inject_log.txt");
            Cll.Log.WriteLine(DateTime.UtcNow.ToString());
            Cll.Log.WriteLine("64Inject open in CMD mode.");

            injector = new _64Injector();
        }
Exemple #2
0
        public _64InjectGUI()
        {
            Cll.Log.SaveIn("64Inject_log.txt");
            Cll.Log.WriteLine(DateTime.UtcNow.ToString());
            Cll.Log.WriteLine("64Inject open in GUI mode.");

            injector = new _64Injector();

            InitializeComponent();

            this.Text = "64Inject " + _64Injector.Release;

            XmlSettings = new XmlWriterSettings
            {
                Indent          = true,
                IndentChars     = "  ",
                NewLineChars    = "\r\n",
                NewLineHandling = NewLineHandling.Replace
            };
            XmlConfig = new XmlDocument();

            LoadXmlConfig();

            if (NusContent.GetJavaVersion() == null)
            {
                MessageBox.Show("Warning! Apparently the system does not have Java installed!\n" +
                                "Java is needed to NUSPacker (encrypt) and JNUSTool (decrypt).",
                                "Warning!", MessageBoxButtons.OK, MessageBoxIcon.Warning);
            }
            else
            {
                StringBuilder sb      = new StringBuilder();
                bool          warning = false;
                if (!File.Exists("resources\\nuspacker\\NUSPacker.jar"))
                {
                    sb.AppendLine("Warning! \"resources\\nuspacker\\NUSPacker.jar\" not found!");
                    sb.AppendLine("NUSPacker allows you to encrypt the result for WUPInstaller.");
                    sb.AppendLine("");
                    warning = true;
                }
                if (!File.Exists("resources\\jnustool\\JNUSTool.jar"))
                {
                    sb.AppendLine("Warning! \"resources\\jnustool\\JNUSTool.jar\" not found!");
                    sb.AppendLine("JNUSTool allows you to decrypt Wii U VC games to use as a base.");
                    warning = true;
                }

                if (warning)
                {
                    MessageBox.Show(sb.ToString(), "Warning!", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                }
            }

            if (NusContent.CheckCommonKeyFiles())
            {
                textBoxCommonKey.Enabled      = false;
                panelValidKey.BackgroundImage = Properties.Resources.checkmark_16;
            }
            else
            {
                textBoxCommonKey.Enabled      = true;
                panelValidKey.BackgroundImage = Properties.Resources.x_mark_16;
            }

            labelLoadedBase.Text = "Base loaded: " + injector.LoadedBase;
            if (injector.BaseIsLoaded)
            {
                panelLoadedBase.BackgroundImage = global::_64Inject.Properties.Resources.checkmark_16;
            }

            if (File.Exists("resources\\boot.png"))
            {
                injector.BootTvImg.Frame  = new Bitmap("resources\\boot.png");
                injector.BootDrcImg.Frame = new Bitmap("resources\\boot.png");
            }

            if (File.Exists("resources\\icon.png"))
            {
                injector.IconImg.Frame = new Bitmap("resources\\icon.png");
            }

            if (File.Exists("resources\\title_screen.png"))
            {
                injector.BootTvImg.TitleScreen  = new Bitmap("resources\\title_screen.png");
                injector.BootDrcImg.TitleScreen = new Bitmap("resources\\title_screen.png");
                injector.IconImg.TitleScreen    = new Bitmap("resources\\title_screen.png");
            }

            UpdateBootTvPictureBox();
            UpdateBootDrcPictureBox();
            UpdateIconPictureBox();
        }