public DailyDataViewModel(Core.SunnyPortal service) { sunnyPortal = service; Messenger.Default.Register <Messages>(this, (x) => { if (x == Messages.IsLoggedIn) { LoadPoints(); } }); }
public MainViewModel(Core.SunnyPortal sunnyPortal) { this.sunnyPortal = sunnyPortal; this.CanUserConnecting = true; Messenger.Default.Register <Messages>(this, (x) => { if (x == Messages.IsLoggedIn) { HandleMessage(); } }); }
public LiveDataModel(Core.SunnyPortal service) { sunnyPortal = service; timer = new Timer(10000); timer.Elapsed += Timer_Elapsed; timer.AutoReset = true; Messenger.Default.Register <Messages>(this, async(x) => { if (x == Messages.IsLoggedIn) { this.CurrentPower = await sunnyPortal.GetCurrentPower(); this.timer.Start(); } }); }
public LoginViewModel(Core.SunnyPortal sunnyPortal) { this.sunnyPortal = sunnyPortal; }