I develop an app for Window RT and trying to use MVVM patern. As storage of data is used the SQLite base. The Engine class is approximate View Model for Main Form of my app. View Model is appropriated to a datasors in the constructor of the Main Form. Source for picture on the Main Form bindings to field Kit. During performance of method GetThing the operator 'while(...)' hangs. What am I doing wrong?
public Engine(IBaseEngine _dBase)
{
dBase = _dBase;
}
private static IBaseEngine dBase;
private static Thing thing;
public string Thing
{
get
{
if (thing == null)
GetThing();
return thing.ThingImage;
}
}
public void GetThing()
{
Task<Thing> tThing = dBase.GetBaseThing();
while (!tThing.IsCompleted) ;
thing = tThing.Result;
}
Aucun commentaire:
Enregistrer un commentaire