Esempio n. 1
0
		public void LoadGroups(IEnumerable<PreviewGroup> previewGroups)
		{
			GroupControls.Clear();
			xtraTabControlGroups.TabPages.Clear();
			foreach (var groupControl in previewGroups.Select(previewGroup => new PreviewGroupControl(previewGroup)))
				GroupControls.Add(groupControl);
			xtraTabControlGroups.TabPages.AddRange(GroupControls.ToArray());
			if (GroupControls.Count > 1)
			{
				xtraTabControlGroups.ShowTabHeader = DefaultBoolean.True;
				_mergedGroup = new PreviewGroup
				{
					Name = "Merged Slides",
					PresentationSourcePath = Path.Combine(ResourceManager.Instance.TempFolder.LocalPath, Path.GetFileName(Path.GetTempFileName()))
				};

				FormProgress.SetTitle("Chill-Out for a few seconds...\nLoading slides...");
				FormProgress.ShowProgress();
				var thread = new Thread(() => _powerPointHelper.MergeFiles(_mergedGroup.PresentationSourcePath, previewGroups.Select(pg => pg.PresentationSourcePath).ToArray()));
				thread.Start();
				while (thread.IsAlive)
					Application.DoEvents();
				FormProgress.CloseProgress();
			}
			else
			{
				xtraTabControlGroups.ShowTabHeader = DefaultBoolean.False;
				_mergedGroup = previewGroups.FirstOrDefault();
			}
		}
		public PreviewGroupControl(PreviewGroup previewGroup)
		{
			InitializeComponent();
			PreviewGroup = previewGroup;

			Text = PreviewGroup.Name;
			laSlideSize.Text = String.Format("{0} {1} x {2}", PowerPointManager.Instance.SlideSettings.SlideSize.Orientation, PowerPointManager.Instance.SlideSettings.SlideSize.Width.ToString("#.##"), PowerPointManager.Instance.SlideSettings.SlideSize.Height.ToString("#.##"));
			GetPreviewImages();
			Resize += OnResize;
			if (_previewImages.Any())
			{
				comboBoxEditSlides.SelectedIndexChanged -= comboBoxEditSlides_SelectedIndexChanged;
				comboBoxEditSlides.Properties.Items.Clear();
				for (var i = 1; i <= _previewImages.Count; i++)
					comboBoxEditSlides.Properties.Items.Add(i.ToString());
			}
			pnNavigationArea.Visible = _previewImages.Count > 1;
		}
		public IList<PreviewGroup> GeneratePreview(IList<OutputConfiguration> configurations)
		{
			var groupList = new List<PreviewGroup>();
			if (!configurations.Any())
				return groupList;

			Logos = GetLogos();
			PopulateReplacementsList();
			var previewGroup = new PreviewGroup
			{
				Name = OutputName,
				PresentationSourcePath = Path.Combine(Common.Core.Configuration.ResourceManager.Instance.TempFolder.LocalPath, Path.GetFileName(Path.GetTempFileName()))
			};
			RegularMediaSchedulePowerPointHelper.Instance.PrepareSnapshotEmail(previewGroup.PresentationSourcePath, new[] { this }, SelectedTheme, MediaMetaData.Instance.SettingsManager.UseSlideMaster);

			groupList.Add(previewGroup);
			return groupList;
		}
		public PreviewGroup GeneratePreview()
		{
			var previewGroup = new PreviewGroup
			{
				Name = Text,
				PresentationSourcePath = Path.Combine(Common.Core.Configuration.ResourceManager.Instance.TempFolder.LocalPath, Path.GetFileName(Path.GetTempFileName()))
			};
			RegularMediaSchedulePowerPointHelper.Instance.PrepareSummaryEmail(previewGroup.PresentationSourcePath, this);
			return previewGroup;
		}
		public PreviewGroup GeneratePreview(bool includeDigital)
		{
			Logos = GetLogos(includeDigital);
			ColumnWidths = GetColumnInfo().OrderBy(ci => ci.Index).Select(ci => ci.Width).ToArray();
			PopulateReplacementsList(includeDigital);
			var previewGroup = new PreviewGroup
			{
				Name = String.Format("{0} ({1})", _data.Name, includeDigital ? String.Format("{0} + Digital", MediaMetaData.Instance.DataTypeString) : MediaMetaData.Instance.DataTypeString),
				PresentationSourcePath = Path.Combine(Common.Core.Configuration.ResourceManager.Instance.TempFolder.LocalPath, Path.GetFileName(Path.GetTempFileName()))
			};
			RegularMediaSchedulePowerPointHelper.Instance.PrepareOptionsEmail(previewGroup.PresentationSourcePath, new[] { this }, SelectedTheme, MediaMetaData.Instance.SettingsManager.UseSlideMaster);
			return previewGroup;
		}
		public PreviewGroup GeneratePreview()
		{
			var previewGroup = new PreviewGroup
			{
				Name = Text,
				PresentationSourcePath = Path.Combine(ResourceManager.Instance.TempFolder.LocalPath, Path.GetFileName(Path.GetTempFileName()))
			};
			PopulateReplacementsList();
			OnlineSchedulePowerPointHelper.Instance.PrepareWebPackageEmail(this, previewGroup.PresentationSourcePath);
			return previewGroup;
		}
Esempio n. 7
0
		public PreviewGroup GeneratePreview(bool includeDigital)
		{
			var outputPages = PrepareOutput(includeDigital);
			var previewGroup = new PreviewGroup
			{
				Name = includeDigital ? String.Format("{0} + Digital", MediaMetaData.Instance.DataTypeString) : MediaMetaData.Instance.DataTypeString,
				PresentationSourcePath = Path.Combine(Common.Core.Configuration.ResourceManager.Instance.TempFolder.LocalPath, Path.GetFileName(Path.GetTempFileName()))
			};
			RegularMediaSchedulePowerPointHelper.Instance.PrepareMediaOneSheetEmail(previewGroup.PresentationSourcePath, outputPages, SelectedTheme, MediaMetaData.Instance.SettingsManager.UseSlideMaster);
			return previewGroup;
		}
		public PreviewGroup GenerateStrategyPreview(string groupName = "")
		{
			var dataModel = PrepareStrategyOutput();
			var previewGroup = new PreviewGroup
			{
				Name = !String.IsNullOrEmpty(groupName) ? groupName : "Digital Strategies",
				PresentationSourcePath = Path.Combine(Common.Core.Configuration.ResourceManager.Instance.TempFolder.LocalPath, Path.GetFileName(Path.GetTempFileName()))
			};
			RegularMediaSchedulePowerPointHelper.Instance.PrepareStrategyEmail(previewGroup.PresentationSourcePath, dataModel, SelectedTheme);
			return previewGroup;
		}
		public PreviewGroup GenerateOneSheetPreview(string groupName = "")
		{
			var outputPage = PrepareOneSheetOutput();
			var previewGroup = new PreviewGroup
			{
				Name = !String.IsNullOrEmpty(groupName) ? groupName : Text,
				PresentationSourcePath = Path.Combine(Common.Core.Configuration.ResourceManager.Instance.TempFolder.LocalPath, Path.GetFileName(Path.GetTempFileName()))
			};
			RegularMediaSchedulePowerPointHelper.Instance.PrepareDigitalOneSheetEmail(previewGroup.PresentationSourcePath, outputPage, SelectedTheme, MediaMetaData.Instance.SettingsManager.UseSlideMaster);
			return previewGroup;
		}
		public PreviewGroup GeneratePreview()
		{
			var previewGroup = new PreviewGroup
			{
				Name = Product.Name,
				PresentationSourcePath = Path.Combine(ResourceManager.Instance.TempFolder.LocalPath, Path.GetFileName(Path.GetTempFileName()))
			};
			OnlineSchedulePowerPointHelper.Instance.PrepareScheduleEmail(previewGroup.PresentationSourcePath, Product, _container.SelectedTheme);
			return previewGroup;
		}