to see the activity picture, at first launch

This commit is contained in:
Paul Schneider 2017-03-09 15:11:10 +01:00
commit 4d9cf47612
2 changed files with 12 additions and 6 deletions

View file

@ -541,11 +541,11 @@ namespace ZicMoove.Droid
} }
} }
} }
var acode = photo[1];
var act = DataManager.Instance.Activities.LocalGet(acode);
act.LocalPhoto = Path.Combine(images, $"{acode}.svg");
} }
} }
foreach (var act in DataManager.Instance.Activities)
{ act.LocalPhoto = Path.Combine(images, $"{act.Code}.svg"); }
DataManager.Instance.Activities.SaveEntity(); DataManager.Instance.Activities.SaveEntity();
} }
} }

View file

@ -1,10 +1,11 @@
using Newtonsoft.Json; using Newtonsoft.Json;
using System; using System;
using YavscLib; using XLabs.Forms.Mvvm;
namespace ZicMoove.Model.Workflow namespace ZicMoove.Model.Workflow
{ {
public class Activity : IActivity using YavscLib;
public class Activity : ViewModel, IActivity
{ {
public string Code public string Code
{ {
@ -74,6 +75,11 @@ namespace ZicMoove.Model.Workflow
get; get;
set; set;
} }
public string LocalPhoto { get; set; } private string photo;
public string LocalPhoto {
get { return photo; }
set { SetProperty<string>(ref photo, value);
} }
} }
} }