public FindTreasureVM(UserDataService userdata, PopUpWindowController popUp, FoundTreasureArgs args) { UserData = userdata; TreasureArgs = args; PopUp = popUp; MessengerInstance.Register <object>(this, "Refresh", obj => { RefreshTreasureComments(); }); //when mod deletes comments }
public TreasureFoundVM(UserDataService userdata, FoundTreasureArgs treasureArgs) { Userdata = userdata; using (var unitOfWork = new UnitOfWork(new GeocachingContext())) { Treasure = unitOfWork.Treasures.Get(treasureArgs.FoundTreasureId); } TreasureLocation = treasureArgs.FoundTreasureLocation; }