Exemplo n.º 1
0
        private void _editWiersz(object obj)
        {
            ViewmodelBase vm = _selectedRow is JPKSprzedazWiersz ? new SprzedazWierszViewmodel((JPKSprzedazWiersz)_selectedRow, _daneWlasne) as ViewmodelBase :
                               _selectedRow is JPKZakupWiersz ? new ZakupWierszViewmodel((JPKZakupWiersz)_selectedRow) : null;

            if (vm != null)
            {
                ItemEditViewmodel.ShowModal(vm, "Zmiana danych");
            }
        }
Exemplo n.º 2
0
        public static bool?ShowModal(ViewmodelBase item, string windowTitle)
        {
            bool?result = new ItemEditView()
            {
                DataContext =
                    new ItemEditViewmodel()
                {
                    ItemContent = item, WindowTitle = windowTitle
                }
            }
            .ShowDialog();

            if (result == true)
            {
                item.SaveToModel();
            }
            return(result);
        }
 private void CreateView(ViewmodelBase vm)
 {
     if (vm is SolverCreationViewModel)
     {
         CreateSolverCreationPage(vm as SolverCreationViewModel);
     }
     else if (vm is SelectionInfoViewModel)
     {
         CreateSelectionInfoPage(vm as SelectionInfoViewModel);
     }
     else if (vm is TaskInfoViewModel)
     {
         CreateTaskInfoPage(vm as TaskInfoViewModel);
     }
     else if (vm is SelectionCreationViewModel)
     {
         CreateSelectionCreationPage(vm as SelectionCreationViewModel);
     }
     else if (vm is PerceptronInfoViewModel)
     {
         CreatePerceptronInfoPage(vm as PerceptronInfoViewModel);
     }
     else if (vm is DecisionTreeCARTInfoViewModel)
     {
         CreateDecisionTreeCARTInfoPage(vm as DecisionTreeCARTInfoViewModel);
     }
     else if (vm is DecisionTreeC4_5InfoViewModel)
     {
         CreateDecisionTreeC4_5InfoPage(vm as DecisionTreeC4_5InfoViewModel);
     }
     else if (vm is WardNetInfoViewModel)
     {
         CreateWardNNInfoPage(vm as WardNetInfoViewModel);
     }
     else if (vm is ConvNNInfoViewModel)
     {
         CreateConvNNInfoPage(vm as ConvNNInfoViewModel);
     }
     else if (vm is SolveViewModel)
     {
         CreateSolvePage(vm as SolveViewModel);
     }
     else if (vm is LearnSolverViewModel)
     {
         CreateLearnSolverPage(vm as LearnSolverViewModel);
     }
     else if (vm is SelectionLearnStatisticViewModel)
     {
         CreateSelectionLearnStatisticPage(vm as SelectionLearnStatisticViewModel);
     }
     else if (vm is PreprocessingViewModel)
     {
         CreatePreprocessingCreationPage(vm as PreprocessingViewModel);
     }
     else if (vm is CreateSolutionViewModel)
     {
         CreateSolutionCreationPage(vm as CreateSolutionViewModel);
     }
     else if (vm is SolveStatisticViewModel)
     {
         CreateSolveStatisticPage(vm as SolveStatisticViewModel);
     }
     else if (vm is KohonenInfoViewModel)
     {
         CreateKohonenInfoPage(vm as KohonenInfoViewModel);
     }
 }