1
0
Fork 0
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.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.

54 lines
2.0 KiB

using EyesAndEars.UWP.ViewModels;
using EyesAndEars.UWP.Services;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using EyesAndEars.UWP.Models;
using System;
using System.Threading.Tasks;
using System.Threading;
// The Blank Page item template is documented at https://go.microsoft.com/fwlink/?LinkId=402352&clcid=0x409
namespace EyesAndEars.UWP
{
/// <summary>
/// An empty page that can be used on its own or navigated to within a Frame.
/// </summary>
public sealed partial class MainPage : Page
{
private MainPageVM _vm = new MainPageVM();
public MainPage()
{
this.InitializeComponent();
IntialiseDataContextAsync();
// Need to set a refresh timer so it updates every 1 second or so...
}
private void IntialiseDataContextAsync() {
try {
// The Update features are not yet working...
_vm.FactoryDevice1 = DataServices.UpdateFactoryDevice(1).Result;
_vm.FactoryDevice2 = DataServices.UpdateFactoryDevice(2).Result;
_vm.FactoryDevice3 = DataServices.UpdateFactoryDevice(3).Result;
_vm.GalleryDevice1 = DataServices.UpdateGalleryDevice(4).Result;
_vm.GalleryDevice2 = DataServices.UpdateGalleryDevice(5).Result;
_vm.GalleryDevice3 = DataServices.UpdateGalleryDevice(6).Result;
DataContext = _vm;
}
catch (Exception) {
_vm = DataServices.CreateFallBackViewModel();
DataContext = _vm;
//throw;
}
}
private async void RefreshButton_Click(object sender, RoutedEventArgs e) {
// GET THE INITIALISATION WORKING FIRST AND THE DEFAULT CYCLE...
}
private void SaveURLButton_Click(object sender, RoutedEventArgs e) {
// WORK ON THIS WENT YOU HAVE A LIVE SYSTEM WORKING WITH KNOWABLE DEFAULTS.
}
}
}