Ejemplo n.º 1
0
 /*
  * Here we handle Close command by requesting MenuScreenViewModel.
  * Indeed, all the SubScreens are tightly coupled with MenuScreen
  * However, it is not difficult at all to introduce more generic solution.
  * Or you can move this logic to the MainMenuService, to avoid this coupling.
  * You'll need to add CloseCommand handler to the MainMenuService and implement it.
  */
 public override void Close(SubScreenViewModel viewModel)
 {
     base.Close(viewModel);
     Publish(new RequestMainMenuScreenCommand()
     {
         ScreenType = typeof(MenuScreenViewModel)
     });
 }
Ejemplo n.º 2
0
 /*
  * Here we handle Close command by requesting MenuScreenViewModel.
  * Indeed, all the SubScreens are tightly coupled with MenuScreen
  * However, it is not difficult at all to introduce more generic solution.
  * Or you can move this logic to the MainMenuService, to avoid this coupling.
  * You'll need to add CloseCommand handler to the MainMenuService and implement it.
  */
 public override void Close(SubScreenViewModel viewModel)
 {
     base.Close(viewModel);
     Publish(new RequestMainMenuScreenCommand()
     {
         ScreenType = typeof(MenuScreenViewModel)
     });
 }
Ejemplo n.º 3
0
 private void ScreenAdded(SubScreenViewModel screen)
 {
     //if screen is of current type, activate it; else deactivate it
     screen.IsActive = MainMenuRoot.CurrentScreenType == screen.GetType();
 }
Ejemplo n.º 4
0
 public override void InitializeSubScreen(SubScreenViewModel viewModel)
 {
     base.InitializeSubScreen(viewModel);
 }
Ejemplo n.º 5
0
 public override void InitializeSubScreen(SubScreenViewModel viewModel)
 {
     base.InitializeSubScreen(viewModel);
 }
Ejemplo n.º 6
0
 public virtual void Close(SubScreenViewModel viewModel)
 {
 }
Ejemplo n.º 7
0
 public virtual void InitializeSubScreen(SubScreenViewModel viewModel)
 {
     // This is called when a SubScreenViewModel is created
     viewModel.Close.Action = this.CloseHandler;
     SubScreenViewModelManager.Add(viewModel);
 }
Ejemplo n.º 8
0
 public virtual void InitializeSubScreen(SubScreenViewModel viewModel)
 {
     // This is called when a SubScreenViewModel is created
     viewModel.Close.Action = this.CloseHandler;
     SubScreenViewModelManager.Add(viewModel);
 }
Ejemplo n.º 9
0
 public virtual void Close(SubScreenViewModel viewModel)
 {
 }
Ejemplo n.º 10
0
 private void ScreenAdded(SubScreenViewModel screen)
 {
     //if screen is of current type, activate it; else deactivate it
     screen.IsActive = MainMenuRoot.CurrentScreenType == screen.GetType();
 }