Cannot save an unnamed sprite
This commit is contained in:
parent
dddab20eef
commit
201e42b370
@ -478,6 +478,11 @@ namespace SpriteLibrary
|
|||||||
|
|
||||||
void ApplyChanges()
|
void ApplyChanges()
|
||||||
{
|
{
|
||||||
|
if (tbSpriteName.Text == "")
|
||||||
|
{
|
||||||
|
MessageBox.Show("You cannot save a sprite that has no name.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
FormToSpriteInformation();
|
FormToSpriteInformation();
|
||||||
if (CurrentSIIndex > 0 && CurrentSIIndex < SpriteInformation.Count)
|
if (CurrentSIIndex > 0 && CurrentSIIndex < SpriteInformation.Count)
|
||||||
{
|
{
|
||||||
@ -498,6 +503,11 @@ namespace SpriteLibrary
|
|||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
bool PromptToApplyChangesAndContinue()
|
bool PromptToApplyChangesAndContinue()
|
||||||
{
|
{
|
||||||
|
if (tbSpriteName.Text == "")
|
||||||
|
{
|
||||||
|
MessageBox.Show("You cannot save a sprite that has no name.");
|
||||||
|
return true;
|
||||||
|
}
|
||||||
if (ValuesDifferFromData())
|
if (ValuesDifferFromData())
|
||||||
{
|
{
|
||||||
DialogResult Answer = MessageBox.Show("You have unsaved Changes. Would you like to save them before proceeding?","Save?",MessageBoxButtons.YesNoCancel);
|
DialogResult Answer = MessageBox.Show("You have unsaved Changes. Would you like to save them before proceeding?","Save?",MessageBoxButtons.YesNoCancel);
|
||||||
|
Loading…
Reference in New Issue
Block a user