Ejemplo n.º 1
0
        public void OpenNewDialogPage <T>(ViewModelBase currentViewModel, T viewModel = null) where T : ViewModelBase
        {
            var newWindow = CreateDialogWindow();

            viewModel = MyCreator.ViewModelCreator(viewModel);
            SetDialogWindowProperties(newWindow, viewModel);
            newWindow.ShowDialog();
        }
Ejemplo n.º 2
0
        public void OpenNewPageDialogWithConstructor <T, Tparameter>(ViewModelBase currentViewModel, Tparameter parameter, T viewModel = null) where T : ViewModelBase <Tparameter>
        {
            var newWindow = CreateDialogWindow();

            viewModel = MyCreator.ViewModelCreator(viewModel);
            MyCreator.PassParemeterToViewModel(viewModel, parameter);
            SetDialogWindowProperties(newWindow, viewModel);
            newWindow.ShowDialog();
        }
Ejemplo n.º 3
0
 static void Main()
 {
     Creator creator = new MyCreator();
     Product product = creator.Create(ProductType.THEIRS);
 }