готовая 4 лаба

This commit is contained in:
platoff aeeee 2024-05-08 10:44:38 +04:00
parent de1eb8e89b
commit 4094d029ef
2 changed files with 6 additions and 5 deletions

View File

@ -8,6 +8,7 @@ using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
using DocumentFormat.OpenXml.Vml;
namespace FurnitureAssemblyBusinessLogic.OfficePackage.Implements namespace FurnitureAssemblyBusinessLogic.OfficePackage.Implements
{ {
@ -121,6 +122,8 @@ namespace FurnitureAssemblyBusinessLogic.OfficePackage.Implements
if (run.Item2.Bold) if (run.Item2.Bold)
{ {
// properties.AppendChild(new Italic());
properties.AppendChild(new Bold()); properties.AppendChild(new Bold());
} }
@ -138,7 +141,7 @@ namespace FurnitureAssemblyBusinessLogic.OfficePackage.Implements
_docBody.AppendChild(docParagraph); _docBody.AppendChild(docParagraph);
} }
// Метод сохранения документа // сохранение документа
protected override void SaveWord(WordInfo info) protected override void SaveWord(WordInfo info)
{ {
if (_docBody == null || _wordDocument == null) if (_docBody == null || _wordDocument == null)
@ -146,10 +149,10 @@ namespace FurnitureAssemblyBusinessLogic.OfficePackage.Implements
return; return;
} }
// Вставляем информацию по секциям (смотри, что является входным параметром) // вставляем инфу по секциям (настройка страницы)
_docBody.AppendChild(CreateSectionProperties()); _docBody.AppendChild(CreateSectionProperties());
// Сохраняем документ // сохраняем
_wordDocument.MainDocumentPart!.Document.Save(); _wordDocument.MainDocumentPart!.Document.Save();
_wordDocument.Dispose(); _wordDocument.Dispose();

View File

@ -118,7 +118,5 @@ namespace FurnitureAssemblyView
} }
} }
} }
} }
} }