public PageStartMenuViewModel(IRegionManager regionManager, ITaskDialogService taskDialog)
 {
     _regionManager = regionManager;
     _taskDialog = taskDialog;
     NavigateCommand = new DelegateCommand<Uri>(Navigate);
     ExitCommand = new DelegateCommand<Window>(ExitGame);
 }
Пример #2
0
        /// <summary>
        /// Initializes a new instance of the EditItemViewModel class.
        /// </summary>
        /// <param name="messageBoxService">A message box service.</param>
        /// <param name="itemService">An item service.</param>
        public EditItemViewModel(IMessageBoxService messageBoxService, ITaskDialogService taskDialogService, IItemService itemService)
        {
            if (messageBoxService == null)
                throw new ArgumentNullException("messageBoxService");
            if (taskDialogService == null)
                throw new ArgumentNullException("taskDialogService");
            if (itemService == null)
                throw new ArgumentNullException("itemService");

            _messageBoxService = messageBoxService;
            _taskDialogService = taskDialogService;
            _itemService = itemService;

            RegisterForMessages();
        }
Пример #3
0
        /// <summary>
        /// Initializes a new instance of the <see cref="App"/> class.
        /// </summary>
        /// <exception cref="T:System.InvalidOperationException">More than one instance of the <see cref="T:System.Windows.Application"/> class is created per <see cref="T:System.AppDomain"/>.</exception>
        public App()
        {
            Bootstrapper.Initialize();

            _taskDialogService = Bootstrapper.Container.Resolve<ITaskDialogService>();

            Startup += App_Startup;

            #if (DEBUG != true)
            // Don't handle global exceptions in debug mode
            DispatcherUnhandledException += App_DispatcherUnhandledException;
            AppDomain.CurrentDomain.UnhandledException += AppDomain_UnhandledException;
            #endif

            ShutdownMode = System.Windows.ShutdownMode.OnMainWindowClose;
        }
Пример #4
0
        /// <summary>
        /// Initializes a new instance of the <see cref="App"/> class.
        /// </summary>
        /// <exception cref="T:System.InvalidOperationException">More than one instance of the <see cref="T:System.Windows.Application"/> class is created per <see cref="T:System.AppDomain"/>.</exception>
        public App()
        {
            Bootstrapper.Initialize();

            _taskDialogService = Bootstrapper.Container.Resolve <ITaskDialogService>();

            Startup += App_Startup;

#if (DEBUG != true)
            // Don't handle global exceptions in debug mode
            DispatcherUnhandledException += App_DispatcherUnhandledException;
            AppDomain.CurrentDomain.UnhandledException += AppDomain_UnhandledException;
#endif

            ShutdownMode = System.Windows.ShutdownMode.OnMainWindowClose;
        }
Пример #5
0
        /// <summary>
        /// Initializes a new instance of the EditItemViewModel class.
        /// </summary>
        /// <param name="messageBoxService">A message box service.</param>
        /// <param name="itemService">An item service.</param>
        public EditItemViewModel(IMessageBoxService messageBoxService, ITaskDialogService taskDialogService, IItemService itemService)
        {
            if (messageBoxService == null)
            {
                throw new ArgumentNullException("messageBoxService");
            }
            if (taskDialogService == null)
            {
                throw new ArgumentNullException("taskDialogService");
            }
            if (itemService == null)
            {
                throw new ArgumentNullException("itemService");
            }

            _messageBoxService = messageBoxService;
            _taskDialogService = taskDialogService;
            _itemService       = itemService;

            RegisterForMessages();
        }
 public MainWindowViewModel(IEventAggregator eventAggregator, ITaskDialogService taskDialog)
 {
     _events = eventAggregator;
     _taskDialog = taskDialog;
     _closeCommand = new DelegateCommand<object>(CloseGame);
 }