Пример #1
0
        private void UPSOpenSimpleForm_Shown(object sender, EventArgs e)
        {
            using (InputFormRef.AutoPleaseWait pleaseWait = new InputFormRef.AutoPleaseWait(this))
            {
                String dir      = Path.GetDirectoryName(this.UPSFilename);
                String filename = Path.GetFileName(this.UPSFilename);
                pleaseWait.DoEvents(R._("{0}に適合する元ファイルを自動検索中・・・", filename));

                uint srcCRC32 = UPSUtil.GetUPSSrcCRC32(this.UPSFilename);

                string orignal_romfile = MainFormUtil.FindOrignalROMByCRC32(dir, srcCRC32);
                this.OrignalFilename.Text = orignal_romfile;
            }
        }
        private void WorkSupport_SelectUPSForm_Shown(object sender, EventArgs e)
        {
            using (InputFormRef.AutoPleaseWait pleaseWait = new InputFormRef.AutoPleaseWait(this))
            {
                String dir      = Path.GetDirectoryName(this.UPSFilename);
                String filename = Path.GetFileName(this.UPSFilename);
                pleaseWait.DoEvents(R._("{0}に適合する元ファイルを自動検索中・・・", filename));

                uint srcCRC32 = UPSUtil.GetUPSSrcCRC32(this.UPSFilename);

                string orignal_romfile = MainFormUtil.FindOrignalROMByCRC32(dir, srcCRC32);
                this.OrignalFilename.Text = orignal_romfile;
            }
            if (File.Exists(this.OrignalFilename.Text))
            {
                ApplyUPSPatchButton.PerformClick();
            }
        }