/// <summary> /// Adding PresentationExtensionList element. /// </summary> /// <param name="filePath">Tartget file path</param> /// <param name="log">Logger</param> public void AddElement(string filePath, VerifiableLog log) { using (PresentationDocument package = PresentationDocument.Open(filePath, true)) { //Adding Guide element A.RgbColorModelHex rgbColorModelHex1 = new A.RgbColorModelHex() { Val = this.Color3 }; P15.ColorType colorType1 = new P15.ColorType(); P15.ExtendedGuide ExtendedGuide1 = new P15.ExtendedGuide() { Id = this.Id3, Position = this.position3, Orientation = this.directionValues2 }; P15.SlideGuideList slideGuideList = new P15.SlideGuideList(); PresentationExtension presentationExtension1 = new PresentationExtension() { Uri = this.SldExtUri }; PresentationExtensionList presentationExtensionList = new PresentationExtensionList(); colorType1.AppendChild<A.RgbColorModelHex>(rgbColorModelHex1); log.Pass("Added RgbColorModelHex element. It SlideGuideList."); ExtendedGuide1.AppendChild<P15.ColorType>(colorType1); log.Pass("Added ColorType element. It SlideGuideList."); slideGuideList.AppendChild<P15.ExtendedGuide>(ExtendedGuide1); log.Pass("Added ExtendedGuide element. It SlideGuideList."); presentationExtension1.AppendChild<P15.SlideGuideList>(slideGuideList); log.Pass("Added SlideGuideList element. It SlideGuideList."); presentationExtensionList.AppendChild<PresentationExtension>(presentationExtension1); log.Pass("Added PresentationExtension element. It SlideGuideList."); //Adding NotesGuide element A.RgbColorModelHex rgbColorModelHex2 = new A.RgbColorModelHex() { Val = this.Color4 }; P15.ColorType colorType2 = new P15.ColorType(); P15.ExtendedGuide ExtendedGuide2 = new P15.ExtendedGuide() { Id = this.Id4, Position = this.position4, Orientation = this.directionValues2 }; P15.NotesGuideList NotesGuideList = new P15.NotesGuideList(); PresentationExtension presentationExtension2 = new PresentationExtension() { Uri = this.NotesExtUri }; colorType2.AppendChild<A.RgbColorModelHex>(rgbColorModelHex2); log.Pass("Added RgbColorModelHex element. It SlideGuideList."); ExtendedGuide2.AppendChild<P15.ColorType>(colorType2); log.Pass("Added ColorType element. It SlideGuideList."); NotesGuideList.AppendChild<P15.ExtendedGuide>(ExtendedGuide2); log.Pass("Added ExtendedGuide element. It SlideGuideList."); presentationExtension2.AppendChild<P15.NotesGuideList>(NotesGuideList); log.Pass("Added SlideGuideList element. It SlideGuideList."); presentationExtensionList.AppendChild<PresentationExtension>(presentationExtension2); log.Pass("Added PresentationExtension element. It SlideGuideList."); package.PresentationPart.Presentation.Append(presentationExtensionList); log.Pass("Added PresentationExtensionList element. It SlideGuideList."); } }
/// <summary> /// Adding PresentationExtensionList element. /// </summary> /// <param name="filePath">Tartget file path</param> /// <param name="log">Logger</param> public void AddElement(string filePath, VerifiableLog log) { using (PresentationDocument package = PresentationDocument.Open(filePath, true)) { //Adding Guide element A.RgbColorModelHex rgbColorModelHex1 = new A.RgbColorModelHex() { Val = this.Color3 }; P15.ColorType colorType1 = new P15.ColorType(); P15.ExtendedGuide ExtendedGuide1 = new P15.ExtendedGuide() { Id = this.Id3, Position = this.position3, Orientation = this.directionValues2 }; P15.SlideGuideList slideGuideList = new P15.SlideGuideList(); PresentationExtension presentationExtension1 = new PresentationExtension() { Uri = this.SldExtUri }; PresentationExtensionList presentationExtensionList = new PresentationExtensionList(); colorType1.AppendChild <A.RgbColorModelHex>(rgbColorModelHex1); log.Pass("Added RgbColorModelHex element. It SlideGuideList."); ExtendedGuide1.AppendChild <P15.ColorType>(colorType1); log.Pass("Added ColorType element. It SlideGuideList."); slideGuideList.AppendChild <P15.ExtendedGuide>(ExtendedGuide1); log.Pass("Added ExtendedGuide element. It SlideGuideList."); presentationExtension1.AppendChild <P15.SlideGuideList>(slideGuideList); log.Pass("Added SlideGuideList element. It SlideGuideList."); presentationExtensionList.AppendChild <PresentationExtension>(presentationExtension1); log.Pass("Added PresentationExtension element. It SlideGuideList."); //Adding NotesGuide element A.RgbColorModelHex rgbColorModelHex2 = new A.RgbColorModelHex() { Val = this.Color4 }; P15.ColorType colorType2 = new P15.ColorType(); P15.ExtendedGuide ExtendedGuide2 = new P15.ExtendedGuide() { Id = this.Id4, Position = this.position4, Orientation = this.directionValues2 }; P15.NotesGuideList NotesGuideList = new P15.NotesGuideList(); PresentationExtension presentationExtension2 = new PresentationExtension() { Uri = this.NotesExtUri }; colorType2.AppendChild <A.RgbColorModelHex>(rgbColorModelHex2); log.Pass("Added RgbColorModelHex element. It SlideGuideList."); ExtendedGuide2.AppendChild <P15.ColorType>(colorType2); log.Pass("Added ColorType element. It SlideGuideList."); NotesGuideList.AppendChild <P15.ExtendedGuide>(ExtendedGuide2); log.Pass("Added ExtendedGuide element. It SlideGuideList."); presentationExtension2.AppendChild <P15.NotesGuideList>(NotesGuideList); log.Pass("Added SlideGuideList element. It SlideGuideList."); presentationExtensionList.AppendChild <PresentationExtension>(presentationExtension2); log.Pass("Added PresentationExtension element. It SlideGuideList."); package.PresentationPart.Presentation.Append(presentationExtensionList); log.Pass("Added PresentationExtensionList element. It SlideGuideList."); } }