Example #1
0
        public void ShowDialog <View, TviewModel>(View view, TviewModel viewmodel, ResizeMode resizeMode = ResizeMode.CanResizeWithGrip, SizeToContent sizeToContent = SizeToContent.Manual)
            where View : UserControl where TviewModel : BaseViewModel
        {
            dialog = null;
            dialog = new WindowContentView();
            dialog.ContentView.Children.Add(view);
            dialog.DataContext = viewmodel;

            ViewModelManager.ShowModal(dialog, new Thickness(25, 25, 25, 25));
        }
Example #2
0
        public void ShowDialog <View, TviewModel>(View view, TviewModel viewmodel, Thickness margin)
            where View : UserControl
            where TviewModel : BaseViewModel
        {
            dialog = null;
            dialog = new WindowContentView();
            dialog.ContentView.Children.Add(view);
            dialog.DataContext = viewmodel;

            ViewModelManager.ShowModal(dialog, margin);
        }
        public void RunEndOfDay()
        {
            EndOfDayNotifications = null;

            ViewModelManager.ShowModal(new DayToFinish(), new Thickness(350, 100, 350, 100));

            if (System.Windows.MessageBox.Show(ViewModelManager.mainWindow, "Desea Ejecutar Fin De Dia", "FIN DE DIA",
                                               System.Windows.MessageBoxButton.YesNo, MessageBoxImage.Question) ==
                MessageBoxResult.Yes)
            {
                AsyncHelper.DoAsync(RunEndOfDayAsync);
            }

            else
            {
                ViewModelManager.CloseModal();
            }
        }