A UWP dashboard which provides live updates for the 'Personal Flash in Real-Time (Andy)' and 'Personal Flash in Real-Time (Tony)' artworks -- part of the 'Return to Ritherdon' project by Nicola Ellis. Documentation can be found at
https://git.abbether.net/return-to-ritherdon/rtr-docs/src/branch/master/eyes-and-ears
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
43 lines
1.6 KiB
43 lines
1.6 KiB
4 years ago
|
using EyesAndEars.UWP.Models;
|
||
|
using EyesAndEars.UWP.ViewModels;
|
||
|
using System;
|
||
|
using System.Threading.Tasks;
|
||
|
|
||
|
namespace EyesAndEars.UWP.Services {
|
||
|
public static class DataServices {
|
||
|
|
||
|
public static async Task<FactoryDevice> UpdateFactoryDevice(int deviceId) {
|
||
|
//var t = await WebServices.GetLightReading("ht", deviceId);
|
||
|
// Need to map the json result to the models and display in view.
|
||
|
return new FactoryDevice();
|
||
|
}
|
||
|
|
||
|
public static async Task<GalleryDevice> UpdateGalleryDevice(int deviceId) {
|
||
|
//var t = await WebServices.GetLightReading("ht", deviceId);
|
||
|
// Need to map the json result to the models and display in view.
|
||
|
|
||
|
return new GalleryDevice();
|
||
|
}
|
||
|
|
||
|
public static MainPageVM CreateFallBackViewModel() {
|
||
|
// "999" and "-" are acting as sentinals in this context.
|
||
|
var r = new LightReading(0, 999, DateTime.Now);
|
||
|
var s = new DeviceStatus(0, "-", DateTime.Now);
|
||
|
var fD1 = new FactoryDevice(1, r, s);
|
||
|
var fD2 = new FactoryDevice(2, r, s);
|
||
|
var fD3 = new FactoryDevice(3, r, s);
|
||
|
var gD1 = new GalleryDevice(4, s);
|
||
|
var gD2 = new GalleryDevice(5, s);
|
||
|
var gD3 = new GalleryDevice(6, s);
|
||
|
var vm = new MainPageVM();
|
||
|
vm.FactoryDevice1 = fD1;
|
||
|
vm.FactoryDevice2 = fD2;
|
||
|
vm.FactoryDevice3 = fD3;
|
||
|
vm.GalleryDevice1 = gD1;
|
||
|
vm.GalleryDevice2 = gD2;
|
||
|
vm.GalleryDevice3 = gD3;
|
||
|
return vm;
|
||
|
}
|
||
|
}
|
||
|
}
|