private void ImportButton_Click(object sender, EventArgs e) { string patch = MakePatch(); if (patch == "") { R.ShowStopError("パッチの生成に失敗しました"); return; } uint img = (uint)this.Image.Value; uint img2 = (uint)this.Image2.Value; uint tsa = (uint)this.TSA.Value; uint pal = (uint)this.PALETTE.Value; //パッチを生成してimportしてみよう. Panel dummy = new Panel(); this.Controls.Add(dummy); bool r = PatchForm.ImportImageOneTime(patch, dummy, this, ref img, ref img2, ref tsa, ref pal); this.Controls.Remove(dummy); if (r == false) { R.ShowStopError("ImportImageOneTimeが失敗しました"); return; } U.ForceUpdate(this.Image, img); U.ForceUpdate(this.Image2, img2); U.ForceUpdate(this.TSA, tsa); U.ForceUpdate(this.PALETTE, pal); Draw(); this.FoundImages = FindImage(); }