示例#1
0
 partial void OnInitialize()
 {
     Traybar = new Traybar();
     Slideshow = new Slideshow();
     DockBar = new DockBar();
 }
示例#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();
			}
示例#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>());
        }
示例#4
0
		partial void OnSetSlideshow(ref Slideshow value);