private void Page_Loaded(object sender, RoutedEventArgs e) { InitializeNavHead(); mainWindowClient = this.Parent as MainWindow; if (mainWindowClient.KinectManagerClient.OpenKinect()) { routeSetViewModel.LoadData(); rocksOnWallViewModel = new RocksOnWallViewModel(canvasWall, mainWindowClient.KinectManagerClient.ManagerCoorMapper); bool isAnyRocksOnWall = rocksOnWallViewModel. LoadAndDrawRocksOnWall(AppGlobal.WallID); rocksOnRouteViewModel = new RocksOnRouteViewModel(canvasWall); // InitializeSaveRouteCommands() has to be called after initializing rocksOnWallViewModel InitializeSaveRouteCommands(); SetUpBtnCommandsInRockStatusUserControls(); if (!isAnyRocksOnWall) { UiHelper.NotifyUser("No rocks registered with the wall!"); } if (debug) { mainWindowClient.SubscribeColorImgSrcToPlaygrd(); } AppGlobal.DebugModeChanged += HandleDebugModeChanged; } }
private void Page_Loaded(object sender, RoutedEventArgs e) { routeSetViewModel.LoadData(); rocksOnWallViewModel = new RocksOnWallViewModel(canvasWall, kinectSensor.CoordinateMapper); bool isAnyRocksOnWall = rocksOnWallViewModel. LoadAndDrawRocksOnWall(AppGlobal.WallID); rocksOnRouteViewModel = new RocksOnRouteViewModel(canvasWall); SetUpBtnCommandsInRockStatusUserControls(); if (!isAnyRocksOnWall) { UiHelper.NotifyUser("No rocks registered with the wall!"); } }