コード例 #1
0
        private void btnStart_Click(object sender, EventArgs e)
        {
            // Checking pre-condition
            if (this.cbSysMenu.SelectedIndex == -1 || String.IsNullOrEmpty(this.tbSaveAs.Text))
            {
                MessageBox.Show("Please, select a System Menu and path to extract !", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                return;
            }

            // Checking serial number
            if (!String.IsNullOrEmpty(this.tbSerialNumber.Text) && !SettingTxt.isValidSerialNumber(this.tbSerialNumber.Text.Replace(" ", "")))
            {
                MessageBox.Show("Invalid Wii Serial Number !", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                return;
            }

            // Init and start thread
            this.LockUnlockForm();
            this.rtbOutput.Clear();
            this.ssBuildNand.Text          = "";
            this.pbProgressBuildNand.Value = 0;
            this.pbGlobal.Value            = 0;
            sysMenu         = this.cbSysMenu.SelectedItem.ToString();
            wiiSerialNumber = this.tbSerialNumber.Text.Replace(" ", "");
            nandPath        = this.tbSaveAs.Text;
            fullNand        = this.rbFullNand.Checked;

            this.nusWorkerThread = new Thread(new ThreadStart(BuildNand));
            this.nusWorkerThread.Start();
        }