Exemplo n.º 1
0
 protected override void OnClose()
 {
     _mapSelectorViewModel.RequestClose();
     CloseHeroSelectorWindows();
     OcrUtil?.Dispose();
     base.OnClose();
 }
Exemplo n.º 2
0
        public void InitializeMapSelector()
        {
            _mapSelectorViewModel?.RequestClose();
            _mapSelectorViewModel = _viewModelFactory.CreateViewModel <MapSelectorViewModel>();
            _mapSelectorViewModel.ButtonVisibility = !IsAutoMode ? Visibility.Visible : Visibility.Hidden;
            _mapSelectorViewModel.Id = 0;
            _mapSelectorViewModel.SetCenterAndTop(App.AppSetting.Position.MapSelectorPosition);

            _mapSelectorViewModel.Visibility = Visibility.Hidden;
            WindowManager.ShowWindow(_mapSelectorViewModel);
            ((Window)_mapSelectorViewModel.View).Owner = (Window)View;
            _mapSelectorViewModel.View.Visibility      = Visibility.Hidden;

            /*
             *          _eventAggregator.Publish(new ShowWindowMessage
             *          {
             *              ViewModel = vm,
             *          });
             */
        }