protected override void DefaultValues()
        {
            base.DefaultValues();

            this.maxRotation = MathHelper.ToRadians(20);
            this.inputManager = WaveServices.Input;
            this.timerFactory = WaveServices.TimerFactory;
            this.viewportManager = WaveServices.ViewportManager;
            this.soundManager = WaveServices.GetService<SoundManager>();
        }
Esempio n. 2
0
 public MainViewModel(Factories factories, Cloud cloud, TimerFactory timerFactory,
     BackgroundWorkerFactory workerFactory, MealEditingViewModel.BackNavigation mealEditingBackNavigation,
     JournalViewModel journal, ProductListingViewModel productListing, MealItemEditingViewModel mealItemEditing,
     MessageDialog messageDialog, WelcomeScreen welcomeScreen, CloudMessages cloudMessages)
 {
     this.factories = factories;
     this.cloud = cloud;
     this.timerFactory = timerFactory;
     this.workerFactory = workerFactory;
     this.mealEditingBackNavigation = mealEditingBackNavigation;
     this.journal = journal;
     this.productListing = productListing;
     this.mealItemEditing = mealItemEditing;
     this.messageDialog = messageDialog;
     this.cloudMessages = cloudMessages;
     WelcomeScreen = welcomeScreen;
     ShareStateProvider();
 }
 private MainViewModel CreateSut(Factories factories = null, Cloud cloud = null,
     TimerFactory timerFactory = null, ProductListingViewModel productListing = null,
     MealItemEditingViewModel mealItemEditing = null, MessageDialog messageDialog = null,
     WelcomeScreen welcomeScreen = null, CloudMessages cloudMessages = null)
 {
     if (factories == null)
         factories = Substitute.For<Factories>();
     if (cloud == null)
         cloud = Substitute.For<Cloud>();
     if (timerFactory == null)
         timerFactory = Substitute.For<TimerFactory>();
     if (productListing == null)
         productListing = new ProductListingViewModel(factories, new BackgroundWorkerSyncFactory());
     if (mealItemEditing == null)
         mealItemEditing = new MealItemEditingViewModel();
     if (messageDialog == null)
         messageDialog = Substitute.For<MessageDialog>();
     if (welcomeScreen == null)
         welcomeScreen = new WelcomeScreenImpl(messageDialog);
     if (cloudMessages == null)
         cloudMessages = new CloudMessages();
     var journal = new JournalViewModel(factories, new BackgroundWorkerSyncFactory(),
         new SugarEditingViewModel());
     return new MainViewModel(factories, cloud, timerFactory, new BackgroundWorkerSyncFactory(),
         new MealEditingViewModel.BackNavigation(), journal, productListing, mealItemEditing, messageDialog,
         welcomeScreen, cloudMessages);
 }
Esempio n. 4
0
 public TrialImpl(TimerFactory timerFactory, MessageDialog messageDialog)
 {
     this.timerFactory = timerFactory;
     this.messageDialog = messageDialog;
 }