private void PaletteCombo_SelectedIndexChanged(object sender, EventArgs e) { uint palIndex = CalcPatelleIndex(); if (palIndex == U.NOT_FOUND) { return; } PFR.MakePaletteBitmapToUI(this.MapObjImage, (int)palIndex); PFR.ClearUndoBuffer(); Bitmap newbitmap = ImageUtil.SwapPalette(this.MapObjImage, (int)palIndex); this.MAP.LoadMap(newbitmap); InputFormRef.WriteButtonToYellow(this.PaletteWriteButton, false); }