initial saving working (possibly)
This commit is contained in:
@ -22,12 +22,13 @@ namespace SpriteLibrary
|
||||
ResourceManager myResources = null;
|
||||
List<SpriteInfo> SpriteInformation = new List<SpriteInfo>();
|
||||
Size SnapGridSize = new Size(5,5);
|
||||
SpriteDatabase myDatabase = null;
|
||||
|
||||
internal SpriteEntryForm(ResourceManager theResourceManager, List<SpriteInfo> ListToWorkOn, Size GridSize)
|
||||
internal SpriteEntryForm(SpriteDatabase theDatabase, List<SpriteInfo> ListToWorkOn, Size GridSize)
|
||||
{
|
||||
InitializeComponent();
|
||||
if (theResourceManager == null) throw new Exception("NullException: The ResourceManager passed to the SpriteEntryForm cannot be null. Pass it Properties.Resources.ResourceManager");
|
||||
myResources = theResourceManager;
|
||||
myDatabase = theDatabase;
|
||||
myResources = myDatabase.GetResourceManager();
|
||||
SnapGridSize = GridSize;
|
||||
LocalSetup();
|
||||
SpriteInformation.AddRange(ListToWorkOn);
|
||||
@ -87,5 +88,10 @@ namespace SpriteLibrary
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void SpriteEntryForm_FormClosing(object sender, FormClosingEventArgs e)
|
||||
{
|
||||
myDatabase.Save(); //try saving the file
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user