Exemplo n.º 1
0
        internal void Process(TableProperties tableProperties, DocxTableProperties docxProperties, DocxNode node)
        {
            ProcessWidth(node, tableProperties);

            ProcessTableBorder(node, docxProperties, tableProperties);
            ProcessTableCellMargin(docxProperties, tableProperties);
        }
Exemplo n.º 2
0
        private void AppendMargins(TableProperties tableProp, int topMargin, int leftMargin, int bottomMargin, int rightMargin)
        {
            var tableCellMarginDefault = new TableCellMarginDefault();
            var tableCellTopMargin     = new TopMargin()
            {
                Width = topMargin.ToString(), Type = TableWidthUnitValues.Dxa
            };
            var tableCellLeftMargin = new TableCellLeftMargin()
            {
                Width = (Int16Value)leftMargin, Type = TableWidthValues.Dxa
            };
            var tableCellBottomMargin = new BottomMargin()
            {
                Width = bottomMargin.ToString(), Type = TableWidthUnitValues.Dxa
            };
            var tableCellRightMargin = new TableCellRightMargin()
            {
                Width = (Int16Value)rightMargin, Type = TableWidthValues.Dxa
            };

            tableCellMarginDefault.Append(tableCellTopMargin);
            tableCellMarginDefault.Append(tableCellLeftMargin);
            tableCellMarginDefault.Append(tableCellBottomMargin);
            tableCellMarginDefault.Append(tableCellRightMargin);

            tableProp.Append(tableCellMarginDefault);
        }
        public IEnumerator GetRootItem_Should_ReturnFirstChildTransform_When_TableBodyHasAtLeastOneChild()
        {
            /*var script = CreateFullyInitializedScript();
             * script.gameObject.SetActive(true);*/
            var gameObjectUnderTest = CreateInactiveGameObject();
            var scriptUnderTest     = gameObjectUnderTest.AddComponent <TableEditor>();
            var tableData           = CreateDummyTableData();

            var props = new TableProperties();

            _properties.SetValue(scriptUnderTest, props);
            _tableData.SetValue(props, tableData);
            _tableBody.SetValue(props, new GameObject().transform);
            _style.SetValue(props, ScriptableObject.CreateInstance <TableStyle>());


            gameObjectUnderTest.SetActive(true);

            new GameObject().transform.parent = _tableBody.GetValue(props) as Transform;

            var result = _getRootItem.Invoke(scriptUnderTest, null) as Transform;

            Assert.IsNotNull(result);
            yield return(null);
        }
Exemplo n.º 4
0
        private void ProcessWidth(DocxNode node, TableProperties tableProperties)
        {
            string width      = node.ExtractAttributeValue(DocxUnits.width);
            string styleWidth = node.ExtractStyleValue(DocxUnits.width);

            if (!string.IsNullOrEmpty(styleWidth))
            {
                width = styleWidth;
            }

            if (!string.IsNullOrEmpty(width))
            {
                decimal value;
                TableWidthUnitValues unit;

                if (DocxUnits.TableUnitsFromStyle(width, out value, out unit))
                {
                    TableWidth tableWidth = new TableWidth()
                    {
                        Width = value.ToString(),
                        Type  = unit
                    };
                    tableProperties.Append(tableWidth);
                }
            }
        }
        private object GetTableTemplateProperty(string domainID, string columnName, TableProperties propertyName)
        {
            if (columnName == null)
            {
                throw new ArgumentNullException(nameof(columnName));
            }

            var template       = this.GetDomainHost <ITableTemplate>(domainID);
            var authentication = this.Context.GetAuthentication(this);

            return(template.Dispatcher.Invoke(() =>
            {
                if (propertyName == TableProperties.TableName)
                {
                    return (object)template.TableName;
                }
                else if (propertyName == TableProperties.Tags)
                {
                    return (object)(string)template.Tags;
                }
                else if (propertyName == TableProperties.Comment)
                {
                    return (object)template.Comment;
                }
                else
                {
                    throw new NotImplementedException();
                }
            }));
        }
Exemplo n.º 6
0
        public static CdmDocumentDefinition FromObject(CdmCorpusContext ctx, string nameSpace, string path, TableEntity table)
        {
            if (table == null || table.Type != SASEntityType.TABLE)
            {
                return(null);
            }

            TableProperties teProperties = ((JToken)table.Properties).ToObject <TableProperties>();
            var             doc          = ctx.Corpus.MakeObject <CdmDocumentDefinition>(CdmObjectType.DocumentDef, table.Name);

            doc.FolderPath = path;
            doc.Namespace  = nameSpace;

            if (teProperties.Properties != null)
            {
                if (teProperties.Properties.ContainsKey("cdm:imports"))
                {
                    foreach (var importObj in teProperties.Properties["cdm:imports"].ToObject <List <Import> >())
                    {
                        doc.Imports.Add(ImportPersistence.FromData(ctx, importObj));
                    }
                }
            }

            doc.Definitions.Add(EntityPersistence.FromData(ctx, table.Name, table));
            return(doc);
        }
        private CustomTableEditor CreateFullyInitializedScript()
        {
            var gameObjectUnderTest = CreateInactiveGameObject();

            var scriptUnderTest = gameObjectUnderTest.AddComponent <CustomTableEditor>();
            var tableData       = CreateDummyTableData();

            var tableStyle = CreateFakeTableStyle();

            // This is another good example for my tutorial about good & bad code design!
            // I would like to work with a FakeTableStyle implementing ITableStyle, like in TableTest.cs
            // It would reduce coupling and makes testing the condition within the unit test below much easier.
            // Unfortunately I have used [SerializeField] private TableStyle _style; within TableEditor.cs
            // When I would use an interface instead, I could connect the Editor with a custom style within the
            // Inspector. So how to solve this dilemma?
            // All serialized fields could be outsourced to an Data-only MonoBehaviour. It could implement an
            // interface and all its getter function could also return interfaces.
            // I will evaluate this hypothesis in the next few days!
            var go = CreateEmptyGameObject();

            var props = new TableProperties();

            _tableData.SetValue(props, tableData);
            _tableBody.SetValue(props, go.transform);
            _style.SetValue(props, tableStyle);
            _properties.SetValue(scriptUnderTest, props);

            return(scriptUnderTest);
        }
Exemplo n.º 8
0
        private Table CreateTable()
        {
            Table table = new Table();

            TableProperties tableProperties = new TableProperties();

            DocumentFormat.OpenXml.Wordprocessing.TableStyle tableStyle = new DocumentFormat.OpenXml.Wordprocessing.TableStyle()
            {
                Val = "TableGrid"
            };
            TableWidth tableWidth = new TableWidth()
            {
                Width = "0", Type = TableWidthUnitValues.Auto
            };
            TableLook tableLook = new TableLook()
            {
                Val              = "04A0",
                FirstRow         = true,
                LastRow          = false,
                FirstColumn      = true,
                LastColumn       = false,
                NoHorizontalBand = false,
                NoVerticalBand   = true
            };

            tableProperties.Append(tableStyle);
            tableProperties.Append(tableWidth);
            tableProperties.Append(tableLook);
            table.Append(tableProperties);
            return(table);
        }
Exemplo n.º 9
0
        public Table GenerateTable(List<string> colwidths, List<string> headers)
        {
            this.colwidths = colwidths;
            Table table1 = new Table();

            TableProperties tableProperties1 = new TableProperties();
            TableWidth tableWidth1 = new TableWidth() { Width = "8750", Type = TableWidthUnitValues.Dxa };
            TableLayout tableLayout1 = new TableLayout() { Type = TableLayoutValues.Fixed };
            TableIndentation tableIndentation1 = new TableIndentation() { Width = 108, Type = TableWidthUnitValues.Dxa };
            TableLook tableLook1 = new TableLook() { Val = "04A0" };

            tableProperties1.Append(tableWidth1);
            tableProperties1.Append(tableIndentation1);
            tableProperties1.Append(tableLayout1);
            tableProperties1.Append(tableLook1);

            TableGrid tableGrid1 = new TableGrid();
            GridColumn gridColumn;

            foreach (string cw in colwidths) {
                gridColumn = new GridColumn() { Width = cw };
                tableGrid1.Append(gridColumn);
            }

            TableRow headerRow = generateHeaderRow(headers);
            table1.Append(tableProperties1);
            table1.Append(tableGrid1);
            table1.Append(headerRow);

            return table1;
        }
Exemplo n.º 10
0
        //判断表格居中 居中为true
        public bool detecttablecenter(DocumentFormat.OpenXml.Wordprocessing.Table table, string tbsJustification, WordprocessingDocument docx)
        {
            //居中检测
            TableProperties tpr = table.GetFirstChild <TableProperties>();

            if (tpr != null)
            {
                if (tpr.GetFirstChild <TableJustification>() != null)
                {
                    TableJustification tj = tpr.GetFirstChild <TableJustification>();
                    if (tj.Val.ToString() != tbsJustification && tj.Val.ToString() != null)
                    {
                        return(false);
                    }
                }
                else
                {
                    if (tpr.TableStyle != null)
                    {
                        TableStyle style_id = tpr.TableStyle;
                        if (style_id != null)//从style中获取
                        {
                            string jc = Util.getFromStyle(docx, style_id.Val, 1);
                            if (jc != null && jc.ToString() != tbsJustification)
                            {
                                return(false);
                            }
                        }
                    }
                }
            }
            return(true);
        }
Exemplo n.º 11
0
        private void ProcessTableCellMargin(DocxTableProperties docxProperties, TableProperties tableProperties)
        {
            if (docxProperties.CellPadding != null)
            {
                TableCellMarginDefault cellMargin = new TableCellMarginDefault();
                Int16 width = (Int16)DocxUnits.GetDxaFromPixel(docxProperties.CellPadding.Value);

                cellMargin.TableCellLeftMargin = new TableCellLeftMargin()
                {
                    Width = width,
                    Type  = TableWidthValues.Dxa
                };

                cellMargin.TopMargin = new TopMargin()
                {
                    Width = width.ToString(),
                    Type  = TableWidthUnitValues.Dxa
                };

                cellMargin.TableCellRightMargin = new TableCellRightMargin()
                {
                    Width = width,
                    Type  = TableWidthValues.Dxa
                };

                cellMargin.BottomMargin = new BottomMargin()
                {
                    Width = width.ToString(),
                    Type  = TableWidthUnitValues.Dxa
                };

                tableProperties.Append(cellMargin);
            }
        }
Exemplo n.º 12
0
        /// <summary>
        /// Add a new table to the document
        /// </summary>
        /// <returns></returns>
        private Table AddTable()
        {
            // Create an empty table.
            var table = new Table();

            OpenXmlHelper.AddTableStyle(_wordDocument, "GridTable4-Accent1");

            var tableProps = new TableProperties();
            var tableStyle = new TableStyle()
            {
                Val = "GridTable4-Accent1"
            };
            var tableWidth = new TableWidth()
            {
                Width = "0", Type = TableWidthUnitValues.Auto
            };
            var tableLook = new TableLook()
            {
                Val = "04A0", FirstRow = true, LastRow = false, FirstColumn = true, LastColumn = false, NoHorizontalBand = false, NoVerticalBand = true
            };

            tableProps.Append(tableStyle);
            tableProps.Append(tableWidth);
            tableProps.Append(tableLook);

            // Append the TableProperties object to the empty table.
            table.Append(tableProps);

            return(table);
        }
        //.....................................................................
        /// <summary>
        ///
        /// </summary>
        /// <returns></returns>
        private TableProperties MakeTableProperties( )
        {
            TableProperties tableProperties1 = new TableProperties( );

            TableStyle tableStyle1 = new TableStyle( )
            {
                Val = "a3"
            };

            TableWidth tableWidth1 = new TableWidth( )
            {
                Width = "0", Type = TableWidthUnitValues.Auto
            };

            TableLook tableLook1 = new TableLook( )
            {
                Val = "04A0", FirstRow = true, LastRow = false, FirstColumn = true, LastColumn = false, NoHorizontalBand = false, NoVerticalBand = true
            };

            tableProperties1.Append(tableStyle1);
            tableProperties1.Append(tableWidth1);
            tableProperties1.Append(tableLook1);

            return(tableProperties1);
        }
Exemplo n.º 14
0
        internal void ApplyTableProperties(Table table, DocxNode node)
        {
            TableProperties tableProp = new TableProperties();

            TableStyle tableStyle = new TableStyle()
            {
                Val = DocxTableProperties.tableGridName
            };

            tableProp.Append(tableStyle);

            DocxTableStyle style = new DocxTableStyle();

            style.Process(tableProp, this, node);

            table.AppendChild(tableProp);

            int count = GetTdCount(node);

            rowSpanInfo = new Dictionary <int, int>();

            if (count > 0)
            {
                TableGrid tg = new TableGrid();

                for (int i = 0; i < count; i++)
                {
                    rowSpanInfo.Add(i, 0);
                    tg.AppendChild(new GridColumn());
                }

                table.AppendChild(tg);
            }
        }
Exemplo n.º 15
0
        private Table CreateFilledTable()
        {
            //Create table with border(page's width)
            Table           table           = new Table();
            TableProperties tableProperties = new TableProperties();
            TableStyle      tableStyle      = new TableStyle()
            {
                Val = "TableGrid"
            };
            TableWidth tableWidth = new TableWidth()
            {
                Width = "5000", Type = TableWidthUnitValues.Pct
            };
            TableLook tableLook = new TableLook()
            {
                Val              = "04A0",
                FirstRow         = true,
                LastRow          = false,
                FirstColumn      = true,
                LastColumn       = false,
                NoHorizontalBand = false,
                NoVerticalBand   = true
            };

            tableProperties.Append(tableStyle);
            tableProperties.Append(tableWidth);
            tableProperties.Append(tableLook);
            table.Append(tableProperties);
            return(table);
        }
Exemplo n.º 16
0
        public DocumentTable(WordprocessingDocument document, params int[] columnWidths)
        {
            this._columnWidths = columnWidths;
            _document          = document;

            _table = new Table();

            var border  = new EnumValue <BorderValues>(BorderValues.BasicThinLines);
            var tblProp = new TableProperties(
                new TableBorders(
                    new TopBorder {
                Val = border, Color = "CCCCCC"
            },
                    new BottomBorder {
                Val = border, Color = "CCCCCC"
            },
                    new LeftBorder {
                Val = border, Color = "CCCCCC"
            },
                    new RightBorder {
                Val = border, Color = "CCCCCC"
            },
                    new InsideHorizontalBorder {
                Val = border, Color = "CCCCCC"
            },
                    new InsideVerticalBorder {
                Val = border, Color = "CCCCCC"
            }
                    )
                );

            _table.AppendChild(tblProp);

            document.MainDocumentPart.Document.Body.Append(_table);
        }
Exemplo n.º 17
0
        public Table CreateTable(int cols, int[] widths)
        {
            Table           table           = new Table();
            TableProperties tableProperties = new TableProperties();
            TableStyle      tableStyle      = new TableStyle()
            {
                Val = "TableGrid"
            };
            TableWidth tableWidth = new TableWidth()
            {
                Width = "0", Type = TableWidthUnitValues.Auto
            };
            TableLook tableLook = new TableLook()
            {
                Val = "04A0"
            };

            tableProperties.Append(tableStyle);
            tableProperties.Append(tableWidth);
            tableProperties.Append(tableLook);
            TableGrid tableGrid = new TableGrid();

            for (int i = 0; i < cols; i++)
            {
                GridColumn gridColumn = new GridColumn()
                {
                    Width = (widths[i] * 102.16).ToString("n0").Replace(",", "")
                };
                tableGrid.Append(gridColumn);
            }
            table.Append(tableProperties);
            table.Append(tableGrid);
            body.Append(table);
            return(table);
        }
        //.....................................................................
        /// <summary>
        ///
        /// </summary>
        /// <param name="wsize">边框的宽度, 8 是一磅的宽度</param>
        /// <returns></returns>
        private TableProperties MakeTableProperties(int wsize)
        {
            TableProperties properties = new TableProperties( );

            TableStyle style = new TableStyle( )
            {
                Val = "a3"
            };

            TableWidth width = new TableWidth( )
            {
                Width = "0", Type = TableWidthUnitValues.Auto
            };

            TableLook look = new TableLook( )
            {
                Val = "04A0", FirstRow = true, LastRow = false, FirstColumn = true, LastColumn = false, NoHorizontalBand = false, NoVerticalBand = true
            };

            properties.Append(style);
            properties.Append(width);
            properties.Append(look);

            if (wsize < 1)
            {
                return(properties);
            }

            properties.Append(this.MakeTableBorders(wsize));

            return(properties);
        }
Exemplo n.º 19
0
        private void SetTableTemplateProperty(string domainID, string columnName, TableProperties propertyName, object value)
        {
            if (columnName == null)
            {
                throw new ArgumentNullException(nameof(columnName));
            }

            var template       = this.GetDomainHost <ITableTemplate>(domainID);
            var authentication = this.Context.GetAuthentication(this);

            template.Dispatcher.Invoke(() =>
            {
                if (propertyName == TableProperties.TableName)
                {
                    template.SetTableName(authentication, (string)value);
                }
                else if (propertyName == TableProperties.Tags)
                {
                    template.SetTags(authentication, (TagInfo)(string)value);
                }
                else if (propertyName == TableProperties.Comment)
                {
                    template.SetComment(authentication, (string)value);
                }
                else
                {
                    throw new NotImplementedException();
                }
            });
        }
        public TableProperties EditTable(IWin32Window owner, TableProperties properties)
        {
            // update UI for edit scenario
            Text          = Res.Get(StringId.TableTableProperties);
            buttonOK.Text = Res.Get(StringId.OKButtonText);
            int verticalSpaceLoss = columnWidthControl.Top - panelRowsAndColumns.Top;

            panelRowsAndColumns.Visible = false;
            columnWidthControl.Top      = panelRowsAndColumns.Top;
            groupBoxSize.Height        -= verticalSpaceLoss;
            groupBoxAppearance.Top     -= verticalSpaceLoss;
            Height -= verticalSpaceLoss;

            // populate the form
            InitializeFormProperties(properties);

            // show the dialog
            if (ShowDialog(owner) == DialogResult.OK)
            {
                return(ReadFormProperties());
            }
            else
            {
                return(null);
            }
        }
Exemplo n.º 21
0
        public void TableAttributeStyleWidth()
        {
            using (MemoryStream mem = new MemoryStream())
            {
                WordDocument doc = new WordDocument(mem);

                doc.Process(new HtmlParser("<table width='50%' style='width:150px'><tr><td>test</td></tr></table>"));

                Assert.IsNotNull(doc.Document.Body);
                Assert.AreEqual(1, doc.Document.Body.ChildElements.Count);

                Word.Table table = doc.Document.Body.ChildElements[0] as Word.Table;

                Assert.IsNotNull(table);
                Assert.AreEqual(3, table.ChildElements.Count);

                TableProperties tableProperties = table.ChildElements[0] as TableProperties;
                Assert.IsNotNull(tableProperties);
                Assert.AreEqual(2, tableProperties.ChildElements.Count);

                TableStyle tableStyle = tableProperties.ChildElements[0] as TableStyle;
                Assert.IsNotNull(tableStyle);
                Assert.AreEqual("TableGrid", tableStyle.Val.Value);

                TableWidth tableWidth = tableProperties.ChildElements[1] as TableWidth;
                Assert.IsNotNull(tableWidth);
                Assert.AreEqual("3000", tableWidth.Width.Value);
                Assert.AreEqual(TableWidthUnitValues.Dxa, tableWidth.Type.Value);

                TableRow row = table.ChildElements[2] as TableRow;

                Assert.IsNotNull(row);
                Assert.AreEqual(1, row.ChildElements.Count);

                TableCell cell = row.ChildElements[0] as TableCell;

                Assert.IsNotNull(cell);
                Assert.AreEqual(1, cell.ChildElements.Count);

                Paragraph para = cell.ChildElements[0] as Paragraph;

                Assert.IsNotNull(para);
                Assert.AreEqual(1, para.ChildElements.Count);

                Run run = para.ChildElements[0] as Run;

                Assert.IsNotNull(run);
                Assert.AreEqual(1, run.ChildElements.Count);

                Word.Text text = run.ChildElements[0] as Word.Text;

                Assert.IsNotNull(text);
                Assert.AreEqual(0, text.ChildElements.Count);
                Assert.AreEqual("test", text.InnerText);

                OpenXmlValidator validator = new OpenXmlValidator();
                var errors = validator.Validate(doc.WordprocessingDocument);
                Assert.AreEqual(0, errors.Count());
            }
        }
Exemplo n.º 22
0
        private TableProperties GenerateTableProperties()
        {
            TableProperties tableProperties1 = new TableProperties();
            TableWidth tableWidth1 = new TableWidth() { Width = "9639", Type = TableWidthUnitValues.Dxa };

            TableBorders tableBorders1 = new TableBorders();
            TopBorder topBorder1 = new TopBorder() { Val = BorderValues.Single, Color = "auto", Size = (UInt32Value)4U, Space = (UInt32Value)0U };
            LeftBorder leftBorder1 = new LeftBorder() { Val = BorderValues.Single, Color = "auto", Size = (UInt32Value)4U, Space = (UInt32Value)0U };
            BottomBorder bottomBorder1 = new BottomBorder() { Val = BorderValues.Single, Color = "auto", Size = (UInt32Value)4U, Space = (UInt32Value)0U };
            RightBorder rightBorder1 = new RightBorder() { Val = BorderValues.Single, Color = "auto", Size = (UInt32Value)4U, Space = (UInt32Value)0U };
            InsideHorizontalBorder insideHorizontalBorder1 = new InsideHorizontalBorder() { Val = BorderValues.Single, Color = "auto", Size = (UInt32Value)4U, Space = (UInt32Value)0U };
            InsideVerticalBorder insideVerticalBorder1 = new InsideVerticalBorder() { Val = BorderValues.Single, Color = "auto", Size = (UInt32Value)4U, Space = (UInt32Value)0U };

            tableBorders1.Append(topBorder1);
            tableBorders1.Append(leftBorder1);
            tableBorders1.Append(bottomBorder1);
            tableBorders1.Append(rightBorder1);
            tableBorders1.Append(insideHorizontalBorder1);
            tableBorders1.Append(insideVerticalBorder1);
            TableLayout tableLayout1 = new TableLayout() { Type = TableLayoutValues.Fixed };
            TableLook tableLook1 = new TableLook() { Val = "04A0" };

            tableProperties1.Append(tableWidth1);
            tableProperties1.Append(tableBorders1);
            tableProperties1.Append(tableLayout1);
            tableProperties1.Append(tableLook1);
            return tableProperties1;
        }
Exemplo n.º 23
0
        private static Table CreateTableWithStyle()
        {
            //create table object
            Table table1 = new Table();

            //define table properties
            TableProperties tableProperties1 = new TableProperties();
            TableStyle      tableStyle1      = new TableStyle()
            {
                Val = "GridTable5Dark-Accent1"
            };
            TableWidth tableWidth1 = new TableWidth()
            {
                Width = "0", Type = TableWidthUnitValues.Auto
            };
            TableLook tableLook1 = new TableLook()
            {
                Val = "04A0"
            };

            //add table styles to properties
            tableProperties1.Append(tableStyle1);
            tableProperties1.Append(tableWidth1);
            tableProperties1.Append(tableLook1);
            table1.Append(tableProperties1);
            return(table1);
        }
Exemplo n.º 24
0
        private void ProcessTableBorder(DocxNode node, DocxTableProperties docxProperties, TableProperties tableProperties)
		{
            string borderStyle = node.ExtractAttributeValue(DocxBorder.borderName);
			
			if (borderStyle == "1")
			{
				TableBorders tableBorders = new TableBorders();
				DocxBorder.ApplyDefaultBorders(tableBorders);
				tableProperties.Append(tableBorders);
			}
			else
			{
                borderStyle = node.ExtractStyleValue(DocxBorder.borderName);
                string leftBorder = node.ExtractStyleValue(DocxBorder.leftBorderName);
                string topBorder = node.ExtractStyleValue(DocxBorder.topBorderName);
                string rightBorder = node.ExtractStyleValue(DocxBorder.rightBorderName);
                string bottomBorder = node.ExtractStyleValue(DocxBorder.bottomBorderName);
				
				TableBorders tableBorders = new TableBorders();
					
				DocxBorder.ApplyBorders(tableBorders, borderStyle, leftBorder, topBorder, 
					rightBorder, bottomBorder, docxProperties.HasDefaultBorder);
				
				if (tableBorders.HasChildren)
				{
					tableProperties.Append(tableBorders);
				}
			}
		}
        internal DocxDocumentTableSchemeBuilder(WordprocessingDocument document, TableProperties contextTableProperties)
            : base(document)
        {
            table = new Table();

            if (contextTableProperties == null)
            {
                var borderType = new EnumValue<BorderValues>(BorderValues.Thick);
                var tblProp = new TableProperties(
                    new TableBorders(
                        new TopBorder {Val = borderType, Size = 1},
                        new BottomBorder {Val = borderType, Size = 1},
                        new LeftBorder {Val = borderType, Size = 1},
                        new RightBorder {Val = borderType, Size = 1},
                        new InsideHorizontalBorder {Val = borderType, Size = 1},
                        new InsideVerticalBorder {Val = borderType, Size = 1}
                        )
                    );
                table.AppendChild(tblProp);
            }
            else
                table.AppendChild(contextTableProperties);

            headerRow = new TableRow();
            table.AppendChild(headerRow);
            Aggregation.Add(table);
        }
Exemplo n.º 26
0
        public Document AddTable(Document document, TableProperties properties)
        {
            if (properties.Students.Count() == 0)
            {
                return(null);
            }

            this.document = OpenDocument(document);
            Word.Range range;

            if (!string.IsNullOrEmpty(properties.Bookmark))
            {
                Word.Bookmark bm = this.document.Bookmarks[properties.Bookmark];
                range = bm.Range;
            }
            else
            {
                range = this.document.Range(0, 0);
            }

            this.document.Tables.Add(range, properties.NumRows, properties.NumColumns);
            CreateTable(properties);
            this.document.Save();
            document.File = SaveDoc();
            return(document);
        }
        /// <summary>
        /// Convert <paramref name="internalTable"/> to a <see cref="Table"/> instance.
        /// </summary>
        /// <param name="internalTable">The <see cref="Core.Models.Table"/> instance to convert.</param>
        /// <returns>A <see cref="Table"/> instance equivalent to <paramref name="internalTable"/>.</returns>
        public override Table ToWrapperType(Core.Models.Table internalTable)
        {
            Ensure.IsNotNull(internalTable, "internalTable");
            Ensure.IsNotNull(internalTable.Properties, "internalTable.Properties");

            Type type;
            TableTypeProperties typeProperties = this.DeserializeTypeProperties(
                internalTable.Properties.Type,
                internalTable.Properties.TypeProperties,
                out type);

            string          typeName   = GetTypeName(type, internalTable.Properties.Type);
            TableProperties properties = new TableProperties(
                typeProperties,
                internalTable.Properties.Availability,
                internalTable.Properties.LinkedServiceName,
                typeName)
            {
                Availability      = internalTable.Properties.Availability,
                CreateTime        = internalTable.Properties.CreateTime,
                Description       = internalTable.Properties.Description,
                ErrorMessage      = internalTable.Properties.ErrorMessage,
                LinkedServiceName = internalTable.Properties.LinkedServiceName,
                Policy            = internalTable.Properties.Policy,
                ProvisioningState = internalTable.Properties.ProvisioningState,
                Structure         = internalTable.Properties.Structure,
                External          = internalTable.Properties.External
            };

            return(new Table()
            {
                Name = internalTable.Name, Properties = properties
            });
        }
Exemplo n.º 28
0
        //Creates an Table instance and adds its children.
        public TableProperties Create(params OpenXmlElement[] newChildren)
        {
            TableProperties tableProperties = new TableProperties();

            tableProperties.Append(newChildren);
            return(tableProperties);
        }
Exemplo n.º 29
0
        /// <summary>
        /// sql类型映射C#类型
        /// </summary>
        /// <param name="columnType"></param>
        /// <returns></returns>
        private static string ColumnTypeMapping(TableProperties tableProperties)
        {
            string resultType = tableProperties.ColumnType;

            switch (tableProperties.ColumnType)
            {
            case "int":
                resultType = "int";
                if (tableProperties.ColumnDescription != null && tableProperties.ColumnDescription.Contains("(") && tableProperties.ColumnDescription.Contains(")"))
                {
                    resultType = "Enum" + tableProperties.TableName.Replace("TB_", "") + tableProperties.ColumnName;
                }
                break;

            case "nvarchar":
            case "varchar":
                resultType = "string";
                break;

            case "datetime":
                resultType = "DateTime";
                break;

            default:
                break;
            }

            return(resultType);
        }
Exemplo n.º 30
0
		private void ProcessTableCellMargin(DocxTableProperties docxProperties, TableProperties tableProperties)
		{
			if (docxProperties.CellPadding != null)
			{
				TableCellMarginDefault cellMargin = new TableCellMarginDefault();
				Int16 width = (Int16)DocxUnits.GetDxaFromPixel(docxProperties.CellPadding.Value);
				
				cellMargin.TableCellLeftMargin = new TableCellLeftMargin() {
					Width = width,
					Type = TableWidthValues.Dxa
				};
				
				cellMargin.TopMargin = new TopMargin() {
					Width = width.ToString(),
					Type = TableWidthUnitValues.Dxa
				};
				
				cellMargin.TableCellRightMargin = new TableCellRightMargin() {
					Width = width,
					Type = TableWidthValues.Dxa
				};
				
				cellMargin.BottomMargin = new BottomMargin() {
					Width = width.ToString(),
					Type = TableWidthUnitValues.Dxa
				};
				
				tableProperties.Append(cellMargin);
			}
		}
Exemplo n.º 31
0
        /// <summary>
        /// sql类型映射C#类型
        /// </summary>
        /// <param name="columnType"></param>
        /// <returns></returns>
        private static string ColumnTypeMappingParam(TableProperties tableProperties)
        {
            string resultType = tableProperties.ColumnType;

            switch (tableProperties.ColumnType)
            {
            case "int":
                resultType = "Int";
                break;

            case "nvarchar":
                resultType = "NVarChar";
                break;

            case "varchar":
                resultType = "VarChar";
                break;

            case "datetime":
                resultType = "DateTime";
                break;

            default:
                break;
            }

            return(resultType);
        }
        public void TestUpdateTableProperties()
        {
            var localName     = "TablesGet.docx";
            var remoteName    = "TestUpdateTableProperties.docx";
            var fullName      = Path.Combine(this.dataFolder, remoteName);
            var newProperties = new TableProperties
            {
                Alignment     = TableProperties.AlignmentEnum.Right,
                AllowAutoFit  = false,
                Bidi          = true,
                BottomPadding = 1,
                CellSpacing   = 2,
                LeftIndent    = 3,
                LeftPadding   = 4,
                RightPadding  = 5,
                StyleOptions  = TableProperties.StyleOptionsEnum.ColumnBands,
                TopPadding    = 6
            };

            this.StorageApi.PutCreate(fullName, null, null, File.ReadAllBytes(BaseTestContext.GetDataDir(this.tableFolder) + localName));

            var request = new UpdateTablePropertiesRequest(remoteName, 1, this.dataFolder, properties: newProperties);
            var actual  = this.WordsApi.UpdateTableProperties(request);

            Assert.AreEqual(200, actual.Code);
        }
Exemplo n.º 33
0
        public static TableEntity ToData(CdmEntityDefinition instance, CdmCorpusContext ctx, ResolveOptions resOpt, CopyOptions options)
        {
            var properties = CreateTablePropertyBags(instance, resOpt, options);
            var columns    = new List <DataColumn>();

            foreach (var attribute in instance.Attributes)
            {
                columns.Add(TypeAttributePersistence.ToData(attribute as CdmTypeAttributeDefinition, ctx, resOpt, options));
            }

            var storageDescriptor = new StorageDescriptor
            {
                Source  = new DataSource(),
                Format  = new FormatInfo(),
                Columns = columns
            };

            TableProperties teProperties = new TableProperties
            {
                Properties        = properties,
                Partitioning      = new TablePartitioning(),
                StorageDescriptor = storageDescriptor
            };

            return(new TableEntity
            {
                Name = instance.EntityName,
                Type = SASEntityType.TABLE,
                Properties = teProperties
            });
        }
Exemplo n.º 34
0
        private void ProcessWidth(DocxNode node, TableProperties tableProperties)
		{
            string width = node.ExtractAttributeValue(DocxUnits.width);
            string styleWidth = node.ExtractStyleValue(DocxUnits.width);
			
			if (!string.IsNullOrEmpty(styleWidth))
			{
				width = styleWidth;
			}
			
			if (!string.IsNullOrEmpty(width))
			{
				decimal value;
				TableWidthUnitValues unit;
				
				if (DocxUnits.TableUnitsFromStyle(width, out value, out unit))
				{
					TableWidth tableWidth = new TableWidth() {
						Width = value.ToString(),
						Type = unit
					};
					tableProperties.Append(tableWidth);
				}
			}
		}
 private void InitializeFormProperties(TableProperties properties)
 {
     BorderSize = properties.BorderSize;
     numericTextBoxCellPadding.Text = properties.CellPadding;
     numericTextBoxCellSpacing.Text = properties.CellSpacing;
     columnWidthControl.ColumnWidth = properties.Width;
 }
Exemplo n.º 36
0
        /// <summary>
        /// Creates the table properties.
        /// </summary>
        /// <param name="style">The style.</param>
        /// <param name="propertyNode">The property node.</param>
        /// <returns></returns>
        private TableProperties CreateTableProperties(IStyle style, XmlNode propertyNode)
        {
            TableProperties tableProperties = new TableProperties(style);

            tableProperties.Node = propertyNode;

            return(tableProperties);
        }
Exemplo n.º 37
0
        /// <summary>
        /// Initializes a new instance of the Table class with required
        /// arguments.
        /// </summary>
        public Table(string name, TableProperties properties)
            : this()
        {
            Ensure.IsNotNullOrEmpty(name, "name");
            Ensure.IsNotNull(properties, "properties");

            this.Name = name;
            this.Properties = properties;
        }
Exemplo n.º 38
0
        private static TableProperties GenerateTableProperties()
        {
            TableProperties tableProperties1 = new TableProperties();
            TableStyle tableStyle1 = new TableStyle() { Val = "TableGrid" };
            TableWidth tableWidth1 = new TableWidth() { Width = "0", Type = TableWidthUnitValues.Auto };
            TableLook tableLook1 = new TableLook() { Val = "04A0" };

            tableProperties1.Append(tableStyle1);
            tableProperties1.Append(tableWidth1);
            tableProperties1.Append(tableLook1);
            return tableProperties1;
        }
Exemplo n.º 39
0
	    private static TableProperties GenerateTableProperties()
		{
			var tableProperties1 = new TableProperties();
			var tableStyle1 = new TableStyle { Val = "TableGrid" };
			var tableWidth1 = new TableWidth { Width = "4900", Type = TableWidthUnitValues.Pct };
			var tableLook1 = new TableLook { Val = "04A0" };
			var tableJustification = new TableJustification { Val = TableRowAlignmentValues.Center };

			tableProperties1.Append(tableStyle1);
			tableProperties1.Append(tableWidth1);
			tableProperties1.Append(tableLook1);
			tableProperties1.Append(tableJustification);
			return tableProperties1;
		}
        private void CreateTableheader(Table table)
        {
            TableProperties tblPr = new TableProperties();
            TableBorders tblBorders = new TableBorders();
            tblBorders.TopBorder = new TopBorder();
            tblBorders.TopBorder.Val = new EnumValue<BorderValues>(BorderValues.Single);
            tblBorders.BottomBorder = new BottomBorder();
            tblBorders.BottomBorder.Val = new EnumValue<BorderValues>(BorderValues.Single);
            tblBorders.LeftBorder = new LeftBorder();
            tblBorders.LeftBorder.Val = new EnumValue<BorderValues>(BorderValues.Single);
            tblBorders.RightBorder = new RightBorder();
            tblBorders.RightBorder.Val = new EnumValue<BorderValues>(BorderValues.Single);
            tblBorders.InsideHorizontalBorder = new InsideHorizontalBorder();
            tblBorders.InsideHorizontalBorder.Val = BorderValues.Single;
            tblBorders.InsideVerticalBorder = new InsideVerticalBorder();
            tblBorders.InsideVerticalBorder.Val = BorderValues.Single;
            tblPr.Append(tblBorders);
            table.Append(tblPr);

            var tr = new TableRow();
            var tc = new TableCell();
            tc.Append(new Paragraph(new Run(new Text("Порядковый номер в таблице"))));
            tr.Append(tc);
            tc = new TableCell();
            tc.Append(new Paragraph(new Run(new Text("Номер рейса"))));
            tr.Append(tc);
            tc = new TableCell();
            tc.Append(new Paragraph(new Run(new Text("Фамилия Имя"))));
            tr.Append(tc);
            tc = new TableCell();
            tc.Append(new Paragraph(new Run(new Text("Гос. номер"))));
            tr.Append(tc);
            tc = new TableCell();
            tc.Append(new Paragraph(new Run(new Text("Дата начала рейса - Дата окончания рейса"))));
            tr.Append(tc);

            table.Append(tr);
        }
Exemplo n.º 41
0
        public Table CreateTable(string[] colwidths)
        {
            this.colwidths = colwidths;
            Table table1 = new Table();

            TableProperties tableProperties1 = new TableProperties();
            TableWidth tableWidth1 = new TableWidth() { Width = "5000", Type = TableWidthUnitValues.Dxa };
            TableIndentation tableIndentation1 = new TableIndentation() { Width = 108, Type = TableWidthUnitValues.Dxa };
            TableLook tableLook1 = new TableLook() { Val = "04A0" };

            tableProperties1.Append(tableWidth1);
            tableProperties1.Append(tableIndentation1);
            tableProperties1.Append(tableLook1);

            TableGrid tableGrid1 = new TableGrid();
            GridColumn gridColumn;

            foreach (string cw in colwidths) {
                gridColumn = new GridColumn() { Width = cw };
                tableGrid1.Append(gridColumn);
            }
            return table1;
        }
Exemplo n.º 42
0
        public override IEnumerable<OpenXmlElement> ToOpenXmlElements(DocumentFormat.OpenXml.Packaging.MainDocumentPart mainDocumentPart)
        {
            Table result = new Table();

            var tableProperties = new TableProperties();
            var tableStyle = new TableStyle() { Val = "GrilledutableauSimpleTable" };
            var tableWidth = UnitHelper.Convert(Width).To<TableWidth>();
            var tableIndentation = new TableIndentation() { Width = 534, Type = TableWidthUnitValues.Dxa };
            var tableLook = new TableLook() { Val = "04A0" };

            tableProperties.Append(tableStyle);
            tableProperties.Append(tableWidth);
            tableProperties.Append(tableIndentation);
            tableProperties.Append(tableLook);

            result.Append(tableProperties);

            ForEachChild(x =>
            {
                Debug.Assert(x is TableRowFormattedElement);
                result.Append(x.ToOpenXmlElements(mainDocumentPart));
            });
            return new List<OpenXmlElement> { result };
        }
Exemplo n.º 43
0
        private static void AddRows(DataTable table, TableStyle tableStyle, Table wordTable, TableProperties tableProperties)
        {
            for (int r = 0; r < table.Rows.Count; r++) {

                // Create a row.
                TableRow tRow = new TableRow();

                for (int c = 0; c < table.Columns.Count; c++) {

                    // Create a cell.
                    TableCell tCell = new TableCell();

                    if ((r % 2 == 0) && (tableStyle.EnableAlternativeBackgroundColor)) {

                        var tCellProperties = new TableCellProperties();

                        // Set Cell Color
                        Shading tCellColor = new Shading() { Val = ShadingPatternValues.Clear, Color = "auto", Fill = System.Drawing.ColorTranslator.ToHtml(tableStyle.AlternativeBackgroundColor) };
                        tCellProperties.Append(tCellColor);

                        tCell.Append(tCellProperties);
                    }

                    string rowContent = table.Rows[r][c] == null ? string.Empty : table.Rows[r][c].ToString();

                    ParagraphProperties paragProperties = new ParagraphProperties();
                    SpacingBetweenLines spacingBetweenLines1 = new SpacingBetweenLines() { After = "0" };
                    paragProperties.Append(spacingBetweenLines1);

                    Run run = new Run();
                    if (rowContent.Contains(Environment.NewLine)) {

                        string[] lines = rowContent.Split(new string[] { Environment.NewLine }, StringSplitOptions.RemoveEmptyEntries);
                        for (int i = 0; i < lines.Length; i++) {

                            var line = lines[i];
                            if (i > 0) {
                                run.AppendChild(new Break());
                            }
                            Text newText = new Text(line);
                            run.AppendChild<Text>(newText);
                        }
                    }
                    else {
                        Text newText = new Text(rowContent);
                        run.AppendChild<Text>(newText);
                    }

                    ApplyFontProperties(tableStyle, RowIdentification.Row, run);

                    var parag = new Paragraph();
                    parag.Append(paragProperties);
                    parag.Append(run);

                    // Specify the table cell content.
                    tCell.Append(parag);

                    // Append the table cell to the table row.
                    tRow.Append(tCell);
                }

                // Append the table row to the table.
                wordTable.Append(tRow);
            }
        }
Exemplo n.º 44
0
        /// <summary>
        /// Changes a single property of a table
        /// </summary>
        /// <param name="table">The table to modify</param>
        /// <param name="propertyName">The property to change</param>
        /// <param name="newValue">The new value of the property</param>
        public void ChangeTableProperty(IHTMLTable table, TableProperties propertyName, string newValue)
        {
            if (table != null)
            {
                IHTMLElement tableElement = table as IHTMLElement;
                switch (propertyName)
                {
                    case TableProperties.BackgroundColor:
                        tableElement.style.backgroundColor = newValue;
                        break;

                    case TableProperties.BorderColor:
                        tableElement.style.borderColor = newValue;
                        break;

                    case TableProperties.BorderSize:
                        if (newValue != null)
                        {
                            tableElement.style.borderWidth = newValue;
                        }
                        break;

                    case TableProperties.Height:
                        if (newValue != null)
                        {
                            tableElement.style.height = newValue;
                        }
                        break;

                    case TableProperties.Width:
                        if (newValue != null)
                        {
                            tableElement.style.width = newValue;
                        }
                        break;

                    case TableProperties.CellSpacing:
                        if (newValue != null)
                        {
                            table.cellSpacing = newValue;
                        }
                        break;
                }
            }
        }
Exemplo n.º 45
0
        private static void SetTableAlignment(HorizontalAlignmentType alignment, TableProperties tblProp)
        {
            TableJustification tblJustification = null;

            if (alignment == HorizontalAlignmentType.Center) {

                tblJustification = new TableJustification() { Val = TableRowAlignmentValues.Center };
            }
            else if (alignment == HorizontalAlignmentType.Right) {

                tblJustification = new TableJustification() { Val = TableRowAlignmentValues.Right };
            }
            else {

                tblJustification = new TableJustification() { Val = TableRowAlignmentValues.Left };
            }

            tblProp.Append(tblJustification);
        }
Exemplo n.º 46
0
        private Table CreateFilledTable(bool hasBorder, bool hasInsideBorder)
        {
            //枠線有りテーブルを生成する(幅はページの幅)
            Table table = new Table();
            TableProperties tableProperties = new TableProperties();
            TableStyle tableStyle = new TableStyle() { Val = "TableGrid" };
            TableWidth tableWidth = new TableWidth() { Width = "5000", Type = TableWidthUnitValues.Pct };
            TableLook tableLook = new TableLook()
            {
                Val = "04A0",
                FirstRow = true,
                LastRow = false,
                FirstColumn = true,
                LastColumn = false,
                NoHorizontalBand = false,
                NoVerticalBand = true
            };
            tableProperties.Append(tableStyle);
            tableProperties.Append(tableWidth);
            tableProperties.Append(tableLook);

            TableBorders borders = new TableBorders();
            tableProperties.Append(borders);

            EnumValue<BorderValues> val = hasBorder ? BorderValues.Single : BorderValues.Nil;
            TopBorder topBorder = new TopBorder() { Val = val };
            BottomBorder bottomBorder = new BottomBorder() { Val = val };
            LeftBorder leftBorder = new LeftBorder() { Val = val };
            RightBorder rightBorder = new RightBorder() { Val = val };
            borders.Append(topBorder);
            borders.Append(bottomBorder);
            borders.Append(leftBorder);
            borders.Append(rightBorder);

            val = hasInsideBorder ? BorderValues.Single : BorderValues.Nil;
            InsideHorizontalBorder horizontalBorder = new InsideHorizontalBorder() { Val = val };
            InsideVerticalBorder verticalBorder = new InsideVerticalBorder() { Val = val };
            borders.Append(horizontalBorder);
            borders.Append(verticalBorder);

            table.Append(tableProperties);
            return table;
        }
Exemplo n.º 47
0
 private Table CreateFilledTable()
 {
     //枠線有りテーブルを生成する(幅はページの幅)
     Table table = new Table();
     TableProperties tableProperties = new TableProperties();
     TableStyle tableStyle = new TableStyle() { Val = "TableGrid" };
     TableWidth tableWidth = new TableWidth() { Width = "5000", Type = TableWidthUnitValues.Pct };
     TableLook tableLook = new TableLook()
     {
         Val = "04A0",
         FirstRow = true,
         LastRow = false,
         FirstColumn = true,
         LastColumn = false,
         NoHorizontalBand = false,
         NoVerticalBand = true
     };
     tableProperties.Append(tableStyle);
     tableProperties.Append(tableWidth);
     tableProperties.Append(tableLook);
     table.Append(tableProperties);
     return table;
 }
Exemplo n.º 48
0
        private object ResolveTableFormatting(TableProperties tableFormatting)
        {
            if (String.IsNullOrEmpty(tableFormatting.TableStyle))
                return tableFormatting;

            TableStyleData tsb = new TableStyleData();
            tsb.count = m_iTableDepth;
            tsb.styleName = tableFormatting.TableStyle;

            m_tableStyleNames.Push(tsb);
            return tableFormatting;
        }
Exemplo n.º 49
0
        /// <summary>
        /// Generates the Word Document and performs the Mail Merge
        /// </summary>
        /// <returns>True or false(with exception) if the generation was successful or not</returns>
        public TemplateGenerationResult GenerateDocument()
        {
            try
            {
                // Don't continue if the template file name is not found
                if (!File.Exists(_templateFileName))
                {
                   // System.IO.File.AppendAllText(@"c:\temp\errors.txt","In GenerateDocument:   " +  _templateFileName);
                    throw new Exception(message: "TemplateFileName (" + _templateFileName + ") does not exist");

                }

                // If the file is a DOTX file convert it to docx
                if (_templateFileName.ToUpper().EndsWith("DOTX"))
                {
                    TemplateGenerationResult resultValue = ConvertTemplate();

                    if (!resultValue.Value)
                    {
                        return resultValue;
                    }
                }
                else
                {
                    // Otherwise make a copy of the Word Document to the targetFileName
                    File.Copy(_templateFileName, _targetFileName);
                }

                using (WordprocessingDocument docGenerated = WordprocessingDocument.Open(_targetFileName, true))
                {
                    docGenerated.ChangeDocumentType(WordprocessingDocumentType.Document);

                    foreach (FieldCode field in docGenerated.MainDocumentPart.RootElement.Descendants<FieldCode>())
                    {
                        var fieldNameStart = field.Text.LastIndexOf(FieldDelimeter, System.StringComparison.Ordinal);
                        //var index = field.Text.LastIndexOf(" ", System.StringComparison.Ordinal) + 1;
                        var fieldname = field.Text.Substring(fieldNameStart + FieldDelimeter.Length).Trim();
                        fieldname = fieldname.Replace("\\* MERGEFORMAT", "").Trim();
                        var fieldValue = _values[fieldname];

                        // Go through all of the Run elements and replace the Text Elements Text Property
                        foreach (Run run in docGenerated.MainDocumentPart.Document.Descendants<Run>())
                        {
                            foreach (Text txtFromRun in run.Descendants<Text>().Where(a => a.Text == "«" + fieldname + "»"))
                            {
                                txtFromRun.Text = fieldValue;
                            }
                        }
                    }

                    if(_transactionDetailsList.Any())
                    {
                        var table = new Table();

                        var props = new TableProperties(
                            new TableBorders(
                            new TopBorder
                            {
                                Val = new EnumValue<BorderValues>(BorderValues.Single),
                                Size = 6,
                                Color = "grey"
                            },
                            new BottomBorder
                            {
                                Val = new EnumValue<BorderValues>(BorderValues.Single),
                                Size = 6,
                                Color = "grey"
                            },
                            new LeftBorder
                            {
                                Val = new EnumValue<BorderValues>(BorderValues.Single),
                                Size = 6,
                                Color = "grey"
                            },
                            new RightBorder
                            {
                                Val = new EnumValue<BorderValues>(BorderValues.Single),
                                Size = 6,
                                Color = "grey"
                            },
                            new InsideHorizontalBorder
                            {
                                Val = new EnumValue<BorderValues>(BorderValues.Single),
                                Size = 6,
                                Color = "grey"
                            },
                            new InsideVerticalBorder
                            {
                                Val = new EnumValue<BorderValues>(BorderValues.Single),
                                Size = 6,
                                Color = "grey"
                            }));

                        //table.AppendChild<TableProperties>(props);
                        var uniqueRegions = _transactionDetailsList.Select(t => t.Region).Distinct();
                        var enumerable = uniqueRegions as List<string> ?? uniqueRegions.ToList();
                        foreach (var uniqueRegion in uniqueRegions)
                        {
                            var transactionDetailsListOfARegion = _transactionDetailsList.Where(t => t.Region == uniqueRegion);
                            var detailsListOfARegion = transactionDetailsListOfARegion as List<TransactionDetail> ?? transactionDetailsListOfARegion.ToList();
                            var firstOrDefault = detailsListOfARegion.FirstOrDefault();

                            var regionTr = new TableRow();
                            var regionTc = new TableCell();
                            var regionTcContent = new TableCell();
                            regionTc.Append(new Paragraph(new Run(new Text("Region: "))));
                            regionTcContent.Append(new Paragraph(new Run(new Text(uniqueRegion))));
                            regionTr.Append(regionTc);
                            regionTr.Append(regionTcContent);
                            table.Append(regionTr);

                            var bidNumberTr = new TableRow();
                            var bidNumberTc = new TableCell();
                            var bidNumberTcContent = new TableCell();
                            bidNumberTc.Append(new Paragraph(new Run(new Text("Bid Contract: "))));
                            if (firstOrDefault != null)
                                bidNumberTcContent.Append(new Paragraph(new Run(new Text(firstOrDefault.BidNumber))));
                            bidNumberTr.Append(bidNumberTc);
                            bidNumberTr.Append(bidNumberTcContent);
                            table.Append(bidNumberTr);

                            var bidDateTr = new TableRow();
                            var bidDateTc = new TableCell();
                            var bidDateTcContent = new TableCell();
                            bidDateTc.Append(new Paragraph(new Run(new Text("Bid Date: "))));
                            if (firstOrDefault != null)
                                bidDateTcContent.Append(new Paragraph(new Run(new Text(firstOrDefault.BidStratingDate))));
                            bidDateTr.Append(bidDateTc);
                            bidDateTr.Append(bidDateTcContent);
                            table.Append(bidDateTr);

                            var transactionTh = new TableRow();

                            var rowNoTh = new TableCell();
                            rowNoTh.Append(new Paragraph(new Run(new Text("No."))));
                            //zoneTh.Append(new TableCellProperties(new TableCellWidth { Type = TableWidthUnitValues.Auto}));
                            transactionTh.Append(rowNoTh);

                            var zoneTh = new TableCell();
                            zoneTh.Append(new Paragraph(new Run(new Text("Zone"))));
                            //zoneTh.Append(new TableCellProperties(new TableCellWidth { Type = TableWidthUnitValues.Auto}));
                            transactionTh.Append(zoneTh);

                            var woredaTh = new TableCell();
                            woredaTh.Append(new Paragraph(new Run(new Text("Woreda"))));
                            //woredaTh.Append(new TableCellProperties(new TableCellWidth { Type = TableWidthUnitValues.Auto}));
                            transactionTh.Append(woredaTh);

                            var warehouseTh = new TableCell();
                            warehouseTh.Append(new Paragraph(new Run(new Text("Warehouse (Origin)"))));
                            //warehouseTh.Append(new TableCellProperties(new TableCellWidth { Type = TableWidthUnitValues.Auto}));
                            transactionTh.Append(warehouseTh);

                            var distanceTh = new TableCell();
                            distanceTh.Append(new Paragraph(new Run(new Text("Distance From Origin"))));
                            //warehouseTh.Append(new TableCellProperties(new TableCellWidth { Type = TableWidthUnitValues.Auto}));
                            transactionTh.Append(distanceTh);

                            var tariffTh = new TableCell();
                            tariffTh.Append(new Paragraph(new Run(new Text("Tariff/Qtl (in birr)"))));
                            //tariffTh.Append(new TableCellProperties(new TableCellWidth { Type = TableWidthUnitValues.Auto}));
                            transactionTh.Append(tariffTh);
                            table.Append(transactionTh);
                            var rowNoCount = 1;
                            foreach (var transaction in detailsListOfARegion)
                            {
                                var transactionTr = new TableRow();

                                var rowNoTc = new TableCell();
                                rowNoTc.Append(new Paragraph(new Run(new Text(rowNoCount.ToString()))));
                                //zoneTc.Append(new TableCellProperties(new TableCellWidth { Type = TableWidthUnitValues.Auto }));
                                transactionTr.Append(rowNoTc);

                                var zoneTc = new TableCell();
                                zoneTc.Append(new Paragraph(new Run(new Text(transaction.Zone))));
                                //zoneTc.Append(new TableCellProperties(new TableCellWidth { Type = TableWidthUnitValues.Auto }));
                                transactionTr.Append(zoneTc);

                                var woredaTc = new TableCell();
                                woredaTc.Append(new Paragraph(new Run(new Text(transaction.Woreda))));
                                //woredaTc.Append(new TableCellProperties(new TableCellWidth { Type = TableWidthUnitValues.Auto }));
                                transactionTr.Append(woredaTc);

                                var warehouseTc = new TableCell();
                                warehouseTc.Append(new Paragraph(new Run(new Text(transaction.Warehouse))));
                                //warehouseTc.Append(new TableCellProperties(new TableCellWidth { Type = TableWidthUnitValues.Auto }));
                                transactionTr.Append(warehouseTc);

                                var distanceTc = new TableCell();
                                distanceTc.Append(new Paragraph(new Run(new Text(transaction.DistanceFromOrigin))));
                                //warehouseTc.Append(new TableCellProperties(new TableCellWidth { Type = TableWidthUnitValues.Auto }));
                                transactionTr.Append(distanceTc);

                                var tariffTc = new TableCell();
                                tariffTc.Append(new Paragraph(new Run(new Text(transaction.Tariff.ToString()))));
                                //tariffTc.Append(new TableCellProperties(new TableCellWidth { Type = TableWidthUnitValues.Auto }));
                                transactionTr.Append(tariffTc);
                                table.Append(transactionTr);

                                rowNoCount++;
                            }
                            var spacingTr = new TableRow();
                            var spacingTc = new TableCell();
                            spacingTc.Append(new Paragraph(new Run(new Text(" "))));
                            spacingTr.Append(spacingTc);
                            table.Append(spacingTr);
                            //table.Append(spacingTr);
                        }
                        docGenerated.MainDocumentPart.Document.Append(table);
                    }

                    // If the Document has settings remove them so the end user doesn't get prompted to use the data source
                    DocumentSettingsPart settingsPart = docGenerated.MainDocumentPart.GetPartsOfType<DocumentSettingsPart>().First();

                    var oxeSettings = settingsPart.Settings.Where(a => a.LocalName == "mailMerge").FirstOrDefault();

                    if (oxeSettings != null)
                    {
                        settingsPart.Settings.RemoveChild(oxeSettings);

                        settingsPart.Settings.Save();
                    }

                    docGenerated.MainDocumentPart.Document.Save();
                }

                return new TemplateGenerationResult { Value = true, ResultPath = _targetFileName};
            }
            catch (Exception ex)
            {
               // System.IO.File.AppendAllText(@"c:\temp\errors.txt", "In DocumentGeneration::generateDocument():   " + ex.Message.ToString(CultureInfo.InvariantCulture));
                return new TemplateGenerationResult { Value = false, Exception = "DocumentGeneration::generateDocument() - " + ex.ToString() };
            }
        }
        private Table GenerateBasiceReportDataTable()
        {
            Table table1 = new Table();

            TableProperties tableProperties1 = new TableProperties();
            TableStyle tableStyle1 = new TableStyle() { Val = "TableGrid" };
            TablePositionProperties tablePositionProperties1 = new TablePositionProperties() { LeftFromText = 180, RightFromText = 180, VerticalAnchor = VerticalAnchorValues.Text, HorizontalAnchor = HorizontalAnchorValues.Margin, TablePositionXAlignment = HorizontalAlignmentValues.Center, TablePositionY = 103 };
            TableWidth tableWidth1 = new TableWidth() { Width = "15026", Type = TableWidthUnitValues.Dxa };
            TableLook tableLook1 = new TableLook() { Val = "04A0", FirstRow = true, LastRow = false, FirstColumn = true, LastColumn = false, NoHorizontalBand = false, NoVerticalBand = true };

            tableProperties1.Append(tableStyle1);
            tableProperties1.Append(tablePositionProperties1);
            tableProperties1.Append(tableWidth1);
            tableProperties1.Append(tableLook1);

            TableGrid tableGrid1 = new TableGrid();
            GridColumn gridColumn1 = new GridColumn() { Width = "15026" };

            tableGrid1.Append(gridColumn1);

            TableRow tableRow1 = new TableRow() { RsidTableRowAddition = "004E307B", RsidTableRowProperties = "00D273DB" };

            TableCell tableCell1 = new TableCell();

            TableCellProperties tableCellProperties1 = new TableCellProperties();
            TableCellWidth tableCellWidth1 = new TableCellWidth() { Width = "15026", Type = TableWidthUnitValues.Dxa };

            tableCellProperties1.Append(tableCellWidth1);

            Paragraph paragraph1 = new Paragraph() { RsidParagraphMarkRevision = "004E307B", RsidParagraphAddition = "004E307B", RsidParagraphProperties = "004E307B", RsidRunAdditionDefault = "004E307B" };

            ParagraphProperties paragraphProperties1 = new ParagraphProperties();
            Justification justification1 = new Justification() { Val = JustificationValues.Center };

            paragraphProperties1.Append(justification1);

            paragraph1.Append(paragraphProperties1);

            tableCell1.Append(tableCellProperties1);
            tableCell1.Append(paragraph1);

            tableRow1.Append(tableCell1);

            table1.Append(tableProperties1);
            table1.Append(tableGrid1);
            table1.Append(tableRow1);
            return table1;
        }
        public void getang()
        {
            Autodesk.AutoCAD.ApplicationServices.Document doc = Application.DocumentManager.MdiActiveDocument;
            Database db = doc.Database;
            Editor ed = doc.Editor;

            string filepath = "D:\\tdoc.docx";

            using (WordprocessingDocument docX = WordprocessingDocument.Create(filepath, WordprocessingDocumentType.Document))
            {
                try
                {
                    // Add a main document part.
                    MainDocumentPart mainPart = docX.AddMainDocumentPart();
                    StyleDefinitionsPart styleDefinitionsPart = mainPart.AddNewPart<StyleDefinitionsPart>();
                    Styles styles1 = new Styles();
                    DocDefaults docDefaults =
                        new DocDefaults(
                            new RunPropertiesDefault(new RunPropertiesBaseStyle(new RunFonts()
                            {
                                Ascii = "Times New Roman",
                                HighAnsi = "Times New Roman",
                                ComplexScript = "Times New Roman"
                            }, new FontSize() { Val = "24" },
                                new FontSizeComplexScript() { Val = "24" })),
                                new ParagraphPropertiesDefault(new SpacingBetweenLines() { After = "0", Line = "240", LineRule = LineSpacingRuleValues.Auto }));
                    styles1.AppendChild(docDefaults);
                    styleDefinitionsPart.Styles = styles1;

                    mainPart.Document = new DocumentFormat.OpenXml.Wordprocessing.Document();
                    DocumentFormat.OpenXml.Wordprocessing.Body body = mainPart.Document.AppendChild(new DocumentFormat.OpenXml.Wordprocessing.Body());
                    ParagraphProperties paragraphProperties1 = new ParagraphProperties(
                        new Justification() { Val = JustificationValues.Center },
                        new ParagraphMarkRunProperties(
                            new RunFonts()
                            {
                                Ascii = "Times New Roman",
                                HighAnsi = "Times New Roman",
                                ComplexScript = "Times New Roman"
                            },
                            new FontSize() { Val = "24" },
                            new FontSizeComplexScript() { Val = "24" }
                            ));

                    Paragraph para = body.AppendChild(new Paragraph());
                    para.AppendChild(paragraphProperties1);

                    Run run = para.AppendChild(new Run());

                    RunProperties runProperties1 = new RunProperties(
                        new Bold());

                    // String msg contains the text, "Hello, Word!"
                    run.AppendChild(runProperties1);
                    run.AppendChild(new Text("ПРИЛОЖЕНИЕ Ф"));
                    run.AppendChild(new Break());
                    run.AppendChild(new Text("Ведомость углов поворотов"));
                    run.AppendChild(new Break());

                    var table = new DocumentFormat.OpenXml.Wordprocessing.Table();
                    // Create a TableProperties object and specify its border information.
                    TableProperties tblProp = new TableProperties(
                        new TableWidth() { Width = "9782", Type = TableWidthUnitValues.Dxa },
                        new TableIndentation() { Width = -318, Type = TableWidthUnitValues.Dxa },
                        new TableBorders(
                            new TopBorder() { Val = new EnumValue<BorderValues>(BorderValues.Single), Size = 4, Space = 0 },
                            new BottomBorder() { Val = new EnumValue<BorderValues>(BorderValues.Single), Size = 4, Space = 0 },
                            new LeftBorder() { Val = new EnumValue<BorderValues>(BorderValues.Single), Size = 4, Space = 0 },
                            new RightBorder() { Val = new EnumValue<BorderValues>(BorderValues.Single), Size = 4, Space = 0 },
                            new InsideHorizontalBorder() { Val = new EnumValue<BorderValues>(BorderValues.Single), Size = 4, Space = 0 },
                            new InsideVerticalBorder() { Val = new EnumValue<BorderValues>(BorderValues.Single), Size = 4, Space = 0 }),
                        new DocumentFormat.OpenXml.Wordprocessing.TableStyle() { Val = "TableGrid" }
                        );

                    // Append the TableProperties object to the empty table.
                    table.AppendChild<TableProperties>(tblProp);

                    // Add 3 columns to the table.
                    TableGrid tg = new TableGrid(new GridColumn(), new GridColumn(), new GridColumn(), new GridColumn(),
                        new GridColumn(), new GridColumn(), new GridColumn());
                    table.AppendChild(tg);

                    TableRow tr1 = new TableRow(
                        new TableRowProperties(new TableRowHeight() { Val = 430 }),
                        new TableCell(
                            new TableCellProperties(
                                new TableCellWidth() { Type = TableWidthUnitValues.Dxa, Width = "1709" },
                                new VerticalMerge() { Val = MergedCellValues.Restart },
                                new TableCellVerticalAlignment() { Val = TableVerticalAlignmentValues.Center }),
                            new Paragraph(new ParagraphProperties(GetCenterJustify()),
                                new Run(new Text("Обозначение точки")))),
                        //new TableCellProperties(new TableCellWidth() {Type = TableWidthUnitValues.Pct, Width = "500"})
                        new TableCell(
                            new TableCellProperties(
                                new GridSpan() { Val = 2 },
                                new TableCellVerticalAlignment() { Val = TableVerticalAlignmentValues.Center },
                                new TableCellWidth() { Type = TableWidthUnitValues.Dxa, Width = "3922" }),
                            new Paragraph(
                                new ParagraphProperties(new Justification() { Val = JustificationValues.Center }),
                                new Run(new Text("Координаты точки")))),
                        new TableCell(
                            new TableCellProperties(
                                new TableCellWidth() { Type = TableWidthUnitValues.Dxa, Width = "1358" },
                                new TableCellVerticalAlignment() { Val = TableVerticalAlignmentValues.Center },
                                new VerticalMerge() { Val = MergedCellValues.Restart }),
                            new Paragraph(new ParagraphProperties(GetCenterJustify()),
                                new Run(new Text("Пикетаж")))),
                        new TableCell(
                            new TableCellProperties(
                                new GridSpan() { Val = 2 },
                                new TableCellVerticalAlignment() { Val = TableVerticalAlignmentValues.Center },
                                new TableCellWidth() { Type = TableWidthUnitValues.Dxa, Width = "2368" }),
                            new Paragraph(new ParagraphProperties(GetCenterJustify()),
                                new Run(new Text("Угол")))),
                        new TableCell(new TableCellProperties(
                            new TableCellWidth() { Type = TableWidthUnitValues.Dxa, Width = "425" },
                            new VerticalMerge() { Val = MergedCellValues.Restart },
                            new TableCellVerticalAlignment() { Val = TableVerticalAlignmentValues.Center }),
                            new Paragraph(new ParagraphProperties(GetCenterJustify()), new Run(new Text("Прямая вставка, м"))))
                        );
                    table.AppendChild(tr1);
                    TableRow tr2 = new TableRow(
                        new TableRowProperties(new TableRowHeight() { Val = 419 }),
                        new TableCell(new TableCellProperties(new VerticalMerge()), new Paragraph(new Run())),
                        new TableCell(
                            new TableCellProperties(new TableCellVerticalAlignment() { Val = TableVerticalAlignmentValues.Center }),
                            new ParagraphProperties(new Justification() { Val = JustificationValues.Center }), new Paragraph(new Run(new Text("Y")))),
                        new TableCell(
                            new TableCellProperties(new TableCellVerticalAlignment() { Val = TableVerticalAlignmentValues.Center }),
                            new ParagraphProperties(new Justification() { Val = JustificationValues.Center }), new Paragraph(new Run(new Text("X")))),
                        new TableCell(new TableCellProperties(new VerticalMerge()), new Paragraph(new Run())),
                        new TableCell(
                            new TableCellProperties(
                                new TableCellWidth() { Type = TableWidthUnitValues.Dxa, Width = "1260" },
                                new TableCellVerticalAlignment() { Val = TableVerticalAlignmentValues.Center }),
                            new Paragraph(new ParagraphProperties(GetCenterJustify()), new Run(new Text("Лево")))),
                        new TableCell(
                            new TableCellProperties(
                                new TableCellWidth() { Type = TableWidthUnitValues.Dxa, Width = "1108" },
                                new TableCellVerticalAlignment() { Val = TableVerticalAlignmentValues.Center }),
                            new Paragraph(new ParagraphProperties(GetCenterJustify()), new Run(new Text("Право")))),
                        new TableCell(new TableCellProperties(new VerticalMerge()), new Paragraph(new Run())));
                    table.AppendChild(tr2);

                    TableCellProperties tcp = new TableCellProperties(new GridSpan() { Val = 7 });

                    while (true)
                    {
                        double dist = 0, paste = 0;

                        table.AppendChild(new TableRow(
                            new TableCell(
                                new TableCellProperties(
                                    new GridSpan() { Val = 7 }),
                                    new Paragraph(
                                        new ParagraphProperties(
                                            new ParagraphMarkRunProperties(new Bold()),
                                            new Justification() { Val = JustificationValues.Center }),
                                            new Run(new RunProperties(
                                                new Bold()),
                                                new Text("Трасса"))))));

                        PromptEntityOptions peo = new PromptEntityOptions("\nВыбери polyline: ");
                        peo.SetRejectMessage("Можно только polyline.");
                        peo.AddAllowedClass(typeof(Polyline), true);
                        PromptEntityResult per = ed.GetEntity(peo);
                        if (per.Status != PromptStatus.OK) { break; }

                        PromptPointResult pPtRes;
                        PromptPointOptions pPtOpts = new PromptPointOptions("");
                        // Prompt for the start point
                        pPtOpts.Message = "\nВведи начало: ";
                        pPtRes = doc.Editor.GetPoint(pPtOpts);

                        PromptDoubleOptions getpik = new PromptDoubleOptions("\nВведи пикетаж (в формате числа, а не 0+00): ");
                        PromptDoubleResult getpikRes = doc.Editor.GetDouble(getpik);
                        dist = 100 * getpikRes.Value;

                        /*
                        PromptStringOptions pStrOpts = new PromptStringOptions("\nEnter your name: ");
                        pStrOpts.AllowSpaces = true;
                        PromptResult pStrRes = doc.Editor.GetString(pStrOpts);
                        Application.ShowAlertDialog("The name entered was: " + pStrRes.StringResult);
                         */

                        Point3d curr = pPtRes.Value, next = pPtRes.Value;
                        try
                        {
                            using (Transaction tr = db.TransactionManager.StartTransaction())
                            {
                                Polyline pline = (Polyline)tr.GetObject(per.ObjectId, OpenMode.ForRead);
                                if ((pPtRes.Value == pline.GetLineSegmentAt(0).StartPoint) || (pPtRes.Value == pline.GetLineSegmentAt(0).EndPoint))
                                    for (int i = 0; i < pline.NumberOfVertices - 2; i++)
                                    {
                                        TrassaRecord temp = new TrassaRecord();
                                        temp.Name = "ВТ" + (i + 1).ToString();

                                        LineSegment3d l1 = pline.GetLineSegmentAt(i);
                                        LineSegment3d l2 = pline.GetLineSegmentAt(i + 1);
                                        double angle = GetPolylineShape(l1, l2, pline.Normal);
                                        if (angle > Math.PI)
                                        {
                                            if ((l1.StartPoint == l2.StartPoint) || (l1.StartPoint == l2.EndPoint))
                                            {
                                                ed.WriteMessage("\n({0:0.00}, {1:0.00}): ", l1.StartPoint.X, l1.StartPoint.Y);
                                                next = l1.StartPoint;

                                                temp.CoordsX = l1.StartPoint.X.ToString("F");
                                                temp.CoordsY = l1.StartPoint.Y.ToString("F");
                                            }
                                            else if ((l1.EndPoint == l2.EndPoint) || (l1.EndPoint == l2.StartPoint))
                                            {
                                                ed.WriteMessage("\n({0:0.00}, {1:0.00}): ", l1.EndPoint.X, l1.EndPoint.Y);
                                                next = l1.EndPoint;

                                                temp.CoordsX = l1.EndPoint.X.ToString("F");
                                                temp.CoordsY = l1.EndPoint.Y.ToString("F");
                                            }
                                            angle = -(angle - Math.PI * 2.0) * 180.0 / Math.PI;
                                            ed.WriteMessage("{0},{1:0}", (int)angle / 1, (angle % 1) * 60);

                                            temp.AngleT = TrassaRecord.Angle.Right;
                                            temp.AngleVal = ((int)angle / 1).ToString("F0") + "°" + ((angle % 1) * 60).ToString("F0") + "’";
                                        }
                                        else
                                        {
                                            if ((l1.StartPoint == l2.StartPoint) || (l1.StartPoint == l2.EndPoint))
                                            {
                                                ed.WriteMessage("\n({0:0.00}, {1:0.00}): ", l1.StartPoint.X, l1.StartPoint.Y);
                                                next = l1.StartPoint;

                                                temp.CoordsX = l1.StartPoint.X.ToString("F");
                                                temp.CoordsY = l1.StartPoint.Y.ToString("F");
                                            }
                                            else if ((l1.EndPoint == l2.EndPoint) || (l1.EndPoint == l2.StartPoint))
                                            {
                                                ed.WriteMessage("\n({0:0.00}, {1:0.00}): ", l1.EndPoint.X, l1.EndPoint.Y);
                                                next = l1.EndPoint;

                                                temp.CoordsX = l1.EndPoint.X.ToString("F");
                                                temp.CoordsY = l1.EndPoint.Y.ToString("F");
                                            }
                                            angle = angle * 180.0 / Math.PI;
                                            ed.WriteMessage("{0},{1:0}", (int)angle / 1, (angle % 1) * 60);

                                            temp.AngleT = TrassaRecord.Angle.Left;
                                            temp.AngleVal = ((int)angle / 1).ToString("F0") + "°" + ((angle % 1) * 60).ToString("F0") + "’";
                                        }

                                        paste = curr.DistanceTo(next);
                                        dist += paste;
                                        curr = next;
                                        ed.WriteMessage(" {0:0.00} {1:0.00}", dist, paste);

                                        temp.Piketaz = ((int)dist / 100).ToString("F0") + "+" + (dist % 100).ToString("F");
                                        temp.DirectInsert = paste.ToString("F");

                                        tr2 = new TableRow(
                                            new TableRowProperties(new TableRowHeight() { Val = 300 }),
                                            new TableCell(new Paragraph(new Run())),
                                            new TableCell(new Paragraph(new Run())),
                                            new TableCell(new Paragraph(new Run())),
                                            new TableCell(new Paragraph(new Run())),
                                            new TableCell(new Paragraph(new Run())),
                                            new TableCell(new Paragraph(new Run())),
                                            new TableCell(new Paragraph(new Run(new Text(temp.DirectInsert))))
                                            );
                                        table.AppendChild(tr2);
                                        tr1 = new TableRow(
                                            new TableRowProperties(new TableRowHeight() { Val = 300 }),
                                            new TableCell(new Paragraph(new Run(new Text(temp.Name)))),
                                            new TableCell(new Paragraph(new Run(new Text(temp.CoordsX)))),
                                            new TableCell(new Paragraph(new Run(new Text(temp.CoordsY)))),
                                            new TableCell(new Paragraph(new Run(new Text(temp.Piketaz)))),
                                            new TableCell(new Paragraph(new Run(new Text((temp.AngleT == TrassaRecord.Angle.Left) ? temp.AngleVal.ToString() : "")))),
                                            new TableCell(new Paragraph(new Run(new Text((temp.AngleT == TrassaRecord.Angle.Right) ? temp.AngleVal.ToString() : "")))),
                                            new TableCell(new Paragraph(new Run()))
                                            );
                                        table.AppendChild(tr1);
                                    }
                                else
                                    for (int i = pline.NumberOfVertices - 3; i >= 0; i--)
                                    {
                                        TrassaRecord temp = new TrassaRecord();
                                        temp.Name = "ВУ" + (pline.NumberOfVertices - 2 - i).ToString();

                                        LineSegment3d l1 = pline.GetLineSegmentAt(i);
                                        LineSegment3d l2 = pline.GetLineSegmentAt(i + 1);
                                        double angle = GetPolylineShape(l1, l2, pline.Normal);
                                        if (angle > Math.PI)
                                        {
                                            if ((l1.StartPoint == l2.StartPoint) || (l1.StartPoint == l2.EndPoint))
                                            {
                                                ed.WriteMessage("\n({0:0.00}, {1:0.00}): ", l1.StartPoint.X, l1.StartPoint.Y);
                                                next = l1.StartPoint;

                                                temp.CoordsX = l1.StartPoint.X.ToString("F");
                                                temp.CoordsY = l1.StartPoint.Y.ToString("F");
                                            }
                                            else if ((l1.EndPoint == l2.EndPoint) || (l1.EndPoint == l2.StartPoint))
                                            {
                                                ed.WriteMessage("\n({0:0.00}, {1:0.00}): ", l1.EndPoint.X, l1.EndPoint.Y);
                                                next = l1.EndPoint;

                                                temp.CoordsX = l1.EndPoint.X.ToString("F");
                                                temp.CoordsY = l1.EndPoint.Y.ToString("F");
                                            }
                                            angle = -(angle - Math.PI * 2.0) * 180.0 / Math.PI;
                                            ed.WriteMessage("{0},{1:0}", (int)angle / 1, (angle % 1) * 60);

                                            temp.AngleT = TrassaRecord.Angle.Left;
                                            temp.AngleVal = ((int)angle / 1).ToString("F0") + "°" + ((angle % 1) * 60).ToString("00") + "’";
                                        }
                                        else
                                        {
                                            if ((l1.StartPoint == l2.StartPoint) || (l1.StartPoint == l2.EndPoint))
                                            {
                                                ed.WriteMessage("\n({0:0.00}, {1:0.00}): ", l1.StartPoint.X, l1.StartPoint.Y);
                                                next = l1.StartPoint;

                                                temp.CoordsX = l1.StartPoint.X.ToString("F");
                                                temp.CoordsY = l1.StartPoint.Y.ToString("F");
                                            }
                                            else if ((l1.EndPoint == l2.EndPoint) || (l1.EndPoint == l2.StartPoint))
                                            {
                                                ed.WriteMessage("\n({0:0.00}, {1:0.00}): ", l1.EndPoint.X, l1.EndPoint.Y);
                                                next = l1.EndPoint;

                                                temp.CoordsX = l1.EndPoint.X.ToString("F");
                                                temp.CoordsY = l1.EndPoint.Y.ToString("F");
                                            }
                                            angle = angle * 180.0 / Math.PI;
                                            ed.WriteMessage("{0},{1:0}", (int)angle / 1, (angle % 1) * 60);

                                            temp.AngleT = TrassaRecord.Angle.Right;
                                            temp.AngleVal = ((int)angle / 1).ToString("F0") + "°" + ((angle % 1) * 60).ToString("00") + "’";
                                        }

                                        paste = curr.DistanceTo(next);
                                        dist += paste;
                                        curr = next;
                                        ed.WriteMessage(" {0:0.00} {1:0.00}", dist, paste);

                                        temp.Piketaz = ((int)dist / 100).ToString("F0") + "+" + (dist % 100).ToString("F");
                                        temp.DirectInsert = paste.ToString("F");

                                        tr2 = new TableRow(
                                            new TableRowProperties(new TableRowHeight() { Val = 300 }),
                                            new TableCell(new Paragraph(new Run())),
                                            new TableCell(new Paragraph(new Run())),
                                            new TableCell(new Paragraph(new Run())),
                                            new TableCell(new Paragraph(new Run())),
                                            new TableCell(new Paragraph(new Run())),
                                            new TableCell(new Paragraph(new Run())),
                                            new TableCell(new Paragraph(new Run(new Text(temp.DirectInsert))))
                                            );
                                        table.AppendChild(tr2);
                                        tr1 = new TableRow(
                                            new TableRowProperties(new TableRowHeight() { Val = 300 }),
                                            new TableCell(new Paragraph(new Run(new Text(temp.Name)))),
                                            new TableCell(new Paragraph(new Run(new Text(temp.CoordsX)))),
                                            new TableCell(new Paragraph(new Run(new Text(temp.CoordsY)))),
                                            new TableCell(new Paragraph(new Run(new Text(temp.Piketaz)))),
                                            new TableCell(new Paragraph(new Run(new Text((temp.AngleT == TrassaRecord.Angle.Left) ? temp.AngleVal.ToString() : "")))),
                                            new TableCell(new Paragraph(new Run(new Text((temp.AngleT == TrassaRecord.Angle.Right) ? temp.AngleVal.ToString() : "")))),
                                            new TableCell(new Paragraph(new Run()))
                                            );
                                        table.AppendChild(tr1);
                                    }
                            }
                        }
                        catch
                        {
                            ed.WriteMessage("\nInvalid polyline.");
                        }
                    }

                    body.AppendChild(table);
                    body.AppendChild(
                        new SectionProperties(
                            new PageMargin()
                            {
                                Top = 1134,
                                Right = (UInt32Value)850U,
                                Bottom = 1134,
                                Left = (UInt32Value)1418U,
                                Header = (UInt32Value)708U,
                                Footer = (UInt32Value)708U,
                                Gutter = (UInt32Value)0U
                            }));
                    ed.WriteMessage("\nДокумент сохранен в D:\\tdoc.docx");
                }
                catch
                {
                    ed.WriteMessage("\nError.");
                }
            }
        }
        public IDocumentTagContextBuilder Table(Action<IDocumentTableSchemeBuilder> header, Action<IDocumentTableRowsBuilder> rows)
        {
            var tableContextBuilder = new DocxDocumentTableSchemeBuilder(Document, _contextTableProperties);

            header.Invoke(tableContextBuilder);
            rows.Invoke(tableContextBuilder);

            AppendElements(tableContextBuilder.AggregatedContent.ToArray());

            _contextTableProperties = null;

            return this;
        }
Exemplo n.º 53
0
		internal void Process(TableProperties tableProperties, DocxTableProperties docxProperties, DocxNode node)
		{
            ProcessWidth(node, tableProperties);

            ProcessTableBorder(node, docxProperties, tableProperties);
			ProcessTableCellMargin(docxProperties, tableProperties);
		}
Exemplo n.º 54
0
        private static void AddTable(string fileName, string[,] data)
        {
            using (var document = WordprocessingDocument.Open(fileName, true))
            {

                var doc = document.MainDocumentPart.Document;

                Table table = new Table();

                TableProperties props = new TableProperties(
                    new TableBorders(
                    new TopBorder
                    {
                        Val = new EnumValue<BorderValues>(BorderValues.Single),
                        Size = 12
                    },
                    new BottomBorder
                    {
                        Val = new EnumValue<BorderValues>(BorderValues.Single),
                        Size = 12
                    },
                    new LeftBorder
                    {
                        Val = new EnumValue<BorderValues>(BorderValues.Single),
                        Size = 12
                    },
                    new RightBorder
                    {
                        Val = new EnumValue<BorderValues>(BorderValues.Single),
                        Size = 12
                    },
                    new InsideHorizontalBorder
                    {
                        Val = new EnumValue<BorderValues>(BorderValues.Single),
                        Size = 12
                    },
                    new InsideVerticalBorder
                    {
                        Val = new EnumValue<BorderValues>(BorderValues.Single),
                        Size = 12
                    }));

                table.AppendChild<TableProperties>(props);

                for (var i = 0; i <= data.GetUpperBound(0); i++)
                {
                    var tr = new TableRow();
                    for (var j = 0; j <= data.GetUpperBound(1); j++)
                    {
                        var tc = new TableCell();
                        tc.Append(new Paragraph(new Run(new Text(data[i, j]))));

                        // Assume you want columns that are automatically sized.
                        tc.Append(new TableCellProperties(
                            new TableCellWidth { Type = TableWidthUnitValues.Auto }));

                        tr.Append(tc);
                    }
                    table.Append(tr);
                }
                doc.Body.Append(table);
                doc.Save();
            }
        }
Exemplo n.º 55
0
    static Table NewTable(int columnCt)
    {
        // Create a table.
        Table tbl = new Table();

        // Set the style and width for the table.
        TableProperties tableProp = new TableProperties();
        TableStyle tableStyle = new TableStyle() { Val = "TableGrid" };

        // Make the table width 100% of the page width.
        TableWidth tableWidth = new TableWidth() { Width = "5000", Type = TableWidthUnitValues.Pct };

        // Apply
        tableProp.Append(tableStyle, tableWidth);
        tbl.AppendChild(tableProp);

        // Add columns to the table.
        TableGrid tg = new TableGrid();
        for (int i = 0; i < columnCt; i++)
        {
            tg.AppendChild(new GridColumn());
        }
        tbl.AppendChild(tg);
        //body.AppendChild(tbl);
        return tbl;
    }
Exemplo n.º 56
0
        private void GenerateChapterTen()
        {
            var paragraph1 = new Paragraph();
            var paraProp = GetParagraphProperties("Header1");
            var run = new Run();
            run.Append(new Text("10. Лист регистрации изменений, вносимых в РПД дисциплины"));

            paragraph1.Append(paraProp);
            paragraph1.Append(run);

            Paragraph paragraph2 = new Paragraph() { RsidParagraphMarkRevision = "00B65E2F", RsidParagraphAddition = "00E24EED", RsidParagraphProperties = "00E24EED", RsidRunAdditionDefault = "00E24EED" };

            ParagraphProperties paragraphProperties2 = new ParagraphProperties();
            SpacingBetweenLines spacingBetweenLines1 = new SpacingBetweenLines() { Line = "360", LineRule = LineSpacingRuleValues.Auto };
            Indentation indentation1 = new Indentation() { Left = "360" };
            Justification justification1 = new Justification() { Val = JustificationValues.Both };

            ParagraphMarkRunProperties paragraphMarkRunProperties2 = new ParagraphMarkRunProperties();
            RunFonts runFonts7 = new RunFonts() { Ascii = "Times New Roman", HighAnsi = "Times New Roman" };
            FontSize fontSize1 = new FontSize() { Val = "28" };
            FontSizeComplexScript fontSizeComplexScript1 = new FontSizeComplexScript() { Val = "28" };
            Languages languages7 = new Languages() { Val = "ru-RU" };

            paragraphMarkRunProperties2.Append(runFonts7);
            paragraphMarkRunProperties2.Append(fontSize1);
            paragraphMarkRunProperties2.Append(fontSizeComplexScript1);
            paragraphMarkRunProperties2.Append(languages7);

            paragraphProperties2.Append(spacingBetweenLines1);
            paragraphProperties2.Append(indentation1);
            paragraphProperties2.Append(justification1);
            paragraphProperties2.Append(paragraphMarkRunProperties2);

            paragraph2.Append(paragraphProperties2);

            Table table1 = new Table();

            TableProperties tableProperties1 = new TableProperties();
            TableWidth tableWidth1 = new TableWidth() { Width = "9807", Type = TableWidthUnitValues.Dxa };

            TableBorders tableBorders1 = new TableBorders();
            TopBorder topBorder1 = new TopBorder() { Val = BorderValues.Single, Color = "auto", Size = (UInt32Value)4U, Space = (UInt32Value)0U };
            LeftBorder leftBorder1 = new LeftBorder() { Val = BorderValues.Single, Color = "auto", Size = (UInt32Value)4U, Space = (UInt32Value)0U };
            BottomBorder bottomBorder1 = new BottomBorder() { Val = BorderValues.Single, Color = "auto", Size = (UInt32Value)4U, Space = (UInt32Value)0U };
            RightBorder rightBorder1 = new RightBorder() { Val = BorderValues.Single, Color = "auto", Size = (UInt32Value)4U, Space = (UInt32Value)0U };
            InsideHorizontalBorder insideHorizontalBorder1 = new InsideHorizontalBorder() { Val = BorderValues.Single, Color = "auto", Size = (UInt32Value)4U, Space = (UInt32Value)0U };
            InsideVerticalBorder insideVerticalBorder1 = new InsideVerticalBorder() { Val = BorderValues.Single, Color = "auto", Size = (UInt32Value)4U, Space = (UInt32Value)0U };

            tableBorders1.Append(topBorder1);
            tableBorders1.Append(leftBorder1);
            tableBorders1.Append(bottomBorder1);
            tableBorders1.Append(rightBorder1);
            tableBorders1.Append(insideHorizontalBorder1);
            tableBorders1.Append(insideVerticalBorder1);
            TableLook tableLook1 = new TableLook() { Val = "01E0", FirstRow = true, LastRow = true, FirstColumn = true, LastColumn = true, NoHorizontalBand = false, NoVerticalBand = false };

            tableProperties1.Append(tableWidth1);
            tableProperties1.Append(tableBorders1);
            tableProperties1.Append(tableLook1);

            TableGrid tableGrid1 = new TableGrid();
            GridColumn gridColumn1 = new GridColumn() { Width = "1565" };
            GridColumn gridColumn2 = new GridColumn() { Width = "1066" };
            GridColumn gridColumn3 = new GridColumn() { Width = "1917" };
            GridColumn gridColumn4 = new GridColumn() { Width = "5259" };

            tableGrid1.Append(gridColumn1);
            tableGrid1.Append(gridColumn2);
            tableGrid1.Append(gridColumn3);
            tableGrid1.Append(gridColumn4);

            TableRow tableRow1 = new TableRow() { RsidTableRowMarkRevision = "00107D47", RsidTableRowAddition = "00E24EED", RsidTableRowProperties = "00BF6E08" };

            TableCell tableCell1 = new TableCell();

            TableCellProperties tableCellProperties1 = new TableCellProperties();
            TableCellWidth tableCellWidth1 = new TableCellWidth() { Width = "1565", Type = TableWidthUnitValues.Dxa };

            tableCellProperties1.Append(tableCellWidth1);

            Paragraph paragraph3 = new Paragraph() { RsidParagraphMarkRevision = "00512F8B", RsidParagraphAddition = "00E24EED", RsidParagraphProperties = "00BF6E08", RsidRunAdditionDefault = "00E24EED" };

            ParagraphProperties paragraphProperties3 = new ParagraphProperties();
            Justification justification2 = new Justification() { Val = JustificationValues.Center };

            ParagraphMarkRunProperties paragraphMarkRunProperties3 = new ParagraphMarkRunProperties();
            RunFonts runFonts8 = new RunFonts() { Ascii = "Times New Roman", HighAnsi = "Times New Roman" };
            Bold bold1 = new Bold();
            FontSize fontSize2 = new FontSize() { Val = "28" };
            FontSizeComplexScript fontSizeComplexScript2 = new FontSizeComplexScript() { Val = "28" };
            Languages languages8 = new Languages() { Val = "ru-RU" };

            paragraphMarkRunProperties3.Append(runFonts8);
            paragraphMarkRunProperties3.Append(bold1);
            paragraphMarkRunProperties3.Append(fontSize2);
            paragraphMarkRunProperties3.Append(fontSizeComplexScript2);
            paragraphMarkRunProperties3.Append(languages8);

            paragraphProperties3.Append(justification2);
            paragraphProperties3.Append(paragraphMarkRunProperties3);

            Run run6 = new Run() { RsidRunProperties = "00512F8B" };

            RunProperties runProperties6 = new RunProperties();
            RunFonts runFonts9 = new RunFonts() { Ascii = "Times New Roman", HighAnsi = "Times New Roman" };
            Bold bold2 = new Bold();
            FontSize fontSize3 = new FontSize() { Val = "28" };
            FontSizeComplexScript fontSizeComplexScript3 = new FontSizeComplexScript() { Val = "28" };
            Languages languages9 = new Languages() { Val = "ru-RU" };

            runProperties6.Append(runFonts9);
            runProperties6.Append(bold2);
            runProperties6.Append(fontSize3);
            runProperties6.Append(fontSizeComplexScript3);
            runProperties6.Append(languages9);
            Text text5 = new Text();
            text5.Text = "№ изменения";

            run6.Append(runProperties6);
            run6.Append(text5);

            paragraph3.Append(paragraphProperties3);
            paragraph3.Append(run6);

            tableCell1.Append(tableCellProperties1);
            tableCell1.Append(paragraph3);

            TableCell tableCell2 = new TableCell();

            TableCellProperties tableCellProperties2 = new TableCellProperties();
            TableCellWidth tableCellWidth2 = new TableCellWidth() { Width = "1066", Type = TableWidthUnitValues.Dxa };

            tableCellProperties2.Append(tableCellWidth2);

            Paragraph paragraph4 = new Paragraph() { RsidParagraphMarkRevision = "00512F8B", RsidParagraphAddition = "00E24EED", RsidParagraphProperties = "00BF6E08", RsidRunAdditionDefault = "00E24EED" };

            ParagraphProperties paragraphProperties4 = new ParagraphProperties();
            Justification justification3 = new Justification() { Val = JustificationValues.Center };

            ParagraphMarkRunProperties paragraphMarkRunProperties4 = new ParagraphMarkRunProperties();
            RunFonts runFonts10 = new RunFonts() { Ascii = "Times New Roman", HighAnsi = "Times New Roman" };
            Bold bold3 = new Bold();
            FontSize fontSize4 = new FontSize() { Val = "28" };
            FontSizeComplexScript fontSizeComplexScript4 = new FontSizeComplexScript() { Val = "28" };
            Languages languages10 = new Languages() { Val = "ru-RU" };

            paragraphMarkRunProperties4.Append(runFonts10);
            paragraphMarkRunProperties4.Append(bold3);
            paragraphMarkRunProperties4.Append(fontSize4);
            paragraphMarkRunProperties4.Append(fontSizeComplexScript4);
            paragraphMarkRunProperties4.Append(languages10);

            paragraphProperties4.Append(justification3);
            paragraphProperties4.Append(paragraphMarkRunProperties4);

            Run run7 = new Run() { RsidRunProperties = "00512F8B" };

            RunProperties runProperties7 = new RunProperties();
            RunFonts runFonts11 = new RunFonts() { Ascii = "Times New Roman", HighAnsi = "Times New Roman" };
            Bold bold4 = new Bold();
            FontSize fontSize5 = new FontSize() { Val = "28" };
            FontSizeComplexScript fontSizeComplexScript5 = new FontSizeComplexScript() { Val = "28" };
            Languages languages11 = new Languages() { Val = "ru-RU" };

            runProperties7.Append(runFonts11);
            runProperties7.Append(bold4);
            runProperties7.Append(fontSize5);
            runProperties7.Append(fontSizeComplexScript5);
            runProperties7.Append(languages11);
            Text text6 = new Text();
            text6.Text = "дата";

            run7.Append(runProperties7);
            run7.Append(text6);

            paragraph4.Append(paragraphProperties4);
            paragraph4.Append(run7);

            tableCell2.Append(tableCellProperties2);
            tableCell2.Append(paragraph4);

            TableCell tableCell3 = new TableCell();

            TableCellProperties tableCellProperties3 = new TableCellProperties();
            TableCellWidth tableCellWidth3 = new TableCellWidth() { Width = "1917", Type = TableWidthUnitValues.Dxa };

            tableCellProperties3.Append(tableCellWidth3);

            Paragraph paragraph5 = new Paragraph() { RsidParagraphMarkRevision = "00512F8B", RsidParagraphAddition = "00E24EED", RsidParagraphProperties = "00BF6E08", RsidRunAdditionDefault = "00E24EED" };

            ParagraphProperties paragraphProperties5 = new ParagraphProperties();
            Justification justification4 = new Justification() { Val = JustificationValues.Center };

            ParagraphMarkRunProperties paragraphMarkRunProperties5 = new ParagraphMarkRunProperties();
            RunFonts runFonts12 = new RunFonts() { Ascii = "Times New Roman", HighAnsi = "Times New Roman" };
            Bold bold5 = new Bold();
            FontSize fontSize6 = new FontSize() { Val = "28" };
            FontSizeComplexScript fontSizeComplexScript6 = new FontSizeComplexScript() { Val = "28" };
            Languages languages12 = new Languages() { Val = "ru-RU" };

            paragraphMarkRunProperties5.Append(runFonts12);
            paragraphMarkRunProperties5.Append(bold5);
            paragraphMarkRunProperties5.Append(fontSize6);
            paragraphMarkRunProperties5.Append(fontSizeComplexScript6);
            paragraphMarkRunProperties5.Append(languages12);

            paragraphProperties5.Append(justification4);
            paragraphProperties5.Append(paragraphMarkRunProperties5);

            Run run8 = new Run() { RsidRunProperties = "00512F8B" };

            RunProperties runProperties8 = new RunProperties();
            RunFonts runFonts13 = new RunFonts() { Ascii = "Times New Roman", HighAnsi = "Times New Roman" };
            Bold bold6 = new Bold();
            FontSize fontSize7 = new FontSize() { Val = "28" };
            FontSizeComplexScript fontSizeComplexScript7 = new FontSizeComplexScript() { Val = "28" };
            Languages languages13 = new Languages() { Val = "ru-RU" };

            runProperties8.Append(runFonts13);
            runProperties8.Append(bold6);
            runProperties8.Append(fontSize7);
            runProperties8.Append(fontSizeComplexScript7);
            runProperties8.Append(languages13);
            Text text7 = new Text();
            text7.Text = "Страницы с изменениями";

            run8.Append(runProperties8);
            run8.Append(text7);

            paragraph5.Append(paragraphProperties5);
            paragraph5.Append(run8);

            tableCell3.Append(tableCellProperties3);
            tableCell3.Append(paragraph5);

            TableCell tableCell4 = new TableCell();

            TableCellProperties tableCellProperties4 = new TableCellProperties();
            TableCellWidth tableCellWidth4 = new TableCellWidth() { Width = "5259", Type = TableWidthUnitValues.Dxa };

            tableCellProperties4.Append(tableCellWidth4);

            Paragraph paragraph6 = new Paragraph() { RsidParagraphMarkRevision = "00B65E2F", RsidParagraphAddition = "00E24EED", RsidParagraphProperties = "00BF6E08", RsidRunAdditionDefault = "00E24EED" };

            ParagraphProperties paragraphProperties6 = new ParagraphProperties();
            Justification justification5 = new Justification() { Val = JustificationValues.Center };

            ParagraphMarkRunProperties paragraphMarkRunProperties6 = new ParagraphMarkRunProperties();
            RunFonts runFonts14 = new RunFonts() { Ascii = "Times New Roman", HighAnsi = "Times New Roman" };
            Bold bold7 = new Bold();
            FontSize fontSize8 = new FontSize() { Val = "28" };
            FontSizeComplexScript fontSizeComplexScript8 = new FontSizeComplexScript() { Val = "28" };
            Languages languages14 = new Languages() { Val = "ru-RU" };

            paragraphMarkRunProperties6.Append(runFonts14);
            paragraphMarkRunProperties6.Append(bold7);
            paragraphMarkRunProperties6.Append(fontSize8);
            paragraphMarkRunProperties6.Append(fontSizeComplexScript8);
            paragraphMarkRunProperties6.Append(languages14);

            paragraphProperties6.Append(justification5);
            paragraphProperties6.Append(paragraphMarkRunProperties6);

            Run run9 = new Run() { RsidRunProperties = "00B65E2F" };

            RunProperties runProperties9 = new RunProperties();
            RunFonts runFonts15 = new RunFonts() { Ascii = "Times New Roman", HighAnsi = "Times New Roman" };
            Bold bold8 = new Bold();
            FontSize fontSize9 = new FontSize() { Val = "28" };
            FontSizeComplexScript fontSizeComplexScript9 = new FontSizeComplexScript() { Val = "28" };
            Languages languages15 = new Languages() { Val = "ru-RU" };

            runProperties9.Append(runFonts15);
            runProperties9.Append(bold8);
            runProperties9.Append(fontSize9);
            runProperties9.Append(fontSizeComplexScript9);
            runProperties9.Append(languages15);
            Text text8 = new Text() { Space = SpaceProcessingModeValues.Preserve };
            text8.Text = "Перечень и содержание откорректированных разделов ";

            run9.Append(runProperties9);
            run9.Append(text8);

            Run run10 = new Run();

            RunProperties runProperties10 = new RunProperties();
            RunFonts runFonts16 = new RunFonts() { Ascii = "Times New Roman", HighAnsi = "Times New Roman" };
            Bold bold9 = new Bold();
            FontSize fontSize10 = new FontSize() { Val = "28" };
            FontSizeComplexScript fontSizeComplexScript10 = new FontSizeComplexScript() { Val = "28" };
            Languages languages16 = new Languages() { Val = "ru-RU" };

            runProperties10.Append(runFonts16);
            runProperties10.Append(bold9);
            runProperties10.Append(fontSize10);
            runProperties10.Append(fontSizeComplexScript10);
            runProperties10.Append(languages16);
            Text text9 = new Text();
            text9.Text = "РПД";

            run10.Append(runProperties10);
            run10.Append(text9);

            paragraph6.Append(paragraphProperties6);
            paragraph6.Append(run9);
            paragraph6.Append(run10);

            tableCell4.Append(tableCellProperties4);
            tableCell4.Append(paragraph6);

            tableRow1.Append(tableCell1);
            tableRow1.Append(tableCell2);
            tableRow1.Append(tableCell3);
            tableRow1.Append(tableCell4);

            TableRow tableRow2 = new TableRow() { RsidTableRowMarkRevision = "00107D47", RsidTableRowAddition = "00E24EED", RsidTableRowProperties = "00BF6E08" };

            TableCell tableCell5 = new TableCell();

            TableCellProperties tableCellProperties5 = new TableCellProperties();
            TableCellWidth tableCellWidth5 = new TableCellWidth() { Width = "1565", Type = TableWidthUnitValues.Dxa };

            tableCellProperties5.Append(tableCellWidth5);

            Paragraph paragraph7 = new Paragraph() { RsidParagraphMarkRevision = "00B65E2F", RsidParagraphAddition = "00E24EED", RsidParagraphProperties = "00BF6E08", RsidRunAdditionDefault = "00E24EED" };

            ParagraphProperties paragraphProperties7 = new ParagraphProperties();
            SpacingBetweenLines spacingBetweenLines2 = new SpacingBetweenLines() { Line = "480", LineRule = LineSpacingRuleValues.Auto };
            Justification justification6 = new Justification() { Val = JustificationValues.Both };

            ParagraphMarkRunProperties paragraphMarkRunProperties7 = new ParagraphMarkRunProperties();
            RunFonts runFonts17 = new RunFonts() { Ascii = "Times New Roman", HighAnsi = "Times New Roman" };
            FontSize fontSize11 = new FontSize() { Val = "28" };
            FontSizeComplexScript fontSizeComplexScript11 = new FontSizeComplexScript() { Val = "28" };
            Languages languages17 = new Languages() { Val = "ru-RU" };

            paragraphMarkRunProperties7.Append(runFonts17);
            paragraphMarkRunProperties7.Append(fontSize11);
            paragraphMarkRunProperties7.Append(fontSizeComplexScript11);
            paragraphMarkRunProperties7.Append(languages17);

            paragraphProperties7.Append(spacingBetweenLines2);
            paragraphProperties7.Append(justification6);
            paragraphProperties7.Append(paragraphMarkRunProperties7);

            paragraph7.Append(paragraphProperties7);

            tableCell5.Append(tableCellProperties5);
            tableCell5.Append(paragraph7);

            TableCell tableCell6 = new TableCell();

            TableCellProperties tableCellProperties6 = new TableCellProperties();
            TableCellWidth tableCellWidth6 = new TableCellWidth() { Width = "1066", Type = TableWidthUnitValues.Dxa };

            tableCellProperties6.Append(tableCellWidth6);

            Paragraph paragraph8 = new Paragraph() { RsidParagraphMarkRevision = "00B65E2F", RsidParagraphAddition = "00E24EED", RsidParagraphProperties = "00BF6E08", RsidRunAdditionDefault = "00E24EED" };

            ParagraphProperties paragraphProperties8 = new ParagraphProperties();
            SpacingBetweenLines spacingBetweenLines3 = new SpacingBetweenLines() { Line = "480", LineRule = LineSpacingRuleValues.Auto };
            Justification justification7 = new Justification() { Val = JustificationValues.Both };

            ParagraphMarkRunProperties paragraphMarkRunProperties8 = new ParagraphMarkRunProperties();
            RunFonts runFonts18 = new RunFonts() { Ascii = "Times New Roman", HighAnsi = "Times New Roman" };
            FontSize fontSize12 = new FontSize() { Val = "28" };
            FontSizeComplexScript fontSizeComplexScript12 = new FontSizeComplexScript() { Val = "28" };
            Languages languages18 = new Languages() { Val = "ru-RU" };

            paragraphMarkRunProperties8.Append(runFonts18);
            paragraphMarkRunProperties8.Append(fontSize12);
            paragraphMarkRunProperties8.Append(fontSizeComplexScript12);
            paragraphMarkRunProperties8.Append(languages18);

            paragraphProperties8.Append(spacingBetweenLines3);
            paragraphProperties8.Append(justification7);
            paragraphProperties8.Append(paragraphMarkRunProperties8);

            paragraph8.Append(paragraphProperties8);

            tableCell6.Append(tableCellProperties6);
            tableCell6.Append(paragraph8);

            TableCell tableCell7 = new TableCell();

            TableCellProperties tableCellProperties7 = new TableCellProperties();
            TableCellWidth tableCellWidth7 = new TableCellWidth() { Width = "1917", Type = TableWidthUnitValues.Dxa };

            tableCellProperties7.Append(tableCellWidth7);

            Paragraph paragraph9 = new Paragraph() { RsidParagraphMarkRevision = "00B65E2F", RsidParagraphAddition = "00E24EED", RsidParagraphProperties = "00BF6E08", RsidRunAdditionDefault = "00E24EED" };

            ParagraphProperties paragraphProperties9 = new ParagraphProperties();
            SpacingBetweenLines spacingBetweenLines4 = new SpacingBetweenLines() { Line = "480", LineRule = LineSpacingRuleValues.Auto };
            Justification justification8 = new Justification() { Val = JustificationValues.Both };

            ParagraphMarkRunProperties paragraphMarkRunProperties9 = new ParagraphMarkRunProperties();
            RunFonts runFonts19 = new RunFonts() { Ascii = "Times New Roman", HighAnsi = "Times New Roman" };
            FontSize fontSize13 = new FontSize() { Val = "28" };
            FontSizeComplexScript fontSizeComplexScript13 = new FontSizeComplexScript() { Val = "28" };
            Languages languages19 = new Languages() { Val = "ru-RU" };

            paragraphMarkRunProperties9.Append(runFonts19);
            paragraphMarkRunProperties9.Append(fontSize13);
            paragraphMarkRunProperties9.Append(fontSizeComplexScript13);
            paragraphMarkRunProperties9.Append(languages19);

            paragraphProperties9.Append(spacingBetweenLines4);
            paragraphProperties9.Append(justification8);
            paragraphProperties9.Append(paragraphMarkRunProperties9);

            paragraph9.Append(paragraphProperties9);

            tableCell7.Append(tableCellProperties7);
            tableCell7.Append(paragraph9);

            TableCell tableCell8 = new TableCell();

            TableCellProperties tableCellProperties8 = new TableCellProperties();
            TableCellWidth tableCellWidth8 = new TableCellWidth() { Width = "5259", Type = TableWidthUnitValues.Dxa };

            tableCellProperties8.Append(tableCellWidth8);

            Paragraph paragraph10 = new Paragraph() { RsidParagraphMarkRevision = "00B65E2F", RsidParagraphAddition = "00E24EED", RsidParagraphProperties = "00BF6E08", RsidRunAdditionDefault = "00E24EED" };

            ParagraphProperties paragraphProperties10 = new ParagraphProperties();
            SpacingBetweenLines spacingBetweenLines5 = new SpacingBetweenLines() { Line = "480", LineRule = LineSpacingRuleValues.Auto };
            Justification justification9 = new Justification() { Val = JustificationValues.Both };

            ParagraphMarkRunProperties paragraphMarkRunProperties10 = new ParagraphMarkRunProperties();
            RunFonts runFonts20 = new RunFonts() { Ascii = "Times New Roman", HighAnsi = "Times New Roman" };
            FontSize fontSize14 = new FontSize() { Val = "28" };
            FontSizeComplexScript fontSizeComplexScript14 = new FontSizeComplexScript() { Val = "28" };
            Languages languages20 = new Languages() { Val = "ru-RU" };

            paragraphMarkRunProperties10.Append(runFonts20);
            paragraphMarkRunProperties10.Append(fontSize14);
            paragraphMarkRunProperties10.Append(fontSizeComplexScript14);
            paragraphMarkRunProperties10.Append(languages20);

            paragraphProperties10.Append(spacingBetweenLines5);
            paragraphProperties10.Append(justification9);
            paragraphProperties10.Append(paragraphMarkRunProperties10);

            paragraph10.Append(paragraphProperties10);

            tableCell8.Append(tableCellProperties8);
            tableCell8.Append(paragraph10);

            tableRow2.Append(tableCell5);
            tableRow2.Append(tableCell6);
            tableRow2.Append(tableCell7);
            tableRow2.Append(tableCell8);

            TableRow tableRow3 = new TableRow() { RsidTableRowMarkRevision = "00107D47", RsidTableRowAddition = "00E24EED", RsidTableRowProperties = "00BF6E08" };

            TableCell tableCell9 = new TableCell();

            TableCellProperties tableCellProperties9 = new TableCellProperties();
            TableCellWidth tableCellWidth9 = new TableCellWidth() { Width = "1565", Type = TableWidthUnitValues.Dxa };

            tableCellProperties9.Append(tableCellWidth9);

            Paragraph paragraph11 = new Paragraph() { RsidParagraphMarkRevision = "00B65E2F", RsidParagraphAddition = "00E24EED", RsidParagraphProperties = "00BF6E08", RsidRunAdditionDefault = "00E24EED" };

            ParagraphProperties paragraphProperties11 = new ParagraphProperties();
            SpacingBetweenLines spacingBetweenLines6 = new SpacingBetweenLines() { Line = "480", LineRule = LineSpacingRuleValues.Auto };
            Justification justification10 = new Justification() { Val = JustificationValues.Both };

            ParagraphMarkRunProperties paragraphMarkRunProperties11 = new ParagraphMarkRunProperties();
            RunFonts runFonts21 = new RunFonts() { Ascii = "Times New Roman", HighAnsi = "Times New Roman" };
            FontSize fontSize15 = new FontSize() { Val = "28" };
            FontSizeComplexScript fontSizeComplexScript15 = new FontSizeComplexScript() { Val = "28" };
            Languages languages21 = new Languages() { Val = "ru-RU" };

            paragraphMarkRunProperties11.Append(runFonts21);
            paragraphMarkRunProperties11.Append(fontSize15);
            paragraphMarkRunProperties11.Append(fontSizeComplexScript15);
            paragraphMarkRunProperties11.Append(languages21);

            paragraphProperties11.Append(spacingBetweenLines6);
            paragraphProperties11.Append(justification10);
            paragraphProperties11.Append(paragraphMarkRunProperties11);

            paragraph11.Append(paragraphProperties11);

            tableCell9.Append(tableCellProperties9);
            tableCell9.Append(paragraph11);

            TableCell tableCell10 = new TableCell();

            TableCellProperties tableCellProperties10 = new TableCellProperties();
            TableCellWidth tableCellWidth10 = new TableCellWidth() { Width = "1066", Type = TableWidthUnitValues.Dxa };

            tableCellProperties10.Append(tableCellWidth10);

            Paragraph paragraph12 = new Paragraph() { RsidParagraphMarkRevision = "00B65E2F", RsidParagraphAddition = "00E24EED", RsidParagraphProperties = "00BF6E08", RsidRunAdditionDefault = "00E24EED" };

            ParagraphProperties paragraphProperties12 = new ParagraphProperties();
            SpacingBetweenLines spacingBetweenLines7 = new SpacingBetweenLines() { Line = "480", LineRule = LineSpacingRuleValues.Auto };
            Justification justification11 = new Justification() { Val = JustificationValues.Both };

            ParagraphMarkRunProperties paragraphMarkRunProperties12 = new ParagraphMarkRunProperties();
            RunFonts runFonts22 = new RunFonts() { Ascii = "Times New Roman", HighAnsi = "Times New Roman" };
            FontSize fontSize16 = new FontSize() { Val = "28" };
            FontSizeComplexScript fontSizeComplexScript16 = new FontSizeComplexScript() { Val = "28" };
            Languages languages22 = new Languages() { Val = "ru-RU" };

            paragraphMarkRunProperties12.Append(runFonts22);
            paragraphMarkRunProperties12.Append(fontSize16);
            paragraphMarkRunProperties12.Append(fontSizeComplexScript16);
            paragraphMarkRunProperties12.Append(languages22);

            paragraphProperties12.Append(spacingBetweenLines7);
            paragraphProperties12.Append(justification11);
            paragraphProperties12.Append(paragraphMarkRunProperties12);

            paragraph12.Append(paragraphProperties12);

            tableCell10.Append(tableCellProperties10);
            tableCell10.Append(paragraph12);

            TableCell tableCell11 = new TableCell();

            TableCellProperties tableCellProperties11 = new TableCellProperties();
            TableCellWidth tableCellWidth11 = new TableCellWidth() { Width = "1917", Type = TableWidthUnitValues.Dxa };

            tableCellProperties11.Append(tableCellWidth11);

            Paragraph paragraph13 = new Paragraph() { RsidParagraphMarkRevision = "00B65E2F", RsidParagraphAddition = "00E24EED", RsidParagraphProperties = "00BF6E08", RsidRunAdditionDefault = "00E24EED" };

            ParagraphProperties paragraphProperties13 = new ParagraphProperties();
            SpacingBetweenLines spacingBetweenLines8 = new SpacingBetweenLines() { Line = "480", LineRule = LineSpacingRuleValues.Auto };
            Justification justification12 = new Justification() { Val = JustificationValues.Both };

            ParagraphMarkRunProperties paragraphMarkRunProperties13 = new ParagraphMarkRunProperties();
            RunFonts runFonts23 = new RunFonts() { Ascii = "Times New Roman", HighAnsi = "Times New Roman" };
            FontSize fontSize17 = new FontSize() { Val = "28" };
            FontSizeComplexScript fontSizeComplexScript17 = new FontSizeComplexScript() { Val = "28" };
            Languages languages23 = new Languages() { Val = "ru-RU" };

            paragraphMarkRunProperties13.Append(runFonts23);
            paragraphMarkRunProperties13.Append(fontSize17);
            paragraphMarkRunProperties13.Append(fontSizeComplexScript17);
            paragraphMarkRunProperties13.Append(languages23);

            paragraphProperties13.Append(spacingBetweenLines8);
            paragraphProperties13.Append(justification12);
            paragraphProperties13.Append(paragraphMarkRunProperties13);

            paragraph13.Append(paragraphProperties13);

            tableCell11.Append(tableCellProperties11);
            tableCell11.Append(paragraph13);

            TableCell tableCell12 = new TableCell();

            TableCellProperties tableCellProperties12 = new TableCellProperties();
            TableCellWidth tableCellWidth12 = new TableCellWidth() { Width = "5259", Type = TableWidthUnitValues.Dxa };

            tableCellProperties12.Append(tableCellWidth12);

            Paragraph paragraph14 = new Paragraph() { RsidParagraphMarkRevision = "00B65E2F", RsidParagraphAddition = "00E24EED", RsidParagraphProperties = "00BF6E08", RsidRunAdditionDefault = "00E24EED" };

            ParagraphProperties paragraphProperties14 = new ParagraphProperties();
            SpacingBetweenLines spacingBetweenLines9 = new SpacingBetweenLines() { Line = "480", LineRule = LineSpacingRuleValues.Auto };
            Justification justification13 = new Justification() { Val = JustificationValues.Both };

            ParagraphMarkRunProperties paragraphMarkRunProperties14 = new ParagraphMarkRunProperties();
            RunFonts runFonts24 = new RunFonts() { Ascii = "Times New Roman", HighAnsi = "Times New Roman" };
            FontSize fontSize18 = new FontSize() { Val = "28" };
            FontSizeComplexScript fontSizeComplexScript18 = new FontSizeComplexScript() { Val = "28" };
            Languages languages24 = new Languages() { Val = "ru-RU" };

            paragraphMarkRunProperties14.Append(runFonts24);
            paragraphMarkRunProperties14.Append(fontSize18);
            paragraphMarkRunProperties14.Append(fontSizeComplexScript18);
            paragraphMarkRunProperties14.Append(languages24);

            paragraphProperties14.Append(spacingBetweenLines9);
            paragraphProperties14.Append(justification13);
            paragraphProperties14.Append(paragraphMarkRunProperties14);

            paragraph14.Append(paragraphProperties14);

            tableCell12.Append(tableCellProperties12);
            tableCell12.Append(paragraph14);

            tableRow3.Append(tableCell9);
            tableRow3.Append(tableCell10);
            tableRow3.Append(tableCell11);
            tableRow3.Append(tableCell12);

            TableRow tableRow4 = new TableRow() { RsidTableRowMarkRevision = "00107D47", RsidTableRowAddition = "00E24EED", RsidTableRowProperties = "00BF6E08" };

            TableCell tableCell13 = new TableCell();

            TableCellProperties tableCellProperties13 = new TableCellProperties();
            TableCellWidth tableCellWidth13 = new TableCellWidth() { Width = "1565", Type = TableWidthUnitValues.Dxa };

            tableCellProperties13.Append(tableCellWidth13);

            Paragraph paragraph15 = new Paragraph() { RsidParagraphMarkRevision = "00B65E2F", RsidParagraphAddition = "00E24EED", RsidParagraphProperties = "00BF6E08", RsidRunAdditionDefault = "00E24EED" };

            ParagraphProperties paragraphProperties15 = new ParagraphProperties();
            SpacingBetweenLines spacingBetweenLines10 = new SpacingBetweenLines() { Line = "480", LineRule = LineSpacingRuleValues.Auto };
            Justification justification14 = new Justification() { Val = JustificationValues.Both };

            ParagraphMarkRunProperties paragraphMarkRunProperties15 = new ParagraphMarkRunProperties();
            RunFonts runFonts25 = new RunFonts() { Ascii = "Times New Roman", HighAnsi = "Times New Roman" };
            FontSize fontSize19 = new FontSize() { Val = "28" };
            FontSizeComplexScript fontSizeComplexScript19 = new FontSizeComplexScript() { Val = "28" };
            Languages languages25 = new Languages() { Val = "ru-RU" };

            paragraphMarkRunProperties15.Append(runFonts25);
            paragraphMarkRunProperties15.Append(fontSize19);
            paragraphMarkRunProperties15.Append(fontSizeComplexScript19);
            paragraphMarkRunProperties15.Append(languages25);

            paragraphProperties15.Append(spacingBetweenLines10);
            paragraphProperties15.Append(justification14);
            paragraphProperties15.Append(paragraphMarkRunProperties15);

            paragraph15.Append(paragraphProperties15);

            tableCell13.Append(tableCellProperties13);
            tableCell13.Append(paragraph15);

            TableCell tableCell14 = new TableCell();

            TableCellProperties tableCellProperties14 = new TableCellProperties();
            TableCellWidth tableCellWidth14 = new TableCellWidth() { Width = "1066", Type = TableWidthUnitValues.Dxa };

            tableCellProperties14.Append(tableCellWidth14);

            Paragraph paragraph16 = new Paragraph() { RsidParagraphMarkRevision = "00B65E2F", RsidParagraphAddition = "00E24EED", RsidParagraphProperties = "00BF6E08", RsidRunAdditionDefault = "00E24EED" };

            ParagraphProperties paragraphProperties16 = new ParagraphProperties();
            SpacingBetweenLines spacingBetweenLines11 = new SpacingBetweenLines() { Line = "480", LineRule = LineSpacingRuleValues.Auto };
            Justification justification15 = new Justification() { Val = JustificationValues.Both };

            ParagraphMarkRunProperties paragraphMarkRunProperties16 = new ParagraphMarkRunProperties();
            RunFonts runFonts26 = new RunFonts() { Ascii = "Times New Roman", HighAnsi = "Times New Roman" };
            FontSize fontSize20 = new FontSize() { Val = "28" };
            FontSizeComplexScript fontSizeComplexScript20 = new FontSizeComplexScript() { Val = "28" };
            Languages languages26 = new Languages() { Val = "ru-RU" };

            paragraphMarkRunProperties16.Append(runFonts26);
            paragraphMarkRunProperties16.Append(fontSize20);
            paragraphMarkRunProperties16.Append(fontSizeComplexScript20);
            paragraphMarkRunProperties16.Append(languages26);

            paragraphProperties16.Append(spacingBetweenLines11);
            paragraphProperties16.Append(justification15);
            paragraphProperties16.Append(paragraphMarkRunProperties16);

            paragraph16.Append(paragraphProperties16);

            tableCell14.Append(tableCellProperties14);
            tableCell14.Append(paragraph16);

            TableCell tableCell15 = new TableCell();

            TableCellProperties tableCellProperties15 = new TableCellProperties();
            TableCellWidth tableCellWidth15 = new TableCellWidth() { Width = "1917", Type = TableWidthUnitValues.Dxa };

            tableCellProperties15.Append(tableCellWidth15);

            Paragraph paragraph17 = new Paragraph() { RsidParagraphMarkRevision = "00B65E2F", RsidParagraphAddition = "00E24EED", RsidParagraphProperties = "00BF6E08", RsidRunAdditionDefault = "00E24EED" };

            ParagraphProperties paragraphProperties17 = new ParagraphProperties();
            SpacingBetweenLines spacingBetweenLines12 = new SpacingBetweenLines() { Line = "480", LineRule = LineSpacingRuleValues.Auto };
            Justification justification16 = new Justification() { Val = JustificationValues.Both };

            ParagraphMarkRunProperties paragraphMarkRunProperties17 = new ParagraphMarkRunProperties();
            RunFonts runFonts27 = new RunFonts() { Ascii = "Times New Roman", HighAnsi = "Times New Roman" };
            FontSize fontSize21 = new FontSize() { Val = "28" };
            FontSizeComplexScript fontSizeComplexScript21 = new FontSizeComplexScript() { Val = "28" };
            Languages languages27 = new Languages() { Val = "ru-RU" };

            paragraphMarkRunProperties17.Append(runFonts27);
            paragraphMarkRunProperties17.Append(fontSize21);
            paragraphMarkRunProperties17.Append(fontSizeComplexScript21);
            paragraphMarkRunProperties17.Append(languages27);

            paragraphProperties17.Append(spacingBetweenLines12);
            paragraphProperties17.Append(justification16);
            paragraphProperties17.Append(paragraphMarkRunProperties17);

            paragraph17.Append(paragraphProperties17);

            tableCell15.Append(tableCellProperties15);
            tableCell15.Append(paragraph17);

            TableCell tableCell16 = new TableCell();

            TableCellProperties tableCellProperties16 = new TableCellProperties();
            TableCellWidth tableCellWidth16 = new TableCellWidth() { Width = "5259", Type = TableWidthUnitValues.Dxa };

            tableCellProperties16.Append(tableCellWidth16);

            Paragraph paragraph18 = new Paragraph() { RsidParagraphMarkRevision = "00B65E2F", RsidParagraphAddition = "00E24EED", RsidParagraphProperties = "00BF6E08", RsidRunAdditionDefault = "00E24EED" };

            ParagraphProperties paragraphProperties18 = new ParagraphProperties();
            SpacingBetweenLines spacingBetweenLines13 = new SpacingBetweenLines() { Line = "480", LineRule = LineSpacingRuleValues.Auto };
            Justification justification17 = new Justification() { Val = JustificationValues.Both };

            ParagraphMarkRunProperties paragraphMarkRunProperties18 = new ParagraphMarkRunProperties();
            RunFonts runFonts28 = new RunFonts() { Ascii = "Times New Roman", HighAnsi = "Times New Roman" };
            FontSize fontSize22 = new FontSize() { Val = "28" };
            FontSizeComplexScript fontSizeComplexScript22 = new FontSizeComplexScript() { Val = "28" };
            Languages languages28 = new Languages() { Val = "ru-RU" };

            paragraphMarkRunProperties18.Append(runFonts28);
            paragraphMarkRunProperties18.Append(fontSize22);
            paragraphMarkRunProperties18.Append(fontSizeComplexScript22);
            paragraphMarkRunProperties18.Append(languages28);

            paragraphProperties18.Append(spacingBetweenLines13);
            paragraphProperties18.Append(justification17);
            paragraphProperties18.Append(paragraphMarkRunProperties18);

            paragraph18.Append(paragraphProperties18);

            tableCell16.Append(tableCellProperties16);
            tableCell16.Append(paragraph18);

            tableRow4.Append(tableCell13);
            tableRow4.Append(tableCell14);
            tableRow4.Append(tableCell15);
            tableRow4.Append(tableCell16);

            TableRow tableRow5 = new TableRow() { RsidTableRowMarkRevision = "00107D47", RsidTableRowAddition = "00E24EED", RsidTableRowProperties = "00BF6E08" };

            TableCell tableCell17 = new TableCell();

            TableCellProperties tableCellProperties17 = new TableCellProperties();
            TableCellWidth tableCellWidth17 = new TableCellWidth() { Width = "1565", Type = TableWidthUnitValues.Dxa };

            tableCellProperties17.Append(tableCellWidth17);

            Paragraph paragraph19 = new Paragraph() { RsidParagraphMarkRevision = "00B65E2F", RsidParagraphAddition = "00E24EED", RsidParagraphProperties = "00BF6E08", RsidRunAdditionDefault = "00E24EED" };

            ParagraphProperties paragraphProperties19 = new ParagraphProperties();
            SpacingBetweenLines spacingBetweenLines14 = new SpacingBetweenLines() { Line = "480", LineRule = LineSpacingRuleValues.Auto };
            Justification justification18 = new Justification() { Val = JustificationValues.Both };

            ParagraphMarkRunProperties paragraphMarkRunProperties19 = new ParagraphMarkRunProperties();
            RunFonts runFonts29 = new RunFonts() { Ascii = "Times New Roman", HighAnsi = "Times New Roman" };
            FontSize fontSize23 = new FontSize() { Val = "28" };
            FontSizeComplexScript fontSizeComplexScript23 = new FontSizeComplexScript() { Val = "28" };
            Languages languages29 = new Languages() { Val = "ru-RU" };

            paragraphMarkRunProperties19.Append(runFonts29);
            paragraphMarkRunProperties19.Append(fontSize23);
            paragraphMarkRunProperties19.Append(fontSizeComplexScript23);
            paragraphMarkRunProperties19.Append(languages29);

            paragraphProperties19.Append(spacingBetweenLines14);
            paragraphProperties19.Append(justification18);
            paragraphProperties19.Append(paragraphMarkRunProperties19);

            paragraph19.Append(paragraphProperties19);

            tableCell17.Append(tableCellProperties17);
            tableCell17.Append(paragraph19);

            TableCell tableCell18 = new TableCell();

            TableCellProperties tableCellProperties18 = new TableCellProperties();
            TableCellWidth tableCellWidth18 = new TableCellWidth() { Width = "1066", Type = TableWidthUnitValues.Dxa };

            tableCellProperties18.Append(tableCellWidth18);

            Paragraph paragraph20 = new Paragraph() { RsidParagraphMarkRevision = "00B65E2F", RsidParagraphAddition = "00E24EED", RsidParagraphProperties = "00BF6E08", RsidRunAdditionDefault = "00E24EED" };

            ParagraphProperties paragraphProperties20 = new ParagraphProperties();
            SpacingBetweenLines spacingBetweenLines15 = new SpacingBetweenLines() { Line = "480", LineRule = LineSpacingRuleValues.Auto };
            Justification justification19 = new Justification() { Val = JustificationValues.Both };

            ParagraphMarkRunProperties paragraphMarkRunProperties20 = new ParagraphMarkRunProperties();
            RunFonts runFonts30 = new RunFonts() { Ascii = "Times New Roman", HighAnsi = "Times New Roman" };
            FontSize fontSize24 = new FontSize() { Val = "28" };
            FontSizeComplexScript fontSizeComplexScript24 = new FontSizeComplexScript() { Val = "28" };
            Languages languages30 = new Languages() { Val = "ru-RU" };

            paragraphMarkRunProperties20.Append(runFonts30);
            paragraphMarkRunProperties20.Append(fontSize24);
            paragraphMarkRunProperties20.Append(fontSizeComplexScript24);
            paragraphMarkRunProperties20.Append(languages30);

            paragraphProperties20.Append(spacingBetweenLines15);
            paragraphProperties20.Append(justification19);
            paragraphProperties20.Append(paragraphMarkRunProperties20);

            paragraph20.Append(paragraphProperties20);

            tableCell18.Append(tableCellProperties18);
            tableCell18.Append(paragraph20);

            TableCell tableCell19 = new TableCell();

            TableCellProperties tableCellProperties19 = new TableCellProperties();
            TableCellWidth tableCellWidth19 = new TableCellWidth() { Width = "1917", Type = TableWidthUnitValues.Dxa };

            tableCellProperties19.Append(tableCellWidth19);

            Paragraph paragraph21 = new Paragraph() { RsidParagraphMarkRevision = "00B65E2F", RsidParagraphAddition = "00E24EED", RsidParagraphProperties = "00BF6E08", RsidRunAdditionDefault = "00E24EED" };

            ParagraphProperties paragraphProperties21 = new ParagraphProperties();
            SpacingBetweenLines spacingBetweenLines16 = new SpacingBetweenLines() { Line = "480", LineRule = LineSpacingRuleValues.Auto };
            Justification justification20 = new Justification() { Val = JustificationValues.Both };

            ParagraphMarkRunProperties paragraphMarkRunProperties21 = new ParagraphMarkRunProperties();
            RunFonts runFonts31 = new RunFonts() { Ascii = "Times New Roman", HighAnsi = "Times New Roman" };
            FontSize fontSize25 = new FontSize() { Val = "28" };
            FontSizeComplexScript fontSizeComplexScript25 = new FontSizeComplexScript() { Val = "28" };
            Languages languages31 = new Languages() { Val = "ru-RU" };

            paragraphMarkRunProperties21.Append(runFonts31);
            paragraphMarkRunProperties21.Append(fontSize25);
            paragraphMarkRunProperties21.Append(fontSizeComplexScript25);
            paragraphMarkRunProperties21.Append(languages31);

            paragraphProperties21.Append(spacingBetweenLines16);
            paragraphProperties21.Append(justification20);
            paragraphProperties21.Append(paragraphMarkRunProperties21);

            paragraph21.Append(paragraphProperties21);

            tableCell19.Append(tableCellProperties19);
            tableCell19.Append(paragraph21);

            TableCell tableCell20 = new TableCell();

            TableCellProperties tableCellProperties20 = new TableCellProperties();
            TableCellWidth tableCellWidth20 = new TableCellWidth() { Width = "5259", Type = TableWidthUnitValues.Dxa };

            tableCellProperties20.Append(tableCellWidth20);

            Paragraph paragraph22 = new Paragraph() { RsidParagraphMarkRevision = "00B65E2F", RsidParagraphAddition = "00E24EED", RsidParagraphProperties = "00BF6E08", RsidRunAdditionDefault = "00E24EED" };

            ParagraphProperties paragraphProperties22 = new ParagraphProperties();
            SpacingBetweenLines spacingBetweenLines17 = new SpacingBetweenLines() { Line = "480", LineRule = LineSpacingRuleValues.Auto };
            Justification justification21 = new Justification() { Val = JustificationValues.Both };

            ParagraphMarkRunProperties paragraphMarkRunProperties22 = new ParagraphMarkRunProperties();
            RunFonts runFonts32 = new RunFonts() { Ascii = "Times New Roman", HighAnsi = "Times New Roman" };
            FontSize fontSize26 = new FontSize() { Val = "28" };
            FontSizeComplexScript fontSizeComplexScript26 = new FontSizeComplexScript() { Val = "28" };
            Languages languages32 = new Languages() { Val = "ru-RU" };

            paragraphMarkRunProperties22.Append(runFonts32);
            paragraphMarkRunProperties22.Append(fontSize26);
            paragraphMarkRunProperties22.Append(fontSizeComplexScript26);
            paragraphMarkRunProperties22.Append(languages32);

            paragraphProperties22.Append(spacingBetweenLines17);
            paragraphProperties22.Append(justification21);
            paragraphProperties22.Append(paragraphMarkRunProperties22);

            paragraph22.Append(paragraphProperties22);

            tableCell20.Append(tableCellProperties20);
            tableCell20.Append(paragraph22);

            tableRow5.Append(tableCell17);
            tableRow5.Append(tableCell18);
            tableRow5.Append(tableCell19);
            tableRow5.Append(tableCell20);

            TableRow tableRow6 = new TableRow() { RsidTableRowMarkRevision = "00107D47", RsidTableRowAddition = "00E24EED", RsidTableRowProperties = "00BF6E08" };

            TableCell tableCell21 = new TableCell();

            TableCellProperties tableCellProperties21 = new TableCellProperties();
            TableCellWidth tableCellWidth21 = new TableCellWidth() { Width = "1565", Type = TableWidthUnitValues.Dxa };

            tableCellProperties21.Append(tableCellWidth21);

            Paragraph paragraph23 = new Paragraph() { RsidParagraphMarkRevision = "00B65E2F", RsidParagraphAddition = "00E24EED", RsidParagraphProperties = "00BF6E08", RsidRunAdditionDefault = "00E24EED" };

            ParagraphProperties paragraphProperties23 = new ParagraphProperties();
            SpacingBetweenLines spacingBetweenLines18 = new SpacingBetweenLines() { Line = "480", LineRule = LineSpacingRuleValues.Auto };
            Justification justification22 = new Justification() { Val = JustificationValues.Both };

            ParagraphMarkRunProperties paragraphMarkRunProperties23 = new ParagraphMarkRunProperties();
            RunFonts runFonts33 = new RunFonts() { Ascii = "Times New Roman", HighAnsi = "Times New Roman" };
            FontSize fontSize27 = new FontSize() { Val = "28" };
            FontSizeComplexScript fontSizeComplexScript27 = new FontSizeComplexScript() { Val = "28" };
            Languages languages33 = new Languages() { Val = "ru-RU" };

            paragraphMarkRunProperties23.Append(runFonts33);
            paragraphMarkRunProperties23.Append(fontSize27);
            paragraphMarkRunProperties23.Append(fontSizeComplexScript27);
            paragraphMarkRunProperties23.Append(languages33);

            paragraphProperties23.Append(spacingBetweenLines18);
            paragraphProperties23.Append(justification22);
            paragraphProperties23.Append(paragraphMarkRunProperties23);

            paragraph23.Append(paragraphProperties23);

            tableCell21.Append(tableCellProperties21);
            tableCell21.Append(paragraph23);

            TableCell tableCell22 = new TableCell();

            TableCellProperties tableCellProperties22 = new TableCellProperties();
            TableCellWidth tableCellWidth22 = new TableCellWidth() { Width = "1066", Type = TableWidthUnitValues.Dxa };

            tableCellProperties22.Append(tableCellWidth22);

            Paragraph paragraph24 = new Paragraph() { RsidParagraphMarkRevision = "00B65E2F", RsidParagraphAddition = "00E24EED", RsidParagraphProperties = "00BF6E08", RsidRunAdditionDefault = "00E24EED" };

            ParagraphProperties paragraphProperties24 = new ParagraphProperties();
            SpacingBetweenLines spacingBetweenLines19 = new SpacingBetweenLines() { Line = "480", LineRule = LineSpacingRuleValues.Auto };
            Justification justification23 = new Justification() { Val = JustificationValues.Both };

            ParagraphMarkRunProperties paragraphMarkRunProperties24 = new ParagraphMarkRunProperties();
            RunFonts runFonts34 = new RunFonts() { Ascii = "Times New Roman", HighAnsi = "Times New Roman" };
            FontSize fontSize28 = new FontSize() { Val = "28" };
            FontSizeComplexScript fontSizeComplexScript28 = new FontSizeComplexScript() { Val = "28" };
            Languages languages34 = new Languages() { Val = "ru-RU" };

            paragraphMarkRunProperties24.Append(runFonts34);
            paragraphMarkRunProperties24.Append(fontSize28);
            paragraphMarkRunProperties24.Append(fontSizeComplexScript28);
            paragraphMarkRunProperties24.Append(languages34);

            paragraphProperties24.Append(spacingBetweenLines19);
            paragraphProperties24.Append(justification23);
            paragraphProperties24.Append(paragraphMarkRunProperties24);

            paragraph24.Append(paragraphProperties24);

            tableCell22.Append(tableCellProperties22);
            tableCell22.Append(paragraph24);

            TableCell tableCell23 = new TableCell();

            TableCellProperties tableCellProperties23 = new TableCellProperties();
            TableCellWidth tableCellWidth23 = new TableCellWidth() { Width = "1917", Type = TableWidthUnitValues.Dxa };

            tableCellProperties23.Append(tableCellWidth23);

            Paragraph paragraph25 = new Paragraph() { RsidParagraphMarkRevision = "00B65E2F", RsidParagraphAddition = "00E24EED", RsidParagraphProperties = "00BF6E08", RsidRunAdditionDefault = "00E24EED" };

            ParagraphProperties paragraphProperties25 = new ParagraphProperties();
            SpacingBetweenLines spacingBetweenLines20 = new SpacingBetweenLines() { Line = "480", LineRule = LineSpacingRuleValues.Auto };
            Justification justification24 = new Justification() { Val = JustificationValues.Both };

            ParagraphMarkRunProperties paragraphMarkRunProperties25 = new ParagraphMarkRunProperties();
            RunFonts runFonts35 = new RunFonts() { Ascii = "Times New Roman", HighAnsi = "Times New Roman" };
            FontSize fontSize29 = new FontSize() { Val = "28" };
            FontSizeComplexScript fontSizeComplexScript29 = new FontSizeComplexScript() { Val = "28" };
            Languages languages35 = new Languages() { Val = "ru-RU" };

            paragraphMarkRunProperties25.Append(runFonts35);
            paragraphMarkRunProperties25.Append(fontSize29);
            paragraphMarkRunProperties25.Append(fontSizeComplexScript29);
            paragraphMarkRunProperties25.Append(languages35);

            paragraphProperties25.Append(spacingBetweenLines20);
            paragraphProperties25.Append(justification24);
            paragraphProperties25.Append(paragraphMarkRunProperties25);

            paragraph25.Append(paragraphProperties25);

            tableCell23.Append(tableCellProperties23);
            tableCell23.Append(paragraph25);

            TableCell tableCell24 = new TableCell();

            TableCellProperties tableCellProperties24 = new TableCellProperties();
            TableCellWidth tableCellWidth24 = new TableCellWidth() { Width = "5259", Type = TableWidthUnitValues.Dxa };

            tableCellProperties24.Append(tableCellWidth24);

            Paragraph paragraph26 = new Paragraph() { RsidParagraphMarkRevision = "00B65E2F", RsidParagraphAddition = "00E24EED", RsidParagraphProperties = "00BF6E08", RsidRunAdditionDefault = "00E24EED" };

            ParagraphProperties paragraphProperties26 = new ParagraphProperties();
            SpacingBetweenLines spacingBetweenLines21 = new SpacingBetweenLines() { Line = "480", LineRule = LineSpacingRuleValues.Auto };
            Justification justification25 = new Justification() { Val = JustificationValues.Both };

            ParagraphMarkRunProperties paragraphMarkRunProperties26 = new ParagraphMarkRunProperties();
            RunFonts runFonts36 = new RunFonts() { Ascii = "Times New Roman", HighAnsi = "Times New Roman" };
            FontSize fontSize30 = new FontSize() { Val = "28" };
            FontSizeComplexScript fontSizeComplexScript30 = new FontSizeComplexScript() { Val = "28" };
            Languages languages36 = new Languages() { Val = "ru-RU" };

            paragraphMarkRunProperties26.Append(runFonts36);
            paragraphMarkRunProperties26.Append(fontSize30);
            paragraphMarkRunProperties26.Append(fontSizeComplexScript30);
            paragraphMarkRunProperties26.Append(languages36);

            paragraphProperties26.Append(spacingBetweenLines21);
            paragraphProperties26.Append(justification25);
            paragraphProperties26.Append(paragraphMarkRunProperties26);

            paragraph26.Append(paragraphProperties26);

            tableCell24.Append(tableCellProperties24);
            tableCell24.Append(paragraph26);

            tableRow6.Append(tableCell21);
            tableRow6.Append(tableCell22);
            tableRow6.Append(tableCell23);
            tableRow6.Append(tableCell24);

            TableRow tableRow7 = new TableRow() { RsidTableRowMarkRevision = "00107D47", RsidTableRowAddition = "00E24EED", RsidTableRowProperties = "00BF6E08" };

            TableCell tableCell25 = new TableCell();

            TableCellProperties tableCellProperties25 = new TableCellProperties();
            TableCellWidth tableCellWidth25 = new TableCellWidth() { Width = "1565", Type = TableWidthUnitValues.Dxa };

            tableCellProperties25.Append(tableCellWidth25);

            Paragraph paragraph27 = new Paragraph() { RsidParagraphMarkRevision = "00B65E2F", RsidParagraphAddition = "00E24EED", RsidParagraphProperties = "00BF6E08", RsidRunAdditionDefault = "00E24EED" };

            ParagraphProperties paragraphProperties27 = new ParagraphProperties();
            SpacingBetweenLines spacingBetweenLines22 = new SpacingBetweenLines() { Line = "480", LineRule = LineSpacingRuleValues.Auto };
            Justification justification26 = new Justification() { Val = JustificationValues.Both };

            ParagraphMarkRunProperties paragraphMarkRunProperties27 = new ParagraphMarkRunProperties();
            RunFonts runFonts37 = new RunFonts() { Ascii = "Times New Roman", HighAnsi = "Times New Roman" };
            FontSize fontSize31 = new FontSize() { Val = "28" };
            FontSizeComplexScript fontSizeComplexScript31 = new FontSizeComplexScript() { Val = "28" };
            Languages languages37 = new Languages() { Val = "ru-RU" };

            paragraphMarkRunProperties27.Append(runFonts37);
            paragraphMarkRunProperties27.Append(fontSize31);
            paragraphMarkRunProperties27.Append(fontSizeComplexScript31);
            paragraphMarkRunProperties27.Append(languages37);

            paragraphProperties27.Append(spacingBetweenLines22);
            paragraphProperties27.Append(justification26);
            paragraphProperties27.Append(paragraphMarkRunProperties27);

            paragraph27.Append(paragraphProperties27);

            tableCell25.Append(tableCellProperties25);
            tableCell25.Append(paragraph27);

            TableCell tableCell26 = new TableCell();

            TableCellProperties tableCellProperties26 = new TableCellProperties();
            TableCellWidth tableCellWidth26 = new TableCellWidth() { Width = "1066", Type = TableWidthUnitValues.Dxa };

            tableCellProperties26.Append(tableCellWidth26);

            Paragraph paragraph28 = new Paragraph() { RsidParagraphMarkRevision = "00B65E2F", RsidParagraphAddition = "00E24EED", RsidParagraphProperties = "00BF6E08", RsidRunAdditionDefault = "00E24EED" };

            ParagraphProperties paragraphProperties28 = new ParagraphProperties();
            SpacingBetweenLines spacingBetweenLines23 = new SpacingBetweenLines() { Line = "480", LineRule = LineSpacingRuleValues.Auto };
            Justification justification27 = new Justification() { Val = JustificationValues.Both };

            ParagraphMarkRunProperties paragraphMarkRunProperties28 = new ParagraphMarkRunProperties();
            RunFonts runFonts38 = new RunFonts() { Ascii = "Times New Roman", HighAnsi = "Times New Roman" };
            FontSize fontSize32 = new FontSize() { Val = "28" };
            FontSizeComplexScript fontSizeComplexScript32 = new FontSizeComplexScript() { Val = "28" };
            Languages languages38 = new Languages() { Val = "ru-RU" };

            paragraphMarkRunProperties28.Append(runFonts38);
            paragraphMarkRunProperties28.Append(fontSize32);
            paragraphMarkRunProperties28.Append(fontSizeComplexScript32);
            paragraphMarkRunProperties28.Append(languages38);

            paragraphProperties28.Append(spacingBetweenLines23);
            paragraphProperties28.Append(justification27);
            paragraphProperties28.Append(paragraphMarkRunProperties28);

            paragraph28.Append(paragraphProperties28);

            tableCell26.Append(tableCellProperties26);
            tableCell26.Append(paragraph28);

            TableCell tableCell27 = new TableCell();

            TableCellProperties tableCellProperties27 = new TableCellProperties();
            TableCellWidth tableCellWidth27 = new TableCellWidth() { Width = "1917", Type = TableWidthUnitValues.Dxa };

            tableCellProperties27.Append(tableCellWidth27);

            Paragraph paragraph29 = new Paragraph() { RsidParagraphMarkRevision = "00B65E2F", RsidParagraphAddition = "00E24EED", RsidParagraphProperties = "00BF6E08", RsidRunAdditionDefault = "00E24EED" };

            ParagraphProperties paragraphProperties29 = new ParagraphProperties();
            SpacingBetweenLines spacingBetweenLines24 = new SpacingBetweenLines() { Line = "480", LineRule = LineSpacingRuleValues.Auto };
            Justification justification28 = new Justification() { Val = JustificationValues.Both };

            ParagraphMarkRunProperties paragraphMarkRunProperties29 = new ParagraphMarkRunProperties();
            RunFonts runFonts39 = new RunFonts() { Ascii = "Times New Roman", HighAnsi = "Times New Roman" };
            FontSize fontSize33 = new FontSize() { Val = "28" };
            FontSizeComplexScript fontSizeComplexScript33 = new FontSizeComplexScript() { Val = "28" };
            Languages languages39 = new Languages() { Val = "ru-RU" };

            paragraphMarkRunProperties29.Append(runFonts39);
            paragraphMarkRunProperties29.Append(fontSize33);
            paragraphMarkRunProperties29.Append(fontSizeComplexScript33);
            paragraphMarkRunProperties29.Append(languages39);

            paragraphProperties29.Append(spacingBetweenLines24);
            paragraphProperties29.Append(justification28);
            paragraphProperties29.Append(paragraphMarkRunProperties29);

            paragraph29.Append(paragraphProperties29);

            tableCell27.Append(tableCellProperties27);
            tableCell27.Append(paragraph29);

            TableCell tableCell28 = new TableCell();

            TableCellProperties tableCellProperties28 = new TableCellProperties();
            TableCellWidth tableCellWidth28 = new TableCellWidth() { Width = "5259", Type = TableWidthUnitValues.Dxa };

            tableCellProperties28.Append(tableCellWidth28);

            Paragraph paragraph30 = new Paragraph() { RsidParagraphMarkRevision = "00B65E2F", RsidParagraphAddition = "00E24EED", RsidParagraphProperties = "00BF6E08", RsidRunAdditionDefault = "00E24EED" };

            ParagraphProperties paragraphProperties30 = new ParagraphProperties();
            SpacingBetweenLines spacingBetweenLines25 = new SpacingBetweenLines() { Line = "480", LineRule = LineSpacingRuleValues.Auto };
            Justification justification29 = new Justification() { Val = JustificationValues.Both };

            ParagraphMarkRunProperties paragraphMarkRunProperties30 = new ParagraphMarkRunProperties();
            RunFonts runFonts40 = new RunFonts() { Ascii = "Times New Roman", HighAnsi = "Times New Roman" };
            FontSize fontSize34 = new FontSize() { Val = "28" };
            FontSizeComplexScript fontSizeComplexScript34 = new FontSizeComplexScript() { Val = "28" };
            Languages languages40 = new Languages() { Val = "ru-RU" };

            paragraphMarkRunProperties30.Append(runFonts40);
            paragraphMarkRunProperties30.Append(fontSize34);
            paragraphMarkRunProperties30.Append(fontSizeComplexScript34);
            paragraphMarkRunProperties30.Append(languages40);

            paragraphProperties30.Append(spacingBetweenLines25);
            paragraphProperties30.Append(justification29);
            paragraphProperties30.Append(paragraphMarkRunProperties30);

            paragraph30.Append(paragraphProperties30);

            tableCell28.Append(tableCellProperties28);
            tableCell28.Append(paragraph30);

            tableRow7.Append(tableCell25);
            tableRow7.Append(tableCell26);
            tableRow7.Append(tableCell27);
            tableRow7.Append(tableCell28);

            TableRow tableRow8 = new TableRow() { RsidTableRowMarkRevision = "00107D47", RsidTableRowAddition = "00E24EED", RsidTableRowProperties = "00BF6E08" };

            TableCell tableCell29 = new TableCell();

            TableCellProperties tableCellProperties29 = new TableCellProperties();
            TableCellWidth tableCellWidth29 = new TableCellWidth() { Width = "1565", Type = TableWidthUnitValues.Dxa };

            tableCellProperties29.Append(tableCellWidth29);

            Paragraph paragraph31 = new Paragraph() { RsidParagraphMarkRevision = "00B65E2F", RsidParagraphAddition = "00E24EED", RsidParagraphProperties = "00BF6E08", RsidRunAdditionDefault = "00E24EED" };

            ParagraphProperties paragraphProperties31 = new ParagraphProperties();
            SpacingBetweenLines spacingBetweenLines26 = new SpacingBetweenLines() { Line = "480", LineRule = LineSpacingRuleValues.Auto };
            Justification justification30 = new Justification() { Val = JustificationValues.Both };

            ParagraphMarkRunProperties paragraphMarkRunProperties31 = new ParagraphMarkRunProperties();
            RunFonts runFonts41 = new RunFonts() { Ascii = "Times New Roman", HighAnsi = "Times New Roman" };
            FontSize fontSize35 = new FontSize() { Val = "28" };
            FontSizeComplexScript fontSizeComplexScript35 = new FontSizeComplexScript() { Val = "28" };
            Languages languages41 = new Languages() { Val = "ru-RU" };

            paragraphMarkRunProperties31.Append(runFonts41);
            paragraphMarkRunProperties31.Append(fontSize35);
            paragraphMarkRunProperties31.Append(fontSizeComplexScript35);
            paragraphMarkRunProperties31.Append(languages41);

            paragraphProperties31.Append(spacingBetweenLines26);
            paragraphProperties31.Append(justification30);
            paragraphProperties31.Append(paragraphMarkRunProperties31);

            paragraph31.Append(paragraphProperties31);

            tableCell29.Append(tableCellProperties29);
            tableCell29.Append(paragraph31);

            TableCell tableCell30 = new TableCell();

            TableCellProperties tableCellProperties30 = new TableCellProperties();
            TableCellWidth tableCellWidth30 = new TableCellWidth() { Width = "1066", Type = TableWidthUnitValues.Dxa };

            tableCellProperties30.Append(tableCellWidth30);

            Paragraph paragraph32 = new Paragraph() { RsidParagraphMarkRevision = "00B65E2F", RsidParagraphAddition = "00E24EED", RsidParagraphProperties = "00BF6E08", RsidRunAdditionDefault = "00E24EED" };

            ParagraphProperties paragraphProperties32 = new ParagraphProperties();
            SpacingBetweenLines spacingBetweenLines27 = new SpacingBetweenLines() { Line = "480", LineRule = LineSpacingRuleValues.Auto };
            Justification justification31 = new Justification() { Val = JustificationValues.Both };

            ParagraphMarkRunProperties paragraphMarkRunProperties32 = new ParagraphMarkRunProperties();
            RunFonts runFonts42 = new RunFonts() { Ascii = "Times New Roman", HighAnsi = "Times New Roman" };
            FontSize fontSize36 = new FontSize() { Val = "28" };
            FontSizeComplexScript fontSizeComplexScript36 = new FontSizeComplexScript() { Val = "28" };
            Languages languages42 = new Languages() { Val = "ru-RU" };

            paragraphMarkRunProperties32.Append(runFonts42);
            paragraphMarkRunProperties32.Append(fontSize36);
            paragraphMarkRunProperties32.Append(fontSizeComplexScript36);
            paragraphMarkRunProperties32.Append(languages42);

            paragraphProperties32.Append(spacingBetweenLines27);
            paragraphProperties32.Append(justification31);
            paragraphProperties32.Append(paragraphMarkRunProperties32);

            paragraph32.Append(paragraphProperties32);

            tableCell30.Append(tableCellProperties30);
            tableCell30.Append(paragraph32);

            TableCell tableCell31 = new TableCell();

            TableCellProperties tableCellProperties31 = new TableCellProperties();
            TableCellWidth tableCellWidth31 = new TableCellWidth() { Width = "1917", Type = TableWidthUnitValues.Dxa };

            tableCellProperties31.Append(tableCellWidth31);

            Paragraph paragraph33 = new Paragraph() { RsidParagraphMarkRevision = "00B65E2F", RsidParagraphAddition = "00E24EED", RsidParagraphProperties = "00BF6E08", RsidRunAdditionDefault = "00E24EED" };

            ParagraphProperties paragraphProperties33 = new ParagraphProperties();
            SpacingBetweenLines spacingBetweenLines28 = new SpacingBetweenLines() { Line = "480", LineRule = LineSpacingRuleValues.Auto };
            Justification justification32 = new Justification() { Val = JustificationValues.Both };

            ParagraphMarkRunProperties paragraphMarkRunProperties33 = new ParagraphMarkRunProperties();
            RunFonts runFonts43 = new RunFonts() { Ascii = "Times New Roman", HighAnsi = "Times New Roman" };
            FontSize fontSize37 = new FontSize() { Val = "28" };
            FontSizeComplexScript fontSizeComplexScript37 = new FontSizeComplexScript() { Val = "28" };
            Languages languages43 = new Languages() { Val = "ru-RU" };

            paragraphMarkRunProperties33.Append(runFonts43);
            paragraphMarkRunProperties33.Append(fontSize37);
            paragraphMarkRunProperties33.Append(fontSizeComplexScript37);
            paragraphMarkRunProperties33.Append(languages43);

            paragraphProperties33.Append(spacingBetweenLines28);
            paragraphProperties33.Append(justification32);
            paragraphProperties33.Append(paragraphMarkRunProperties33);

            paragraph33.Append(paragraphProperties33);

            tableCell31.Append(tableCellProperties31);
            tableCell31.Append(paragraph33);

            TableCell tableCell32 = new TableCell();

            TableCellProperties tableCellProperties32 = new TableCellProperties();
            TableCellWidth tableCellWidth32 = new TableCellWidth() { Width = "5259", Type = TableWidthUnitValues.Dxa };

            tableCellProperties32.Append(tableCellWidth32);

            Paragraph paragraph34 = new Paragraph() { RsidParagraphMarkRevision = "00B65E2F", RsidParagraphAddition = "00E24EED", RsidParagraphProperties = "00BF6E08", RsidRunAdditionDefault = "00E24EED" };

            ParagraphProperties paragraphProperties34 = new ParagraphProperties();
            SpacingBetweenLines spacingBetweenLines29 = new SpacingBetweenLines() { Line = "480", LineRule = LineSpacingRuleValues.Auto };
            Justification justification33 = new Justification() { Val = JustificationValues.Both };

            ParagraphMarkRunProperties paragraphMarkRunProperties34 = new ParagraphMarkRunProperties();
            RunFonts runFonts44 = new RunFonts() { Ascii = "Times New Roman", HighAnsi = "Times New Roman" };
            FontSize fontSize38 = new FontSize() { Val = "28" };
            FontSizeComplexScript fontSizeComplexScript38 = new FontSizeComplexScript() { Val = "28" };
            Languages languages44 = new Languages() { Val = "ru-RU" };

            paragraphMarkRunProperties34.Append(runFonts44);
            paragraphMarkRunProperties34.Append(fontSize38);
            paragraphMarkRunProperties34.Append(fontSizeComplexScript38);
            paragraphMarkRunProperties34.Append(languages44);

            paragraphProperties34.Append(spacingBetweenLines29);
            paragraphProperties34.Append(justification33);
            paragraphProperties34.Append(paragraphMarkRunProperties34);

            paragraph34.Append(paragraphProperties34);

            tableCell32.Append(tableCellProperties32);
            tableCell32.Append(paragraph34);

            tableRow8.Append(tableCell29);
            tableRow8.Append(tableCell30);
            tableRow8.Append(tableCell31);
            tableRow8.Append(tableCell32);

            TableRow tableRow9 = new TableRow() { RsidTableRowMarkRevision = "00107D47", RsidTableRowAddition = "00E24EED", RsidTableRowProperties = "00BF6E08" };

            TableCell tableCell33 = new TableCell();

            TableCellProperties tableCellProperties33 = new TableCellProperties();
            TableCellWidth tableCellWidth33 = new TableCellWidth() { Width = "1565", Type = TableWidthUnitValues.Dxa };

            tableCellProperties33.Append(tableCellWidth33);

            Paragraph paragraph35 = new Paragraph() { RsidParagraphMarkRevision = "00B65E2F", RsidParagraphAddition = "00E24EED", RsidParagraphProperties = "00BF6E08", RsidRunAdditionDefault = "00E24EED" };

            ParagraphProperties paragraphProperties35 = new ParagraphProperties();
            SpacingBetweenLines spacingBetweenLines30 = new SpacingBetweenLines() { Line = "480", LineRule = LineSpacingRuleValues.Auto };
            Justification justification34 = new Justification() { Val = JustificationValues.Both };

            ParagraphMarkRunProperties paragraphMarkRunProperties35 = new ParagraphMarkRunProperties();
            RunFonts runFonts45 = new RunFonts() { Ascii = "Times New Roman", HighAnsi = "Times New Roman" };
            FontSize fontSize39 = new FontSize() { Val = "28" };
            FontSizeComplexScript fontSizeComplexScript39 = new FontSizeComplexScript() { Val = "28" };
            Languages languages45 = new Languages() { Val = "ru-RU" };

            paragraphMarkRunProperties35.Append(runFonts45);
            paragraphMarkRunProperties35.Append(fontSize39);
            paragraphMarkRunProperties35.Append(fontSizeComplexScript39);
            paragraphMarkRunProperties35.Append(languages45);

            paragraphProperties35.Append(spacingBetweenLines30);
            paragraphProperties35.Append(justification34);
            paragraphProperties35.Append(paragraphMarkRunProperties35);

            paragraph35.Append(paragraphProperties35);

            tableCell33.Append(tableCellProperties33);
            tableCell33.Append(paragraph35);

            TableCell tableCell34 = new TableCell();

            TableCellProperties tableCellProperties34 = new TableCellProperties();
            TableCellWidth tableCellWidth34 = new TableCellWidth() { Width = "1066", Type = TableWidthUnitValues.Dxa };

            tableCellProperties34.Append(tableCellWidth34);

            Paragraph paragraph36 = new Paragraph() { RsidParagraphMarkRevision = "00B65E2F", RsidParagraphAddition = "00E24EED", RsidParagraphProperties = "00BF6E08", RsidRunAdditionDefault = "00E24EED" };

            ParagraphProperties paragraphProperties36 = new ParagraphProperties();
            SpacingBetweenLines spacingBetweenLines31 = new SpacingBetweenLines() { Line = "480", LineRule = LineSpacingRuleValues.Auto };
            Justification justification35 = new Justification() { Val = JustificationValues.Both };

            ParagraphMarkRunProperties paragraphMarkRunProperties36 = new ParagraphMarkRunProperties();
            RunFonts runFonts46 = new RunFonts() { Ascii = "Times New Roman", HighAnsi = "Times New Roman" };
            FontSize fontSize40 = new FontSize() { Val = "28" };
            FontSizeComplexScript fontSizeComplexScript40 = new FontSizeComplexScript() { Val = "28" };
            Languages languages46 = new Languages() { Val = "ru-RU" };

            paragraphMarkRunProperties36.Append(runFonts46);
            paragraphMarkRunProperties36.Append(fontSize40);
            paragraphMarkRunProperties36.Append(fontSizeComplexScript40);
            paragraphMarkRunProperties36.Append(languages46);

            paragraphProperties36.Append(spacingBetweenLines31);
            paragraphProperties36.Append(justification35);
            paragraphProperties36.Append(paragraphMarkRunProperties36);

            paragraph36.Append(paragraphProperties36);

            tableCell34.Append(tableCellProperties34);
            tableCell34.Append(paragraph36);

            TableCell tableCell35 = new TableCell();

            TableCellProperties tableCellProperties35 = new TableCellProperties();
            TableCellWidth tableCellWidth35 = new TableCellWidth() { Width = "1917", Type = TableWidthUnitValues.Dxa };

            tableCellProperties35.Append(tableCellWidth35);

            Paragraph paragraph37 = new Paragraph() { RsidParagraphMarkRevision = "00B65E2F", RsidParagraphAddition = "00E24EED", RsidParagraphProperties = "00BF6E08", RsidRunAdditionDefault = "00E24EED" };

            ParagraphProperties paragraphProperties37 = new ParagraphProperties();
            SpacingBetweenLines spacingBetweenLines32 = new SpacingBetweenLines() { Line = "480", LineRule = LineSpacingRuleValues.Auto };
            Justification justification36 = new Justification() { Val = JustificationValues.Both };

            ParagraphMarkRunProperties paragraphMarkRunProperties37 = new ParagraphMarkRunProperties();
            RunFonts runFonts47 = new RunFonts() { Ascii = "Times New Roman", HighAnsi = "Times New Roman" };
            FontSize fontSize41 = new FontSize() { Val = "28" };
            FontSizeComplexScript fontSizeComplexScript41 = new FontSizeComplexScript() { Val = "28" };
            Languages languages47 = new Languages() { Val = "ru-RU" };

            paragraphMarkRunProperties37.Append(runFonts47);
            paragraphMarkRunProperties37.Append(fontSize41);
            paragraphMarkRunProperties37.Append(fontSizeComplexScript41);
            paragraphMarkRunProperties37.Append(languages47);

            paragraphProperties37.Append(spacingBetweenLines32);
            paragraphProperties37.Append(justification36);
            paragraphProperties37.Append(paragraphMarkRunProperties37);

            paragraph37.Append(paragraphProperties37);

            tableCell35.Append(tableCellProperties35);
            tableCell35.Append(paragraph37);

            TableCell tableCell36 = new TableCell();

            TableCellProperties tableCellProperties36 = new TableCellProperties();
            TableCellWidth tableCellWidth36 = new TableCellWidth() { Width = "5259", Type = TableWidthUnitValues.Dxa };

            tableCellProperties36.Append(tableCellWidth36);

            Paragraph paragraph38 = new Paragraph() { RsidParagraphMarkRevision = "00B65E2F", RsidParagraphAddition = "00E24EED", RsidParagraphProperties = "00BF6E08", RsidRunAdditionDefault = "00E24EED" };

            ParagraphProperties paragraphProperties38 = new ParagraphProperties();
            SpacingBetweenLines spacingBetweenLines33 = new SpacingBetweenLines() { Line = "480", LineRule = LineSpacingRuleValues.Auto };
            Justification justification37 = new Justification() { Val = JustificationValues.Both };

            ParagraphMarkRunProperties paragraphMarkRunProperties38 = new ParagraphMarkRunProperties();
            RunFonts runFonts48 = new RunFonts() { Ascii = "Times New Roman", HighAnsi = "Times New Roman" };
            FontSize fontSize42 = new FontSize() { Val = "28" };
            FontSizeComplexScript fontSizeComplexScript42 = new FontSizeComplexScript() { Val = "28" };
            Languages languages48 = new Languages() { Val = "ru-RU" };

            paragraphMarkRunProperties38.Append(runFonts48);
            paragraphMarkRunProperties38.Append(fontSize42);
            paragraphMarkRunProperties38.Append(fontSizeComplexScript42);
            paragraphMarkRunProperties38.Append(languages48);

            paragraphProperties38.Append(spacingBetweenLines33);
            paragraphProperties38.Append(justification37);
            paragraphProperties38.Append(paragraphMarkRunProperties38);

            paragraph38.Append(paragraphProperties38);

            tableCell36.Append(tableCellProperties36);
            tableCell36.Append(paragraph38);

            tableRow9.Append(tableCell33);
            tableRow9.Append(tableCell34);
            tableRow9.Append(tableCell35);
            tableRow9.Append(tableCell36);

            TableRow tableRow10 = new TableRow() { RsidTableRowMarkRevision = "00107D47", RsidTableRowAddition = "00E24EED", RsidTableRowProperties = "00BF6E08" };

            TableCell tableCell37 = new TableCell();

            TableCellProperties tableCellProperties37 = new TableCellProperties();
            TableCellWidth tableCellWidth37 = new TableCellWidth() { Width = "1565", Type = TableWidthUnitValues.Dxa };

            tableCellProperties37.Append(tableCellWidth37);

            Paragraph paragraph39 = new Paragraph() { RsidParagraphMarkRevision = "00B65E2F", RsidParagraphAddition = "00E24EED", RsidParagraphProperties = "00BF6E08", RsidRunAdditionDefault = "00E24EED" };

            ParagraphProperties paragraphProperties39 = new ParagraphProperties();
            SpacingBetweenLines spacingBetweenLines34 = new SpacingBetweenLines() { Line = "480", LineRule = LineSpacingRuleValues.Auto };
            Justification justification38 = new Justification() { Val = JustificationValues.Both };

            ParagraphMarkRunProperties paragraphMarkRunProperties39 = new ParagraphMarkRunProperties();
            RunFonts runFonts49 = new RunFonts() { Ascii = "Times New Roman", HighAnsi = "Times New Roman" };
            FontSize fontSize43 = new FontSize() { Val = "28" };
            FontSizeComplexScript fontSizeComplexScript43 = new FontSizeComplexScript() { Val = "28" };
            Languages languages49 = new Languages() { Val = "ru-RU" };

            paragraphMarkRunProperties39.Append(runFonts49);
            paragraphMarkRunProperties39.Append(fontSize43);
            paragraphMarkRunProperties39.Append(fontSizeComplexScript43);
            paragraphMarkRunProperties39.Append(languages49);

            paragraphProperties39.Append(spacingBetweenLines34);
            paragraphProperties39.Append(justification38);
            paragraphProperties39.Append(paragraphMarkRunProperties39);

            paragraph39.Append(paragraphProperties39);

            tableCell37.Append(tableCellProperties37);
            tableCell37.Append(paragraph39);

            TableCell tableCell38 = new TableCell();

            TableCellProperties tableCellProperties38 = new TableCellProperties();
            TableCellWidth tableCellWidth38 = new TableCellWidth() { Width = "1066", Type = TableWidthUnitValues.Dxa };

            tableCellProperties38.Append(tableCellWidth38);

            Paragraph paragraph40 = new Paragraph() { RsidParagraphMarkRevision = "00B65E2F", RsidParagraphAddition = "00E24EED", RsidParagraphProperties = "00BF6E08", RsidRunAdditionDefault = "00E24EED" };

            ParagraphProperties paragraphProperties40 = new ParagraphProperties();
            SpacingBetweenLines spacingBetweenLines35 = new SpacingBetweenLines() { Line = "480", LineRule = LineSpacingRuleValues.Auto };
            Justification justification39 = new Justification() { Val = JustificationValues.Both };

            ParagraphMarkRunProperties paragraphMarkRunProperties40 = new ParagraphMarkRunProperties();
            RunFonts runFonts50 = new RunFonts() { Ascii = "Times New Roman", HighAnsi = "Times New Roman" };
            FontSize fontSize44 = new FontSize() { Val = "28" };
            FontSizeComplexScript fontSizeComplexScript44 = new FontSizeComplexScript() { Val = "28" };
            Languages languages50 = new Languages() { Val = "ru-RU" };

            paragraphMarkRunProperties40.Append(runFonts50);
            paragraphMarkRunProperties40.Append(fontSize44);
            paragraphMarkRunProperties40.Append(fontSizeComplexScript44);
            paragraphMarkRunProperties40.Append(languages50);

            paragraphProperties40.Append(spacingBetweenLines35);
            paragraphProperties40.Append(justification39);
            paragraphProperties40.Append(paragraphMarkRunProperties40);

            paragraph40.Append(paragraphProperties40);

            tableCell38.Append(tableCellProperties38);
            tableCell38.Append(paragraph40);

            TableCell tableCell39 = new TableCell();

            TableCellProperties tableCellProperties39 = new TableCellProperties();
            TableCellWidth tableCellWidth39 = new TableCellWidth() { Width = "1917", Type = TableWidthUnitValues.Dxa };

            tableCellProperties39.Append(tableCellWidth39);

            Paragraph paragraph41 = new Paragraph() { RsidParagraphMarkRevision = "00B65E2F", RsidParagraphAddition = "00E24EED", RsidParagraphProperties = "00BF6E08", RsidRunAdditionDefault = "00E24EED" };

            ParagraphProperties paragraphProperties41 = new ParagraphProperties();
            SpacingBetweenLines spacingBetweenLines36 = new SpacingBetweenLines() { Line = "480", LineRule = LineSpacingRuleValues.Auto };
            Justification justification40 = new Justification() { Val = JustificationValues.Both };

            ParagraphMarkRunProperties paragraphMarkRunProperties41 = new ParagraphMarkRunProperties();
            RunFonts runFonts51 = new RunFonts() { Ascii = "Times New Roman", HighAnsi = "Times New Roman" };
            FontSize fontSize45 = new FontSize() { Val = "28" };
            FontSizeComplexScript fontSizeComplexScript45 = new FontSizeComplexScript() { Val = "28" };
            Languages languages51 = new Languages() { Val = "ru-RU" };

            paragraphMarkRunProperties41.Append(runFonts51);
            paragraphMarkRunProperties41.Append(fontSize45);
            paragraphMarkRunProperties41.Append(fontSizeComplexScript45);
            paragraphMarkRunProperties41.Append(languages51);

            paragraphProperties41.Append(spacingBetweenLines36);
            paragraphProperties41.Append(justification40);
            paragraphProperties41.Append(paragraphMarkRunProperties41);

            paragraph41.Append(paragraphProperties41);

            tableCell39.Append(tableCellProperties39);
            tableCell39.Append(paragraph41);

            TableCell tableCell40 = new TableCell();

            TableCellProperties tableCellProperties40 = new TableCellProperties();
            TableCellWidth tableCellWidth40 = new TableCellWidth() { Width = "5259", Type = TableWidthUnitValues.Dxa };

            tableCellProperties40.Append(tableCellWidth40);

            Paragraph paragraph42 = new Paragraph() { RsidParagraphMarkRevision = "00B65E2F", RsidParagraphAddition = "00E24EED", RsidParagraphProperties = "00BF6E08", RsidRunAdditionDefault = "00E24EED" };

            ParagraphProperties paragraphProperties42 = new ParagraphProperties();
            SpacingBetweenLines spacingBetweenLines37 = new SpacingBetweenLines() { Line = "480", LineRule = LineSpacingRuleValues.Auto };
            Justification justification41 = new Justification() { Val = JustificationValues.Both };

            ParagraphMarkRunProperties paragraphMarkRunProperties42 = new ParagraphMarkRunProperties();
            RunFonts runFonts52 = new RunFonts() { Ascii = "Times New Roman", HighAnsi = "Times New Roman" };
            FontSize fontSize46 = new FontSize() { Val = "28" };
            FontSizeComplexScript fontSizeComplexScript46 = new FontSizeComplexScript() { Val = "28" };
            Languages languages52 = new Languages() { Val = "ru-RU" };

            paragraphMarkRunProperties42.Append(runFonts52);
            paragraphMarkRunProperties42.Append(fontSize46);
            paragraphMarkRunProperties42.Append(fontSizeComplexScript46);
            paragraphMarkRunProperties42.Append(languages52);

            paragraphProperties42.Append(spacingBetweenLines37);
            paragraphProperties42.Append(justification41);
            paragraphProperties42.Append(paragraphMarkRunProperties42);

            paragraph42.Append(paragraphProperties42);

            tableCell40.Append(tableCellProperties40);
            tableCell40.Append(paragraph42);

            tableRow10.Append(tableCell37);
            tableRow10.Append(tableCell38);
            tableRow10.Append(tableCell39);
            tableRow10.Append(tableCell40);

            TableRow tableRow11 = new TableRow() { RsidTableRowMarkRevision = "00107D47", RsidTableRowAddition = "00E24EED", RsidTableRowProperties = "00BF6E08" };

            TableCell tableCell41 = new TableCell();

            TableCellProperties tableCellProperties41 = new TableCellProperties();
            TableCellWidth tableCellWidth41 = new TableCellWidth() { Width = "1565", Type = TableWidthUnitValues.Dxa };

            tableCellProperties41.Append(tableCellWidth41);

            Paragraph paragraph43 = new Paragraph() { RsidParagraphMarkRevision = "00B65E2F", RsidParagraphAddition = "00E24EED", RsidParagraphProperties = "00BF6E08", RsidRunAdditionDefault = "00E24EED" };

            ParagraphProperties paragraphProperties43 = new ParagraphProperties();
            SpacingBetweenLines spacingBetweenLines38 = new SpacingBetweenLines() { Line = "480", LineRule = LineSpacingRuleValues.Auto };
            Justification justification42 = new Justification() { Val = JustificationValues.Both };

            ParagraphMarkRunProperties paragraphMarkRunProperties43 = new ParagraphMarkRunProperties();
            RunFonts runFonts53 = new RunFonts() { Ascii = "Times New Roman", HighAnsi = "Times New Roman" };
            FontSize fontSize47 = new FontSize() { Val = "28" };
            FontSizeComplexScript fontSizeComplexScript47 = new FontSizeComplexScript() { Val = "28" };
            Languages languages53 = new Languages() { Val = "ru-RU" };

            paragraphMarkRunProperties43.Append(runFonts53);
            paragraphMarkRunProperties43.Append(fontSize47);
            paragraphMarkRunProperties43.Append(fontSizeComplexScript47);
            paragraphMarkRunProperties43.Append(languages53);

            paragraphProperties43.Append(spacingBetweenLines38);
            paragraphProperties43.Append(justification42);
            paragraphProperties43.Append(paragraphMarkRunProperties43);

            paragraph43.Append(paragraphProperties43);

            tableCell41.Append(tableCellProperties41);
            tableCell41.Append(paragraph43);

            TableCell tableCell42 = new TableCell();

            TableCellProperties tableCellProperties42 = new TableCellProperties();
            TableCellWidth tableCellWidth42 = new TableCellWidth() { Width = "1066", Type = TableWidthUnitValues.Dxa };

            tableCellProperties42.Append(tableCellWidth42);

            Paragraph paragraph44 = new Paragraph() { RsidParagraphMarkRevision = "00B65E2F", RsidParagraphAddition = "00E24EED", RsidParagraphProperties = "00BF6E08", RsidRunAdditionDefault = "00E24EED" };

            ParagraphProperties paragraphProperties44 = new ParagraphProperties();
            SpacingBetweenLines spacingBetweenLines39 = new SpacingBetweenLines() { Line = "480", LineRule = LineSpacingRuleValues.Auto };
            Justification justification43 = new Justification() { Val = JustificationValues.Both };

            ParagraphMarkRunProperties paragraphMarkRunProperties44 = new ParagraphMarkRunProperties();
            RunFonts runFonts54 = new RunFonts() { Ascii = "Times New Roman", HighAnsi = "Times New Roman" };
            FontSize fontSize48 = new FontSize() { Val = "28" };
            FontSizeComplexScript fontSizeComplexScript48 = new FontSizeComplexScript() { Val = "28" };
            Languages languages54 = new Languages() { Val = "ru-RU" };

            paragraphMarkRunProperties44.Append(runFonts54);
            paragraphMarkRunProperties44.Append(fontSize48);
            paragraphMarkRunProperties44.Append(fontSizeComplexScript48);
            paragraphMarkRunProperties44.Append(languages54);

            paragraphProperties44.Append(spacingBetweenLines39);
            paragraphProperties44.Append(justification43);
            paragraphProperties44.Append(paragraphMarkRunProperties44);

            paragraph44.Append(paragraphProperties44);

            tableCell42.Append(tableCellProperties42);
            tableCell42.Append(paragraph44);

            TableCell tableCell43 = new TableCell();

            TableCellProperties tableCellProperties43 = new TableCellProperties();
            TableCellWidth tableCellWidth43 = new TableCellWidth() { Width = "1917", Type = TableWidthUnitValues.Dxa };

            tableCellProperties43.Append(tableCellWidth43);

            Paragraph paragraph45 = new Paragraph() { RsidParagraphMarkRevision = "00B65E2F", RsidParagraphAddition = "00E24EED", RsidParagraphProperties = "00BF6E08", RsidRunAdditionDefault = "00E24EED" };

            ParagraphProperties paragraphProperties45 = new ParagraphProperties();
            SpacingBetweenLines spacingBetweenLines40 = new SpacingBetweenLines() { Line = "480", LineRule = LineSpacingRuleValues.Auto };
            Justification justification44 = new Justification() { Val = JustificationValues.Both };

            ParagraphMarkRunProperties paragraphMarkRunProperties45 = new ParagraphMarkRunProperties();
            RunFonts runFonts55 = new RunFonts() { Ascii = "Times New Roman", HighAnsi = "Times New Roman" };
            FontSize fontSize49 = new FontSize() { Val = "28" };
            FontSizeComplexScript fontSizeComplexScript49 = new FontSizeComplexScript() { Val = "28" };
            Languages languages55 = new Languages() { Val = "ru-RU" };

            paragraphMarkRunProperties45.Append(runFonts55);
            paragraphMarkRunProperties45.Append(fontSize49);
            paragraphMarkRunProperties45.Append(fontSizeComplexScript49);
            paragraphMarkRunProperties45.Append(languages55);

            paragraphProperties45.Append(spacingBetweenLines40);
            paragraphProperties45.Append(justification44);
            paragraphProperties45.Append(paragraphMarkRunProperties45);

            paragraph45.Append(paragraphProperties45);

            tableCell43.Append(tableCellProperties43);
            tableCell43.Append(paragraph45);

            TableCell tableCell44 = new TableCell();

            TableCellProperties tableCellProperties44 = new TableCellProperties();
            TableCellWidth tableCellWidth44 = new TableCellWidth() { Width = "5259", Type = TableWidthUnitValues.Dxa };

            tableCellProperties44.Append(tableCellWidth44);

            Paragraph paragraph46 = new Paragraph() { RsidParagraphMarkRevision = "00B65E2F", RsidParagraphAddition = "00E24EED", RsidParagraphProperties = "00BF6E08", RsidRunAdditionDefault = "00E24EED" };

            ParagraphProperties paragraphProperties46 = new ParagraphProperties();
            SpacingBetweenLines spacingBetweenLines41 = new SpacingBetweenLines() { Line = "480", LineRule = LineSpacingRuleValues.Auto };
            Justification justification45 = new Justification() { Val = JustificationValues.Both };

            ParagraphMarkRunProperties paragraphMarkRunProperties46 = new ParagraphMarkRunProperties();
            RunFonts runFonts56 = new RunFonts() { Ascii = "Times New Roman", HighAnsi = "Times New Roman" };
            FontSize fontSize50 = new FontSize() { Val = "28" };
            FontSizeComplexScript fontSizeComplexScript50 = new FontSizeComplexScript() { Val = "28" };
            Languages languages56 = new Languages() { Val = "ru-RU" };

            paragraphMarkRunProperties46.Append(runFonts56);
            paragraphMarkRunProperties46.Append(fontSize50);
            paragraphMarkRunProperties46.Append(fontSizeComplexScript50);
            paragraphMarkRunProperties46.Append(languages56);

            paragraphProperties46.Append(spacingBetweenLines41);
            paragraphProperties46.Append(justification45);
            paragraphProperties46.Append(paragraphMarkRunProperties46);

            paragraph46.Append(paragraphProperties46);

            tableCell44.Append(tableCellProperties44);
            tableCell44.Append(paragraph46);

            tableRow11.Append(tableCell41);
            tableRow11.Append(tableCell42);
            tableRow11.Append(tableCell43);
            tableRow11.Append(tableCell44);

            TableRow tableRow12 = new TableRow() { RsidTableRowMarkRevision = "00107D47", RsidTableRowAddition = "00E24EED", RsidTableRowProperties = "00BF6E08" };

            TableCell tableCell45 = new TableCell();

            TableCellProperties tableCellProperties45 = new TableCellProperties();
            TableCellWidth tableCellWidth45 = new TableCellWidth() { Width = "1565", Type = TableWidthUnitValues.Dxa };

            tableCellProperties45.Append(tableCellWidth45);

            Paragraph paragraph47 = new Paragraph() { RsidParagraphMarkRevision = "00B65E2F", RsidParagraphAddition = "00E24EED", RsidParagraphProperties = "00BF6E08", RsidRunAdditionDefault = "00E24EED" };

            ParagraphProperties paragraphProperties47 = new ParagraphProperties();
            SpacingBetweenLines spacingBetweenLines42 = new SpacingBetweenLines() { Line = "480", LineRule = LineSpacingRuleValues.Auto };
            Justification justification46 = new Justification() { Val = JustificationValues.Both };

            ParagraphMarkRunProperties paragraphMarkRunProperties47 = new ParagraphMarkRunProperties();
            RunFonts runFonts57 = new RunFonts() { Ascii = "Times New Roman", HighAnsi = "Times New Roman" };
            FontSize fontSize51 = new FontSize() { Val = "28" };
            FontSizeComplexScript fontSizeComplexScript51 = new FontSizeComplexScript() { Val = "28" };
            Languages languages57 = new Languages() { Val = "ru-RU" };

            paragraphMarkRunProperties47.Append(runFonts57);
            paragraphMarkRunProperties47.Append(fontSize51);
            paragraphMarkRunProperties47.Append(fontSizeComplexScript51);
            paragraphMarkRunProperties47.Append(languages57);

            paragraphProperties47.Append(spacingBetweenLines42);
            paragraphProperties47.Append(justification46);
            paragraphProperties47.Append(paragraphMarkRunProperties47);

            paragraph47.Append(paragraphProperties47);

            tableCell45.Append(tableCellProperties45);
            tableCell45.Append(paragraph47);

            TableCell tableCell46 = new TableCell();

            TableCellProperties tableCellProperties46 = new TableCellProperties();
            TableCellWidth tableCellWidth46 = new TableCellWidth() { Width = "1066", Type = TableWidthUnitValues.Dxa };

            tableCellProperties46.Append(tableCellWidth46);

            Paragraph paragraph48 = new Paragraph() { RsidParagraphMarkRevision = "00B65E2F", RsidParagraphAddition = "00E24EED", RsidParagraphProperties = "00BF6E08", RsidRunAdditionDefault = "00E24EED" };

            ParagraphProperties paragraphProperties48 = new ParagraphProperties();
            SpacingBetweenLines spacingBetweenLines43 = new SpacingBetweenLines() { Line = "480", LineRule = LineSpacingRuleValues.Auto };
            Justification justification47 = new Justification() { Val = JustificationValues.Both };

            ParagraphMarkRunProperties paragraphMarkRunProperties48 = new ParagraphMarkRunProperties();
            RunFonts runFonts58 = new RunFonts() { Ascii = "Times New Roman", HighAnsi = "Times New Roman" };
            FontSize fontSize52 = new FontSize() { Val = "28" };
            FontSizeComplexScript fontSizeComplexScript52 = new FontSizeComplexScript() { Val = "28" };
            Languages languages58 = new Languages() { Val = "ru-RU" };

            paragraphMarkRunProperties48.Append(runFonts58);
            paragraphMarkRunProperties48.Append(fontSize52);
            paragraphMarkRunProperties48.Append(fontSizeComplexScript52);
            paragraphMarkRunProperties48.Append(languages58);

            paragraphProperties48.Append(spacingBetweenLines43);
            paragraphProperties48.Append(justification47);
            paragraphProperties48.Append(paragraphMarkRunProperties48);

            paragraph48.Append(paragraphProperties48);

            tableCell46.Append(tableCellProperties46);
            tableCell46.Append(paragraph48);

            TableCell tableCell47 = new TableCell();

            TableCellProperties tableCellProperties47 = new TableCellProperties();
            TableCellWidth tableCellWidth47 = new TableCellWidth() { Width = "1917", Type = TableWidthUnitValues.Dxa };

            tableCellProperties47.Append(tableCellWidth47);

            Paragraph paragraph49 = new Paragraph() { RsidParagraphMarkRevision = "00B65E2F", RsidParagraphAddition = "00E24EED", RsidParagraphProperties = "00BF6E08", RsidRunAdditionDefault = "00E24EED" };

            ParagraphProperties paragraphProperties49 = new ParagraphProperties();
            SpacingBetweenLines spacingBetweenLines44 = new SpacingBetweenLines() { Line = "480", LineRule = LineSpacingRuleValues.Auto };
            Justification justification48 = new Justification() { Val = JustificationValues.Both };

            ParagraphMarkRunProperties paragraphMarkRunProperties49 = new ParagraphMarkRunProperties();
            RunFonts runFonts59 = new RunFonts() { Ascii = "Times New Roman", HighAnsi = "Times New Roman" };
            FontSize fontSize53 = new FontSize() { Val = "28" };
            FontSizeComplexScript fontSizeComplexScript53 = new FontSizeComplexScript() { Val = "28" };
            Languages languages59 = new Languages() { Val = "ru-RU" };

            paragraphMarkRunProperties49.Append(runFonts59);
            paragraphMarkRunProperties49.Append(fontSize53);
            paragraphMarkRunProperties49.Append(fontSizeComplexScript53);
            paragraphMarkRunProperties49.Append(languages59);

            paragraphProperties49.Append(spacingBetweenLines44);
            paragraphProperties49.Append(justification48);
            paragraphProperties49.Append(paragraphMarkRunProperties49);

            paragraph49.Append(paragraphProperties49);

            tableCell47.Append(tableCellProperties47);
            tableCell47.Append(paragraph49);

            TableCell tableCell48 = new TableCell();

            TableCellProperties tableCellProperties48 = new TableCellProperties();
            TableCellWidth tableCellWidth48 = new TableCellWidth() { Width = "5259", Type = TableWidthUnitValues.Dxa };

            tableCellProperties48.Append(tableCellWidth48);

            Paragraph paragraph50 = new Paragraph() { RsidParagraphMarkRevision = "00B65E2F", RsidParagraphAddition = "00E24EED", RsidParagraphProperties = "00BF6E08", RsidRunAdditionDefault = "00E24EED" };

            ParagraphProperties paragraphProperties50 = new ParagraphProperties();
            SpacingBetweenLines spacingBetweenLines45 = new SpacingBetweenLines() { Line = "480", LineRule = LineSpacingRuleValues.Auto };
            Justification justification49 = new Justification() { Val = JustificationValues.Both };

            ParagraphMarkRunProperties paragraphMarkRunProperties50 = new ParagraphMarkRunProperties();
            RunFonts runFonts60 = new RunFonts() { Ascii = "Times New Roman", HighAnsi = "Times New Roman" };
            FontSize fontSize54 = new FontSize() { Val = "28" };
            FontSizeComplexScript fontSizeComplexScript54 = new FontSizeComplexScript() { Val = "28" };
            Languages languages60 = new Languages() { Val = "ru-RU" };

            paragraphMarkRunProperties50.Append(runFonts60);
            paragraphMarkRunProperties50.Append(fontSize54);
            paragraphMarkRunProperties50.Append(fontSizeComplexScript54);
            paragraphMarkRunProperties50.Append(languages60);

            paragraphProperties50.Append(spacingBetweenLines45);
            paragraphProperties50.Append(justification49);
            paragraphProperties50.Append(paragraphMarkRunProperties50);

            paragraph50.Append(paragraphProperties50);

            tableCell48.Append(tableCellProperties48);
            tableCell48.Append(paragraph50);

            tableRow12.Append(tableCell45);
            tableRow12.Append(tableCell46);
            tableRow12.Append(tableCell47);
            tableRow12.Append(tableCell48);

            TableRow tableRow13 = new TableRow() { RsidTableRowMarkRevision = "00107D47", RsidTableRowAddition = "00E24EED", RsidTableRowProperties = "00BF6E08" };

            TableCell tableCell49 = new TableCell();

            TableCellProperties tableCellProperties49 = new TableCellProperties();
            TableCellWidth tableCellWidth49 = new TableCellWidth() { Width = "1565", Type = TableWidthUnitValues.Dxa };

            tableCellProperties49.Append(tableCellWidth49);

            Paragraph paragraph51 = new Paragraph() { RsidParagraphMarkRevision = "00B65E2F", RsidParagraphAddition = "00E24EED", RsidParagraphProperties = "00BF6E08", RsidRunAdditionDefault = "00E24EED" };

            ParagraphProperties paragraphProperties51 = new ParagraphProperties();
            SpacingBetweenLines spacingBetweenLines46 = new SpacingBetweenLines() { Line = "480", LineRule = LineSpacingRuleValues.Auto };
            Justification justification50 = new Justification() { Val = JustificationValues.Both };

            ParagraphMarkRunProperties paragraphMarkRunProperties51 = new ParagraphMarkRunProperties();
            RunFonts runFonts61 = new RunFonts() { Ascii = "Times New Roman", HighAnsi = "Times New Roman" };
            FontSize fontSize55 = new FontSize() { Val = "28" };
            FontSizeComplexScript fontSizeComplexScript55 = new FontSizeComplexScript() { Val = "28" };
            Languages languages61 = new Languages() { Val = "ru-RU" };

            paragraphMarkRunProperties51.Append(runFonts61);
            paragraphMarkRunProperties51.Append(fontSize55);
            paragraphMarkRunProperties51.Append(fontSizeComplexScript55);
            paragraphMarkRunProperties51.Append(languages61);

            paragraphProperties51.Append(spacingBetweenLines46);
            paragraphProperties51.Append(justification50);
            paragraphProperties51.Append(paragraphMarkRunProperties51);

            paragraph51.Append(paragraphProperties51);

            tableCell49.Append(tableCellProperties49);
            tableCell49.Append(paragraph51);

            TableCell tableCell50 = new TableCell();

            TableCellProperties tableCellProperties50 = new TableCellProperties();
            TableCellWidth tableCellWidth50 = new TableCellWidth() { Width = "1066", Type = TableWidthUnitValues.Dxa };

            tableCellProperties50.Append(tableCellWidth50);

            Paragraph paragraph52 = new Paragraph() { RsidParagraphMarkRevision = "00B65E2F", RsidParagraphAddition = "00E24EED", RsidParagraphProperties = "00BF6E08", RsidRunAdditionDefault = "00E24EED" };

            ParagraphProperties paragraphProperties52 = new ParagraphProperties();
            SpacingBetweenLines spacingBetweenLines47 = new SpacingBetweenLines() { Line = "480", LineRule = LineSpacingRuleValues.Auto };
            Justification justification51 = new Justification() { Val = JustificationValues.Both };

            ParagraphMarkRunProperties paragraphMarkRunProperties52 = new ParagraphMarkRunProperties();
            RunFonts runFonts62 = new RunFonts() { Ascii = "Times New Roman", HighAnsi = "Times New Roman" };
            FontSize fontSize56 = new FontSize() { Val = "28" };
            FontSizeComplexScript fontSizeComplexScript56 = new FontSizeComplexScript() { Val = "28" };
            Languages languages62 = new Languages() { Val = "ru-RU" };

            paragraphMarkRunProperties52.Append(runFonts62);
            paragraphMarkRunProperties52.Append(fontSize56);
            paragraphMarkRunProperties52.Append(fontSizeComplexScript56);
            paragraphMarkRunProperties52.Append(languages62);

            paragraphProperties52.Append(spacingBetweenLines47);
            paragraphProperties52.Append(justification51);
            paragraphProperties52.Append(paragraphMarkRunProperties52);

            paragraph52.Append(paragraphProperties52);

            tableCell50.Append(tableCellProperties50);
            tableCell50.Append(paragraph52);

            TableCell tableCell51 = new TableCell();

            TableCellProperties tableCellProperties51 = new TableCellProperties();
            TableCellWidth tableCellWidth51 = new TableCellWidth() { Width = "1917", Type = TableWidthUnitValues.Dxa };

            tableCellProperties51.Append(tableCellWidth51);

            Paragraph paragraph53 = new Paragraph() { RsidParagraphMarkRevision = "00B65E2F", RsidParagraphAddition = "00E24EED", RsidParagraphProperties = "00BF6E08", RsidRunAdditionDefault = "00E24EED" };

            ParagraphProperties paragraphProperties53 = new ParagraphProperties();
            SpacingBetweenLines spacingBetweenLines48 = new SpacingBetweenLines() { Line = "480", LineRule = LineSpacingRuleValues.Auto };
            Justification justification52 = new Justification() { Val = JustificationValues.Both };

            ParagraphMarkRunProperties paragraphMarkRunProperties53 = new ParagraphMarkRunProperties();
            RunFonts runFonts63 = new RunFonts() { Ascii = "Times New Roman", HighAnsi = "Times New Roman" };
            FontSize fontSize57 = new FontSize() { Val = "28" };
            FontSizeComplexScript fontSizeComplexScript57 = new FontSizeComplexScript() { Val = "28" };
            Languages languages63 = new Languages() { Val = "ru-RU" };

            paragraphMarkRunProperties53.Append(runFonts63);
            paragraphMarkRunProperties53.Append(fontSize57);
            paragraphMarkRunProperties53.Append(fontSizeComplexScript57);
            paragraphMarkRunProperties53.Append(languages63);

            paragraphProperties53.Append(spacingBetweenLines48);
            paragraphProperties53.Append(justification52);
            paragraphProperties53.Append(paragraphMarkRunProperties53);

            paragraph53.Append(paragraphProperties53);

            tableCell51.Append(tableCellProperties51);
            tableCell51.Append(paragraph53);

            TableCell tableCell52 = new TableCell();

            TableCellProperties tableCellProperties52 = new TableCellProperties();
            TableCellWidth tableCellWidth52 = new TableCellWidth() { Width = "5259", Type = TableWidthUnitValues.Dxa };

            tableCellProperties52.Append(tableCellWidth52);

            Paragraph paragraph54 = new Paragraph() { RsidParagraphMarkRevision = "00B65E2F", RsidParagraphAddition = "00E24EED", RsidParagraphProperties = "00BF6E08", RsidRunAdditionDefault = "00E24EED" };

            ParagraphProperties paragraphProperties54 = new ParagraphProperties();
            SpacingBetweenLines spacingBetweenLines49 = new SpacingBetweenLines() { Line = "480", LineRule = LineSpacingRuleValues.Auto };
            Justification justification53 = new Justification() { Val = JustificationValues.Both };

            ParagraphMarkRunProperties paragraphMarkRunProperties54 = new ParagraphMarkRunProperties();
            RunFonts runFonts64 = new RunFonts() { Ascii = "Times New Roman", HighAnsi = "Times New Roman" };
            FontSize fontSize58 = new FontSize() { Val = "28" };
            FontSizeComplexScript fontSizeComplexScript58 = new FontSizeComplexScript() { Val = "28" };
            Languages languages64 = new Languages() { Val = "ru-RU" };

            paragraphMarkRunProperties54.Append(runFonts64);
            paragraphMarkRunProperties54.Append(fontSize58);
            paragraphMarkRunProperties54.Append(fontSizeComplexScript58);
            paragraphMarkRunProperties54.Append(languages64);

            paragraphProperties54.Append(spacingBetweenLines49);
            paragraphProperties54.Append(justification53);
            paragraphProperties54.Append(paragraphMarkRunProperties54);

            paragraph54.Append(paragraphProperties54);

            tableCell52.Append(tableCellProperties52);
            tableCell52.Append(paragraph54);

            tableRow13.Append(tableCell49);
            tableRow13.Append(tableCell50);
            tableRow13.Append(tableCell51);
            tableRow13.Append(tableCell52);

            TableRow tableRow14 = new TableRow() { RsidTableRowMarkRevision = "00107D47", RsidTableRowAddition = "00E24EED", RsidTableRowProperties = "00BF6E08" };

            TableCell tableCell53 = new TableCell();

            TableCellProperties tableCellProperties53 = new TableCellProperties();
            TableCellWidth tableCellWidth53 = new TableCellWidth() { Width = "1565", Type = TableWidthUnitValues.Dxa };

            tableCellProperties53.Append(tableCellWidth53);

            Paragraph paragraph55 = new Paragraph() { RsidParagraphMarkRevision = "00B65E2F", RsidParagraphAddition = "00E24EED", RsidParagraphProperties = "00BF6E08", RsidRunAdditionDefault = "00E24EED" };

            ParagraphProperties paragraphProperties55 = new ParagraphProperties();
            SpacingBetweenLines spacingBetweenLines50 = new SpacingBetweenLines() { Line = "480", LineRule = LineSpacingRuleValues.Auto };
            Justification justification54 = new Justification() { Val = JustificationValues.Both };

            ParagraphMarkRunProperties paragraphMarkRunProperties55 = new ParagraphMarkRunProperties();
            RunFonts runFonts65 = new RunFonts() { Ascii = "Times New Roman", HighAnsi = "Times New Roman" };
            FontSize fontSize59 = new FontSize() { Val = "28" };
            FontSizeComplexScript fontSizeComplexScript59 = new FontSizeComplexScript() { Val = "28" };
            Languages languages65 = new Languages() { Val = "ru-RU" };

            paragraphMarkRunProperties55.Append(runFonts65);
            paragraphMarkRunProperties55.Append(fontSize59);
            paragraphMarkRunProperties55.Append(fontSizeComplexScript59);
            paragraphMarkRunProperties55.Append(languages65);

            paragraphProperties55.Append(spacingBetweenLines50);
            paragraphProperties55.Append(justification54);
            paragraphProperties55.Append(paragraphMarkRunProperties55);

            paragraph55.Append(paragraphProperties55);

            tableCell53.Append(tableCellProperties53);
            tableCell53.Append(paragraph55);

            TableCell tableCell54 = new TableCell();

            TableCellProperties tableCellProperties54 = new TableCellProperties();
            TableCellWidth tableCellWidth54 = new TableCellWidth() { Width = "1066", Type = TableWidthUnitValues.Dxa };

            tableCellProperties54.Append(tableCellWidth54);

            Paragraph paragraph56 = new Paragraph() { RsidParagraphMarkRevision = "00B65E2F", RsidParagraphAddition = "00E24EED", RsidParagraphProperties = "00BF6E08", RsidRunAdditionDefault = "00E24EED" };

            ParagraphProperties paragraphProperties56 = new ParagraphProperties();
            SpacingBetweenLines spacingBetweenLines51 = new SpacingBetweenLines() { Line = "480", LineRule = LineSpacingRuleValues.Auto };
            Justification justification55 = new Justification() { Val = JustificationValues.Both };

            ParagraphMarkRunProperties paragraphMarkRunProperties56 = new ParagraphMarkRunProperties();
            RunFonts runFonts66 = new RunFonts() { Ascii = "Times New Roman", HighAnsi = "Times New Roman" };
            FontSize fontSize60 = new FontSize() { Val = "28" };
            FontSizeComplexScript fontSizeComplexScript60 = new FontSizeComplexScript() { Val = "28" };
            Languages languages66 = new Languages() { Val = "ru-RU" };

            paragraphMarkRunProperties56.Append(runFonts66);
            paragraphMarkRunProperties56.Append(fontSize60);
            paragraphMarkRunProperties56.Append(fontSizeComplexScript60);
            paragraphMarkRunProperties56.Append(languages66);

            paragraphProperties56.Append(spacingBetweenLines51);
            paragraphProperties56.Append(justification55);
            paragraphProperties56.Append(paragraphMarkRunProperties56);

            paragraph56.Append(paragraphProperties56);

            tableCell54.Append(tableCellProperties54);
            tableCell54.Append(paragraph56);

            TableCell tableCell55 = new TableCell();

            TableCellProperties tableCellProperties55 = new TableCellProperties();
            TableCellWidth tableCellWidth55 = new TableCellWidth() { Width = "1917", Type = TableWidthUnitValues.Dxa };

            tableCellProperties55.Append(tableCellWidth55);

            Paragraph paragraph57 = new Paragraph() { RsidParagraphMarkRevision = "00B65E2F", RsidParagraphAddition = "00E24EED", RsidParagraphProperties = "00BF6E08", RsidRunAdditionDefault = "00E24EED" };

            ParagraphProperties paragraphProperties57 = new ParagraphProperties();
            SpacingBetweenLines spacingBetweenLines52 = new SpacingBetweenLines() { Line = "480", LineRule = LineSpacingRuleValues.Auto };
            Justification justification56 = new Justification() { Val = JustificationValues.Both };

            ParagraphMarkRunProperties paragraphMarkRunProperties57 = new ParagraphMarkRunProperties();
            RunFonts runFonts67 = new RunFonts() { Ascii = "Times New Roman", HighAnsi = "Times New Roman" };
            FontSize fontSize61 = new FontSize() { Val = "28" };
            FontSizeComplexScript fontSizeComplexScript61 = new FontSizeComplexScript() { Val = "28" };
            Languages languages67 = new Languages() { Val = "ru-RU" };

            paragraphMarkRunProperties57.Append(runFonts67);
            paragraphMarkRunProperties57.Append(fontSize61);
            paragraphMarkRunProperties57.Append(fontSizeComplexScript61);
            paragraphMarkRunProperties57.Append(languages67);

            paragraphProperties57.Append(spacingBetweenLines52);
            paragraphProperties57.Append(justification56);
            paragraphProperties57.Append(paragraphMarkRunProperties57);

            paragraph57.Append(paragraphProperties57);

            tableCell55.Append(tableCellProperties55);
            tableCell55.Append(paragraph57);

            TableCell tableCell56 = new TableCell();

            TableCellProperties tableCellProperties56 = new TableCellProperties();
            TableCellWidth tableCellWidth56 = new TableCellWidth() { Width = "5259", Type = TableWidthUnitValues.Dxa };

            tableCellProperties56.Append(tableCellWidth56);

            Paragraph paragraph58 = new Paragraph() { RsidParagraphMarkRevision = "00B65E2F", RsidParagraphAddition = "00E24EED", RsidParagraphProperties = "00BF6E08", RsidRunAdditionDefault = "00E24EED" };

            ParagraphProperties paragraphProperties58 = new ParagraphProperties();
            SpacingBetweenLines spacingBetweenLines53 = new SpacingBetweenLines() { Line = "480", LineRule = LineSpacingRuleValues.Auto };
            Justification justification57 = new Justification() { Val = JustificationValues.Both };

            ParagraphMarkRunProperties paragraphMarkRunProperties58 = new ParagraphMarkRunProperties();
            RunFonts runFonts68 = new RunFonts() { Ascii = "Times New Roman", HighAnsi = "Times New Roman" };
            FontSize fontSize62 = new FontSize() { Val = "28" };
            FontSizeComplexScript fontSizeComplexScript62 = new FontSizeComplexScript() { Val = "28" };
            Languages languages68 = new Languages() { Val = "ru-RU" };

            paragraphMarkRunProperties58.Append(runFonts68);
            paragraphMarkRunProperties58.Append(fontSize62);
            paragraphMarkRunProperties58.Append(fontSizeComplexScript62);
            paragraphMarkRunProperties58.Append(languages68);

            paragraphProperties58.Append(spacingBetweenLines53);
            paragraphProperties58.Append(justification57);
            paragraphProperties58.Append(paragraphMarkRunProperties58);

            paragraph58.Append(paragraphProperties58);

            tableCell56.Append(tableCellProperties56);
            tableCell56.Append(paragraph58);

            tableRow14.Append(tableCell53);
            tableRow14.Append(tableCell54);
            tableRow14.Append(tableCell55);
            tableRow14.Append(tableCell56);

            TableRow tableRow15 = new TableRow() { RsidTableRowMarkRevision = "00107D47", RsidTableRowAddition = "00E24EED", RsidTableRowProperties = "00BF6E08" };

            TableCell tableCell57 = new TableCell();

            TableCellProperties tableCellProperties57 = new TableCellProperties();
            TableCellWidth tableCellWidth57 = new TableCellWidth() { Width = "1565", Type = TableWidthUnitValues.Dxa };

            tableCellProperties57.Append(tableCellWidth57);

            Paragraph paragraph59 = new Paragraph() { RsidParagraphMarkRevision = "00B65E2F", RsidParagraphAddition = "00E24EED", RsidParagraphProperties = "00BF6E08", RsidRunAdditionDefault = "00E24EED" };

            ParagraphProperties paragraphProperties59 = new ParagraphProperties();
            SpacingBetweenLines spacingBetweenLines54 = new SpacingBetweenLines() { Line = "480", LineRule = LineSpacingRuleValues.Auto };
            Justification justification58 = new Justification() { Val = JustificationValues.Both };

            ParagraphMarkRunProperties paragraphMarkRunProperties59 = new ParagraphMarkRunProperties();
            RunFonts runFonts69 = new RunFonts() { Ascii = "Times New Roman", HighAnsi = "Times New Roman" };
            FontSize fontSize63 = new FontSize() { Val = "28" };
            FontSizeComplexScript fontSizeComplexScript63 = new FontSizeComplexScript() { Val = "28" };
            Languages languages69 = new Languages() { Val = "ru-RU" };

            paragraphMarkRunProperties59.Append(runFonts69);
            paragraphMarkRunProperties59.Append(fontSize63);
            paragraphMarkRunProperties59.Append(fontSizeComplexScript63);
            paragraphMarkRunProperties59.Append(languages69);

            paragraphProperties59.Append(spacingBetweenLines54);
            paragraphProperties59.Append(justification58);
            paragraphProperties59.Append(paragraphMarkRunProperties59);

            paragraph59.Append(paragraphProperties59);

            tableCell57.Append(tableCellProperties57);
            tableCell57.Append(paragraph59);

            TableCell tableCell58 = new TableCell();

            TableCellProperties tableCellProperties58 = new TableCellProperties();
            TableCellWidth tableCellWidth58 = new TableCellWidth() { Width = "1066", Type = TableWidthUnitValues.Dxa };

            tableCellProperties58.Append(tableCellWidth58);

            Paragraph paragraph60 = new Paragraph() { RsidParagraphMarkRevision = "00B65E2F", RsidParagraphAddition = "00E24EED", RsidParagraphProperties = "00BF6E08", RsidRunAdditionDefault = "00E24EED" };

            ParagraphProperties paragraphProperties60 = new ParagraphProperties();
            SpacingBetweenLines spacingBetweenLines55 = new SpacingBetweenLines() { Line = "480", LineRule = LineSpacingRuleValues.Auto };
            Justification justification59 = new Justification() { Val = JustificationValues.Both };

            ParagraphMarkRunProperties paragraphMarkRunProperties60 = new ParagraphMarkRunProperties();
            RunFonts runFonts70 = new RunFonts() { Ascii = "Times New Roman", HighAnsi = "Times New Roman" };
            FontSize fontSize64 = new FontSize() { Val = "28" };
            FontSizeComplexScript fontSizeComplexScript64 = new FontSizeComplexScript() { Val = "28" };
            Languages languages70 = new Languages() { Val = "ru-RU" };

            paragraphMarkRunProperties60.Append(runFonts70);
            paragraphMarkRunProperties60.Append(fontSize64);
            paragraphMarkRunProperties60.Append(fontSizeComplexScript64);
            paragraphMarkRunProperties60.Append(languages70);

            paragraphProperties60.Append(spacingBetweenLines55);
            paragraphProperties60.Append(justification59);
            paragraphProperties60.Append(paragraphMarkRunProperties60);

            paragraph60.Append(paragraphProperties60);

            tableCell58.Append(tableCellProperties58);
            tableCell58.Append(paragraph60);

            TableCell tableCell59 = new TableCell();

            TableCellProperties tableCellProperties59 = new TableCellProperties();
            TableCellWidth tableCellWidth59 = new TableCellWidth() { Width = "1917", Type = TableWidthUnitValues.Dxa };

            tableCellProperties59.Append(tableCellWidth59);

            Paragraph paragraph61 = new Paragraph() { RsidParagraphMarkRevision = "00B65E2F", RsidParagraphAddition = "00E24EED", RsidParagraphProperties = "00BF6E08", RsidRunAdditionDefault = "00E24EED" };

            ParagraphProperties paragraphProperties61 = new ParagraphProperties();
            SpacingBetweenLines spacingBetweenLines56 = new SpacingBetweenLines() { Line = "480", LineRule = LineSpacingRuleValues.Auto };
            Justification justification60 = new Justification() { Val = JustificationValues.Both };

            ParagraphMarkRunProperties paragraphMarkRunProperties61 = new ParagraphMarkRunProperties();
            RunFonts runFonts71 = new RunFonts() { Ascii = "Times New Roman", HighAnsi = "Times New Roman" };
            FontSize fontSize65 = new FontSize() { Val = "28" };
            FontSizeComplexScript fontSizeComplexScript65 = new FontSizeComplexScript() { Val = "28" };
            Languages languages71 = new Languages() { Val = "ru-RU" };

            paragraphMarkRunProperties61.Append(runFonts71);
            paragraphMarkRunProperties61.Append(fontSize65);
            paragraphMarkRunProperties61.Append(fontSizeComplexScript65);
            paragraphMarkRunProperties61.Append(languages71);

            paragraphProperties61.Append(spacingBetweenLines56);
            paragraphProperties61.Append(justification60);
            paragraphProperties61.Append(paragraphMarkRunProperties61);

            paragraph61.Append(paragraphProperties61);

            tableCell59.Append(tableCellProperties59);
            tableCell59.Append(paragraph61);

            TableCell tableCell60 = new TableCell();

            TableCellProperties tableCellProperties60 = new TableCellProperties();
            TableCellWidth tableCellWidth60 = new TableCellWidth() { Width = "5259", Type = TableWidthUnitValues.Dxa };

            tableCellProperties60.Append(tableCellWidth60);

            Paragraph paragraph62 = new Paragraph() { RsidParagraphMarkRevision = "00B65E2F", RsidParagraphAddition = "00E24EED", RsidParagraphProperties = "00BF6E08", RsidRunAdditionDefault = "00E24EED" };

            ParagraphProperties paragraphProperties62 = new ParagraphProperties();
            SpacingBetweenLines spacingBetweenLines57 = new SpacingBetweenLines() { Line = "480", LineRule = LineSpacingRuleValues.Auto };
            Justification justification61 = new Justification() { Val = JustificationValues.Both };

            ParagraphMarkRunProperties paragraphMarkRunProperties62 = new ParagraphMarkRunProperties();
            RunFonts runFonts72 = new RunFonts() { Ascii = "Times New Roman", HighAnsi = "Times New Roman" };
            FontSize fontSize66 = new FontSize() { Val = "28" };
            FontSizeComplexScript fontSizeComplexScript66 = new FontSizeComplexScript() { Val = "28" };
            Languages languages72 = new Languages() { Val = "ru-RU" };

            paragraphMarkRunProperties62.Append(runFonts72);
            paragraphMarkRunProperties62.Append(fontSize66);
            paragraphMarkRunProperties62.Append(fontSizeComplexScript66);
            paragraphMarkRunProperties62.Append(languages72);

            paragraphProperties62.Append(spacingBetweenLines57);
            paragraphProperties62.Append(justification61);
            paragraphProperties62.Append(paragraphMarkRunProperties62);

            paragraph62.Append(paragraphProperties62);

            tableCell60.Append(tableCellProperties60);
            tableCell60.Append(paragraph62);

            tableRow15.Append(tableCell57);
            tableRow15.Append(tableCell58);
            tableRow15.Append(tableCell59);
            tableRow15.Append(tableCell60);

            table1.Append(tableProperties1);
            table1.Append(tableGrid1);
            table1.Append(tableRow1);
            table1.Append(tableRow2);
            table1.Append(tableRow3);
            table1.Append(tableRow4);
            table1.Append(tableRow5);
            table1.Append(tableRow6);
            table1.Append(tableRow7);
            table1.Append(tableRow8);
            table1.Append(tableRow9);
            table1.Append(tableRow10);
            table1.Append(tableRow11);
            table1.Append(tableRow12);
            table1.Append(tableRow13);
            table1.Append(tableRow14);
            table1.Append(tableRow15);

            //SectionProperties sectionProperties1 = new SectionProperties() { RsidRPr = "00E24EED", RsidR = "00E43BFF", RsidSect = "00FF205A" };
            //PageSize pageSize1 = new PageSize() { Width = (UInt32Value)11906U, Height = (UInt32Value)16838U };
            //PageMargin pageMargin1 = new PageMargin() { Top = 1440, Right = (UInt32Value)992U, Bottom = 1440, Left = (UInt32Value)1701U, Header = (UInt32Value)720U, Footer = (UInt32Value)720U, Gutter = (UInt32Value)0U };
            //PageNumberType pageNumberType1 = new PageNumberType() { Start = 1 };
            //Columns columns1 = new Columns() { Space = "720" };
            //TitlePage titlePage1 = new TitlePage();
            //DocGrid docGrid1 = new DocGrid() { LinePitch = 326 };

            //sectionProperties1.Append(pageSize1);
            //sectionProperties1.Append(pageMargin1);
            //sectionProperties1.Append(pageNumberType1);
            //sectionProperties1.Append(columns1);
            //sectionProperties1.Append(titlePage1);
            //sectionProperties1.Append(docGrid1);

            _body.Append(paragraph1);
            _body.Append(paragraph2);
            _body.Append(table1);
            //_body.Append(sectionProperties1);
        }
Exemplo n.º 57
0
        private TableRow GetTable(bool blankLine, Paragraph para = null)
        {
            if (blankLine)
            {
                paragraph = new Paragraph();
                ParagraphProperties paraProperties = new ParagraphProperties();
                paraProperties.Append(new Justification() { Val = JustificationValues.Left });
                paraProperties.Append(new SpacingBetweenLines() { After = "10", Line = "240", LineRule = LineSpacingRuleValues.Auto });
                paragraph.Append(paraProperties);
                body.Append(paragraph);
                Run run = new Run();
                RunProperties runProperties = new RunProperties();
                runProperties.Append(new RunFonts() { Ascii = "Cambria" });
                runProperties.Append(new FontSize() { Val = "3" });
                run.Append(runProperties);
                run.Append(new Text(".") { Space = SpaceProcessingModeValues.Preserve });
                paragraph.Append(run);
            }

            Table tbl = new Table();
            TableProperties tableProperties = new TableProperties();
            if (para != null)  // this is used only for drawing the H
                tableProperties.Append(new TableWidth() { Type = TableWidthUnitValues.Auto, Width = "0" });
            else
                tableProperties.Append(new TableWidth() { Type = TableWidthUnitValues.Pct, Width = "5000" });
            tableProperties.Append(new TableBorders()
            {
                TopBorder = new TopBorder() { Val = BorderValues.None },
                BottomBorder = new BottomBorder() { Val = BorderValues.None },
                LeftBorder = new LeftBorder() { Val = BorderValues.None },
                RightBorder = new RightBorder() { Val = BorderValues.None }
            });
            tableProperties.Append(new AutofitToFirstFixedWidthCell());
            tbl.Append(tableProperties);
            if (para != null)
                para.Append(tbl);
            else
                body.Append(tbl);
            TableRow trLetter = new TableRow();
            tbl.Append(trLetter);

            return trLetter;
        }
        //[LoginFilter(Order = 0)]
        //[SecurityFilter(Order = 1)]
        private Table GenerateBasiceReportDataTable()
        {
            Table table1 = new Table();

            // Li Zheng 2010.11.21 线框
            BorderValues bv = BorderValues.Single;
            TableBorders tblBorders = new TableBorders();
            tblBorders.TopBorder = new DocumentFormat.OpenXml.Wordprocessing.TopBorder();
            tblBorders.TopBorder.Val = new EnumValue<BorderValues>(bv);
            tblBorders.BottomBorder = new DocumentFormat.OpenXml.Wordprocessing.BottomBorder();
            tblBorders.BottomBorder.Val = new EnumValue<BorderValues>(bv);
            tblBorders.LeftBorder = new DocumentFormat.OpenXml.Wordprocessing.LeftBorder();
            tblBorders.LeftBorder.Val = new EnumValue<BorderValues>(bv);
            tblBorders.RightBorder = new DocumentFormat.OpenXml.Wordprocessing.RightBorder();
            tblBorders.RightBorder.Val = new EnumValue<BorderValues>(bv);
            tblBorders.InsideHorizontalBorder = new DocumentFormat.OpenXml.Wordprocessing.InsideHorizontalBorder();
            tblBorders.InsideHorizontalBorder.Val = bv;
            tblBorders.InsideVerticalBorder = new DocumentFormat.OpenXml.Wordprocessing.InsideVerticalBorder();
            tblBorders.InsideVerticalBorder.Val = bv;

            TableProperties tableProperties1 = new TableProperties();
            TableStyle tableStyle1 = new TableStyle() { Val = "TableGrid", };
            TableWidth tableWidth1 = new TableWidth() { Width = "11157", Type = TableWidthUnitValues.Dxa };//表格宽度

            TableIndentation tableIndentation1 = new TableIndentation() { Width = 0, Type = TableWidthUnitValues.Dxa };//首字缩进
            TableLook tableLook1 = new TableLook() { Val = "04A0", FirstRow = true, LastRow = false, FirstColumn = true, LastColumn = false, NoHorizontalBand = false, NoVerticalBand = true };

            tableProperties1.Append(tblBorders);
            tableProperties1.Append(tableStyle1);
            tableProperties1.Append(tableWidth1);
            tableProperties1.Append(tableIndentation1);
            tableProperties1.Append(tableLook1);

            TableGrid tableGrid1 = new TableGrid();
            GridColumn gridColumn1 = new GridColumn() { Width = "11157" };

            tableGrid1.Append(gridColumn1);

            TableRow tableRow1 = new TableRow() { RsidTableRowMarkRevision = "00E77591", RsidTableRowAddition = "00E77591", RsidTableRowProperties = "00E77591" };

            TableCell tableCell1 = new TableCell();

            TableCellProperties tableCellProperties1 = new TableCellProperties();
            TableCellWidth tableCellWidth1 = new TableCellWidth() { Width = "11157", Type = TableWidthUnitValues.Dxa };
            TableCellVerticalAlignment tableCellVerticalAlignment1 = new TableCellVerticalAlignment() { Val = TableVerticalAlignmentValues.Center };

            tableCellProperties1.Append(tableCellWidth1);
            tableCellProperties1.Append(tableCellVerticalAlignment1);

            Paragraph paragraph1 = new Paragraph() { RsidParagraphAddition = "005D4399", RsidParagraphProperties = "001D44EB", RsidRunAdditionDefault = "005D4399" };

            ParagraphProperties paragraphProperties1 = new ParagraphProperties();
            Justification justification1 = new Justification() { Val = JustificationValues.Center };

            ParagraphMarkRunProperties paragraphMarkRunProperties1 = new ParagraphMarkRunProperties();
            RunFonts runFonts1 = new RunFonts() { AsciiTheme = ThemeFontValues.MinorEastAsia, HighAnsiTheme = ThemeFontValues.MinorEastAsia, EastAsiaTheme = ThemeFontValues.MinorEastAsia };

            paragraphMarkRunProperties1.Append(runFonts1);
            paragraphMarkRunProperties1.Append();

            paragraphProperties1.Append(justification1);
            paragraphProperties1.Append(paragraphMarkRunProperties1);
            BookmarkStart bookmarkStart1 = new BookmarkStart() { Name = "_GoBack", Id = "0" };

            paragraph1.Append(paragraphProperties1);
            paragraph1.Append(bookmarkStart1);

            tableCell1.Append(tableCellProperties1);
            tableCell1.Append(paragraph1);

            tableRow1.Append(tableCell1);
            BookmarkEnd bookmarkEnd1 = new BookmarkEnd() { Id = "0" };

            table1.Append(tableProperties1);
            table1.Append(tableGrid1);
            table1.Append(tableRow1);
            table1.Append(bookmarkEnd1);
            return table1;
        }
        public void GetIntersectionsRiver()
        {
            Database db = HostApplicationServices.WorkingDatabase;
            Autodesk.AutoCAD.ApplicationServices.Document doc = Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument;
            Editor ed = doc.Editor;
            Transaction tr = db.TransactionManager.StartTransaction();

            #region For Word
            string filepath = "D:\\intersections_rivers.docx";

            using (WordprocessingDocument docX = WordprocessingDocument.Create(filepath, WordprocessingDocumentType.Document))
            {
                try
                {
                    // Add a main document part.
                    MainDocumentPart mainPart = docX.AddMainDocumentPart();
                    StyleDefinitionsPart styleDefinitionsPart = mainPart.AddNewPart<StyleDefinitionsPart>();
                    Styles styles1 = new Styles();
                    DocDefaults docDefaults =
                        new DocDefaults(
                            new RunPropertiesDefault(new RunPropertiesBaseStyle(new RunFonts()
                            {
                                Ascii = "Times New Roman",
                                HighAnsi = "Times New Roman",
                                ComplexScript = "Times New Roman"
                            }, new FontSize() { Val = "24" },
                                new FontSizeComplexScript() { Val = "24" })),
                                new ParagraphPropertiesDefault(new SpacingBetweenLines() { After = "0", Line = "240", LineRule = LineSpacingRuleValues.Auto }));
                    styles1.AppendChild(docDefaults);
                    styleDefinitionsPart.Styles = styles1;

                    mainPart.Document = new DocumentFormat.OpenXml.Wordprocessing.Document();
                    DocumentFormat.OpenXml.Wordprocessing.Body body = mainPart.Document.AppendChild(new DocumentFormat.OpenXml.Wordprocessing.Body());
                    ParagraphProperties paragraphProperties1 = new ParagraphProperties(
                        new Justification() { Val = JustificationValues.Center },
                        new ParagraphMarkRunProperties(
                            new RunFonts()
                            {
                                Ascii = "Times New Roman",
                                HighAnsi = "Times New Roman",
                                ComplexScript = "Times New Roman"
                            },
                            new FontSize() { Val = "24" },
                            new FontSizeComplexScript() { Val = "24" }
                            ));

                    Paragraph para = body.AppendChild(new Paragraph());
                    para.AppendChild(paragraphProperties1);

                    Run run = para.AppendChild(new Run());

                    RunProperties runProperties1 = new RunProperties(
                        new Bold());

                    // String msg contains the text, "Hello, Word!"
                    run.AppendChild(runProperties1);
                    run.AppendChild(new Text("ПРИЛОЖЕНИЕ"));
                    run.AppendChild(new Break());
                    run.AppendChild(new Text("Ведомость пересечений"));
                    run.AppendChild(new Break());

                    var table = new DocumentFormat.OpenXml.Wordprocessing.Table();
                    // Create a TableProperties object and specify its border information.
                    TableProperties tblProp = new TableProperties(
                        new TableWidth() { Width = "9782", Type = TableWidthUnitValues.Dxa },
                        new TableIndentation() { Width = -318, Type = TableWidthUnitValues.Dxa },
                        new TableBorders(
                            new TopBorder() { Val = new EnumValue<BorderValues>(BorderValues.Single), Size = 4, Space = 0 },
                            new BottomBorder() { Val = new EnumValue<BorderValues>(BorderValues.Single), Size = 4, Space = 0 },
                            new LeftBorder() { Val = new EnumValue<BorderValues>(BorderValues.Single), Size = 4, Space = 0 },
                            new RightBorder() { Val = new EnumValue<BorderValues>(BorderValues.Single), Size = 4, Space = 0 },
                            new InsideHorizontalBorder() { Val = new EnumValue<BorderValues>(BorderValues.Single), Size = 4, Space = 0 },
                            new InsideVerticalBorder() { Val = new EnumValue<BorderValues>(BorderValues.Single), Size = 4, Space = 0 }),
                        new DocumentFormat.OpenXml.Wordprocessing.TableStyle() { Val = "TableGrid" }
                        );

                    // Append the TableProperties object to the empty table.
                    table.AppendChild<TableProperties>(tblProp);

                    // Add 3 columns to the table.
                    TableGrid tg = new TableGrid(new GridColumn(), new GridColumn(), new GridColumn(), new GridColumn(),
                         new GridColumn(), new GridColumn(), new GridColumn(), new GridColumn(), new GridColumn());
                    table.AppendChild(tg);

                    TableRow tr1 = new TableRow(
                        new TableRowProperties(new TableRowHeight() { Val = 430 }),
                        new TableCell(
                            new TableCellProperties(
                                new TableCellWidth() { Type = TableWidthUnitValues.Dxa, Width = "1709" },
                                new VerticalMerge() { Val = MergedCellValues.Restart },
                                new TableCellVerticalAlignment() { Val = TableVerticalAlignmentValues.Center }),
                            new Paragraph(new ParagraphProperties(GetCenterJustify()),
                                new Run(new Text("Наимен. водотока")))),
                        //new TableCellProperties(new TableCellWidth() {Type = TableWidthUnitValues.Pct, Width = "500"})
                        new TableCell(
                            new TableCellProperties(
                                new GridSpan() { Val = 2 },
                                new TableCellVerticalAlignment() { Val = TableVerticalAlignmentValues.Center },
                                new TableCellWidth() { Type = TableWidthUnitValues.Dxa, Width = "3922" }),
                            new Paragraph(
                                new ParagraphProperties(new Justification() { Val = JustificationValues.Center }),
                                new Run(new Text("Пикетное положение пересечения")))),
                        new TableCell(
                            new TableCellProperties(
                                new TableCellVerticalAlignment() { Val = TableVerticalAlignmentValues.Center }),
                            new Paragraph(
                                new ParagraphProperties(new Justification() { Val = JustificationValues.Center }),
                                new Run(new Text("Ширина водотока в межень")))),
                        new TableCell(
                            new TableCellProperties(
                                new TableCellWidth() { Type = TableWidthUnitValues.Dxa, Width = "1358" },
                                new TableCellVerticalAlignment() { Val = TableVerticalAlignmentValues.Center },
                                new VerticalMerge() { Val = MergedCellValues.Restart }),
                            new Paragraph(new ParagraphProperties(GetCenterJustify()),
                                new Run(new Text("Глуб. водотока")))),
                        new TableCell(
                            new TableCellProperties(
                                new GridSpan() { Val = 3 },
                                new TableCellVerticalAlignment() { Val = TableVerticalAlignmentValues.Center },
                                new TableCellWidth() { Type = TableWidthUnitValues.Dxa, Width = "2368" }),
                            new Paragraph(new ParagraphProperties(GetCenterJustify()),
                                new Run(new Text("Горизонт воды")))),
                        new TableCell(new TableCellProperties(
                            new TableCellWidth() { Type = TableWidthUnitValues.Dxa, Width = "425" },
                            new VerticalMerge() { Val = MergedCellValues.Restart },
                            new TableCellVerticalAlignment() { Val = TableVerticalAlignmentValues.Center }),
                            new Paragraph(new ParagraphProperties(GetCenterJustify()), new Run(new Text("Прим."))))
                        );
                    table.AppendChild(tr1);
                    TableRow tr2 = new TableRow(
                        new TableRowProperties(new TableRowHeight() { Val = 419 }),
                        new TableCell(new TableCellProperties(new VerticalMerge()), new Paragraph(new Run())),
                        new TableCell(
                            new TableCellProperties(new TableCellVerticalAlignment() { Val = TableVerticalAlignmentValues.Center }),
                            new ParagraphProperties(new Justification() { Val = JustificationValues.Center }), new Paragraph(new Run(new Text("От")))),
                        new TableCell(
                            new TableCellProperties(new TableCellVerticalAlignment() { Val = TableVerticalAlignmentValues.Center }),
                            new ParagraphProperties(new Justification() { Val = JustificationValues.Center }), new Paragraph(new Run(new Text("До")))),
                        new TableCell(
                            new TableCellProperties(new TableCellVerticalAlignment() { Val = TableVerticalAlignmentValues.Center }),
                            new ParagraphProperties(new Justification() { Val = JustificationValues.Center }), new Paragraph(new Run(new Text("половодье")))),
                        new TableCell(new TableCellProperties(new VerticalMerge()), new Paragraph(new Run())),
                        new TableCell(
                            new TableCellProperties(
                                new TableCellWidth() { Type = TableWidthUnitValues.Dxa, Width = "1260" },
                                new TableCellVerticalAlignment() { Val = TableVerticalAlignmentValues.Center }),
                            new Paragraph(new ParagraphProperties(GetCenterJustify()), new Run(new Text("Дата съемки")))),
                        new TableCell(
                            new TableCellProperties(
                                new TableCellWidth() { Type = TableWidthUnitValues.Dxa, Width = "1108" },
                                new TableCellVerticalAlignment() { Val = TableVerticalAlignmentValues.Center }),
                            new Paragraph(new ParagraphProperties(GetCenterJustify()), new Run(new Text("На день съемки")))),
                        new TableCell(
                            new TableCellProperties(
                                new TableCellWidth() { Type = TableWidthUnitValues.Dxa, Width = "1108" },
                                new TableCellVerticalAlignment() { Val = TableVerticalAlignmentValues.Center }),
                            new Paragraph(new ParagraphProperties(GetCenterJustify()), new Run(new Text("Макс.")))),
                        new TableCell(new TableCellProperties(new VerticalMerge()), new Paragraph(new Run())));
                    table.AppendChild(tr2);

                    TableCellProperties tcp = new TableCellProperties(new GridSpan() { Val = 9 });
            #endregion

                    while (true)
                    {

                        //using (tr)
                        //{
                        try
                        {
                            #region Поиск пересечений
                            BlockTableRecord btr = (BlockTableRecord)tr.GetObject(db.CurrentSpaceId, OpenMode.ForWrite);
                            PromptEntityOptions peo = new PromptEntityOptions("\nВыбери polyline  >>");
                            peo.SetRejectMessage("\nМожно только polyline >>");
                            peo.AddAllowedClass(typeof(Polyline), false);
                            PromptEntityResult res;
                            res = ed.GetEntity(peo);
                            if (res.Status != PromptStatus.OK)
                            {
                                break;
                            }
                            DBObject ent = (DBObject)tr.GetObject(res.ObjectId, OpenMode.ForRead);
                            if (ent == null) return;

                            PromptPointResult pPtRes;
                            PromptPointOptions pPtOpts = new PromptPointOptions("");
                            // Prompt for the start point
                            pPtOpts.Message = "\nВведи начало: ";
                            pPtRes = doc.Editor.GetPoint(pPtOpts);

                            PromptDoubleOptions getpik = new PromptDoubleOptions("\nВведи пикетаж (в формате числа, а не 0+00): ");
                            PromptDoubleResult getpikRes = doc.Editor.GetDouble(getpik);

                            //zoom
                            /*PromptEntityResult per = ed.GetEntity(peo);

                            if (per.Status != PromptStatus.OK)
                                return;*/

                            // Extract its extents

                            Extents3d ext;

                            Transaction trans = db.TransactionManager.StartTransaction();
                            using (trans)
                            {
                                Entity enti = (Entity)trans.GetObject(res.ObjectId, OpenMode.ForRead);
                                ext = enti.GeometricExtents;
                                trans.Commit();
                            }

                            ext.TransformBy(ed.CurrentUserCoordinateSystem.Inverse());

                            ZoomWin(ed, ext.MinPoint, ext.MaxPoint);
                            //

                            //Polyline poly = (Polyline)ent as Polyline;
                            Curve curv = ent as Curve;

                            DBObjectCollection pcurves = new DBObjectCollection();

                            curv.Explode(pcurves);
                            TypedValue[] values = new TypedValue[]
                     {
                        new TypedValue(0, "lwpolyline")
                        //might be added layer name to select curve:
                        //, new TypedValue(8, "mylayer")
                     };
                            SelectionFilter filter = new SelectionFilter(values);

                            Point3dCollection fence = new Point3dCollection();

                            double leng = curv.GetDistanceAtParameter(curv.EndParam) - curv.GetDistanceAtParameter(curv.StartParam);
                            // number of divisions along polyline to create fence selection
                            double step = leng / 256;// set number of steps to your suit

                            int num = Convert.ToInt32(leng / step);

                            for (int i = 0; i < num; i++)
                            {
                                Point3d pp = curv.GetPointAtDist(step * i);

                                fence.Add(curv.GetClosestPointTo(pp, false));
                            }

                            PromptSelectionResult selres = ed.SelectFence(fence, filter);

                            if (selres.Status != PromptStatus.OK) return;
                            Point3dCollection intpts = new Point3dCollection();

                            DBObjectCollection qcurves = new DBObjectCollection();
                            //ed.WriteMessage("\nCheck");
                            foreach (SelectedObject selobj in selres.Value)
                            {
                                DBObject obj = tr.GetObject(selobj.ObjectId, OpenMode.ForRead, false) as DBObject;
                                if (selobj.ObjectId != curv.ObjectId)
                                {
                                    DBObjectCollection icurves = new DBObjectCollection();
                                    Curve icurv = obj as Curve;
                                    icurv.Explode(icurves);
                                    foreach (DBObject dbo in icurves)
                                    {
                                        if (!qcurves.Contains(dbo))
                                            qcurves.Add(dbo);
                                    }
                                }

                            }
                            //ed.WriteMessage("\n{0}", qcurves.Count);

                            int j = 0;
                            Point3dCollection polypts = new Point3dCollection();

                            for (int i = 0; i < pcurves.Count; ++i)
                            {
                                for (j = 0; j < qcurves.Count; ++j)
                                {
                                    Curve curve1 = pcurves[i] as Curve;

                                    Curve curve2 = qcurves[j] as Curve;

                                    Point3dCollection pts = new Point3dCollection();

                                    curve1.IntersectWith(curve2, Intersect.OnBothOperands, pts, IntPtr.Zero, IntPtr.Zero);

                                    foreach (Point3d pt in pts)
                                    {
                                        if (!polypts.Contains(pt))
                                            polypts.Add(pt);
                                    }
                                }
                            }
                            #endregion

                            try
                            {
                                using (Transaction tran = db.TransactionManager.StartTransaction())
                                {
                                    Polyline pline = (Polyline)tran.GetObject(res.ObjectId, OpenMode.ForRead);
                                    table.AppendChild(new TableRow(
                                        new TableCell(
                                            new TableCellProperties(
                                                new GridSpan() { Val = 9 }),
                                                new Paragraph(
                                                    new ParagraphProperties(
                                                        new ParagraphMarkRunProperties(new Bold()),
                                                        new Justification() { Val = JustificationValues.Center }),
                                                        new Run(new RunProperties(
                                                            new Bold()),
                                                            new Text("ПК" + ((int)(getpikRes.Value)).ToString("F0") + "-ПК" +
                                                                ((int)(100 * getpikRes.Value + pline.Length) / 100).ToString("F0") + "+" +
                                                                ((100 * getpikRes.Value + pline.Length) % 100).ToString("F")))))));
                                }
                            }
                            catch { ed.WriteMessage("\nError."); }

                            Autodesk.AutoCAD.ApplicationServices.Application.SetSystemVariable("osmode", 0);// optional
                            // for debug only
                            Autodesk.AutoCAD.ApplicationServices.Application.ShowAlertDialog(string.Format("\nНайдено пересечений: {0}", polypts.Count));

                            if (polypts.Count == 0)
                            {
                                try
                                {
                                    using (Transaction tran = db.TransactionManager.StartTransaction())
                                    {
                                        Polyline pline = (Polyline)tran.GetObject(res.ObjectId, OpenMode.ForRead);
                                        table.AppendChild(new TableRow(
                                            new TableCell(
                                                new TableCellProperties(
                                                    new GridSpan() { Val = 9 }),
                                                    new Paragraph(
                                                        new ParagraphProperties(
                                                            new Justification() { Val = JustificationValues.Center }),
                                                            new Run(new Text("На данном участке трассы пересечения отсутствуют"))))));
                                    }
                                }
                                catch { ed.WriteMessage("\nError."); }
                            }
                            else
                            {
                                //List<double> pik = new List<double>(polypts.Count);
                                double[] pik = new double[polypts.Count];
                                int numInter = 0;

                                foreach (Point3d inspt in polypts)
                                {
                                    double dist = 0;
                                    dist = 100 * getpikRes.Value;

                                    // test for visulization only
                                    /*Circle circ = new Circle(inspt, Vector3d.ZAxis, 10 * db.Dimtxt);
                                    circ.ColorIndex = 1;
                                    btr.AppendEntity(circ);
                                    tr.AddNewlyCreatedDBObject(circ, true);*/

                                    Point3d curr = pPtRes.Value, next = pPtRes.Value;
                                    try
                                    {
                                        using (Transaction tran = db.TransactionManager.StartTransaction())
                                        {
                                            Polyline pline = (Polyline)tran.GetObject(res.ObjectId, OpenMode.ForRead);
                                            if ((pPtRes.Value == pline.GetLineSegmentAt(0).StartPoint) || (pPtRes.Value == pline.GetLineSegmentAt(0).EndPoint))
                                                for (int i = 0; i < pline.NumberOfVertices - 2; i++)
                                                {
                                                    LineSegment3d l1 = pline.GetLineSegmentAt(i);
                                                    LineSegment3d l2 = pline.GetLineSegmentAt(i + 1);
                                                    double angle = GetPolylineShape(l1, l2, pline.Normal);
                                                    if (angle > Math.PI)
                                                    {
                                                        if ((l1.StartPoint == l2.StartPoint) || (l1.StartPoint == l2.EndPoint))
                                                            next = l1.StartPoint;
                                                        else if ((l1.EndPoint == l2.EndPoint) || (l1.EndPoint == l2.StartPoint))
                                                            next = l1.EndPoint;
                                                    }
                                                    else
                                                    {
                                                        if ((l1.StartPoint == l2.StartPoint) || (l1.StartPoint == l2.EndPoint))
                                                            next = l1.StartPoint;
                                                        else if ((l1.EndPoint == l2.EndPoint) || (l1.EndPoint == l2.StartPoint))
                                                            next = l1.EndPoint;
                                                    }

                                                    if (Math.Abs(inspt.DistanceTo(curr) + inspt.DistanceTo(next) - curr.DistanceTo(next)) < 1)
                                                    {
                                                        dist += inspt.DistanceTo(curr);
                                                        ed.WriteMessage(((int)dist / 100).ToString("F0") + "+" + (dist % 100).ToString("F") + "\n");
                                                        break;
                                                    }
                                                    else
                                                        dist += curr.DistanceTo(next);

                                                    curr = next;
                                                }
                                            else
                                                for (int i = pline.NumberOfVertices - 3; i >= 0; i--)
                                                {
                                                    LineSegment3d l1 = pline.GetLineSegmentAt(i);
                                                    LineSegment3d l2 = pline.GetLineSegmentAt(i + 1);
                                                    double angle = GetPolylineShape(l1, l2, pline.Normal);
                                                    if (angle > Math.PI)
                                                    {
                                                        if ((l1.StartPoint == l2.StartPoint) || (l1.StartPoint == l2.EndPoint))
                                                            next = l1.StartPoint;
                                                        else if ((l1.EndPoint == l2.EndPoint) || (l1.EndPoint == l2.StartPoint))
                                                            next = l1.EndPoint;
                                                    }
                                                    else
                                                    {
                                                        if ((l1.StartPoint == l2.StartPoint) || (l1.StartPoint == l2.EndPoint))
                                                            next = l1.StartPoint;
                                                        else if ((l1.EndPoint == l2.EndPoint) || (l1.EndPoint == l2.StartPoint))
                                                            next = l1.EndPoint;
                                                    }

                                                    if (Math.Abs(inspt.DistanceTo(curr) + inspt.DistanceTo(next) - curr.DistanceTo(next)) < 1)
                                                    {
                                                        dist += inspt.DistanceTo(curr);
                                                        ed.WriteMessage(((int)dist / 100).ToString("F0") + "+" + (dist % 100).ToString("F") + "\n");
                                                        break;
                                                    }
                                                    else
                                                        dist += curr.DistanceTo(next);

                                                    curr = next;
                                                }
                                        }
                                    }
                                    catch
                                    {
                                        ed.WriteMessage("\nInvalid polyline.");
                                    }
                                    pik[numInter] = dist;
                                    numInter++;
                                    //ed.WriteMessage(" {0:0.00}\n", dist);
                                }

                                //pik.Sort();

                                Array.Sort(pik);

                                for (int i = 0; i < polypts.Count; i++)
                                {
                                    tr1 = new TableRow(
                                        new TableRowProperties(new TableRowHeight() { Val = 300 }),
                                        new TableCell(new Paragraph(new Run())),
                                        new TableCell(
                                                new TableCellProperties(
                                                    new GridSpan() { Val = 2 }),
                                                    new Paragraph(
                                                        new ParagraphProperties(
                                                            new Justification() { Val = JustificationValues.Center }),
                                                            new Run(new Text(((int)pik[i] / 100).ToString("F0") + "+" + (pik[i] % 100).ToString("F"))))),
                                        new TableCell(new Paragraph(new Run())),
                                        new TableCell(new Paragraph(new Run())),
                                        new TableCell(new Paragraph(new Run())),
                                        new TableCell(new Paragraph(new Run())),
                                        new TableCell(new Paragraph(new Run())),
                                        new TableCell(new Paragraph(new Run()))
                                        );
                                    table.AppendChild(tr1);
                                }
                            }

                        }
                        catch
                        {
                            ed.WriteMessage("\nError");
                        }
                        //}
                    }

                    tr.Commit();

                    body.AppendChild(table);
                    body.AppendChild(
                        new SectionProperties(
                            new PageMargin()
                            {
                                Top = 1134,
                                Right = (UInt32Value)850U,
                                Bottom = 1134,
                                Left = (UInt32Value)1418U,
                                Header = (UInt32Value)708U,
                                Footer = (UInt32Value)708U,
                                Gutter = (UInt32Value)0U
                            }));
                    ed.WriteMessage("\nДокумент сохранен в D:\\intersections_rivers.docx");
                }
                catch
                {
                    ed.WriteMessage("\nError.");
                }
            }
        }
Exemplo n.º 60
0
        private void WriteVariables(Body body)
        {
            Paragraph p = CreateMidashi1Paragraph("3. " + Resources.VariableSummary); //変数の概要
            body.Append(p);

            ObservableCollection<QuestionVM> questions = studyUnit.AllQuestions;
            foreach (VariableVM variable in studyUnit.Variables)
            {
                StringBuilder buf = new StringBuilder();
                buf.Append(variable.Title);
                buf.Append(" ");
                buf.Append(variable.Label);
                buf.Append(" (");
                buf.Append(variable.Response.TypeName);
                buf.Append(" )");
                p = CreateParagraph(buf.ToString());
                body.Append(p);

                QuestionVM question = EDOUtils.Find<QuestionVM>(questions, variable.QuestionId);
                buf = new StringBuilder();
                buf.Append(Resources.CorrespondingQuestionSentence); //対応する質問文
                if (question != null)
                {
                    buf.Append(" " + question.Text);
                }

                //質問文の段落
                p = CreateParagraph(buf.ToString());
                body.Append(p);

                if (variable.Response.IsTypeChoices)
                {
                    p = CreateEmptyParagraph();
                    body.Append(p);

                    Table table = new Table();
                    body.Append(table);

                    TableProperties tableProperties = new TableProperties();
                    DocumentFormat.OpenXml.Wordprocessing.TableStyle tableStyle = new DocumentFormat.OpenXml.Wordprocessing.TableStyle() { Val = "TableGrid" };
                    TableWidth tableWidth = new TableWidth() { Width = "0", Type = TableWidthUnitValues.Auto };
                    TableLook tableLook = new TableLook()
                    {
                        Val = "04A0",
                        FirstRow = true,
                        LastRow = false,
                        FirstColumn = true,
                        LastColumn = false,
                        NoHorizontalBand = false,
                        NoVerticalBand = true
                    };
                    tableProperties.Append(tableStyle);
                    tableProperties.Append(tableWidth);
                    tableProperties.Append(tableLook);
                    table.Append(tableProperties);

                    TableRow tableRow = new TableRow();
                    table.Append(tableRow);

                    TableCell tableCell1 = new TableCell();
                    tableCell1.Append(CreateParagraph(Resources.Code));
                    tableRow.Append(tableCell1);

                    TableCell tableCell2 = new TableCell();
                    tableCell2.Append(CreateParagraph(Resources.Category));
                    tableRow.Append(tableCell2);

                    TableCell tableCell3 = new TableCell();
                    tableCell3.Append(CreateParagraph(Resources.Total));
                    tableRow.Append(tableCell3);

                    ObservableCollection<CodeVM> codes = variable.Response.Codes;
                    foreach (CodeVM code in codes)
                    {
                        tableRow = new TableRow();
                        table.Append(tableRow);

                        tableCell1 = new TableCell();
                        tableCell1.Append(CreateParagraph(code.Value));
                        tableRow.Append(tableCell1);

                        tableCell2 = new TableCell();
                        tableCell2.Append(CreateParagraph(code.Label));
                        tableRow.Append(tableCell2);

                        tableCell3 = new TableCell();
                        tableCell3.Append(CreateEmptyParagraph());
                        tableRow.Append(tableCell3);
                    }

                }

                //空の段落
                p = CreateEmptyParagraph();
                body.Append(p);

            }
            p = CreateBreakPageParagraph();
            body.Append(p);
        }