private void button1_Click(object sender, EventArgs e) { SprType newSprType = SprType.VP_PARALLEL_UPRIGHT; if (radioButton1.Checked) { newSprType = SprType.VP_PARALLEL_UPRIGHT; } else if (radioButton2.Checked) { newSprType = SprType.FACING_UPRIGHT; } else if (radioButton3.Checked) { newSprType = SprType.VP_PARALLEL; } else if (radioButton4.Checked) { newSprType = SprType.ORIENTED; } else if (radioButton5.Checked) { newSprType = SprType.VP_PARALLEL_ORIENTED; } //Save sprite try { sprLoader.FixSpriteType(newSprType); //Close window Close(); } catch (Exception exp) { MessageBox.Show(exp.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
private void btnSave_Click(object sender, EventArgs e) { SprType newSprType = SprType.VP_PARALLEL_UPRIGHT; if (radioParallelUpright.Checked) { newSprType = SprType.VP_PARALLEL_UPRIGHT; } else if (radioFacingUpright.Checked) { newSprType = SprType.FACING_UPRIGHT; } else if (radioParallel.Checked) { newSprType = SprType.VP_PARALLEL; } else if (radioOriented.Checked) { newSprType = SprType.ORIENTED; } else if (radioParallelOriented.Checked) { newSprType = SprType.VP_PARALLEL_ORIENTED; } //Save sprite try { sprLoader.FixSpriteType(newSprType); Close(); } catch (Exception exp) { MessageBox.Show(exp.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } }