Added id-based constructor to PrintItemWrapper

This commit is contained in:
Kevin Pope 2014-03-25 17:31:02 -07:00
parent f555aea0e0
commit 5e7fb2e59e

View file

@ -99,6 +99,12 @@ namespace MatterHackers.MatterControl.PrintQueue
//}
}
public PrintItemWrapper(int printItemId)
{
this.PrintItem = DataStorage.Datastore.Instance.dbSQLite.Table<DataStorage.PrintItem>().Where(v => v.Id == printItemId).Take(1).FirstOrDefault();
this.fileType = System.IO.Path.GetExtension(this.PrintItem.FileLocation).ToUpper();
}
public void Delete()
{
PrintItem.Delete();