private void MainPage_Loaded(object sender, RoutedEventArgs e) { // Initialize Service Bus connection and set required event handlers IEventTransport ServiceBusEventTransport = new ServiceBusEventTransportUwp(); this.serviceBusEventController = new LevelMapApp.Controllers.ServiceBusEventController(ServiceBusEventTransport, this.SettingsController); }
protected override void OnStart() { if (transport == null) { return; } this.serviceBusEventController = new LevelMapApp.Controllers.ServiceBusEventController(transport, this.settingsController); this.serviceBusEventController.OnRoomScheduleStatusChanged += ((SmartHive.LevelMapApp.MainPage) this.MainPage).OnRoomScheduleStatusChanged; this.serviceBusEventController.OnRoomSensorChanged += ((SmartHive.LevelMapApp.MainPage) this.MainPage).OnRoomSensorChanged; }