Esempio n. 1
0
        protected virtual void NavigateToStatisticView(object parameter)
        {
            string key = string.Format(STATISTIC_KEY_FORMAT, typeof(TEntity).FullName);

            // opens statistic window
            NavigationManager.NavigateTo(
                parent: NavigationManager.MainContent,
                key: key,
                viewModel: statisticViewModelFactory.MakeInstance(key));
        }
Esempio n. 2
0
        private void ChangeContentMethod(object obj)
        {
            if (menuItemIndex != -1)
            {
                // clear history
                NavigationManager.ClearHistory();

                // gets menu item text
                string menuItemName = menuItems[menuItemIndex].ItemText;

                // create ViewModel by menu text
                ViewModelBase allItemViewModelBase = menuItemViewModelFactory.MakeInstance(menuItemName);

                // navigate to control registered by ViewModel name and pass him current view model
                NavigationManager.NavigateTo(
                    parent: NavigationManager.MainContent,
                    key: allItemViewModelBase.GetType().FullName,
                    viewModel: allItemViewModelBase);
            }
        }
Esempio n. 3
0
 private CV.ValidationCommandBase <TEntity> CreateValidationCommand()
 {
     CV.ValidationCommandBase <TEntity> validationCommand = validationCommandFactory.MakeInstance(typeof(TEntity).Name);
     validationCommand.EntityToValidate = shownEntity;
     return(validationCommand);
 }