private void EditRegion(RGNH range) { if (mInst.Region.ContainsKey(range)) { var region = mInst.Region.FindFirst(range); var fm = new RegionInfoDialog(mFile, region); fm.ShowDialog(); DispRegionInfo(); } else { AddRegion(); } }
private void AddRegion() { var region = new InstPack.Region(); region.Header.KeyLo = byte.MaxValue; var fm = new RegionInfoDialog(mFile, region); fm.ShowDialog(); if (byte.MaxValue != region.Header.KeyLo) { mInst.Region.Add(region); DispRegionInfo(); } }