Ejemplo n.º 1
0
 partial void OnInitialize()
 {
     Traybar = new Traybar();
     Slideshow = new Slideshow();
     DockBar = new DockBar();
 }
Ejemplo n.º 2
0
			public void Setup()
			{
				ViewModelBootstrapperForTests.Initialize();

				slideConfigRepoMock = new Mock<IAsyncRepository<SlideConfiguration>>();
				loggerMock = new Mock<ILog>();

				widgetMetadataRepoMock = new Mock<IAsyncRepository<WidgetMetadata>>();
				WidgetsExists();

				slideConfig = new SlideConfiguration
				{
					Duration = 100,
					Title = "Holidays provider widget",
					WidgetType = typeof(HolidayProviderTestWidget).FullName,
					WidgetConfigurationId = Guid.NewGuid()
				};
				slideConfigs = new List<SlideConfiguration> { slideConfig };
				slideConfigRepoMock.Setup(t => t.BeginGet(It.IsAny<Specification<SlideConfiguration>>())).Raises(
					t => t.GetCompleted += null, new GetCompletedEventArgs<SlideConfiguration>(slideConfigs, new AllSpecification<SlideConfiguration>()));

				moduleLoader = new ModuleLoader(slideConfigRepoMock.Object, widgetMetadataRepoMock.Object, loggerMock.Object);

				slideshowViewModel = new Slideshow();
				dockBarViewModel = new DockBar();

				Before();
			}
Ejemplo n.º 3
0
        public void LoadSlides(Slideshow slideshow)
        {
        	Guard.Requires<ArgumentNullException>(slideshow != null);

            slideshowViewModel = slideshow; 
            slideshowViewModel.Slides.Clear();
            welcomeWidget = new WelcomeWidget();
#if SILVERLIGHT
            welcomeWidget.View = new SL.WelcomeWidgetView();
#endif
            slideshowViewModel.Slides.Add(new Slide(){Widget = welcomeWidget});
            welcomeWidget.ProgressbarService.ShowInView("Downloading slideshow configuration...");

			widgetMetadataRepo.BeginGet(All.ItemsOf<WidgetMetadata>());
        }
Ejemplo n.º 4
0
		partial void OnSetSlideshow(ref Slideshow value);