public NextStepsTabDControl(IChildTabPageContainer slideContainer, ShiftChildTabInfo tabInfo) : base(slideContainer, tabInfo) { InitializeComponent(); clipartEditContainer1.Init(ImageClipartObject.FromImage(CustomTabInfo.Clipart1Image), CustomTabInfo.Clipart1Configuration, TabPageContainer.ParentControl); clipartEditContainer1.EditValueChanged += OnEditValueChanged; clipartEditContainer2.Init(ImageClipartObject.FromImage(CustomTabInfo.Clipart2Image), CustomTabInfo.Clipart2Configuration, TabPageContainer.ParentControl); clipartEditContainer2.EditValueChanged += OnEditValueChanged; comboBoxEditSlideHeader.EnableSelectAll().RaiseNullValueIfEditorEmpty().AssignConfiguration(CustomTabInfo.HeadersEditorConfiguration); memoEditSubheader1.EnableSelectAll().RaiseNullValueIfEditorEmpty().AssignConfiguration(CustomTabInfo.SubHeader1Configuration); memoEditSubheader2.EnableSelectAll().RaiseNullValueIfEditorEmpty().AssignConfiguration(CustomTabInfo.SubHeader2Configuration); memoEditSubheader3.EnableSelectAll().RaiseNullValueIfEditorEmpty().AssignConfiguration(CustomTabInfo.SubHeader3Configuration); memoEditSubheader4.EnableSelectAll().RaiseNullValueIfEditorEmpty().AssignConfiguration(CustomTabInfo.SubHeader4Configuration); memoEditSubheader5.EnableSelectAll().RaiseNullValueIfEditorEmpty().AssignConfiguration(CustomTabInfo.SubHeader5Configuration); memoEditSubheader6.EnableSelectAll().RaiseNullValueIfEditorEmpty().AssignConfiguration(CustomTabInfo.SubHeader6Configuration); memoEditSubheader7.EnableSelectAll().RaiseNullValueIfEditorEmpty().AssignConfiguration(CustomTabInfo.SubHeader7Configuration); memoEditSubheader8.EnableSelectAll().RaiseNullValueIfEditorEmpty().AssignConfiguration(CustomTabInfo.SubHeader8Configuration); comboBoxEditSlideHeader.Properties.Items.Clear(); comboBoxEditSlideHeader.Properties.Items.AddRange(CustomTabInfo.HeadersItems .Where(item => !item.IsPlaceholder).ToArray()); comboBoxEditSlideHeader.Properties.NullText = CustomTabInfo.HeadersItems.FirstOrDefault(h => h.IsPlaceholder)?.Value ?? "Select or type"; memoEditSubheader1.Properties.NullText = CustomTabInfo.SubHeader1Placeholder ?? memoEditSubheader1.Properties.NullText; memoEditSubheader2.Properties.NullText = CustomTabInfo.SubHeader2Placeholder ?? memoEditSubheader2.Properties.NullText; memoEditSubheader3.Properties.NullText = CustomTabInfo.SubHeader3Placeholder ?? memoEditSubheader3.Properties.NullText; memoEditSubheader4.Properties.NullText = CustomTabInfo.SubHeader4Placeholder ?? memoEditSubheader4.Properties.NullText; memoEditSubheader5.Properties.NullText = CustomTabInfo.SubHeader5Placeholder ?? memoEditSubheader5.Properties.NullText; memoEditSubheader6.Properties.NullText = CustomTabInfo.SubHeader6Placeholder ?? memoEditSubheader6.Properties.NullText; memoEditSubheader7.Properties.NullText = CustomTabInfo.SubHeader7Placeholder ?? memoEditSubheader7.Properties.NullText; memoEditSubheader8.Properties.NullText = CustomTabInfo.SubHeader8Placeholder ?? memoEditSubheader8.Properties.NullText; }
public AudienceTabBControl(IChildTabPageContainer slideContainer, StarChildTabInfo tabInfo) : base(slideContainer, tabInfo) { InitializeComponent(); textEditTabBSubheader1.EnableSelectAll().RaiseNullValueIfEditorEmpty().RaiseChangePlaceholderColor(); textEditTabBSubheader2.EnableSelectAll().RaiseNullValueIfEditorEmpty().RaiseChangePlaceholderColor(); textEditTabBSubheader3.EnableSelectAll().RaiseNullValueIfEditorEmpty().RaiseChangePlaceholderColor(); memoEditTabBSubheader4.EnableSelectAll().RaiseNullValueIfEditorEmpty().RaiseChangePlaceholderColor(); memoEditTabBSubheader5.EnableSelectAll().RaiseNullValueIfEditorEmpty().RaiseChangePlaceholderColor(); memoEditTabBSubheader6.EnableSelectAll().RaiseNullValueIfEditorEmpty().RaiseChangePlaceholderColor(); textEditTabBSubheader1.Properties.NullText = CustomTabInfo.SubHeader1Placeholder ?? textEditTabBSubheader1.Properties.NullText; textEditTabBSubheader2.Properties.NullText = CustomTabInfo.SubHeader2Placeholder ?? textEditTabBSubheader2.Properties.NullText; textEditTabBSubheader3.Properties.NullText = CustomTabInfo.SubHeader3Placeholder ?? textEditTabBSubheader3.Properties.NullText; memoEditTabBSubheader4.Properties.NullText = CustomTabInfo.SubHeader4Placeholder ?? memoEditTabBSubheader4.Properties.NullText; memoEditTabBSubheader5.Properties.NullText = CustomTabInfo.SubHeader5Placeholder ?? memoEditTabBSubheader5.Properties.NullText; memoEditTabBSubheader6.Properties.NullText = CustomTabInfo.SubHeader6Placeholder ?? memoEditTabBSubheader6.Properties.NullText; clipartEditContainerTabB1.Init(ImageClipartObject.FromImage(CustomTabInfo.Clipart1Image), CustomTabInfo.Clipart1Configuration, TabPageContainer.ParentControl); clipartEditContainerTabB1.EditValueChanged += OnEditValueChanged; clipartEditContainerTabB2.Init(ImageClipartObject.FromImage(CustomTabInfo.Clipart2Image), CustomTabInfo.Clipart2Configuration, TabPageContainer.ParentControl); clipartEditContainerTabB2.EditValueChanged += OnEditValueChanged; clipartEditContainerTabB3.Init(ImageClipartObject.FromImage(CustomTabInfo.Clipart3Image), CustomTabInfo.Clipart3Configuration, TabPageContainer.ParentControl); clipartEditContainerTabB3.EditValueChanged += OnEditValueChanged; }
private void OnImageDragDrop(object sender, DragEventArgs e) { if (e.Data != null && e.Data.GetDataPresent(DataFormats.FileDrop, true) && e.Data.GetData(DataFormats.FileDrop, true) is String[]) { var filePath = (e.Data.GetData(DataFormats.FileDrop) as String[] ?? new string[] { }).FirstOrDefault(); if (filePath == null) { return; } ClipartObject clipartObject = null; if (FileFormatHelper.IsImageFile(filePath)) { clipartObject = ImageClipartObject.FromFile(filePath); } else if (FileFormatHelper.IsVideoFile(filePath)) { clipartObject = GenererateVideoClipart(filePath); } if (clipartObject != null) { LoadData(clipartObject); EditValueChanged?.Invoke(sender, e); } } }
public FishingTabBControl(IChildTabPageContainer slideContainer, StarChildTabInfo tabInfo) : base(slideContainer, tabInfo) { InitializeComponent(); comboBoxEditTabBCombo1.EnableSelectAll().RaiseNullValueIfEditorEmpty().RaiseChangePlaceholderColor(); comboBoxEditTabBCombo2.EnableSelectAll().RaiseNullValueIfEditorEmpty().RaiseChangePlaceholderColor(); comboBoxEditTabBCombo3.EnableSelectAll().RaiseNullValueIfEditorEmpty().RaiseChangePlaceholderColor(); comboBoxEditTabBCombo4.EnableSelectAll().RaiseNullValueIfEditorEmpty().RaiseChangePlaceholderColor(); comboBoxEditTabBCombo1.Properties.Items.AddRange(SlideContainer.StarInfo.TargetCustomersLists.CombinedList.Where(item => !item.IsPlaceholder).ToArray()); comboBoxEditTabBCombo1.Properties.NullText = SlideContainer.StarInfo.TargetCustomersLists.CombinedList.Where(item => item.IsPlaceholder).ElementAtOrDefault(0)?.Value ?? comboBoxEditTabBCombo1.Properties.NullText; comboBoxEditTabBCombo2.Properties.Items.AddRange(SlideContainer.StarInfo.TargetCustomersLists.CombinedList.Where(item => !item.IsPlaceholder).ToArray()); comboBoxEditTabBCombo2.Properties.NullText = SlideContainer.StarInfo.TargetCustomersLists.CombinedList.Where(item => item.IsPlaceholder).ElementAtOrDefault(1)?.Value ?? comboBoxEditTabBCombo2.Properties.NullText; comboBoxEditTabBCombo3.Properties.Items.AddRange(SlideContainer.StarInfo.TargetCustomersLists.CombinedList.Where(item => !item.IsPlaceholder).ToArray()); comboBoxEditTabBCombo3.Properties.NullText = SlideContainer.StarInfo.TargetCustomersLists.CombinedList.Where(item => item.IsPlaceholder).ElementAtOrDefault(2)?.Value ?? comboBoxEditTabBCombo3.Properties.NullText; comboBoxEditTabBCombo4.Properties.Items.AddRange(SlideContainer.StarInfo.TargetCustomersLists.CombinedList.Where(item => !item.IsPlaceholder).ToArray()); comboBoxEditTabBCombo4.Properties.NullText = SlideContainer.StarInfo.TargetCustomersLists.CombinedList.Where(item => item.IsPlaceholder).ElementAtOrDefault(3)?.Value ?? comboBoxEditTabBCombo4.Properties.NullText; clipartEditContainerTabB1.Init(ImageClipartObject.FromImage(CustomTabInfo.Clipart1Image), CustomTabInfo.Clipart1Configuration, TabPageContainer.ParentControl); clipartEditContainerTabB1.EditValueChanged += OnEditValueChanged; clipartEditContainerTabB2.Init(ImageClipartObject.FromImage(CustomTabInfo.Clipart2Image), CustomTabInfo.Clipart2Configuration, TabPageContainer.ParentControl); clipartEditContainerTabB2.EditValueChanged += OnEditValueChanged; }
private void OnPasteItemClick(object sender, ItemClickEventArgs e) { ImageSource imageSource = null; var clipboardImage = ClipboardHelper.GetPngFormClipboard() ?? ClipboardHelper.GetImageFormClipboard(); if (clipboardImage != null) { imageSource = ImageSource.FromImage(clipboardImage); } else if (Clipboard.ContainsText(TextDataFormat.Html)) { var textContent = Clipboard.GetText(TextDataFormat.Html); try { imageSource = ImageSource.FromString(textContent); } catch { } } if (imageSource != null) { LoadData(ImageClipartObject.FromImageSource(imageSource)); EditValueChanged?.Invoke(sender, e); } }
private void OnInsertFileItemClick(object sender, ItemClickEventArgs e) { using (var openFileDialog = new OpenFileDialog()) { openFileDialog.Title = "Inser Image or Video file"; openFileDialog.DefaultExt = "*.png;*.bmp;*.jpg;*.jpeg;*.mp4;*.avi;*.wmv"; openFileDialog.Filter = "Image or Video files|*.png;*.bmp;*.jpg;*.jpeg;*.mp4;*.avi;*.wmv"; openFileDialog.InitialDirectory = Environment.GetFolderPath(Environment.SpecialFolder.Desktop); if (openFileDialog.ShowDialog() == DialogResult.OK) { var filePath = openFileDialog.FileName; ClipartObject clipartObject = null; if (FileFormatHelper.IsImageFile(filePath)) { clipartObject = ImageClipartObject.FromFile(filePath); } else if (FileFormatHelper.IsVideoFile(filePath)) { clipartObject = GenererateVideoClipart(filePath); } if (clipartObject != null) { LoadData(clipartObject); EditValueChanged?.Invoke(sender, e); } } } }
protected override OutputDataPackage GetOutputData() { var outputDataPackage = new OutputDataPackage(); outputDataPackage.Theme = SelectedTheme; var clipart = SlideContainer.EditedContent.CoverState.TabD.Clipart1 ?? ImageClipartObject.FromImage(CustomTabInfo.Clipart1Image); if (clipart != null) { outputDataPackage.ClipartItems.Add("SHIFT01DCLIPART1", clipart); } var slideHeader = (SlideContainer.EditedContent.CoverState.TabD.SlideHeader ?? CustomTabInfo.HeadersItems.FirstOrDefault(h => h.IsDefault))?.Value; var subHeader1 = SlideContainer.EditedContent.CoverState.TabD.Subheader1 ?? CustomTabInfo.SubHeader1DefaultValue; var calendar1 = SlideContainer.EditedContent.CoverState.TabD.Calendar1 != DateTime.MinValue ? SlideContainer.EditedContent.CoverState.TabD.Calendar1 ?? _defaultDate : (DateTime?)null; outputDataPackage.TemplateName = MasterWizardManager.Instance.SelectedWizard.GetShiftCoverFile("004_cover_regional.pptx"); outputDataPackage.TextItems.Add("SHIFT01DHeader".ToUpper(), slideHeader); outputDataPackage.TextItems.Add("SHIFT01DCalendar1".ToUpper(), calendar1?.ToString("MMMM d, yyyy") ?? String.Empty); outputDataPackage.TextItems.Add("SHIFT01DSubheader1".ToUpper(), subHeader1); return(outputDataPackage); }
public override void LoadData() { if (Initialized) { return; } _allowHandleEvents = false; var savedImageClipart = TabState.Clipart is ImageClipartObject imageClipart ? imageClipart : null; _defaultClipartObject = ImageClipartObject.FromFile(TabInfo.DefaultImagePath); _currentClipartObject = TabInfo.ImageFiles.Any(item => String.Equals(item, savedImageClipart?.FilePath, StringComparison.OrdinalIgnoreCase)) ? savedImageClipart : ImageClipartObject.FromFile(TabInfo.ImageFiles.FirstOrDefault()); clipartEditContainer.Init(_defaultClipartObject, new ClipartConfiguration(), Container.Container.TabPageContainer.ParentControl); clipartEditContainer.EditValueChanged += OnEditValueChanged; clipartEditContainer.LoadData(TabState.Clipart ?? _defaultClipartObject); _allowHandleEvents = true; Initialized = true; }
public GoalsTabBControl(IChildTabPageContainer slideContainer, ShiftChildTabInfo tabInfo) : base(slideContainer, tabInfo) { InitializeComponent(); comboBoxEditSlideHeader.EnableSelectAll().RaiseNullValueIfEditorEmpty().AssignConfiguration(CustomTabInfo.HeadersEditorConfiguration); comboBoxEditSlideHeader.Properties.Items.Clear(); comboBoxEditSlideHeader.Properties.Items.AddRange(CustomTabInfo.HeadersItems .Where(item => !item.IsPlaceholder).ToArray()); comboBoxEditSlideHeader.Properties.NullText = CustomTabInfo.HeadersItems.FirstOrDefault(h => h.IsPlaceholder)?.Value ?? "Select or type"; clipartEditContainer1.Init(ImageClipartObject.FromImage(CustomTabInfo.Clipart1Image), CustomTabInfo.Clipart1Configuration, TabPageContainer.ParentControl); clipartEditContainer1.EditValueChanged += OnEditValueChanged; clipartEditContainer2.Init(ImageClipartObject.FromImage(CustomTabInfo.Clipart2Image), CustomTabInfo.Clipart2Configuration, TabPageContainer.ParentControl); clipartEditContainer2.EditValueChanged += OnEditValueChanged; clipartEditContainer3.Init(ImageClipartObject.FromImage(CustomTabInfo.Clipart3Image), CustomTabInfo.Clipart3Configuration, TabPageContainer.ParentControl); clipartEditContainer3.EditValueChanged += OnEditValueChanged; memoPopupEdit1.Init(SlideContainer.ShiftInfo.ClientGoalsLists.Goals, CustomTabInfo.MemoPopup1DefaultItem, CustomTabInfo.MemoPopup1Configuration, SlideContainer.StyleConfiguration, SlideContainer.ResourceManager); memoPopupEdit1.EditValueChanged += OnEditValueChanged; memoPopupEdit2.Init(SlideContainer.ShiftInfo.ClientGoalsLists.Goals, CustomTabInfo.MemoPopup2DefaultItem, CustomTabInfo.MemoPopup2Configuration, SlideContainer.StyleConfiguration, SlideContainer.ResourceManager); memoPopupEdit2.EditValueChanged += OnEditValueChanged; memoPopupEdit3.Init(SlideContainer.ShiftInfo.ClientGoalsLists.Goals, CustomTabInfo.MemoPopup3DefaultItem, CustomTabInfo.MemoPopup3Configuration, SlideContainer.StyleConfiguration, SlideContainer.ResourceManager); memoPopupEdit3.EditValueChanged += OnEditValueChanged; }
protected override OutputDataPackage GetOutputData() { var outputDataPackage = new OutputDataPackage(); outputDataPackage.Theme = SelectedTheme; var clipart1 = SlideContainer.EditedContent.NextStepsState.TabI.Clipart1 ?? ImageClipartObject.FromImage(CustomTabInfo.Clipart1Image); if (clipart1 != null) { outputDataPackage.ClipartItems.Add("SHIFT14ICLIPART1", clipart1); } var clipart2 = SlideContainer.EditedContent.NextStepsState.TabI.Clipart2 ?? ImageClipartObject.FromImage(CustomTabInfo.Clipart2Image); if (clipart2 != null) { outputDataPackage.ClipartItems.Add("SHIFT14ICLIPART2", clipart2); } var clipart3 = SlideContainer.EditedContent.NextStepsState.TabI.Clipart3 ?? ImageClipartObject.FromImage(CustomTabInfo.Clipart3Image); if (clipart3 != null) { outputDataPackage.ClipartItems.Add("SHIFT14ICLIPART3", clipart3); } var slideHeader = (SlideContainer.EditedContent.NextStepsState.TabI.SlideHeader ?? CustomTabInfo.HeadersItems.FirstOrDefault(h => h.IsDefault))?.Value; var combos = new[] { (SlideContainer.EditedContent.NextStepsState.TabI.Combo1 ?? CustomTabInfo.Combo1Items.FirstOrDefault(h => h.IsDefault))?.Value, (SlideContainer.EditedContent.NextStepsState.TabI.Combo2 ?? CustomTabInfo.Combo2Items.FirstOrDefault(h => h.IsDefault))?.Value, (SlideContainer.EditedContent.NextStepsState.TabI.Combo3 ?? CustomTabInfo.Combo3Items.FirstOrDefault(h => h.IsDefault))?.Value, (SlideContainer.EditedContent.NextStepsState.TabI.Combo4 ?? CustomTabInfo.Combo4Items.FirstOrDefault(h => h.IsDefault))?.Value, (SlideContainer.EditedContent.NextStepsState.TabI.Combo5 ?? CustomTabInfo.Combo5Items.FirstOrDefault(h => h.IsDefault))?.Value, } .Where(item => !String.IsNullOrWhiteSpace(item)) .ToList(); outputDataPackage.TemplateName = MasterWizardManager.Instance.SelectedWizard.GetShiftNextStepsFile("i_next_steps.pptx"); outputDataPackage.TextItems.Add("SHIFT14IHeader".ToUpper(), slideHeader); outputDataPackage.TextItems.Add("SHIFT14ICOMBOMERGE1".ToUpper(), String.Join(String.Format("{0}{0}", (char)13), combos.Select(item => String.Format("- {0}", item)))); outputDataPackage.TextItems.Add("SHIFT14ITAB1SUBHEADER1".ToUpper(), SlideContainer.EditedContent.NextStepsState.TabI.Subheader1 ?? CustomTabInfo.SubHeader1DefaultValue); outputDataPackage.TextItems.Add("SHIFT14ITAB2SUBHEADER1".ToUpper(), SlideContainer.EditedContent.NextStepsState.TabI.Subheader2 ?? CustomTabInfo.SubHeader2DefaultValue); outputDataPackage.TextItems.Add("SHIFT14ITAB3SUBHEADER1".ToUpper(), SlideContainer.EditedContent.NextStepsState.TabI.Subheader3 ?? CustomTabInfo.SubHeader3DefaultValue); outputDataPackage.TextItems.Add("SHIFT14ITAB4SUBHEADER1".ToUpper(), SlideContainer.EditedContent.NextStepsState.TabI.Subheader4 ?? CustomTabInfo.SubHeader4DefaultValue); outputDataPackage.TextItems.Add("SHIFT14ITAB5SUBHEADER1".ToUpper(), SlideContainer.EditedContent.NextStepsState.TabI.Subheader5 ?? CustomTabInfo.SubHeader5DefaultValue); outputDataPackage.TextItems.Add("SHIFT14ITAB6SUBHEADER1".ToUpper(), SlideContainer.EditedContent.NextStepsState.TabI.Subheader6 ?? CustomTabInfo.SubHeader6DefaultValue); return(outputDataPackage); }
public ROITabBControl(IChildTabPageContainer slideContainer, StarChildTabInfo tabInfo) : base(slideContainer, tabInfo) { InitializeComponent(); textEditTabBSubheader1.EnableSelectAll().RaiseNullValueIfEditorEmpty().RaiseChangePlaceholderColor(); spinEditTabBSubheader2.EnableSelectAll(); textEditTabBSubheader3.EnableSelectAll().RaiseNullValueIfEditorEmpty().RaiseChangePlaceholderColor(); textEditTabBSubheader4.EnableSelectAll().RaiseNullValueIfEditorEmpty().RaiseChangePlaceholderColor(); spinEditTabBSubheader5.EnableSelectAll(); textEditTabBSubheader6.EnableSelectAll().RaiseNullValueIfEditorEmpty().RaiseChangePlaceholderColor(); textEditTabBSubheader7.EnableSelectAll().RaiseNullValueIfEditorEmpty().RaiseChangePlaceholderColor(); spinEditTabBSubheader8.EnableSelectAll(); textEditTabBSubheader9.EnableSelectAll().RaiseNullValueIfEditorEmpty().RaiseChangePlaceholderColor(); textEditTabBSubheader10.EnableSelectAll().RaiseNullValueIfEditorEmpty().RaiseChangePlaceholderColor(); spinEditTabBSubheader11.EnableSelectAll(); textEditTabBSubheader12.EnableSelectAll().RaiseNullValueIfEditorEmpty().RaiseChangePlaceholderColor(); textEditTabBSubheader13.EnableSelectAll().RaiseNullValueIfEditorEmpty().RaiseChangePlaceholderColor(); textEditTabBSubheader14.EnableSelectAll().RaiseNullValueIfEditorEmpty().RaiseChangePlaceholderColor(); textEditTabBSubheader15.EnableSelectAll().RaiseNullValueIfEditorEmpty().RaiseChangePlaceholderColor(); textEditTabBSubheader16.EnableSelectAll().RaiseNullValueIfEditorEmpty().RaiseChangePlaceholderColor(); spinEditTabBSubheader17.EnableSelectAll(); textEditTabBSubheader18.EnableSelectAll().RaiseNullValueIfEditorEmpty().RaiseChangePlaceholderColor(); textEditTabBSubheader19.EnableSelectAll().RaiseNullValueIfEditorEmpty().RaiseChangePlaceholderColor(); textEditTabBSubheader20.EnableSelectAll().RaiseNullValueIfEditorEmpty().RaiseChangePlaceholderColor(); textEditTabBSubheader21.EnableSelectAll().RaiseNullValueIfEditorEmpty().RaiseChangePlaceholderColor(); textEditTabBSubheader22.EnableSelectAll().RaiseNullValueIfEditorEmpty().RaiseChangePlaceholderColor(); textEditTabBSubheader23.EnableSelectAll().RaiseNullValueIfEditorEmpty().RaiseChangePlaceholderColor(); spinEditTabBSubheader24.EnableSelectAll(); textEditTabBSubheader25.EnableSelectAll().RaiseNullValueIfEditorEmpty().RaiseChangePlaceholderColor(); Application.DoEvents(); clipartEditContainer1.Init(ImageClipartObject.FromImage(CustomTabInfo.Clipart1Image), CustomTabInfo.Clipart1Configuration, TabPageContainer.ParentControl); clipartEditContainer1.EditValueChanged += OnEditValueChanged; clipartEditContainer2.Init(ImageClipartObject.FromImage(CustomTabInfo.Clipart2Image), CustomTabInfo.Clipart2Configuration, TabPageContainer.ParentControl); clipartEditContainer2.EditValueChanged += OnEditValueChanged; clipartEditContainer3.Init(ImageClipartObject.FromImage(CustomTabInfo.Clipart3Image), CustomTabInfo.Clipart3Configuration, TabPageContainer.ParentControl); clipartEditContainer3.EditValueChanged += OnEditValueChanged; textEditTabBSubheader1.Properties.NullText = CustomTabInfo.SubHeader1Placeholder ?? textEditTabBSubheader1.Properties.NullText; textEditTabBSubheader3.Properties.NullText = CustomTabInfo.SubHeader3Placeholder ?? textEditTabBSubheader3.Properties.NullText; textEditTabBSubheader4.Properties.NullText = CustomTabInfo.SubHeader4Placeholder ?? textEditTabBSubheader4.Properties.NullText; textEditTabBSubheader6.Properties.NullText = CustomTabInfo.SubHeader6Placeholder ?? textEditTabBSubheader6.Properties.NullText; textEditTabBSubheader7.Properties.NullText = CustomTabInfo.SubHeader7Placeholder ?? textEditTabBSubheader7.Properties.NullText; textEditTabBSubheader9.Properties.NullText = CustomTabInfo.SubHeader9Placeholder ?? textEditTabBSubheader9.Properties.NullText; textEditTabBSubheader10.Properties.NullText = CustomTabInfo.SubHeader10Placeholder ?? textEditTabBSubheader10.Properties.NullText; textEditTabBSubheader12.Properties.NullText = CustomTabInfo.SubHeader12Placeholder ?? textEditTabBSubheader12.Properties.NullText; textEditTabBSubheader13.Properties.NullText = CustomTabInfo.SubHeader13Placeholder ?? textEditTabBSubheader13.Properties.NullText; textEditTabBSubheader14.Properties.NullText = CustomTabInfo.SubHeader14Placeholder ?? textEditTabBSubheader14.Properties.NullText; textEditTabBSubheader15.Properties.NullText = CustomTabInfo.SubHeader15Placeholder ?? textEditTabBSubheader15.Properties.NullText; textEditTabBSubheader16.Properties.NullText = CustomTabInfo.SubHeader16Placeholder ?? textEditTabBSubheader16.Properties.NullText; textEditTabBSubheader18.Properties.NullText = CustomTabInfo.SubHeader18Placeholder ?? textEditTabBSubheader18.Properties.NullText; textEditTabBSubheader19.Properties.NullText = CustomTabInfo.SubHeader19Placeholder ?? textEditTabBSubheader19.Properties.NullText; textEditTabBSubheader20.Properties.NullText = CustomTabInfo.SubHeader20Placeholder ?? textEditTabBSubheader20.Properties.NullText; textEditTabBSubheader21.Properties.NullText = CustomTabInfo.SubHeader21Placeholder ?? textEditTabBSubheader21.Properties.NullText; textEditTabBSubheader22.Properties.NullText = CustomTabInfo.SubHeader22Placeholder ?? textEditTabBSubheader22.Properties.NullText; textEditTabBSubheader23.Properties.NullText = CustomTabInfo.SubHeader23Placeholder ?? textEditTabBSubheader23.Properties.NullText; textEditTabBSubheader25.Properties.NullText = CustomTabInfo.SubHeader25Placeholder ?? textEditTabBSubheader25.Properties.NullText; Application.DoEvents(); }
protected override OutputDataPackage GetOutputData() { var outputDataPackage = new OutputDataPackage(); outputDataPackage.Theme = SelectedTheme; switch (SlideContainer.EditedContent.ApproachState.TabA.Items.Count) { case 1: outputDataPackage.TemplateName = MasterWizardManager.Instance.SelectedWizard.GetShiftApproachFile("058_our_approach_a4.pptx"); break; case 2: outputDataPackage.TemplateName = MasterWizardManager.Instance.SelectedWizard.GetShiftApproachFile("057_our_approach_a3.pptx"); break; case 3: outputDataPackage.TemplateName = MasterWizardManager.Instance.SelectedWizard.GetShiftApproachFile("056_our_approach_a2.pptx"); break; case 4: outputDataPackage.TemplateName = MasterWizardManager.Instance.SelectedWizard.GetShiftApproachFile("055_our_approach_a1.pptx"); break; default: outputDataPackage.TemplateName = MasterWizardManager.Instance.SelectedWizard.GetShiftApproachFile("058_our_approach_a4.pptx"); break; } outputDataPackage.TextItems.Add("SHIFT09AHEADER".ToUpper(), (SlideContainer.EditedContent.ApproachState.TabA.SlideHeader ?? CustomTabInfo.HeadersItems.FirstOrDefault(h => h.IsDefault))?.Value); outputDataPackage.TextItems.Add("SHIFT09ACOMBO1".ToUpper(), (SlideContainer.EditedContent.ApproachState.TabA.Combo1 ?? CustomTabInfo.Combo1Items.FirstOrDefault(h => h.IsDefault))?.Value); var itemStateList = SlideContainer.EditedContent.ApproachState.TabA.Items.OrderBy(itemState => itemState.Index).ToList(); for (var i = 0; i < itemStateList.Count; i++) { var itemState = SlideContainer.EditedContent.ApproachState.TabA.Items[i]; var itemInfo = CustomTabInfo.ApproachItems.FirstOrDefault(item => String.Equals(item.Id, itemState.Id, StringComparison.OrdinalIgnoreCase)); if (itemInfo == null) { continue; } var clipart = ImageClipartObject.FromFile(itemInfo.ImagePath); clipart.OutputBackground = true; outputDataPackage.ClipartItems.Add(String.Format("SHIFT09ATAB{0}CLIPART{0}", i + 1).ToUpper(), clipart); outputDataPackage.TextItems.Add(String.Format("SHIFT09ATAB{0}SUBHEADER{0}", i + 1).ToUpper(), itemState.Subheader ?? itemInfo.SubHeaderDefaultValue); } return(outputDataPackage); }
protected override OutputDataPackage GetOutputData() { var outputDataPackage = new OutputDataPackage(); outputDataPackage.Theme = SelectedTheme; var clipart1 = SlideContainer.EditedContent.InvestmentState.TabB.Clipart1 ?? ImageClipartObject.FromImage(CustomTabInfo.Clipart1Image); if (clipart1 != null) { outputDataPackage.ClipartItems.Add("SHIFT12BCLIPART1", clipart1); } var clipart2 = SlideContainer.EditedContent.InvestmentState.TabB.Clipart2 ?? ImageClipartObject.FromImage(CustomTabInfo.Clipart2Image); if (clipart2 != null) { outputDataPackage.ClipartItems.Add("SHIFT12BCLIPART2", clipart2); } var clipart3 = SlideContainer.EditedContent.InvestmentState.TabB.Clipart3 ?? ImageClipartObject.FromImage(CustomTabInfo.Clipart3Image); if (clipart3 != null) { outputDataPackage.ClipartItems.Add("SHIFT12BCLIPART3", clipart3); } var clipart4 = SlideContainer.EditedContent.InvestmentState.TabB.Clipart4 ?? ImageClipartObject.FromImage(CustomTabInfo.Clipart4Image); if (clipart4 != null) { outputDataPackage.ClipartItems.Add("SHIFT12BCLIPART4", clipart4); } var clipart5 = SlideContainer.EditedContent.InvestmentState.TabB.Clipart5 ?? ImageClipartObject.FromImage(CustomTabInfo.Clipart5Image); if (clipart5 != null) { outputDataPackage.ClipartItems.Add("SHIFT12BCLIPART5", clipart5); } outputDataPackage.TemplateName = MasterWizardManager.Instance.SelectedWizard.GetShiftInvestmentFile("investment_b.pptx"); outputDataPackage.TextItems.Add("SHIFT12BHEADER".ToUpper(), (SlideContainer.EditedContent.InvestmentState.TabB.SlideHeader ?? CustomTabInfo.HeadersItems.FirstOrDefault(h => h.IsDefault))?.Value); outputDataPackage.TextItems.Add("SHIFT12BCOMBO1".ToUpper(), (SlideContainer.EditedContent.InvestmentState.TabB.Combo1 ?? CustomTabInfo.Combo1Items.FirstOrDefault(h => h.IsDefault))?.Value); outputDataPackage.TextItems.Add("SHIFT12BCOMBO2".ToUpper(), (SlideContainer.EditedContent.InvestmentState.TabB.Combo2 ?? CustomTabInfo.Combo2Items.FirstOrDefault(h => h.IsDefault))?.Value); outputDataPackage.TextItems.Add("SHIFT12BCOMBO3".ToUpper(), (SlideContainer.EditedContent.InvestmentState.TabB.Combo3 ?? CustomTabInfo.Combo3Items.FirstOrDefault(h => h.IsDefault))?.Value); outputDataPackage.TextItems.Add("SHIFT12BCOMBO4".ToUpper(), (SlideContainer.EditedContent.InvestmentState.TabB.Combo4 ?? CustomTabInfo.Combo4Items.FirstOrDefault(h => h.IsDefault))?.Value); outputDataPackage.TextItems.Add("SHIFT12BCOMBO5".ToUpper(), (SlideContainer.EditedContent.InvestmentState.TabB.Combo5 ?? CustomTabInfo.Combo5Items.FirstOrDefault(h => h.IsDefault))?.Value); outputDataPackage.TextItems.Add("SHIFT12BCOMBO6".ToUpper(), (SlideContainer.EditedContent.InvestmentState.TabB.Combo6 ?? CustomTabInfo.Combo6Items.FirstOrDefault(h => h.IsDefault))?.Value); outputDataPackage.TextItems.Add("SHIFT12BSUBHEADER1".ToUpper(), SlideContainer.EditedContent.InvestmentState.TabB.Subheader1 ?? CustomTabInfo.SubHeader1DefaultValue); outputDataPackage.TextItems.Add("SHIFT12BSUBHEADER2".ToUpper(), SlideContainer.EditedContent.InvestmentState.TabB.Subheader2 ?? CustomTabInfo.SubHeader2DefaultValue); return(outputDataPackage); }
protected override OutputDataPackage GetOutputData() { var outputDataPackage = new OutputDataPackage(); outputDataPackage.Theme = SelectedTheme; var clipart1 = SlideContainer.EditedContent.InvestmentState.TabF.Clipart1 ?? ImageClipartObject.FromImage(CustomTabInfo.Clipart1Image); if (clipart1 != null) { clipart1.OutputBackground = true; outputDataPackage.ClipartItems.Add("SHIFT12FCLIPART1", clipart1); } var clipart2 = SlideContainer.EditedContent.InvestmentState.TabF.Clipart2 ?? ImageClipartObject.FromImage(CustomTabInfo.Clipart2Image); if (clipart2 != null) { outputDataPackage.ClipartItems.Add("SHIFT12FCLIPART2", clipart2); } var clipart3 = SlideContainer.EditedContent.InvestmentState.TabF.Clipart3 ?? ImageClipartObject.FromImage(CustomTabInfo.Clipart3Image); if (clipart3 != null) { outputDataPackage.ClipartItems.Add("SHIFT12FCLIPART3", clipart3); } var slideHeader = (SlideContainer.EditedContent.InvestmentState.TabF.SlideHeader ?? CustomTabInfo.HeadersItems.FirstOrDefault(h => h.IsDefault))?.Value; var combos = new[] { (SlideContainer.EditedContent.InvestmentState.TabF.Combo1 ?? CustomTabInfo.Combo1Items.FirstOrDefault(h => h.IsDefault))?.Value, (SlideContainer.EditedContent.InvestmentState.TabF.Combo2 ?? CustomTabInfo.Combo2Items.FirstOrDefault(h => h.IsDefault))?.Value, (SlideContainer.EditedContent.InvestmentState.TabF.Combo3 ?? CustomTabInfo.Combo3Items.FirstOrDefault(h => h.IsDefault))?.Value, (SlideContainer.EditedContent.InvestmentState.TabF.Combo4 ?? CustomTabInfo.Combo4Items.FirstOrDefault(h => h.IsDefault))?.Value, (SlideContainer.EditedContent.InvestmentState.TabF.Combo5 ?? CustomTabInfo.Combo5Items.FirstOrDefault(h => h.IsDefault))?.Value, (SlideContainer.EditedContent.InvestmentState.TabF.Combo6 ?? CustomTabInfo.Combo6Items.FirstOrDefault(h => h.IsDefault))?.Value, (SlideContainer.EditedContent.InvestmentState.TabF.Combo7 ?? CustomTabInfo.Combo7Items.FirstOrDefault(h => h.IsDefault))?.Value, (SlideContainer.EditedContent.InvestmentState.TabF.Combo8 ?? CustomTabInfo.Combo8Items.FirstOrDefault(h => h.IsDefault))?.Value, } .Where(item => !String.IsNullOrWhiteSpace(item)) .ToList(); outputDataPackage.TemplateName = MasterWizardManager.Instance.SelectedWizard.GetShiftInvestmentFile("proof_f.pptx"); outputDataPackage.TextItems.Add("SHIFT12FHeader".ToUpper(), slideHeader); outputDataPackage.TextItems.Add("SHIFT12FSUBHEADER1".ToUpper(), SlideContainer.EditedContent.InvestmentState.TabF.Subheader1 ?? CustomTabInfo.SubHeader1DefaultValue); outputDataPackage.TextItems.Add("SHIFT12FCOMBOMERGE1".ToUpper(), String.Join(String.Format("{0}", (char)13), combos)); return(outputDataPackage); }
public AgendaTabCControl(IChildTabPageContainer slideContainer, ShiftChildTabInfo tabInfo) : base(slideContainer, tabInfo) { InitializeComponent(); comboBoxEditSlideHeader.EnableSelectAll().RaiseNullValueIfEditorEmpty().AssignConfiguration(CustomTabInfo.HeadersEditorConfiguration); comboBoxEditCombo1.EnableSelectAll().RaiseNullValueIfEditorEmpty().AssignConfiguration(CustomTabInfo.Combo1Configuration); comboBoxEditCombo2.EnableSelectAll().RaiseNullValueIfEditorEmpty().AssignConfiguration(CustomTabInfo.Combo2Configuration); comboBoxEditCombo3.EnableSelectAll().RaiseNullValueIfEditorEmpty().AssignConfiguration(CustomTabInfo.Combo3Configuration); comboBoxEditCombo4.EnableSelectAll().RaiseNullValueIfEditorEmpty().AssignConfiguration(CustomTabInfo.Combo4Configuration); comboBoxEditCombo5.EnableSelectAll().RaiseNullValueIfEditorEmpty().AssignConfiguration(CustomTabInfo.Combo5Configuration); comboBoxEditCombo6.EnableSelectAll().RaiseNullValueIfEditorEmpty().AssignConfiguration(CustomTabInfo.Combo6Configuration); comboBoxEditSlideHeader.Properties.Items.Clear(); comboBoxEditSlideHeader.Properties.Items.AddRange(CustomTabInfo.HeadersItems .Where(item => !item.IsPlaceholder).ToArray()); comboBoxEditSlideHeader.Properties.NullText = CustomTabInfo.HeadersItems.FirstOrDefault(h => h.IsPlaceholder)?.Value ?? "Select or type"; comboBoxEditCombo1.Properties.Items.Clear(); comboBoxEditCombo1.Properties.Items.AddRange(CustomTabInfo.Combo1Items.Where(item => !item.IsPlaceholder).ToArray()); comboBoxEditCombo1.Properties.NullText = CustomTabInfo.Combo1Items.FirstOrDefault(item => item.IsPlaceholder)?.Value ?? comboBoxEditCombo1.Properties.NullText; comboBoxEditCombo2.Properties.Items.Clear(); comboBoxEditCombo2.Properties.Items.AddRange(CustomTabInfo.Combo2Items.Where(item => !item.IsPlaceholder).ToArray()); comboBoxEditCombo2.Properties.NullText = CustomTabInfo.Combo2Items.FirstOrDefault(item => item.IsPlaceholder)?.Value ?? comboBoxEditCombo2.Properties.NullText; comboBoxEditCombo3.Properties.Items.Clear(); comboBoxEditCombo3.Properties.Items.AddRange(CustomTabInfo.Combo3Items.Where(item => !item.IsPlaceholder).ToArray()); comboBoxEditCombo3.Properties.NullText = CustomTabInfo.Combo3Items.FirstOrDefault(item => item.IsPlaceholder)?.Value ?? comboBoxEditCombo3.Properties.NullText; comboBoxEditCombo4.Properties.Items.Clear(); comboBoxEditCombo4.Properties.Items.AddRange(CustomTabInfo.Combo4Items.Where(item => !item.IsPlaceholder).ToArray()); comboBoxEditCombo4.Properties.NullText = CustomTabInfo.Combo4Items.FirstOrDefault(item => item.IsPlaceholder)?.Value ?? comboBoxEditCombo4.Properties.NullText; comboBoxEditCombo5.Properties.Items.Clear(); comboBoxEditCombo5.Properties.Items.AddRange(CustomTabInfo.Combo5Items.Where(item => !item.IsPlaceholder).ToArray()); comboBoxEditCombo5.Properties.NullText = CustomTabInfo.Combo5Items.FirstOrDefault(item => item.IsPlaceholder)?.Value ?? comboBoxEditCombo5.Properties.NullText; comboBoxEditCombo6.Properties.Items.Clear(); comboBoxEditCombo6.Properties.Items.AddRange(CustomTabInfo.Combo6Items.Where(item => !item.IsPlaceholder).ToArray()); comboBoxEditCombo6.Properties.NullText = CustomTabInfo.Combo6Items.FirstOrDefault(item => item.IsPlaceholder)?.Value ?? comboBoxEditCombo6.Properties.NullText; clipartEditContainer1.Init(ImageClipartObject.FromImage(CustomTabInfo.Clipart1Image), CustomTabInfo.Clipart1Configuration, TabPageContainer.ParentControl); clipartEditContainer1.EditValueChanged += OnEditValueChanged; }
public ShareTabEControl(IChildTabPageContainer slideContainer, StarChildTabInfo tabInfo) : base(slideContainer, tabInfo) { InitializeComponent(); comboBoxEditTabECombo1.EnableSelectAll().RaiseNullValueIfEditorEmpty().RaiseChangePlaceholderColor(); comboBoxEditTabECombo2.EnableSelectAll().RaiseNullValueIfEditorEmpty().RaiseChangePlaceholderColor(); comboBoxEditTabECombo3.EnableSelectAll().RaiseNullValueIfEditorEmpty().RaiseChangePlaceholderColor(); comboBoxEditTabECombo4.EnableSelectAll().RaiseNullValueIfEditorEmpty().RaiseChangePlaceholderColor(); textEditTabESubheader1.EnableSelectAll().RaiseNullValueIfEditorEmpty().RaiseChangePlaceholderColor(); textEditTabESubheader2.EnableSelectAll().RaiseNullValueIfEditorEmpty().RaiseChangePlaceholderColor(); textEditTabESubheader3.EnableSelectAll().RaiseNullValueIfEditorEmpty().RaiseChangePlaceholderColor(); textEditTabESubheader4.EnableSelectAll().RaiseNullValueIfEditorEmpty().RaiseChangePlaceholderColor(); textEditTabESubheader5.EnableSelectAll().RaiseNullValueIfEditorEmpty().RaiseChangePlaceholderColor(); textEditTabESubheader6.EnableSelectAll().RaiseNullValueIfEditorEmpty().RaiseChangePlaceholderColor(); spinEditTabESubheader7.EnableSelectAll(); textEditTabESubheader8.EnableSelectAll().RaiseNullValueIfEditorEmpty().RaiseChangePlaceholderColor(); textEditTabESubheader9.EnableSelectAll().RaiseNullValueIfEditorEmpty().RaiseChangePlaceholderColor(); textEditTabESubheader10.EnableSelectAll().RaiseNullValueIfEditorEmpty().RaiseChangePlaceholderColor(); Application.DoEvents(); clipartEditContainer1.Init(ImageClipartObject.FromImage(CustomTabInfo.Clipart1Image), CustomTabInfo.Clipart1Configuration, TabPageContainer.ParentControl); clipartEditContainer1.EditValueChanged += OnEditValueChanged; clipartEditContainer2.Init(ImageClipartObject.FromImage(CustomTabInfo.Clipart2Image), CustomTabInfo.Clipart2Configuration, TabPageContainer.ParentControl); clipartEditContainer2.EditValueChanged += OnEditValueChanged; clipartEditContainer3.Init(ImageClipartObject.FromImage(CustomTabInfo.Clipart3Image), CustomTabInfo.Clipart3Configuration, TabPageContainer.ParentControl); clipartEditContainer3.EditValueChanged += OnEditValueChanged; Application.DoEvents(); textEditTabESubheader1.Properties.NullText = CustomTabInfo.SubHeader1Placeholder ?? textEditTabESubheader1.Properties.NullText; textEditTabESubheader2.Properties.NullText = CustomTabInfo.SubHeader2Placeholder ?? textEditTabESubheader2.Properties.NullText; textEditTabESubheader3.Properties.NullText = CustomTabInfo.SubHeader3Placeholder ?? textEditTabESubheader3.Properties.NullText; textEditTabESubheader4.Properties.NullText = CustomTabInfo.SubHeader4Placeholder ?? textEditTabESubheader4.Properties.NullText; textEditTabESubheader5.Properties.NullText = CustomTabInfo.SubHeader5Placeholder ?? textEditTabESubheader5.Properties.NullText; textEditTabESubheader6.Properties.NullText = CustomTabInfo.SubHeader6Placeholder ?? textEditTabESubheader6.Properties.NullText; textEditTabESubheader8.Properties.NullText = CustomTabInfo.SubHeader8Placeholder ?? textEditTabESubheader8.Properties.NullText; textEditTabESubheader9.Properties.NullText = CustomTabInfo.SubHeader9Placeholder ?? textEditTabESubheader9.Properties.NullText; textEditTabESubheader10.Properties.NullText = CustomTabInfo.SubHeader10Placeholder ?? textEditTabESubheader10.Properties.NullText; comboBoxEditTabECombo1.Properties.Items.AddRange(CustomTabInfo.Combo1Items.Where(item => !item.IsPlaceholder).ToArray()); comboBoxEditTabECombo1.Properties.NullText = CustomTabInfo.Combo1Items.FirstOrDefault(item => item.IsPlaceholder)?.Value ?? comboBoxEditTabECombo1.Properties.NullText; comboBoxEditTabECombo2.Properties.Items.AddRange(CustomTabInfo.Combo2Items.Where(item => !item.IsPlaceholder).ToArray()); comboBoxEditTabECombo2.Properties.NullText = CustomTabInfo.Combo2Items.FirstOrDefault(item => item.IsPlaceholder)?.Value ?? comboBoxEditTabECombo2.Properties.NullText; comboBoxEditTabECombo3.Properties.Items.AddRange(CustomTabInfo.Combo3Items.Where(item => !item.IsPlaceholder).ToArray()); comboBoxEditTabECombo3.Properties.NullText = CustomTabInfo.Combo3Items.FirstOrDefault(item => item.IsPlaceholder)?.Value ?? comboBoxEditTabECombo3.Properties.NullText; comboBoxEditTabECombo4.Properties.Items.AddRange(CustomTabInfo.Combo4Items.Where(item => !item.IsPlaceholder).ToArray()); comboBoxEditTabECombo4.Properties.NullText = CustomTabInfo.Combo4Items.FirstOrDefault(item => item.IsPlaceholder)?.Value ?? comboBoxEditTabECombo4.Properties.NullText; Application.DoEvents(); }
public VideoTabAControl(IChildTabPageContainer slideContainer, StarChildTabInfo tabInfo) : base(slideContainer, tabInfo) { InitializeComponent(); memoEditTabASubheader1.EnableSelectAll().RaiseNullValueIfEditorEmpty().RaiseChangePlaceholderColor(); memoEditTabASubheader1.Properties.NullText = CustomTabInfo.SubHeader1Placeholder ?? memoEditTabASubheader1.Properties.NullText; clipartEditContainerTabA1.Init(ImageClipartObject.FromImage(CustomTabInfo.Clipart1Image), CustomTabInfo.Clipart1Configuration, TabPageContainer.ParentControl); clipartEditContainerTabA1.EditValueChanged += OnEditValueChanged; }
private void OnFavoritesOpenItemClick(object sender, ItemClickEventArgs e) { using (var form = new FormFavoritesOpen()) { if (form.ShowDialog() == DialogResult.OK && form.SelectedImageSource != null) { var imageSource = form.SelectedImageSource; LoadData(ImageClipartObject.FromImageSource(imageSource)); EditValueChanged?.Invoke(sender, e); } } }
public NeedsSolutionsTabBControl(IChildTabPageContainer slideContainer, ShiftChildTabInfo tabInfo) : base(slideContainer, tabInfo) { InitializeComponent(); clipartEditContainer1.Init(ImageClipartObject.FromImage(CustomTabInfo.Clipart1Image), CustomTabInfo.Clipart1Configuration, TabPageContainer.ParentControl); clipartEditContainer1.EditValueChanged += OnEditValueChanged; clipartEditContainer2.Init(ImageClipartObject.FromImage(CustomTabInfo.Clipart2Image), CustomTabInfo.Clipart2Configuration, TabPageContainer.ParentControl); clipartEditContainer2.EditValueChanged += OnEditValueChanged; clipartEditContainer3.Init(ImageClipartObject.FromImage(CustomTabInfo.Clipart3Image), CustomTabInfo.Clipart3Configuration, TabPageContainer.ParentControl); clipartEditContainer3.EditValueChanged += OnEditValueChanged; comboBoxEditSlideHeader.EnableSelectAll().RaiseNullValueIfEditorEmpty().AssignConfiguration(CustomTabInfo.HeadersEditorConfiguration); comboBoxEditSlideHeader.Properties.Items.Clear(); comboBoxEditSlideHeader.Properties.Items.AddRange(CustomTabInfo.HeadersItems .Where(item => !item.IsPlaceholder).ToArray()); comboBoxEditSlideHeader.Properties.NullText = CustomTabInfo.HeadersItems.FirstOrDefault(h => h.IsPlaceholder)?.Value ?? "Select or type"; itemControl1.Init(CustomTabInfo.NeedsList, null, //CustomTabInfo.ItemInfoList.ElementAtOrDefault(0), CustomTabInfo.Combo1Placeholder, CustomTabInfo.Combo1Configuration, CustomTabInfo.SubHeader1Configuration, SlideContainer.StyleConfiguration); itemControl1.EditValueChanged += OnEditValueChanged; itemControl2.Init(CustomTabInfo.NeedsList, null, //CustomTabInfo.ItemInfoList.ElementAtOrDefault(1), CustomTabInfo.Combo2Placeholder, CustomTabInfo.Combo2Configuration, CustomTabInfo.SubHeader2Configuration, SlideContainer.StyleConfiguration); itemControl2.EditValueChanged += OnEditValueChanged; itemControl3.Init(CustomTabInfo.NeedsList, null, //CustomTabInfo.ItemInfoList.ElementAtOrDefault(2), CustomTabInfo.Combo3Placeholder, CustomTabInfo.Combo3Configuration, CustomTabInfo.SubHeader3Configuration, SlideContainer.StyleConfiguration); itemControl3.EditValueChanged += OnEditValueChanged; itemControl4.Init(CustomTabInfo.NeedsList, null, //CustomTabInfo.ItemInfoList.ElementAtOrDefault(0), CustomTabInfo.Combo4Placeholder, CustomTabInfo.Combo1Configuration, CustomTabInfo.SubHeader1Configuration, SlideContainer.StyleConfiguration); itemControl4.EditValueChanged += OnEditValueChanged; }
public MarketTabDControl(IChildTabPageContainer slideContainer, ShiftChildTabInfo tabInfo) : base(slideContainer, tabInfo) { InitializeComponent(); clipartEditContainer1.Init(ImageClipartObject.FromImage(CustomTabInfo.Clipart1Image), CustomTabInfo.Clipart1Configuration, TabPageContainer.ParentControl); clipartEditContainer1.EditValueChanged += OnEditValueChanged; clipartEditContainer2.Init(ImageClipartObject.FromImage(CustomTabInfo.Clipart2Image), CustomTabInfo.Clipart2Configuration, TabPageContainer.ParentControl); clipartEditContainer2.EditValueChanged += OnEditValueChanged; clipartEditContainer3.Init(ImageClipartObject.FromImage(CustomTabInfo.Clipart3Image), CustomTabInfo.Clipart3Configuration, TabPageContainer.ParentControl); clipartEditContainer3.EditValueChanged += OnEditValueChanged; clipartEditContainer4.Init(ImageClipartObject.FromImage(CustomTabInfo.Clipart4Image), CustomTabInfo.Clipart4Configuration, TabPageContainer.ParentControl); clipartEditContainer4.EditValueChanged += OnEditValueChanged; clipartEditContainer5.Init(ImageClipartObject.FromImage(CustomTabInfo.Clipart5Image), CustomTabInfo.Clipart5Configuration, TabPageContainer.ParentControl); clipartEditContainer5.EditValueChanged += OnEditValueChanged; comboBoxEditSlideHeader.EnableSelectAll().RaiseNullValueIfEditorEmpty().AssignConfiguration(CustomTabInfo.HeadersEditorConfiguration); comboBoxEditCombo1.EnableSelectAll().RaiseNullValueIfEditorEmpty().AssignConfiguration(CustomTabInfo.Combo1Configuration); comboBoxEditCombo2.EnableSelectAll().RaiseNullValueIfEditorEmpty().AssignConfiguration(CustomTabInfo.Combo2Configuration); spinEditSubheader1.EnableSelectAll().AssignConfiguration(CustomTabInfo.SubHeader1Configuration); memoEditSubheader2.EnableSelectAll().RaiseNullValueIfEditorEmpty().AssignConfiguration(CustomTabInfo.SubHeader2Configuration); spinEditSubheader3.EnableSelectAll().AssignConfiguration(CustomTabInfo.SubHeader3Configuration); spinEditSubheader4.EnableSelectAll().AssignConfiguration(CustomTabInfo.SubHeader4Configuration); spinEditSubheader5.EnableSelectAll().AssignConfiguration(CustomTabInfo.SubHeader5Configuration); comboBoxEditSlideHeader.Properties.Items.Clear(); comboBoxEditSlideHeader.Properties.Items.AddRange(CustomTabInfo.HeadersItems .Where(item => !item.IsPlaceholder).ToArray()); comboBoxEditSlideHeader.Properties.NullText = CustomTabInfo.HeadersItems.FirstOrDefault(h => h.IsPlaceholder)?.Value ?? "Select or type"; comboBoxEditCombo1.Properties.Items.Clear(); comboBoxEditCombo1.Properties.Items.AddRange(CustomTabInfo.Combo1Items.Where(item => !item.IsPlaceholder).ToArray()); comboBoxEditCombo1.Properties.NullText = CustomTabInfo.Combo1Items.FirstOrDefault(item => item.IsPlaceholder)?.Value ?? comboBoxEditCombo1.Properties.NullText; comboBoxEditCombo2.Properties.Items.Clear(); comboBoxEditCombo2.Properties.Items.AddRange(CustomTabInfo.Combo2Items.Where(item => !item.IsPlaceholder).ToArray()); comboBoxEditCombo2.Properties.NullText = CustomTabInfo.Combo2Items.FirstOrDefault(item => item.IsPlaceholder)?.Value ?? comboBoxEditCombo2.Properties.NullText; memoEditSubheader2.Properties.NullText = CustomTabInfo.SubHeader2Placeholder ?? memoEditSubheader2.Properties.NullText; memoPopupEdit1.Init(SlideContainer.ShiftInfo.TargetCustomersLists.HHIs, CustomTabInfo.MemoPopup1DefaultItem, CustomTabInfo.MemoPopup1Configuration, SlideContainer.StyleConfiguration, SlideContainer.ResourceManager); memoPopupEdit1.EditValueChanged += OnEditValueChanged; memoPopupEdit2.Init(SlideContainer.ShiftInfo.TargetCustomersLists.Demos, CustomTabInfo.MemoPopup2DefaultItem, CustomTabInfo.MemoPopup2Configuration, SlideContainer.StyleConfiguration, SlideContainer.ResourceManager); memoPopupEdit2.EditValueChanged += OnEditValueChanged; memoPopupEdit3.Init(SlideContainer.ShiftInfo.TargetCustomersLists.Geographies, CustomTabInfo.MemoPopup3DefaultItem, CustomTabInfo.MemoPopup3Configuration, SlideContainer.StyleConfiguration, SlideContainer.ResourceManager); memoPopupEdit3.EditValueChanged += OnEditValueChanged; }
public static SolutionsItemState FromItemInfo(SolutionsItemInfo itemInfo) { var itemState = new SolutionsItemState(); if (itemInfo != null) { itemState.Id = itemInfo.Id; itemState.Clipart = ImageClipartObject.FromFile(itemInfo.ImagePath); itemState.Title = itemInfo.Title; itemState.Subheader = itemInfo.SubHeaderDefaultValue; } return(itemState); }
public ROITabDControl(IChildTabPageContainer slideContainer, ShiftChildTabInfo tabInfo) : base(slideContainer, tabInfo) { InitializeComponent(); comboBoxEditSlideHeader.EnableSelectAll().RaiseNullValueIfEditorEmpty().AssignConfiguration(CustomTabInfo.HeadersEditorConfiguration); textEditTabDSubheader1.EnableSelectAll().RaiseNullValueIfEditorEmpty().RaiseChangePlaceholderColor(); spinEditTabDSubheader2.EnableSelectAll(); textEditTabDSubheader3.EnableSelectAll().RaiseNullValueIfEditorEmpty().RaiseChangePlaceholderColor(); spinEditTabDSubheader4.EnableSelectAll(); textEditTabDSubheader5.EnableSelectAll().RaiseNullValueIfEditorEmpty().RaiseChangePlaceholderColor(); spinEditTabDSubheader6.EnableSelectAll(); textEditTabDSubheader7.EnableSelectAll().RaiseNullValueIfEditorEmpty().RaiseChangePlaceholderColor(); spinEditTabDSubheader8.EnableSelectAll(); textEditTabDSubheader9.EnableSelectAll().RaiseNullValueIfEditorEmpty().RaiseChangePlaceholderColor(); spinEditTabDSubheader10.EnableSelectAll(); textEditTabDSubheader11.EnableSelectAll().RaiseNullValueIfEditorEmpty().RaiseChangePlaceholderColor(); spinEditTabDSubheader12.EnableSelectAll(); textEditTabDSubheader13.EnableSelectAll().RaiseNullValueIfEditorEmpty().RaiseChangePlaceholderColor(); textEditTabDSubheader14.EnableSelectAll().RaiseNullValueIfEditorEmpty().RaiseChangePlaceholderColor(); spinEditTabDSubheader15.EnableSelectAll(); textEditTabDSubheader16.EnableSelectAll().RaiseNullValueIfEditorEmpty().RaiseChangePlaceholderColor(); textEditTabDSubheader17.EnableSelectAll().RaiseNullValueIfEditorEmpty().RaiseChangePlaceholderColor(); Application.DoEvents(); clipartEditContainer1.Init(ImageClipartObject.FromImage(CustomTabInfo.Clipart1Image), CustomTabInfo.Clipart1Configuration, TabPageContainer.ParentControl); clipartEditContainer1.EditValueChanged += OnEditValueChanged; clipartEditContainer2.Init(ImageClipartObject.FromImage(CustomTabInfo.Clipart2Image), CustomTabInfo.Clipart2Configuration, TabPageContainer.ParentControl); clipartEditContainer2.EditValueChanged += OnEditValueChanged; clipartEditContainer3.Init(ImageClipartObject.FromImage(CustomTabInfo.Clipart3Image), CustomTabInfo.Clipart3Configuration, TabPageContainer.ParentControl); clipartEditContainer3.EditValueChanged += OnEditValueChanged; comboBoxEditSlideHeader.Properties.Items.Clear(); comboBoxEditSlideHeader.Properties.Items.AddRange(CustomTabInfo.HeadersItems .Where(item => !item.IsPlaceholder).ToArray()); comboBoxEditSlideHeader.Properties.NullText = CustomTabInfo.HeadersItems.FirstOrDefault(h => h.IsPlaceholder)?.Value ?? "Select or type"; textEditTabDSubheader1.Properties.NullText = CustomTabInfo.SubHeader1Placeholder ?? textEditTabDSubheader1.Properties.NullText; textEditTabDSubheader3.Properties.NullText = CustomTabInfo.SubHeader3Placeholder ?? textEditTabDSubheader3.Properties.NullText; textEditTabDSubheader5.Properties.NullText = CustomTabInfo.SubHeader5Placeholder ?? textEditTabDSubheader5.Properties.NullText; textEditTabDSubheader7.Properties.NullText = CustomTabInfo.SubHeader7Placeholder ?? textEditTabDSubheader7.Properties.NullText; textEditTabDSubheader9.Properties.NullText = CustomTabInfo.SubHeader9Placeholder ?? textEditTabDSubheader9.Properties.NullText; textEditTabDSubheader11.Properties.NullText = CustomTabInfo.SubHeader11Placeholder ?? textEditTabDSubheader11.Properties.NullText; textEditTabDSubheader13.Properties.NullText = CustomTabInfo.SubHeader13Placeholder ?? textEditTabDSubheader13.Properties.NullText; textEditTabDSubheader14.Properties.NullText = CustomTabInfo.SubHeader14Placeholder ?? textEditTabDSubheader14.Properties.NullText; textEditTabDSubheader16.Properties.NullText = CustomTabInfo.SubHeader16Placeholder ?? textEditTabDSubheader16.Properties.NullText; textEditTabDSubheader17.Properties.NullText = CustomTabInfo.SubHeader17Placeholder ?? textEditTabDSubheader17.Properties.NullText; Application.DoEvents(); }
protected override OutputDataPackage GetOutputData() { var outputDataPackage = new OutputDataPackage(); outputDataPackage.Theme = SelectedTheme; var clipart1 = SlideContainer.EditedContent.GoalsState.TabB.Clipart1 ?? ImageClipartObject.FromImage(CustomTabInfo.Clipart1Image); if (clipart1 != null) { clipart1.OutputBackground = true; outputDataPackage.ClipartItems.Add("SHIFT04BCLIPART1", clipart1); } var clipart2 = SlideContainer.EditedContent.GoalsState.TabB.Clipart2 ?? ImageClipartObject.FromImage(CustomTabInfo.Clipart2Image); if (clipart2 != null) { outputDataPackage.ClipartItems.Add("SHIFT04BCLIPART2", clipart2); } var clipart3 = SlideContainer.EditedContent.GoalsState.TabB.Clipart3 ?? ImageClipartObject.FromImage(CustomTabInfo.Clipart3Image); if (clipart3 != null) { outputDataPackage.ClipartItems.Add("SHIFT04BCLIPART3", clipart3); } var slideHeader = (SlideContainer.EditedContent.GoalsState.TabB.SlideHeader ?? CustomTabInfo.HeadersItems.FirstOrDefault(h => h.IsDefault))?.Value; var combos = new[] { (SlideContainer.EditedContent.GoalsState.TabB.MemoPopup1 ?? CustomTabInfo.MemoPopup1DefaultItem)?.Value, (SlideContainer.EditedContent.GoalsState.TabB.MemoPopup2 ?? CustomTabInfo.MemoPopup2DefaultItem)?.Value, (SlideContainer.EditedContent.GoalsState.TabB.MemoPopup3 ?? CustomTabInfo.MemoPopup3DefaultItem)?.Value, } .Where(item => !String.IsNullOrWhiteSpace(item)) .ToList(); outputDataPackage.TemplateName = MasterWizardManager.Instance.SelectedWizard.GetShiftGoalsFile("014_goals_ihm.pptx"); outputDataPackage.TextItems.Add("SHIFT04BHeader".ToUpper(), slideHeader); outputDataPackage.TextItems.Add("SHIFT04BMULTIBOX1".ToUpper(), combos.ElementAtOrDefault(0)); outputDataPackage.TextItems.Add("SHIFT04BMULTIBOX2".ToUpper(), combos.ElementAtOrDefault(1)); outputDataPackage.TextItems.Add("SHIFT04BMULTIBOX3".ToUpper(), combos.ElementAtOrDefault(2)); return(outputDataPackage); }
private void SelectPreviouseItem() { var imageFilePath = TabInfo.ImageFiles .FirstOrDefault(item => _currentClipartObject == null || String.Equals(_currentClipartObject.FilePath, item, StringComparison.OrdinalIgnoreCase)); var currentItemIndex = TabInfo.ImageFiles.IndexOf(imageFilePath); var nextImageFilePath = TabInfo.ImageFiles.ElementAtOrDefault(currentItemIndex - 1 >= 0 ? currentItemIndex - 1 : TabInfo.ImageFiles.Count - 1); _currentClipartObject = ImageClipartObject.FromFile(nextImageFilePath); _allowHandleEvents = false; clipartEditContainer.LoadData(_currentClipartObject); _allowHandleEvents = true; RaiseEditValueChanged(); }
private void SelectItemFromList() { using (var form = new FormImageList()) { form.LoadData(TabInfo.ImageFiles, (_currentClipartObject ?? _defaultClipartObject)?.FilePath); if (form.ShowDialog() == DialogResult.OK) { _currentClipartObject = ImageClipartObject.FromFile(form.SelectedFile); _allowHandleEvents = false; clipartEditContainer.LoadData(_currentClipartObject); _allowHandleEvents = true; RaiseEditValueChanged(); } } }
public ContractTabDControl(IChildTabPageContainer slideContainer, ShiftChildTabInfo tabInfo) : base(slideContainer, tabInfo) { InitializeComponent(); comboBoxEditUserName.EnableSelectAll().RaiseNullValueIfEditorEmpty().AssignConfiguration(CustomTabInfo.EditorNameConfiguration); textEditUserDescription.EnableSelectAll().RaiseNullValueIfEditorEmpty().AssignConfiguration(CustomTabInfo.EditorDescriptionConfiguration); textEditUserEmail.EnableSelectAll().RaiseNullValueIfEditorEmpty().AssignConfiguration(CustomTabInfo.EditorEmailConfiguration); textEditUserPhone.EnableSelectAll().RaiseNullValueIfEditorEmpty().AssignConfiguration(CustomTabInfo.EditorPhoneConfiguration); comboBoxEditUserName.Properties.Items.Clear(); comboBoxEditUserName.Properties.Items.AddRange(CustomTabInfo.UserList); clipartEditContainer2.Init(ImageClipartObject.FromImage(CustomTabInfo.Clipart2Image), CustomTabInfo.Clipart2Configuration, TabPageContainer.ParentControl); clipartEditContainer2.EditValueChanged += OnEditValueChanged; clipartEditContainer3.Init(ImageClipartObject.FromImage(CustomTabInfo.Clipart3Image), CustomTabInfo.Clipart3Configuration, TabPageContainer.ParentControl); clipartEditContainer3.EditValueChanged += OnEditValueChanged; }
protected override OutputDataPackage GetOutputData() { var outputDataPackage = new OutputDataPackage(); outputDataPackage.Theme = SelectedTheme; var clipart1 = SlideContainer.EditedContent.AgendaState.TabB.Clipart1 ?? ImageClipartObject.FromImage(CustomTabInfo.Clipart1Image); if (clipart1 != null) { outputDataPackage.ClipartItems.Add("SHIFT03BCLIPART1", clipart1); } var slideHeader = (SlideContainer.EditedContent.AgendaState.TabB.SlideHeader ?? CustomTabInfo.HeadersItems.FirstOrDefault(h => h.IsDefault))?.Value; var combos = new[] { (SlideContainer.EditedContent.AgendaState.TabB.Combo1 ?? CustomTabInfo.Combo1Items.FirstOrDefault(h => h.IsDefault))?.Value, (SlideContainer.EditedContent.AgendaState.TabB.Combo2 ?? CustomTabInfo.Combo2Items.FirstOrDefault(h => h.IsDefault))?.Value, (SlideContainer.EditedContent.AgendaState.TabB.Combo3 ?? CustomTabInfo.Combo3Items.FirstOrDefault(h => h.IsDefault))?.Value, (SlideContainer.EditedContent.AgendaState.TabB.Combo4 ?? CustomTabInfo.Combo4Items.FirstOrDefault(h => h.IsDefault))?.Value, (SlideContainer.EditedContent.AgendaState.TabB.Combo5 ?? CustomTabInfo.Combo5Items.FirstOrDefault(h => h.IsDefault))?.Value, (SlideContainer.EditedContent.AgendaState.TabB.Combo6 ?? CustomTabInfo.Combo6Items.FirstOrDefault(h => h.IsDefault))?.Value, (SlideContainer.EditedContent.AgendaState.TabB.Combo7 ?? CustomTabInfo.Combo7Items.FirstOrDefault(h => h.IsDefault))?.Value, (SlideContainer.EditedContent.AgendaState.TabB.Combo8 ?? CustomTabInfo.Combo8Items.FirstOrDefault(h => h.IsDefault))?.Value, } .Where(item => !String.IsNullOrWhiteSpace(item)) .ToList(); outputDataPackage.TemplateName = MasterWizardManager.Instance.SelectedWizard.GetShiftAgendaFile("010_agenda_ihm.pptx"); outputDataPackage.TextItems.Add("SHIFT03BHeader".ToUpper(), slideHeader); outputDataPackage.TextItems.Add("SHIFT03BCOMBO1".ToUpper(), combos.ElementAtOrDefault(0)); outputDataPackage.TextItems.Add("SHIFT03BCOMBO2".ToUpper(), combos.ElementAtOrDefault(1)); outputDataPackage.TextItems.Add("SHIFT03BCOMBO3".ToUpper(), combos.ElementAtOrDefault(2)); outputDataPackage.TextItems.Add("SHIFT03BCOMBO4".ToUpper(), combos.ElementAtOrDefault(3)); outputDataPackage.TextItems.Add("SHIFT03BCOMBO5".ToUpper(), combos.ElementAtOrDefault(4)); outputDataPackage.TextItems.Add("SHIFT03BCOMBO6".ToUpper(), combos.ElementAtOrDefault(5)); outputDataPackage.TextItems.Add("SHIFT03BCOMBO7".ToUpper(), combos.ElementAtOrDefault(6)); outputDataPackage.TextItems.Add("SHIFT03BCOMBO8".ToUpper(), combos.ElementAtOrDefault(7)); return(outputDataPackage); }
protected override OutputDataPackage GetOutputData() { var outputDataPackage = new OutputDataPackage(); outputDataPackage.Theme = SelectedTheme; var clipart1 = SlideContainer.EditedContent.IntroState.TabC.Clipart1 ?? ImageClipartObject.FromImage(CustomTabInfo.Clipart1Image); if (clipart1 != null) { outputDataPackage.ClipartItems.Add("SHIFT02CCLIPART1", clipart1); } var clipart2 = SlideContainer.EditedContent.IntroState.TabC.Clipart2 ?? ImageClipartObject.FromImage(CustomTabInfo.Clipart2Image); if (clipart2 != null) { outputDataPackage.ClipartItems.Add("SHIFT02CCLIPART2", clipart2); } var clipart3 = SlideContainer.EditedContent.IntroState.TabC.Clipart3 ?? ImageClipartObject.FromImage(CustomTabInfo.Clipart3Image); if (clipart3 != null) { outputDataPackage.ClipartItems.Add("SHIFT02CCLIPART3", clipart3); } var clipart4 = SlideContainer.EditedContent.IntroState.TabC.Clipart4 ?? ImageClipartObject.FromImage(CustomTabInfo.Clipart4Image); if (clipart4 != null) { outputDataPackage.ClipartItems.Add("SHIFT02CCLIPART4", clipart4); } var slideHeader = (SlideContainer.EditedContent.IntroState.TabC.SlideHeader ?? CustomTabInfo.HeadersItems.FirstOrDefault(h => h.IsDefault))?.Value; outputDataPackage.TemplateName = MasterWizardManager.Instance.SelectedWizard.GetShiftIntroFile("007_intro_boutique.pptx"); outputDataPackage.TextItems.Add("SHIFT02CHeader".ToUpper(), slideHeader); return(outputDataPackage); }
protected override OutputDataPackage GetOutputData() { var outputDataPackage = new OutputDataPackage(); outputDataPackage.Theme = SelectedTheme; var clipart1 = SlideContainer.EditedContent.CBCState.TabF.Clipart1 ?? ImageClipartObject.FromImage(CustomTabInfo.Clipart1Image); if (clipart1 != null) { outputDataPackage.ClipartItems.Add("SHIFT08FCLIPART1", clipart1); } var clipart2 = SlideContainer.EditedContent.CBCState.TabF.Clipart2 ?? ImageClipartObject.FromImage(CustomTabInfo.Clipart2Image); if (clipart2 != null) { outputDataPackage.ClipartItems.Add("SHIFT08FCLIPART2", clipart2); } outputDataPackage.TemplateName = MasterWizardManager.Instance.SelectedWizard.GetShiftCBCFile("054a_cbc_west_palm.pptx"); outputDataPackage.TextItems.Add("SHIFT08FHEADER".ToUpper(), (SlideContainer.EditedContent.CBCState.TabF.SlideHeader ?? CustomTabInfo.HeadersItems.FirstOrDefault(h => h.IsDefault))?.Value); outputDataPackage.TextItems.Add("SHIFT08FCOMBO1".ToUpper(), (SlideContainer.EditedContent.CBCState.TabF.Combo1 ?? CustomTabInfo.Combo1Items.FirstOrDefault(item => item.IsDefault && !item.IsPlaceholder))?.Value); var subheaders = new[] { SlideContainer.EditedContent.CBCState.TabF.Subheader1 ?? CustomTabInfo.SubHeader1DefaultValue, SlideContainer.EditedContent.CBCState.TabF.Subheader2 ?? CustomTabInfo.SubHeader2DefaultValue, SlideContainer.EditedContent.CBCState.TabF.Subheader3 ?? CustomTabInfo.SubHeader3DefaultValue, SlideContainer.EditedContent.CBCState.TabF.Subheader4 ?? CustomTabInfo.SubHeader4DefaultValue, SlideContainer.EditedContent.CBCState.TabF.Subheader5 ?? CustomTabInfo.SubHeader5DefaultValue } .Where(item => !String.IsNullOrWhiteSpace(item)) .ToList(); for (int i = 0; i < 5; i++) { outputDataPackage.TextItems.Add(String.Format("SHIFT08FSUBHEADER{0}", i + 1).ToUpper(), subheaders.ElementAtOrDefault(i)); } return(outputDataPackage); }
protected override OutputDataPackage GetOutputData() { var outputDataPackage = new OutputDataPackage(); outputDataPackage.Theme = TabPageContainer.ParentControl.SelectedTheme; var clipart = SlideContainer.EditedContent.FishingState.TabA.Clipart1 ?? ImageClipartObject.FromImage(CustomTabInfo.Clipart1Image); if (clipart != null) { outputDataPackage.ClipartItems.Add("CP03ACLIPART1", clipart); } var slideHeader = (SlideContainer.EditedContent.FishingState.TabA.SlideHeader ?? CustomTabInfo.HeadersItems.FirstOrDefault(h => h.IsDefault))?.Value; var subHeaders = new[] { SlideContainer.EditedContent.FishingState.TabA.Subheader1 ?? CustomTabInfo.SubHeader1DefaultValue, SlideContainer.EditedContent.FishingState.TabA.Subheader2 ?? CustomTabInfo.SubHeader2DefaultValue } .Where(item => !String.IsNullOrWhiteSpace(item)) .ToList(); switch (subHeaders.Count) { case 1: outputDataPackage.TemplateName = MasterWizardManager.Instance.SelectedWizard.GetStarFishingFile("CP03A-1.pptx"); break; case 2: outputDataPackage.TemplateName = MasterWizardManager.Instance.SelectedWizard.GetStarFishingFile("CP03A-2.pptx"); break; default: outputDataPackage.TemplateName = MasterWizardManager.Instance.SelectedWizard.GetStarFishingFile("CP03A-1.pptx"); break; } outputDataPackage.TextItems.Add("CP03AHEADER".ToUpper(), slideHeader); outputDataPackage.TextItems.Add("HEADER".ToUpper(), slideHeader); outputDataPackage.TextItems.Add("CP03ASubheader1".ToUpper(), subHeaders.ElementAtOrDefault(0)); outputDataPackage.TextItems.Add("CP03ASubheader2".ToUpper(), subHeaders.ElementAtOrDefault(1)); return(outputDataPackage); }