Ejemplo n.º 1
0
        protected void FlattenTabStops(TabStops tabStops, TabStops refTabStops)
        {
            if (!tabStops._fClearAll)
            {
                foreach (TabStop refTabStop in refTabStops)
                {
                    if (tabStops.GetTabStopAt(refTabStop.Position) == null && refTabStop.AddTab)
                    {
                        tabStops.AddTabStop(refTabStop.Position, refTabStop.Alignment, refTabStop.Leader);
                    }
                }
            }

            for (int i = 0; i < tabStops.Count; i++)
            {
                TabStop tabStop = tabStops[i];
                if (!tabStop.AddTab)
                {
                    tabStops.RemoveObjectAt(i);
                }
            }
            // The TabStopCollection is complete now.
            // Prevent inheritence of tab stops.
            tabStops._fClearAll = true;
        }
Ejemplo n.º 2
0
 private static void ProcessTabStop(TabStop t, XmlWriter xmlw)
 {
     xmlw.WriteStartElement("TabStop");
     xmlw.WriteAttributeString("Alignment", t.Alignment.ToStringSafe());
     xmlw.WriteAttributeString("XOffset", t.XOffset.ToStringSafe());
     xmlw.WriteEndElement();
 }
Ejemplo n.º 3
0
        /// <summary>
        /// Go to the next visible pane at the Holodeck main window
        /// -- Might throw a HolodeckExceptions.UnaccessableControlException
        /// </summary>
        private static void GoToNext()
        {
            switch (currPos)
            {
            case TabStop.HeadLine:
            {
                currPos = TabStop.RegistryPane;
                SendKeyStrokes("{TAB}");                          // Tab
                break;
            }

            case TabStop.RegistryPane:
            {
                currPos = TabStop.FilePane;
                SendKeyStrokes("{TAB}");                          // Tab
                break;
            }

            case TabStop.FilePane:
            {
                currPos = TabStop.HeadLine;
                SendKeyStrokes("{TAB}");                          // Tab
                break;
            }

            default:
            {
                // TODO: provide meaningful information in the exception
                throw new HolodeckExceptions.UnaccessableControlException();
            }
            }
        }
Ejemplo n.º 4
0
		/// <summary>
		/// Change the focus to the specified control
		/// </summary>
		/// <param name="toPos">the desired control</param>
		private static void GoTo (TabStop toPos) 
		{
			while (currPos != toPos) 
			{
				GoToNext ();
			}
		}
        public void ChangeTocTabStops()
        {
            //ExStart:ChangeTOCTabStops
            Document doc = new Document(MyDir + "Table of contents.docx");

            foreach (Paragraph para in doc.GetChildNodes(NodeType.Paragraph, true))
            {
                // Check if this paragraph is formatted using the TOC result based styles.
                // This is any style between TOC and TOC9.
                if (para.ParagraphFormat.Style.StyleIdentifier >= StyleIdentifier.Toc1 &&
                    para.ParagraphFormat.Style.StyleIdentifier <= StyleIdentifier.Toc9)
                {
                    // Get the first tab used in this paragraph, this should be the tab used to align the page numbers.
                    TabStop tab = para.ParagraphFormat.TabStops[0];

                    // Remove the old tab from the collection.
                    para.ParagraphFormat.TabStops.RemoveByPosition(tab.Position);

                    // Insert a new tab using the same properties but at a modified position.
                    // We could also change the separators used (dots) by passing a different Leader type.
                    para.ParagraphFormat.TabStops.Add(tab.Position - 50, tab.Alignment, tab.Leader);
                }
            }

            doc.Save(ArtifactsDir + "WorkingWithTableOfContent.ChangeTocTabStops.docx");
            //ExEnd:ChangeTOCTabStops
        }
Ejemplo n.º 6
0
        public static void Run()
        {
            //ExStart:ChangeTOCTabStops
            // The path to the documents directory.
            string dataDir = RunExamples.GetDataDir_WorkingWithStyles();

            string fileName = "Document.TableOfContents.doc";
            // Open the document.
            Document doc = new Document(dataDir + fileName);

            // Iterate through all paragraphs in the document
            foreach (Paragraph para in doc.GetChildNodes(NodeType.Paragraph, true))
            {
                // Check if this paragraph is formatted using the TOC result based styles. This is any style between TOC and TOC9.
                if (para.ParagraphFormat.Style.StyleIdentifier >= StyleIdentifier.Toc1 && para.ParagraphFormat.Style.StyleIdentifier <= StyleIdentifier.Toc9)
                {
                    // Get the first tab used in this paragraph, this should be the tab used to align the page numbers.
                    TabStop tab = para.ParagraphFormat.TabStops[0];
                    // Remove the old tab from the collection.
                    para.ParagraphFormat.TabStops.RemoveByPosition(tab.Position);
                    // Insert a new tab using the same properties but at a modified position.
                    // We could also change the separators used (dots) by passing a different Leader type
                    para.ParagraphFormat.TabStops.Add(tab.Position - 50, tab.Alignment, tab.Leader);
                }
            }

            dataDir = dataDir + RunExamples.GetOutputFilePath(fileName);
            doc.Save(dataDir);
            //ExEnd:ChangeTOCTabStops
            Console.WriteLine("\nPosition of the right tab stop in TOC related paragraphs modified successfully.\nFile saved at " + dataDir);
        }
Ejemplo n.º 7
0
        public virtual void SeveralTabsInRowTest()
        {
            String   fileName    = "severalTabsInRowTest.pdf";
            String   outFileName = destinationFolder + fileName;
            String   cmpFileName = sourceFolder + "cmp_" + fileName;
            Document doc         = InitDocument(outFileName);
            float    tabInterval = doc.GetPdfDocument().GetDefaultPageSize().GetWidth() / 8;

            float[]        positions  = new float[] { tabInterval * 2, tabInterval * 4, tabInterval * 6 };
            TabAlignment[] alignments = new TabAlignment[] { TabAlignment.RIGHT, TabAlignment.CENTER, TabAlignment.CENTER };
            //        Drawable[] leaders = {null, null, null};
            ILineDrawer[] leaders = new ILineDrawer[] { new DottedLine(), new DashedLine(.5f), new SolidLine(.5f) };
            Paragraph     p       = new Paragraph();

            p.SetFontSize(8);
            IList <TabStop> tabStops = new List <TabStop>();

            for (int i = 0; i < positions.Length; ++i)
            {
                TabStop tabStop = new TabStop(positions[i], alignments[i], leaders[i]);
                tabStops.Add(tabStop);
            }
            p.AddTabStops(tabStops);
            p.Add(new Tab()).Add("ttttttttttttttttttttttttttttttttttttttttttttt").Add(new Tab()).Add(new Tab()).Add("ttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttt\n"
                                                                                                                    );
            p.Add(new Tab()).Add(new Tab()).Add(new Tab()).Add("ttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttt\n"
                                                               );
            p.Add(new Tab()).Add(new Tab()).Add("ttttttttttttttttttttttttttttttttttttttttttttt").Add(new Tab()).Add("ttttttttttttttttttttttttttttttttttttttttttt"
                                                                                                                    );
            doc.Add(p);
            DrawTabStopsPositions(positions, doc, 1, 0, 120);
            doc.Close();
            NUnit.Framework.Assert.IsNull(new CompareTool().CompareByContent(outFileName, cmpFileName, destinationFolder
                                                                             , "diff" + outFileName));
        }
Ejemplo n.º 8
0
        public virtual void ChunkEndsAfterOrBeforeTabPosition()
        {
            String      outFileName   = destinationFolder + "chunkEndsAfterOrBeforeTabPosition.pdf";
            String      cmpFileName   = sourceFolder + "cmp_chunkEndsAfterOrBeforeTabPosition.pdf";
            PdfDocument pdfDoc        = new PdfDocument(new PdfWriter(outFileName));
            Document    doc           = new Document(pdfDoc);
            String      textBeforeTab = "a";
            String      textAfterTab  = "tab stop's position = ";
            Paragraph   paragraph;

            for (int i = 0; i < 20; i++)
            {
                paragraph = new Paragraph();
                paragraph.Add(new Text(textBeforeTab));
                TabStop[] tabStop = new TabStop[1];
                tabStop[0] = new TabStop(i);
                paragraph.AddTabStops(tabStop);
                paragraph.Add(new Tab());
                paragraph.Add(new Text(textAfterTab));
                paragraph.Add(JavaUtil.IntegerToString(i));
                doc.Add(paragraph);
            }
            doc.Close();
            NUnit.Framework.Assert.IsNull(new CompareTool().CompareByContent(outFileName, cmpFileName, destinationFolder
                                                                             , "diff"));
        }
Ejemplo n.º 9
0
        private void AddTabbedTextToParagraph(Paragraph p, String text, float[] positions, TabAlignment[] alignments
                                              , ILineDrawer[] tabLeadings, char?[] tabAnchorCharacters)
        {
            IList <TabStop> tabStops = new List <TabStop>();

            for (int i = 0; i < positions.Length; ++i)
            {
                TabStop tabStop = new TabStop(positions[i], alignments[i], tabLeadings[i]);
                tabStop.SetTabAnchor(tabAnchorCharacters[i]);
                tabStops.Add(tabStop);
            }
            p.AddTabStops(tabStops);
            foreach (String line in iText.IO.Util.StringUtil.Split(text, "\n"))
            {
                foreach (String chunk in iText.IO.Util.StringUtil.Split(line, "\t"))
                {
                    foreach (String piece in iText.IO.Util.StringUtil.Split(chunk, "#"))
                    {
                        if (!String.IsNullOrEmpty(piece))
                        {
                            p.Add(piece);
                        }
                    }
                    p.Add(new Tab());
                }
                p.Add("\n");
            }
        }
Ejemplo n.º 10
0
        protected void FlattenTabStops(TabStops tabStops, TabStops refTabStops)
        {
            if (!tabStops.fClearAll)
            {
                foreach (TabStop refTabStop in refTabStops)
                {
                    if (tabStops.GetTabStopAt(refTabStop.Position) == null && refTabStop.AddTab)
                    {
                        tabStops.AddTabStop(refTabStop.Position, refTabStop.Alignment, refTabStop.Leader);
                    }
                }
            }

            for (int i = 0; i < tabStops.Count; i++)
            {
                TabStop tabStop = tabStops[i];
                if (!tabStop.AddTab)
                {
                    tabStops.RemoveObjectAt(i);
                }
            }
            //Die TabStopCollection ist so wie sie jetzt ist vollständig.
            //Sie darf daher nichts erben, d.h. :
            tabStops.fClearAll = true;
        }
Ejemplo n.º 11
0
        public void AddEx()
        {
            //ExStart
            //ExFor:TabStopCollection.Add(TabStop)
            //ExFor:TabStopCollection.Add(Double, TabAlignment, TabLeader)
            //ExSummary:Shows how to create tab stops and add them to a document.
            Document  doc       = new Document(MyDir + "Document.doc");
            Paragraph paragraph = (Paragraph)doc.GetChild(NodeType.Paragraph, 0, true);

            // Create a TabStop object and add it to the document.
            TabStop tabStop = new TabStop(ConvertUtil.InchToPoint(3), TabAlignment.Left, TabLeader.Dashes);

            paragraph.ParagraphFormat.TabStops.Add(tabStop);

            // Add a tab stop without explicitly creating new TabStop objects.
            paragraph.ParagraphFormat.TabStops.Add(ConvertUtil.MillimeterToPoint(100), TabAlignment.Left, TabLeader.Dashes);

            // Add tab stops at 5 cm to all paragraphs.
            foreach (Paragraph para in doc.GetChildNodes(NodeType.Paragraph, true))
            {
                para.ParagraphFormat.TabStops.Add(ConvertUtil.MillimeterToPoint(50), TabAlignment.Left, TabLeader.Dashes);
            }

            doc.Save(MyDir + @"\Artifacts\Document.AddedTabStops.doc");
            //ExEnd
        }
Ejemplo n.º 12
0
        public void ChangeTOCTabStops()
        {
            //ExStart
            //ExFor:TabStop
            //ExFor:ParagraphFormat.TabStops
            //ExFor:Style.StyleIdentifier
            //ExFor:TabStopCollection.RemoveByPosition
            //ExFor:TabStop.Alignment
            //ExFor:TabStop.Position
            //ExFor:TabStop.Leader
            //ExId:ChangeTOCTabStops
            //ExSummary:Shows how to modify the position of the right tab stop in TOC related paragraphs.
            Aspose.Words.Document doc = new Aspose.Words.Document(MyDir + "Document.TableOfContents.doc");

            // Iterate through all paragraphs in the document
            foreach (Paragraph para in doc.GetChildNodes(NodeType.Paragraph, true))
            {
                // Check if this paragraph is formatted using the TOC result based styles. This is any style between TOC and TOC9.
                if (para.ParagraphFormat.Style.StyleIdentifier >= StyleIdentifier.Toc1 && para.ParagraphFormat.Style.StyleIdentifier <= StyleIdentifier.Toc9)
                {
                    // Get the first tab used in this paragraph, this should be the tab used to align the page numbers.
                    TabStop tab = para.ParagraphFormat.TabStops[0];
                    // Remove the old tab from the collection.
                    para.ParagraphFormat.TabStops.RemoveByPosition(tab.Position);
                    // Insert a new tab using the same properties but at a modified position.
                    // We could also change the separators used (dots) by passing a different Leader type
                    para.ParagraphFormat.TabStops.Add(tab.Position - 50, tab.Alignment, tab.Leader);
                }
            }

            doc.Save(MyDir + "Document.TableOfContentsTabStops Out.doc");
            //ExEnd
        }
        public void AddEx()
        {
            //ExStart
            //ExFor:TabStopCollection.Add(TabStop)
            //ExFor:TabStopCollection.Add(Double, TabAlignment, TabLeader)
            //ExSummary:Shows how to create tab stops and add them to a document.
            Document doc = new Document(MyDir + "Document.doc");
            Paragraph paragraph = (Paragraph)doc.GetChild(NodeType.Paragraph, 0, true);

            // Create a TabStop object and add it to the document.
            TabStop tabStop = new TabStop(ConvertUtil.InchToPoint(3), TabAlignment.Left, TabLeader.Dashes);
            paragraph.ParagraphFormat.TabStops.Add(tabStop);

            // Add a tab stop without explicitly creating new TabStop objects.
            paragraph.ParagraphFormat.TabStops.Add(ConvertUtil.MillimeterToPoint(100), TabAlignment.Left, TabLeader.Dashes);

            // Add tab stops at 5 cm to all paragraphs.
            foreach (Paragraph para in doc.GetChildNodes(NodeType.Paragraph, true))
            {
                para.ParagraphFormat.TabStops.Add(ConvertUtil.MillimeterToPoint(50), TabAlignment.Left, TabLeader.Dashes);
            }

            doc.Save(MyDir + @"\Artifacts\Document.AddedTabStops.doc");
            //ExEnd
        }
Ejemplo n.º 14
0
		/// <summary>
		/// Bring this pane to its default state
		/// </summary>
		public static void Reset () 
		{
			// TODO: figure out a better way to handle the first time selection (which is between Back and PauseApplication)

			SendKeyStrokes ("{TAB}"); // Tab
			currPos = TabStop.PauseApplication;
			isVisited = true;
		}
Ejemplo n.º 15
0
		/// <summary>
		/// Bring this pane to its default state
		/// </summary>
		public static void Reset () 
		{
			// TODO: figure out a better way to handle the first time selection (which is between Back and ApplicationName)

			SendKeyStrokes ("{TAB}"); // Tab
			currPos = TabStop.ApplicationName;
			selectionStatus = Selection.Launch;
		}
Ejemplo n.º 16
0
 private static void ProcessTabStop(TabStop t, Utf8JsonWriter jsonw)
 {
     jsonw.WritePropertyName("TabStop");
     jsonw.WriteStartObject();
     jsonw.WriteString("Alignment", t.Alignment.ToStringSafe());
     jsonw.WriteString("XOffset", t.XOffset.ToStringSafe());
     jsonw.WriteEndObject();
 }
Ejemplo n.º 17
0
		/// <summary>
		/// Change the focus to the specified control
		/// </summary>
		/// <param name="toPos">the desired control</param>
		private static void GoTo (TabStop toPos) 
		{
			// TODO: Throw an exception if the specified control is unreachable in the current state

			while (currPos != toPos) 
			{
				GoToNext ();
			}
		}
Ejemplo n.º 18
0
        /// <summary>
        /// Bring this pane to its default state
        /// </summary>
        public static void Reset()
        {
            // TODO: reset the pane

            if (NewProjectPane3.IsVisited ())
            {
                SendKeyStrokes ("{TAB}"); // Tab
            }

            currPos = TabStop.ProjectLocation;
        }
Ejemplo n.º 19
0
        /// <summary>Calculates and sets tab size with the account of the element that is next in the line after the tab.
        ///     </summary>
        /// <remarks>
        /// Calculates and sets tab size with the account of the element that is next in the line after the tab.
        /// Returns resulting width of the tab.
        /// </remarks>
        private float CalculateTab(Rectangle layoutBox, float curWidth, TabStop tabStop,
                                   IRenderer nextElementRenderer, LayoutResult nextElementResult, IRenderer tabRenderer
                                   )
        {
            float childWidth = 0;

            if (nextElementRenderer != null)
            {
                childWidth = nextElementRenderer.GetOccupiedArea().GetBBox().GetWidth();
            }
            float tabWidth = 0;

            switch (tabStop.GetTabAlignment())
            {
            case TabAlignment.RIGHT:
            {
                tabWidth = tabStop.GetTabPosition() - curWidth - childWidth;
                break;
            }

            case TabAlignment.CENTER:
            {
                tabWidth = tabStop.GetTabPosition() - curWidth - childWidth / 2;
                break;
            }

            case TabAlignment.ANCHOR:
            {
                float anchorPosition = -1;
                if (nextElementRenderer is TextRenderer)
                {
                    anchorPosition = ((TextRenderer)nextElementRenderer).GetTabAnchorCharacterPosition
                                         ();
                }
                if (anchorPosition == -1)
                {
                    anchorPosition = childWidth;
                }
                tabWidth = tabStop.GetTabPosition() - curWidth - anchorPosition;
                break;
            }
            }
            if (tabWidth < 0)
            {
                tabWidth = 0;
            }
            if (curWidth + tabWidth + childWidth > layoutBox.GetWidth())
            {
                tabWidth -= (curWidth + childWidth + tabWidth) - layoutBox.GetWidth();
            }
            tabRenderer.SetProperty(Property.WIDTH, UnitValue.CreatePointValue(tabWidth));
            tabRenderer.SetProperty(Property.HEIGHT, maxAscent - maxDescent);
            return(tabWidth);
        }
Ejemplo n.º 20
0
		/// <summary>
		/// Bring this pane to its default state
		/// </summary>
		public static void Reset () 
		{
			// TODO: reset the pane

			if (NewProjectPane3.IsVisited ()) 
			{
				SendKeyStrokes ("{TAB}"); // Tab
			}

			currPos = TabStop.ProjectLocation;
		}
Ejemplo n.º 21
0
 /// <summary>
 /// Change the focus to the specified control
 /// </summary>
 /// <param name="toPos">the desired control</param>
 private static void GoTo(TabStop toPos)
 {
     TabStop origPos = currPos;
     while (currPos != toPos)
     {
         GoToNext ();
         if (currPos == origPos)
         {
             throw new HolodeckExceptions.UnaccessableControlException ();
         }
     }
 }
Ejemplo n.º 22
0
		/// <summary>
		/// Change the focus to the next control
		/// </summary>
		private static void GoToNext () 
		{
			switch (currPos) 
			{
				case TabStop.PauseApplication: 
				{
					currPos = TabStop.ProcessChaining;
					SendKeyStrokes ("{TAB}"); // Tab
					break;
				}
				case TabStop.ProcessChaining:
				{
				//	currPos = TabStop.NativeFunctions;
					currPos = TabStop.Functions;
					SendKeyStrokes ("{TAB}"); // Tab
					break;
				}
		/*      case TabStop.NativeFunctions:
				{
					currPos = TabStop.Finish;
					SendKeyStrokes("(TAB)");  // Tab
					break;
				}*/
				case TabStop.Functions: 
				{
					currPos = TabStop.Finish;
					SendKeyStrokes ("{TAB}"); // Tab
					break;
				}
				case TabStop.Cancel: 
				{
					currPos = TabStop.Back;
					SendKeyStrokes ("{TAB}"); // Tab
					break;
				}
				case TabStop.Back: 
				{
					currPos = TabStop.PauseApplication;
					SendKeyStrokes ("{TAB}"); // Tab
					break;
				}
				case TabStop.Finish: 
				{
					currPos = TabStop.Cancel;
					SendKeyStrokes ("{TAB}"); // Tab
					break;
				}
				default : 
				{
					break;
				}
			}
		}
Ejemplo n.º 23
0
		/// <summary>
		/// Change the focus to the specified control
		/// </summary>
		/// <param name="toPos">the desired control</param>
		private static void GoTo (TabStop toPos) 
		{
			TabStop origPos = currPos;
			while (currPos != toPos) 
			{
				GoToNext ();
				if (currPos == origPos) 
				{
					throw new HolodeckExceptions.UnaccessableControlException ();
				}
			}
		}
Ejemplo n.º 24
0
		/// <summary>
		/// Change the focus to the next control
		/// </summary>
		private static void GoToNext () 
		{
			switch (currPos) 
			{
				case TabStop.PauseApplication: 
				{
					if (newVersion) 
					{
						//new version
						SendKeyStrokes("{TAB}");
					}

					currPos = TabStop.ProcessChaining;
					SendKeyStrokes ("{TAB}"); // Tab
					break;
				}
				case TabStop.ProcessChaining:
				{
					currPos = TabStop.Functions;
					SendKeyStrokes ("{TAB}"); // Tab
					break;
				}
				case TabStop.Functions: 
				{
					currPos = TabStop.Finish;
					SendKeyStrokes ("{TAB}"); // Tab
					break;
				}
				case TabStop.Cancel: 
				{
					currPos = TabStop.Back;
					SendKeyStrokes ("{TAB}"); // Tab
					break;
				}
				case TabStop.Back: 
				{
					currPos = TabStop.PauseApplication;
					SendKeyStrokes ("{TAB}"); // Tab
					break;
				}
				case TabStop.Finish: 
				{
					currPos = TabStop.Cancel;
					SendKeyStrokes ("{TAB}"); // Tab
					break;
				}
				default : 
				{
					throw new HolodeckExceptions.UnaccessableControlException ();
				}
			}
		}
Ejemplo n.º 25
0
		/// <summary>
		/// Change the focus to the specified control
		/// -- Might throw a HolodeckExceptions.UnaccessableControlException
		/// </summary>
		/// <param name="toPos">the desired control</param>
		private static void GoTo (TabStop toPos) 
		{
			TabStop origPos = currPos;
			while (currPos != toPos) 
			{
				GoToNext ();
				if (currPos == origPos) 
				{
					// TODO: provide meaningful information in the exception
					throw new HolodeckExceptions.UnaccessableControlException ();
				}
			}
		}
Ejemplo n.º 26
0
        public static List <Paragraph> GetParagraph(ReportValueList valueList, Int32Value width, int column = 2)
        {
            if (column < 1)
            {
                column = 1;
            }
            List <Paragraph> list      = new List <Paragraph>();
            int       currentcolumn    = 0;
            Paragraph currentParagraph = null;

            foreach (var reportvalue in valueList.Values)
            {
                reportvalue.Size = valueList.Size;
                if (currentcolumn == 0)
                {
                    currentParagraph = new Paragraph();
                    ParagraphProperties pPr = new ParagraphProperties();
                    //添加标签类
                    Tabs       tabs      = new Tabs();
                    Int32Value eachWidth = width / (new Int32Value(column));
                    for (int i = 1; i < column; i++)
                    {
                        TabStop stop = new TabStop();
                        stop.Val      = new EnumValue <TabStopValues>(TabStopValues.Left);
                        stop.Position = eachWidth * i;
                        tabs.Append(stop);
                    }
                    pPr.Append(tabs);
                    currentParagraph.Append(pPr);
                    list.Add(currentParagraph);
                }
                List <Run> runs = GetRuns(reportvalue);
                foreach (var run in runs)
                {
                    currentParagraph.Append(run);
                }
                currentcolumn++;
                if (currentcolumn < column)
                {
                    Run run = new Run();
                    run.Append(new TabChar());
                    currentParagraph.Append(run);
                }
                if (currentcolumn >= column)
                {
                    currentcolumn = 0;
                }
            }
            return(list);
        }
Ejemplo n.º 27
0
        private void InsertTabs(Node currentNode, double tabPos, bool islistitem)
        {
            Paragraph para     = (Paragraph)currentNode;
            TabStop   newtab   = new TabStop(tabPos, Aspose.Words.TabAlignment.Left, TabLeader.Dashes);
            int       noOfTabs = NoOfTabs(para) + (islistitem?1:0);

            for (int i = 0; i < para.ParagraphFormat.TabStops.Count; i++)
            {
                TabStop oldTab = para.ParagraphFormat.TabStops[i];
                if (oldTab.Position >= tabPos || noOfTabs - 1 < i)
                {
                    para.ParagraphFormat.TabStops.RemoveByIndex(i);
                }
            }
            para.ParagraphFormat.TabStops.Add(newtab);
        }
Ejemplo n.º 28
0
 public void Flush()
 {
     if (tabStop != null)
     {
         float textWidth       = originalWidth - width - tabPosition;
         float tabStopPosition = tabStop.GetPosition(tabPosition, originalWidth - width, tabStopAnchorPosition);
         width = originalWidth - tabStopPosition - textWidth;
         if (width < 0)
         {
             tabStopPosition += width;
         }
         tabStop.Position = tabStopPosition;
         tabStop          = null;
         tabPosition      = float.NaN;
     }
 }
Ejemplo n.º 29
0
        private TabStop GetNextTabStop(float curWidth)
        {
            SortedDictionary <float, TabStop> tabStops         = this.GetProperty <SortedDictionary <float, TabStop> >(Property.TAB_STOPS);
            KeyValuePair <float, TabStop>?    nextTabStopEntry = null;
            TabStop nextTabStop = null;

            if (tabStops != null)
            {
                nextTabStopEntry = tabStops.HigherEntry(curWidth);
            }
            if (!nextTabStopEntry.Equals(default(KeyValuePair <float, TabStop>)))
            {
                nextTabStop = ((KeyValuePair <float, TabStop>)nextTabStopEntry).Value;
            }
            return(nextTabStop);
        }
Ejemplo n.º 30
0
		/// <summary>
		/// Change the focus to the next control
		/// </summary>
		private static void GoToNext () 
		{
			switch (currPos) 
			{
				case TabStop.ProjectLocation: 
				{
					currPos = TabStop.Browse;
					SendKeyStrokes ("{TAB}"); // Tab
					break;
				}
				case TabStop.Browse: 
				{
					if (!NewProjectPane3.IsVisited ()) 
					{
						currPos = TabStop.Cancel;
					} 
					else 
					{
						currPos = TabStop.Finish;
					}
					SendKeyStrokes ("{TAB}"); // Tab
					break;
				}
				case TabStop.Cancel: 
				{
					currPos = TabStop.Next;
					SendKeyStrokes ("{TAB}"); // Tab
					break;
				}
				case TabStop.Next: 
				{
					currPos = TabStop.ProjectLocation;
					SendKeyStrokes ("{TAB}"); // Tab
					break;
				}
				case TabStop.Finish: 
				{
					currPos = TabStop.Cancel;
					SendKeyStrokes ("{TAB}"); // Tab
					break;
				}
				default: 
				{
					break;
				}
			}
		}
Ejemplo n.º 31
0
		/// <summary>
		/// Change the focus to the next control
		/// </summary>
		private static void GoToNext () 
		{
			switch (currPos) 
			{
				case TabStop.ProjectLocation: 
				{
					currPos = TabStop.Browse;
					SendKeyStrokes ("{TAB}"); // Tab
					break;
				}
				case TabStop.Browse: 
				{
					if (!NewProjectPane3.IsVisited ()) 
					{
						currPos = TabStop.Cancel;
					} 
					else 
					{
						currPos = TabStop.Finish;
					}
					SendKeyStrokes ("{TAB}"); // Tab
					break;
				}
				case TabStop.Cancel: 
				{
					currPos = TabStop.Next;
					SendKeyStrokes ("{TAB}"); // Tab
					break;
				}
				case TabStop.Next: 
				{
					currPos = TabStop.ProjectLocation;
					SendKeyStrokes ("{TAB}"); // Tab
					break;
				}
				case TabStop.Finish: 
				{
					currPos = TabStop.Cancel;
					SendKeyStrokes ("{TAB}"); // Tab
					break;
				}
				default: 
				{
					throw new HolodeckExceptions.UnaccessableControlException ();
				}
			}
		}
Ejemplo n.º 32
0
        public void ChangeTocsTabStops()
        {
            //ExStart
            //ExFor:TabStop
            //ExFor:ParagraphFormat.TabStops
            //ExFor:Style.StyleIdentifier
            //ExFor:TabStopCollection.RemoveByPosition
            //ExFor:TabStop.Alignment
            //ExFor:TabStop.Position
            //ExFor:TabStop.Leader
            //ExSummary:Shows how to modify the position of the right tab stop in TOC related paragraphs.
            Document doc = new Document(MyDir + "Table of contents.docx");

            // Iterate through all paragraphs formatted using the TOC result based styles; this is any style between TOC and TOC9
            foreach (Paragraph para in doc.GetChildNodes(NodeType.Paragraph, true).OfType <Paragraph>())
            {
                if (para.ParagraphFormat.Style.StyleIdentifier >= StyleIdentifier.Toc1 &&
                    para.ParagraphFormat.Style.StyleIdentifier <= StyleIdentifier.Toc9)
                {
                    // Get the first tab used in this paragraph, this should be the tab used to align the page numbers
                    TabStop tab = para.ParagraphFormat.TabStops[0];
                    // Remove the old tab from the collection
                    para.ParagraphFormat.TabStops.RemoveByPosition(tab.Position);
                    // Insert a new tab using the same properties but at a modified position
                    // We could also change the separators used (dots) by passing a different Leader type
                    para.ParagraphFormat.TabStops.Add(tab.Position - 50, tab.Alignment, tab.Leader);
                }
            }

            doc.Save(ArtifactsDir + "Styles.ChangeTocsTabStops.docx");
            //ExEnd

            doc = new Document(ArtifactsDir + "Styles.ChangeTocsTabStops.docx");

            foreach (Paragraph para in doc.GetChildNodes(NodeType.Paragraph, true).OfType <Paragraph>())
            {
                if (para.ParagraphFormat.Style.StyleIdentifier >= StyleIdentifier.Toc1 &&
                    para.ParagraphFormat.Style.StyleIdentifier <= StyleIdentifier.Toc9)
                {
                    TabStop tabStop = para.GetEffectiveTabStops()[0];
                    Assert.AreEqual(400.8d, tabStop.Position);
                    Assert.AreEqual(TabAlignment.Right, tabStop.Alignment);
                    Assert.AreEqual(TabLeader.Dots, tabStop.Leader);
                }
            }
        }
Ejemplo n.º 33
0
        public void ChangeTocsTabStops()
        {
            //ExStart
            //ExFor:TabStop
            //ExFor:ParagraphFormat.TabStops
            //ExFor:Style.StyleIdentifier
            //ExFor:TabStopCollection.RemoveByPosition
            //ExFor:TabStop.Alignment
            //ExFor:TabStop.Position
            //ExFor:TabStop.Leader
            //ExSummary:Shows how to modify the position of the right tab stop in TOC related paragraphs.
            Document doc = new Document(MyDir + "Table of contents.docx");

            // Iterate through all paragraphs with TOC result-based styles; this is any style between TOC and TOC9.
            foreach (Paragraph para in doc.GetChildNodes(NodeType.Paragraph, true).OfType <Paragraph>())
            {
                if (para.ParagraphFormat.Style.StyleIdentifier >= StyleIdentifier.Toc1 &&
                    para.ParagraphFormat.Style.StyleIdentifier <= StyleIdentifier.Toc9)
                {
                    // Get the first tab used in this paragraph, this should be the tab used to align the page numbers.
                    TabStop tab = para.ParagraphFormat.TabStops[0];

                    // Replace the first default tab, stop with a custom tab stop.
                    para.ParagraphFormat.TabStops.RemoveByPosition(tab.Position);
                    para.ParagraphFormat.TabStops.Add(tab.Position - 50, tab.Alignment, tab.Leader);
                }
            }

            doc.Save(ArtifactsDir + "Styles.ChangeTocsTabStops.docx");
            //ExEnd

            doc = new Document(ArtifactsDir + "Styles.ChangeTocsTabStops.docx");

            foreach (Paragraph para in doc.GetChildNodes(NodeType.Paragraph, true).OfType <Paragraph>())
            {
                if (para.ParagraphFormat.Style.StyleIdentifier >= StyleIdentifier.Toc1 &&
                    para.ParagraphFormat.Style.StyleIdentifier <= StyleIdentifier.Toc9)
                {
                    TabStop tabStop = para.GetEffectiveTabStops()[0];
                    Assert.AreEqual(400.8d, tabStop.Position);
                    Assert.AreEqual(TabAlignment.Right, tabStop.Alignment);
                    Assert.AreEqual(TabLeader.Dots, tabStop.Leader);
                }
            }
        }
Ejemplo n.º 34
0
 /// <summary>
 /// Change the focus to the next control
 /// </summary>
 private static void GoToNext()
 {
     switch (currPos)
     {
         case TabStop.ProjectLocation:
         {
             currPos = TabStop.Browse;
             SendKeyStrokes ("{TAB}"); // Tab
             break;
         }
         case TabStop.Browse:
         {
             if (!NewProjectPane3.IsVisited ())
             {
                 currPos = TabStop.Cancel;
             }
             else
             {
                 currPos = TabStop.Finish;
             }
             SendKeyStrokes ("{TAB}"); // Tab
             break;
         }
         case TabStop.Cancel:
         {
             currPos = TabStop.Next;
             SendKeyStrokes ("{TAB}"); // Tab
             break;
         }
         case TabStop.Next:
         {
             currPos = TabStop.ProjectLocation;
             SendKeyStrokes ("{TAB}"); // Tab
             break;
         }
         case TabStop.Finish:
         {
             currPos = TabStop.Cancel;
             SendKeyStrokes ("{TAB}"); // Tab
             break;
         }
         default:
         {
             break;
         }
     }
 }
        //[LoginFilter(Order = 0)]
        //[SecurityFilter(Order = 1)]
        private Paragraph GenerateReportDataSecondHeadParagraph(string reportNO, string pipeTypeName, int curPage, int recordsPageCount, string WorkNO)
        {
            Paragraph paragraph1 = new Paragraph() { RsidParagraphAddition = "005D4399", RsidParagraphProperties = "001D44EB", RsidRunAdditionDefault = "005D4399" };

            ParagraphProperties paragraphProperties1 = new ParagraphProperties();

            Tabs tabs1 = new Tabs();

            TabStop tabStop1 = new TabStop() { Val = TabStopValues.Left, Position = 0 };
            TabStop tabStop2 = new TabStop() { Val = TabStopValues.Center, Position = 5000 };
            TabStop tabStop3 = new TabStop() { Val = TabStopValues.Right, Position = 10070 };

            tabs1.Append(tabStop1);
            tabs1.Append(tabStop2);
            tabs1.Append(tabStop3);

            ParagraphMarkRunProperties paragraphMarkRunProperties1 = new ParagraphMarkRunProperties();
            FontSizeComplexScript fontSizeComplexScript1 = new FontSizeComplexScript() { Val = "28" };

            paragraphMarkRunProperties1.Append(fontSizeComplexScript1);

            paragraphProperties1.Append(tabs1);
            paragraphProperties1.Append(paragraphMarkRunProperties1);

            Run run1 = new Run() { RsidRunProperties = "00200017" };

            RunProperties runProperties1 = new RunProperties();
            RunFonts runFonts1 = new RunFonts() { Hint = FontTypeHintValues.EastAsia };
            Bold bold1 = new Bold();
            FontSizeComplexScript fontSizeComplexScript2 = new FontSizeComplexScript() { Val = "28" };

            runProperties1.Append(runFonts1);
            runProperties1.Append(bold1);
            runProperties1.Append(fontSizeComplexScript2);
            Text text1 = new Text();
            text1.Text = "NO.";

            run1.Append(runProperties1);
            run1.Append(text1);

            Run run2 = new Run() { RsidRunAddition = "00CE1671" };

            RunProperties runProperties2 = new RunProperties();
            FontSizeComplexScript fontSizeComplexScript3 = new FontSizeComplexScript() { Val = "28" };

            runProperties2.Append(fontSizeComplexScript3);
            Text text2 = new Text();
            text2.Text = reportNO;

            run2.Append(runProperties2);
            run2.Append(text2);

            Run run3 = new Run() { RsidRunAddition = "00CE1671" };

            RunProperties runProperties3 = new RunProperties();
            RunFonts runFonts2 = new RunFonts() { Hint = FontTypeHintValues.EastAsia };
            FontSizeComplexScript fontSizeComplexScript4 = new FontSizeComplexScript() { Val = "28" };

            runProperties3.Append(runFonts2);
            runProperties3.Append(fontSizeComplexScript4);
            TabChar tabChar1 = new TabChar();

            run3.Append(runProperties3);
            run3.Append(tabChar1);

            Run run4 = new Run() { RsidRunProperties = "00CE1671", RsidRunAddition = "00CE1671" };

            RunProperties runProperties4 = new RunProperties();
            RunFonts runFonts3 = new RunFonts() { Hint = FontTypeHintValues.EastAsia };
            Bold bold2 = new Bold();
            BoldComplexScript boldComplexScript1 = new BoldComplexScript();
            FontSizeComplexScript fontSizeComplexScript5 = new FontSizeComplexScript() { Val = "21" };

            runProperties4.Append(runFonts3);
            runProperties4.Append(bold2);
            runProperties4.Append(boldComplexScript1);
            runProperties4.Append(fontSizeComplexScript5);
            Text text3 = new Text();
            text3.Text = "样品编号:";

            run4.Append(runProperties4);
            run4.Append(text3);

            Run run5 = new Run() { RsidRunProperties = "00CE1671", RsidRunAddition = "00CE1671" };

            RunProperties runProperties5 = new RunProperties();
            BoldComplexScript boldComplexScript2 = new BoldComplexScript();
            FontSizeComplexScript fontSizeComplexScript6 = new FontSizeComplexScript() { Val = "21" };

            runProperties5.Append(boldComplexScript2);
            runProperties5.Append(fontSizeComplexScript6);
            Text text4 = new Text();

            text4.Text = WorkNO;

            run5.Append(runProperties5);
            run5.Append(text4);

            Run run6 = new Run() { RsidRunAddition = "00CE1671" };

            RunProperties runProperties6 = new RunProperties();
            RunFonts runFonts4 = new RunFonts() { Hint = FontTypeHintValues.EastAsia };
            Bold bold3 = new Bold();
            BoldComplexScript boldComplexScript3 = new BoldComplexScript();
            FontSizeComplexScript fontSizeComplexScript7 = new FontSizeComplexScript() { Val = "21" };

            runProperties6.Append(runFonts4);
            runProperties6.Append(bold3);
            runProperties6.Append(boldComplexScript3);
            runProperties6.Append(fontSizeComplexScript7);
            TabChar tabChar2 = new TabChar();

            run6.Append(runProperties6);
            run6.Append(tabChar2);

            Run run7 = new Run() { RsidRunProperties = "00200017" };

            RunProperties runProperties7 = new RunProperties();
            RunFonts runFonts5 = new RunFonts() { Hint = FontTypeHintValues.EastAsia };
            Bold bold4 = new Bold();
            FontSizeComplexScript fontSizeComplexScript8 = new FontSizeComplexScript() { Val = "28" };

            runProperties7.Append(runFonts5);
            runProperties7.Append(bold4);
            runProperties7.Append(fontSizeComplexScript8);
            Text text5 = new Text();
            text5.Text = "第";

            run7.Append(runProperties7);
            run7.Append(text5);

            Run run8 = new Run() { RsidRunAddition = "00D55672" };

            RunProperties runProperties8 = new RunProperties();
            RunFonts runFonts6 = new RunFonts() { Hint = FontTypeHintValues.EastAsia };
            Bold bold5 = new Bold();
            FontSizeComplexScript fontSizeComplexScript9 = new FontSizeComplexScript() { Val = "28" };

            runProperties8.Append(runFonts6);
            runProperties8.Append(bold5);
            runProperties8.Append(fontSizeComplexScript9);
            Text text6 = new Text() { Space = SpaceProcessingModeValues.Preserve };
            text6.Text = " " + curPage + " ";

            run8.Append(runProperties8);
            run8.Append(text6);

            Run run9 = new Run() { RsidRunProperties = "00200017" };

            RunProperties runProperties9 = new RunProperties();
            RunFonts runFonts7 = new RunFonts() { Hint = FontTypeHintValues.EastAsia };
            Bold bold6 = new Bold();
            FontSizeComplexScript fontSizeComplexScript10 = new FontSizeComplexScript() { Val = "28" };

            runProperties9.Append(runFonts7);
            runProperties9.Append(bold6);
            runProperties9.Append(fontSizeComplexScript10);
            Text text7 = new Text();
            text7.Text = "页";

            run9.Append(runProperties9);
            run9.Append(text7);

            Run run10 = new Run();

            RunProperties runProperties10 = new RunProperties();
            RunFonts runFonts8 = new RunFonts() { Hint = FontTypeHintValues.EastAsia };
            FontSizeComplexScript fontSizeComplexScript11 = new FontSizeComplexScript() { Val = "28" };

            runProperties10.Append(runFonts8);
            runProperties10.Append(fontSizeComplexScript11);
            Text text8 = new Text() { Space = SpaceProcessingModeValues.Preserve };
            text8.Text = "  ";

            run10.Append(runProperties10);
            run10.Append(text8);

            Run run11 = new Run() { RsidRunProperties = "00D55672" };

            RunProperties runProperties11 = new RunProperties();
            RunFonts runFonts9 = new RunFonts() { Hint = FontTypeHintValues.EastAsia };
            Bold bold7 = new Bold();
            FontSizeComplexScript fontSizeComplexScript12 = new FontSizeComplexScript() { Val = "28" };

            runProperties11.Append(runFonts9);
            runProperties11.Append(bold7);
            runProperties11.Append(fontSizeComplexScript12);
            Text text9 = new Text();
            text9.Text = "共";

            run11.Append(runProperties11);
            run11.Append(text9);

            Run run12 = new Run() { RsidRunAddition = "00D55672" };

            RunProperties runProperties12 = new RunProperties();
            RunFonts runFonts10 = new RunFonts() { Hint = FontTypeHintValues.EastAsia };
            Bold bold8 = new Bold();
            FontSizeComplexScript fontSizeComplexScript13 = new FontSizeComplexScript() { Val = "28" };

            runProperties12.Append(runFonts10);
            runProperties12.Append(bold8);
            runProperties12.Append(fontSizeComplexScript13);
            Text text10 = new Text() { Space = SpaceProcessingModeValues.Preserve };
            text10.Text = " " + recordsPageCount + " ";

            run12.Append(runProperties12);
            run12.Append(text10);

            Run run13 = new Run() { RsidRunProperties = "00200017" };

            RunProperties runProperties13 = new RunProperties();
            RunFonts runFonts11 = new RunFonts() { Hint = FontTypeHintValues.EastAsia };
            Bold bold9 = new Bold();
            FontSizeComplexScript fontSizeComplexScript14 = new FontSizeComplexScript() { Val = "28" };

            runProperties13.Append(runFonts11);
            runProperties13.Append(bold9);
            runProperties13.Append(fontSizeComplexScript14);
            Text text11 = new Text();
            text11.Text = "页";

            run13.Append(runProperties13);
            run13.Append(text11);

            paragraph1.Append(paragraphProperties1);
            paragraph1.Append(run1);
            paragraph1.Append(run2);
            paragraph1.Append(run3);
            paragraph1.Append(run4);
            paragraph1.Append(run5);
            paragraph1.Append(run6);
            paragraph1.Append(run7);
            paragraph1.Append(run8);
            paragraph1.Append(run9);
            paragraph1.Append(run10);
            paragraph1.Append(run11);
            paragraph1.Append(run12);
            paragraph1.Append(run13);
            return paragraph1;
            //return paragraph1;
        }
Ejemplo n.º 36
0
 /// <summary>
 /// Change the focus to the specified control
 /// </summary>
 /// <param name="toPos">the desired control</param>
 private static void GoTo(TabStop toPos)
 {
     while (currPos != toPos)
     {
         GoToNext ();
     }
 }
Ejemplo n.º 37
0
 virtual public void Flush()
 {
     if (tabStop != null)
     {
         float textWidth = originalWidth - width - tabPosition;
         float tabStopPosition = tabStop.GetPosition(tabPosition, originalWidth - width, tabStopAnchorPosition);
         width = originalWidth - tabStopPosition - textWidth;
         if (width < 0)
             tabStopPosition += width;
         if (!isRTL)
             tabStop.Position = tabStopPosition;
         else
             tabStop.Position = originalWidth - width - tabPosition;
         tabStop = null;
         tabPosition = float.NaN;
     }
 }
Ejemplo n.º 38
0
 /// <summary>
 /// Change the focus to the next control
 /// </summary>
 private static void GoToNext()
 {
     switch (currPos)
     {
         case TabStop.PauseApplication:
         {
             currPos = TabStop.ProcessChaining;
             SendKeyStrokes ("{TAB}"); // Tab
             break;
         }
         case TabStop.ProcessChaining:
         {
         //	currPos = TabStop.NativeFunctions;
             currPos = TabStop.Functions;
             SendKeyStrokes ("{TAB}"); // Tab
             break;
         }
     /*      case TabStop.NativeFunctions:
         {
             currPos = TabStop.Finish;
             SendKeyStrokes("(TAB)");  // Tab
             break;
         }*/
         case TabStop.Functions:
         {
             currPos = TabStop.Finish;
             SendKeyStrokes ("{TAB}"); // Tab
             break;
         }
         case TabStop.Cancel:
         {
             currPos = TabStop.Back;
             SendKeyStrokes ("{TAB}"); // Tab
             break;
         }
         case TabStop.Back:
         {
             currPos = TabStop.PauseApplication;
             SendKeyStrokes ("{TAB}"); // Tab
             break;
         }
         case TabStop.Finish:
         {
             currPos = TabStop.Cancel;
             SendKeyStrokes ("{TAB}"); // Tab
             break;
         }
         default :
         {
             break;
         }
     }
 }
Ejemplo n.º 39
0
        /// <summary>
        /// Returns back the index of the next visible pane after the specified one in paneOrdering
        /// -- Might throw a HolodeckExceptions.UnaccessableControlException
        /// </summary>
        /// <param name="pane">the specified pane</param>
        /// <returns>the index of a paneOrdering element</returns>
        private static int GetNextPaneIndex(TabStop pane)
        {
            int position = 0;
            while ((position < paneOrdering.Count) &&
                (((TabStop) paneOrdering[position]) != pane))
            {
                position++;
            }
            if (position == paneOrdering.Count)
            {
                // TODO: provide meaningful info in the exception
                throw new HolodeckExceptions.UnaccessableControlException ();
            }

            position++;
            if (position == paneOrdering.Count)
            {
                position = 0;
            }
            return position;
        }
Ejemplo n.º 40
0
        /// <summary>
        /// Parses a single statement in an attribute declaration block.
        /// </summary>
        private void ParseAttributeStatement(DocumentObject doc)
        {
            // Syntax is easy
            //   identifier: xxxxx
            // or 
            //   sequence of identifiers: xxx.yyy.zzz
            //
            // followed by: «=», «+=», «-=», or «{»
            //
            // Parser of rhs depends on the type of the l-value.

            if (doc == null)
                throw new ArgumentNullException("doc");
            string valueName = "";
            try
            {
                valueName = _scanner.Token;
                ReadCode();

                // Resolve path, if it exists.
                object val;
                while (Symbol == Symbol.Dot)
                {
#if DEBUG_
                    if (valueName == "TabStops")
                        valueName.GetType();
#endif
                    Debug.Assert(doc != null, "Make ReSharper happy.");
                    val = doc.GetValue(valueName);
                    if (val == null)
                    {
                        DocumentObject documentObject = doc;
                        val = documentObject.CreateValue(valueName);
                        doc.SetValue(valueName, val);
                    }
                    AssertCondition(val != null, DomMsgID.InvalidValueName, valueName);
                    doc = val as DocumentObject;
                    AssertCondition(doc != null, DomMsgID.SymbolIsNotAnObject, valueName);

                    ReadCode();
                    AssertCondition(Symbol == Symbol.Identifier, DomMsgID.InvalidValueName, _scanner.Token);
                    valueName = _scanner.Token;
                    AssertCondition(valueName[0] != '_', DomMsgID.NoAccess, _scanner.Token);

#if DEBUG_
          if (valueName == "TabStops")
            valueName.GetType();
#endif

                    ReadCode();
                }

                Debug.Assert(doc != null, "Make ReSharper happy.");
                switch (Symbol)
                {
                    case Symbol.Assign:
                        //DomValueDescriptor is needed from assignment routine.
                        ValueDescriptor pvd = doc.Meta[valueName];
                        AssertCondition(pvd != null, DomMsgID.InvalidValueName, valueName);
                        ParseAssign(doc, pvd);
                        break;

                    case Symbol.PlusAssign:
                    case Symbol.MinusAssign:
                        // Hard-coded for TabStops only...
                        if (!(doc is ParagraphFormat))
                            ThrowParserException(DomMsgID.SymbolNotAllowed, _scanner.Token);
                        if (String.Compare(valueName, "TabStops", StringComparison.OrdinalIgnoreCase) != 0)
                            ThrowParserException(DomMsgID.InvalidValueForOperation, valueName, _scanner.Token);

                        ParagraphFormat paragraphFormat = (ParagraphFormat)doc;
                        TabStops tabStops = paragraphFormat.TabStops;

                        if (true) // HACK in ParseAttributeStatement
                        {
                            bool fAddItem = Symbol == Symbol.PlusAssign;
                            TabStop tabStop = new TabStop();

                            ReadCode();

                            if (Symbol == Symbol.BraceLeft)
                            {
                                ParseAttributeBlock(tabStop);
                            }
                            else if (Symbol == Symbol.StringLiteral || Symbol == Symbol.RealLiteral || Symbol == Symbol.IntegerLiteral)
                            {
                                // Special hack for tab stops...
                                Unit unit = Token;
                                tabStop.SetValue("Position", unit);

                                ReadCode();
                            }
                            else
                                ThrowParserException(DomMsgID.UnexpectedSymbol, Token);

                            if (fAddItem)
                                tabStops.AddTabStop(tabStop);
                            else
                                tabStops.RemoveTabStop(tabStop.Position);
                        }
                        break;

                    case Symbol.BraceLeft:
                        val = doc.GetValue(valueName);
                        AssertCondition(val != null, DomMsgID.InvalidValueName, valueName);

                        DocumentObject doc2 = val as DocumentObject;
                        if (doc2 != null)
                            ParseAttributeBlock(doc2);
                        else
                            ThrowParserException(DomMsgID.SymbolIsNotAnObject, valueName);
                        break;

                    default:
                        ThrowParserException(DomMsgID.SymbolNotAllowed, _scanner.Token);
                        return;
                }
            }
            catch (DdlParserException ex)
            {
                ReportParserException(ex);
                AdjustToNextBlock();
            }
            catch (ArgumentException e)
            {
                ReportParserException(e, DomMsgID.InvalidAssignment, valueName);
            }
        }
Ejemplo n.º 41
0
        /// <summary>
        /// Gets the elements of the GridView as Name - Value pairs
        /// Note: Assumes that the GridView is showing the properties of a resource
        /// -- Might throw a HolodeckExceptions.UnaccessableControlException
        /// </summary>
        /// <returns>the string list containing the Name - Value pairs of the GridView entries</returns>
        protected static string[] GetResourcePropertyGridViewElements2()
        {
            SetNameOrdering ();
            // this sets us to the PropertyName field, so we need to update currPos
            currPos = TabStop.PropertyName;

            GoToFirstProperty ();

            string[] retArray = new string[ResourcePropertyNumber];
            for (int i = 0; i < retArray.Length; i++)
            {
                GoTo (TabStop.PropertyValue);

                retArray[i] = Base.GetEditBoxText (false);

                GoTo (TabStop.PropertyName);
                GoToNextProperty ();
            }

            GoTo (TabStop.HeadLine);

            return retArray;
        }
Ejemplo n.º 42
0
 /// <summary>
 /// Sets the "Properties" pane to its default state
 /// </summary>
 public static void Reset()
 {
     currPos = TabStop.HeadLine;
 }
Ejemplo n.º 43
0
 /// <summary>
 /// Go to the next visible pane at the Holodeck main window
 /// -- Might throw a HolodeckExceptions.UnaccessableControlException
 /// </summary>
 private static void GoToNext()
 {
     switch (currPos)
     {
         case TabStop.HeadLine:
         {
             currPos = TabStop.ToolBar;
             SendKeyStrokes ("{TAB}"); // Tab
             break;
         }
         case TabStop.ToolBar:
         {
             currPos = TabStop.PropertyName;
             SendKeyStrokes ("{TAB}"); // Tab
             break;
         }
         case TabStop.PropertyName:
         {
             currPos = TabStop.PropertyValue;
             SendKeyStrokes ("{TAB}"); // Tab
             break;
         }
         case TabStop.PropertyValue:
         {
             currPos = TabStop.HeadLine;
             SendKeyStrokes ("{TAB}"); // Tab
             break;
         }
         default:
         {
             // TODO: provide meaningful information in the exception
             throw new HolodeckExceptions.UnaccessableControlException ();
         }
     }
 }
Ejemplo n.º 44
0
 /// <summary>
 /// Change the focus to the specified control
 /// -- Might throw a HolodeckExceptions.UnaccessableControlException
 /// </summary>
 /// <param name="toPos">the desired control</param>
 private static void GoTo(TabStop toPos)
 {
     TabStop origPos = currPos;
     while (currPos != toPos)
     {
         GoToNext ();
         if (currPos == origPos)
         {
             // TODO: provide meaningful information in the exception
             throw new HolodeckExceptions.UnaccessableControlException ();
         }
     }
 }
Ejemplo n.º 45
0
        // Creates an Paragraph instance and adds its children.
        public Paragraph GenerateParagraph(FamilyInfo f)
        {
            Paragraph paragraph1 = new Paragraph() { RsidParagraphAddition = "00185682", RsidParagraphProperties = "00EF4816", RsidRunAdditionDefault = "00185682" };

            ParagraphProperties paragraphProperties1 = new ParagraphProperties();

            Tabs tabs1 = new Tabs();
            TabStop tabStop1 = new TabStop() { Val = TabStopValues.Left, Position = 270 };
            TabStop tabStop2 = new TabStop() { Val = TabStopValues.Left, Position = 1710 };
            TabStop tabStop3 = new TabStop() { Val = TabStopValues.Left, Position = 4410 };

            tabs1.Append(tabStop1);
            tabs1.Append(tabStop2);
            tabs1.Append(tabStop3);

            ParagraphMarkRunProperties paragraphMarkRunProperties1 = new ParagraphMarkRunProperties();
            NoProof noProof1 = new NoProof();

            paragraphMarkRunProperties1.Append(noProof1);

            paragraphProperties1.Append(new KeepLines());
            paragraphProperties1.Append(tabs1);
            paragraphProperties1.Append(paragraphMarkRunProperties1);

            Run run1 = new Run() { RsidRunProperties = "00E8319A" };

            RunProperties runProperties1 = new RunProperties();
            Bold bold1 = new Bold();
            BoldComplexScript boldComplexScript1 = new BoldComplexScript();
            Italic italic1 = new Italic();
            ItalicComplexScript italicComplexScript1 = new ItalicComplexScript();
            NoProof noProof2 = new NoProof();
            Color color1 = new Color() { Val = "4F81BD", ThemeColor = ThemeColorValues.Accent1 };

            runProperties1.Append(bold1);
            runProperties1.Append(boldComplexScript1);
            runProperties1.Append(italic1);
            runProperties1.Append(italicComplexScript1);
            runProperties1.Append(noProof2);
            runProperties1.Append(color1);
            Text text1 = new Text();
            text1.Text = f.FamilyName;

            run1.Append(runProperties1);
            run1.Append(text1);

            Run run2 = new Run() { RsidRunProperties = "006217A5" };

            RunProperties runProperties2 = new RunProperties();
            RunStyle runStyle1 = new RunStyle() { Val = "IntenseEmphasis" };
            NoProof noProof3 = new NoProof();

            runProperties2.Append(runStyle1);
            runProperties2.Append(noProof3);
            Text text2 = new Text() { Space = SpaceProcessingModeValues.Preserve };
            text2.Text = " Family ";

            run2.Append(runProperties2);
            run2.Append(text2);

            Run run3 = new Run();

            RunProperties runProperties3 = new RunProperties();
            NoProof noProof4 = new NoProof();

            runProperties3.Append(noProof4);
            Break break1 = new Break();

            run3.Append(runProperties3);
            run3.Append(break1);

            Run run4 = new Run();

            RunProperties runProperties4 = new RunProperties();
            NoProof noProof5 = new NoProof();

            runProperties4.Append(noProof5);
            TabChar tabChar1 = new TabChar();
            Text text3 = new Text();
            text3.Text = f.Address;

            run4.Append(runProperties4);
            run4.Append(tabChar1);
            run4.Append(text3);

            Run run5 = new Run();

            RunProperties runProperties5 = new RunProperties();
            NoProof noProof6 = new NoProof();

            runProperties5.Append(noProof6);
            Break break2 = new Break();

            run5.Append(runProperties5);
            run5.Append(break2);

            Run run6 = new Run();

            RunProperties runProperties6 = new RunProperties();
            NoProof noProof7 = new NoProof();

            runProperties6.Append(noProof7);
            TabChar tabChar2 = new TabChar();
            Text text4 = new Text();
            text4.Text = f.CityStateZip;

            run6.Append(runProperties6);
            run6.Append(tabChar2);
            run6.Append(text4);

            Run run7 = new Run();

            RunProperties runProperties7 = new RunProperties();
            NoProof noProof8 = new NoProof();

            runProperties7.Append(noProof8);
            Break break3 = new Break();

            run7.Append(runProperties7);
            run7.Append(break3);

            Run run8 = new Run();

            RunProperties runProperties8 = new RunProperties();
            NoProof noProof9 = new NoProof();

            runProperties8.Append(noProof9);
            TabChar tabChar3 = new TabChar();
            Text text5 = new Text();
            text5.Text = "Home Phone: " + f.HomePhone.FmtFone();

            run8.Append(runProperties8);
            run8.Append(tabChar3);
            run8.Append(text5);

            Run run20 = new Run();

            RunProperties runProperties20 = new RunProperties();
            NoProof noProof21 = new NoProof();

            runProperties20.Append(noProof21);
            TabChar tabChar11 = new TabChar();

            run20.Append(runProperties20);
            run20.Append(tabChar11);
            BookmarkStart bookmarkStart1 = new BookmarkStart() { Name = "_GoBack", Id = "0" };
            BookmarkEnd bookmarkEnd1 = new BookmarkEnd() { Id = "0" };

            paragraph1.Append(paragraphProperties1);
            paragraph1.Append(run1);
            paragraph1.Append(run2);
            paragraph1.Append(run3);
            paragraph1.Append(run4);
            paragraph1.Append(run5);
            paragraph1.Append(run6);
            paragraph1.Append(run7);
            paragraph1.Append(run8);

            foreach (var m in f.Members)
            {
                var first = new Run();
                first.Append(new RunProperties(new NoProof()));
                first.Append(new Break());
                string fname = m.Last == f.FamilyName
                    ? m.First
                    : m.First + " " + m.Last;
                fname = m.Age.HasValue && m.Age < 22
                    ? "{0} ({1})".Fmt(fname, m.Age)
                    : fname;

                first.Append(new Text(fname));
                paragraph1.Append(first);

                var email = new Run();
                email.Append(new RunProperties(new NoProof()));
                email.Append(new TabChar());
                email.Append(new Text(m.Email ?? ""));
                paragraph1.Append(email);

                var cell = new Run();
                cell.Append(new RunProperties(new NoProof()));
                cell.Append(new TabChar());
                cell.Append(new Text(m.Cell.FmtFone()));
                paragraph1.Append(cell);
            }

            paragraph1.Append(run20);
            paragraph1.Append(bookmarkStart1);
            paragraph1.Append(bookmarkEnd1);
            return paragraph1;
        }
Ejemplo n.º 46
0
        private void GenerateChapterFive()
        {
            Paragraph paragraph1 = new Paragraph() { RsidParagraphMarkRevision = "005B1369", RsidParagraphAddition = "005B1369", RsidParagraphProperties = "005B1369", RsidRunAdditionDefault = "005B1369" };

            ParagraphProperties paragraphProperties1 = new ParagraphProperties();
            Indentation indentation1 = new Indentation() { FirstLine = "567" };
            Justification justification1 = new Justification() { Val = JustificationValues.Both };

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

            paragraphMarkRunProperties1.Append(runFonts1);
            paragraphMarkRunProperties1.Append(fontSize1);
            paragraphMarkRunProperties1.Append(fontSizeComplexScript1);
            paragraphMarkRunProperties1.Append(languages1);

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

            Run run1 = new Run() { RsidRunProperties = "005B1369" };

            RunProperties runProperties1 = new RunProperties();
            RunFonts runFonts2 = new RunFonts() { Ascii = "Times New Roman", HighAnsi = "Times New Roman" };
            FontSize fontSize2 = new FontSize() { Val = "28" };
            FontSizeComplexScript fontSizeComplexScript2 = new FontSizeComplexScript() { Val = "28" };
            Languages languages2 = new Languages() { Val = "ru-RU" };

            runProperties1.Append(runFonts2);
            runProperties1.Append(fontSize2);
            runProperties1.Append(fontSizeComplexScript2);
            runProperties1.Append(languages2);
            Text text1 = new Text();
            text1.Text = "При чтении лекционного материала занятия могут проходить как с использованием:";

            run1.Append(runProperties1);
            run1.Append(text1);

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

            Paragraph paragraph2 = new Paragraph() { RsidParagraphMarkRevision = "005B1369", RsidParagraphAddition = "005B1369", RsidParagraphProperties = "005B1369", RsidRunAdditionDefault = "005B1369" };

            ParagraphProperties paragraphProperties2 = new ParagraphProperties();

            NumberingProperties numberingProperties1 = new NumberingProperties();
            NumberingLevelReference numberingLevelReference1 = new NumberingLevelReference() { Val = 0 };
            NumberingId numberingId1 = new NumberingId() { Val = 6 };

            numberingProperties1.Append(numberingLevelReference1);
            numberingProperties1.Append(numberingId1);
            Indentation indentation2 = new Indentation() { Left = "641", Hanging = "357" };
            Justification justification2 = new Justification() { Val = JustificationValues.Both };

            ParagraphMarkRunProperties paragraphMarkRunProperties2 = new ParagraphMarkRunProperties();
            RunFonts runFonts3 = new RunFonts() { Ascii = "Times New Roman", HighAnsi = "Times New Roman" };
            FontSize fontSize3 = new FontSize() { Val = "28" };
            FontSizeComplexScript fontSizeComplexScript3 = new FontSizeComplexScript() { Val = "28" };
            Languages languages3 = new Languages() { Val = "ru-RU" };

            paragraphMarkRunProperties2.Append(runFonts3);
            paragraphMarkRunProperties2.Append(fontSize3);
            paragraphMarkRunProperties2.Append(fontSizeComplexScript3);
            paragraphMarkRunProperties2.Append(languages3);

            paragraphProperties2.Append(numberingProperties1);
            paragraphProperties2.Append(indentation2);
            paragraphProperties2.Append(justification2);
            paragraphProperties2.Append(paragraphMarkRunProperties2);
            ProofError proofError1 = new ProofError() { Type = ProofingErrorValues.GrammarStart };

            Run run2 = new Run() { RsidRunProperties = "005B1369" };

            RunProperties runProperties2 = new RunProperties();
            RunFonts runFonts4 = new RunFonts() { Ascii = "Times New Roman", HighAnsi = "Times New Roman" };
            Bold bold1 = new Bold();
            FontSize fontSize4 = new FontSize() { Val = "28" };
            FontSizeComplexScript fontSizeComplexScript4 = new FontSizeComplexScript() { Val = "28" };
            Languages languages4 = new Languages() { Val = "ru-RU" };

            runProperties2.Append(runFonts4);
            runProperties2.Append(bold1);
            runProperties2.Append(fontSize4);
            runProperties2.Append(fontSizeComplexScript4);
            runProperties2.Append(languages4);
            Text text2 = new Text();
            text2.Text = "информационно";

            run2.Append(runProperties2);
            run2.Append(text2);
            ProofError proofError2 = new ProofError() { Type = ProofingErrorValues.GrammarEnd };

            Run run3 = new Run() { RsidRunProperties = "005B1369" };

            RunProperties runProperties3 = new RunProperties();
            RunFonts runFonts5 = new RunFonts() { Ascii = "Times New Roman", HighAnsi = "Times New Roman" };
            Bold bold2 = new Bold();
            FontSize fontSize5 = new FontSize() { Val = "28" };
            FontSizeComplexScript fontSizeComplexScript5 = new FontSizeComplexScript() { Val = "28" };
            Languages languages5 = new Languages() { Val = "ru-RU" };

            runProperties3.Append(runFonts5);
            runProperties3.Append(bold2);
            runProperties3.Append(fontSize5);
            runProperties3.Append(fontSizeComplexScript5);
            runProperties3.Append(languages5);
            Text text3 = new Text() { Space = SpaceProcessingModeValues.Preserve };
            text3.Text = "-коммуникационных образовательных технологий: ";

            run3.Append(runProperties3);
            run3.Append(text3);

            Run run4 = new Run() { RsidRunProperties = "005B1369" };

            RunProperties runProperties4 = new RunProperties();
            RunFonts runFonts6 = new RunFonts() { Ascii = "Times New Roman", HighAnsi = "Times New Roman" };
            Bold bold3 = new Bold();
            Italic italic1 = new Italic();
            FontSize fontSize6 = new FontSize() { Val = "28" };
            FontSizeComplexScript fontSizeComplexScript6 = new FontSizeComplexScript() { Val = "28" };
            Languages languages6 = new Languages() { Val = "ru-RU" };

            runProperties4.Append(runFonts6);
            runProperties4.Append(bold3);
            runProperties4.Append(italic1);
            runProperties4.Append(fontSize6);
            runProperties4.Append(fontSizeComplexScript6);
            runProperties4.Append(languages6);
            Text text4 = new Text();
            text4.Text = "лекция-визуализация";

            run4.Append(runProperties4);
            run4.Append(text4);

            Run run5 = new Run() { RsidRunProperties = "005B1369" };

            RunProperties runProperties5 = new RunProperties();
            RunFonts runFonts7 = new RunFonts() { Ascii = "Times New Roman", HighAnsi = "Times New Roman" };
            FontSize fontSize7 = new FontSize() { Val = "28" };
            FontSizeComplexScript fontSizeComplexScript7 = new FontSizeComplexScript() { Val = "28" };
            Languages languages7 = new Languages() { Val = "ru-RU" };

            runProperties5.Append(runFonts7);
            runProperties5.Append(fontSize7);
            runProperties5.Append(fontSizeComplexScript7);
            runProperties5.Append(languages7);
            Text text5 = new Text() { Space = SpaceProcessingModeValues.Preserve };
            text5.Text = " – изложение содержания каждой темы сопровождается презентацией (демонстрацией учебных материалов, представленных в среде программы ";

            run5.Append(runProperties5);
            run5.Append(text5);

            Run run6 = new Run() { RsidRunProperties = "005B1369" };

            RunProperties runProperties6 = new RunProperties();
            RunFonts runFonts8 = new RunFonts() { Ascii = "Times New Roman", HighAnsi = "Times New Roman" };
            FontSize fontSize8 = new FontSize() { Val = "28" };
            FontSizeComplexScript fontSizeComplexScript8 = new FontSizeComplexScript() { Val = "28" };

            runProperties6.Append(runFonts8);
            runProperties6.Append(fontSize8);
            runProperties6.Append(fontSizeComplexScript8);
            Text text6 = new Text();
            text6.Text = "Microsoft";

            run6.Append(runProperties6);
            run6.Append(text6);

            Run run7 = new Run() { RsidRunProperties = "005B1369" };

            RunProperties runProperties7 = new RunProperties();
            RunFonts runFonts9 = new RunFonts() { Ascii = "Times New Roman", HighAnsi = "Times New Roman" };
            FontSize fontSize9 = new FontSize() { Val = "28" };
            FontSizeComplexScript fontSizeComplexScript9 = new FontSizeComplexScript() { Val = "28" };
            Languages languages8 = new Languages() { Val = "ru-RU" };

            runProperties7.Append(runFonts9);
            runProperties7.Append(fontSize9);
            runProperties7.Append(fontSizeComplexScript9);
            runProperties7.Append(languages8);
            Text text7 = new Text() { Space = SpaceProcessingModeValues.Preserve };
            text7.Text = " ";

            run7.Append(runProperties7);
            run7.Append(text7);
            ProofError proofError3 = new ProofError() { Type = ProofingErrorValues.SpellStart };

            Run run8 = new Run() { RsidRunProperties = "005B1369" };

            RunProperties runProperties8 = new RunProperties();
            RunFonts runFonts10 = new RunFonts() { Ascii = "Times New Roman", HighAnsi = "Times New Roman" };
            FontSize fontSize10 = new FontSize() { Val = "28" };
            FontSizeComplexScript fontSizeComplexScript10 = new FontSizeComplexScript() { Val = "28" };

            runProperties8.Append(runFonts10);
            runProperties8.Append(fontSize10);
            runProperties8.Append(fontSizeComplexScript10);
            Text text8 = new Text();
            text8.Text = "Powerpoint";

            run8.Append(runProperties8);
            run8.Append(text8);
            ProofError proofError4 = new ProofError() { Type = ProofingErrorValues.SpellEnd };

            Run run9 = new Run() { RsidRunProperties = "005B1369" };

            RunProperties runProperties9 = new RunProperties();
            RunFonts runFonts11 = new RunFonts() { Ascii = "Times New Roman", HighAnsi = "Times New Roman" };
            FontSize fontSize11 = new FontSize() { Val = "28" };
            FontSizeComplexScript fontSizeComplexScript11 = new FontSizeComplexScript() { Val = "28" };
            Languages languages9 = new Languages() { Val = "ru-RU" };

            runProperties9.Append(runFonts11);
            runProperties9.Append(fontSize11);
            runProperties9.Append(fontSizeComplexScript11);
            runProperties9.Append(languages9);
            Text text9 = new Text();
            text9.Text = ")";

            run9.Append(runProperties9);
            run9.Append(text9);

            paragraph2.Append(paragraphProperties2);
            paragraph2.Append(proofError1);
            paragraph2.Append(run2);
            paragraph2.Append(proofError2);
            paragraph2.Append(run3);
            paragraph2.Append(run4);
            paragraph2.Append(run5);
            paragraph2.Append(run6);
            paragraph2.Append(run7);
            paragraph2.Append(proofError3);
            paragraph2.Append(run8);
            paragraph2.Append(proofError4);
            paragraph2.Append(run9);

            Paragraph paragraph3 = new Paragraph() { RsidParagraphMarkRevision = "005B1369", RsidParagraphAddition = "005B1369", RsidParagraphProperties = "005B1369", RsidRunAdditionDefault = "005B1369" };

            ParagraphProperties paragraphProperties3 = new ParagraphProperties();

            NumberingProperties numberingProperties2 = new NumberingProperties();
            NumberingLevelReference numberingLevelReference2 = new NumberingLevelReference() { Val = 0 };
            NumberingId numberingId2 = new NumberingId() { Val = 6 };

            numberingProperties2.Append(numberingLevelReference2);
            numberingProperties2.Append(numberingId2);
            Indentation indentation3 = new Indentation() { Left = "641", Hanging = "357" };
            Justification justification3 = new Justification() { Val = JustificationValues.Both };

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

            paragraphMarkRunProperties3.Append(runFonts12);
            paragraphMarkRunProperties3.Append(fontSize12);
            paragraphMarkRunProperties3.Append(fontSizeComplexScript12);
            paragraphMarkRunProperties3.Append(languages10);

            paragraphProperties3.Append(numberingProperties2);
            paragraphProperties3.Append(indentation3);
            paragraphProperties3.Append(justification3);
            paragraphProperties3.Append(paragraphMarkRunProperties3);
            ProofError proofError5 = new ProofError() { Type = ProofingErrorValues.GrammarStart };

            Run run10 = new Run() { RsidRunProperties = "005B1369" };

            RunProperties runProperties10 = new RunProperties();
            RunFonts runFonts13 = new RunFonts() { Ascii = "Times New Roman", HighAnsi = "Times New Roman" };
            FontSize fontSize13 = new FontSize() { Val = "28" };
            FontSizeComplexScript fontSizeComplexScript13 = new FontSizeComplexScript() { Val = "28" };
            Languages languages11 = new Languages() { Val = "ru-RU" };

            runProperties10.Append(runFonts13);
            runProperties10.Append(fontSize13);
            runProperties10.Append(fontSizeComplexScript13);
            runProperties10.Append(languages11);
            Text text10 = new Text();
            text10.Text = "так";

            run10.Append(runProperties10);
            run10.Append(text10);
            ProofError proofError6 = new ProofError() { Type = ProofingErrorValues.GrammarEnd };

            Run run11 = new Run() { RsidRunProperties = "005B1369" };

            RunProperties runProperties11 = new RunProperties();
            RunFonts runFonts14 = new RunFonts() { Ascii = "Times New Roman", HighAnsi = "Times New Roman" };
            FontSize fontSize14 = new FontSize() { Val = "28" };
            FontSizeComplexScript fontSizeComplexScript14 = new FontSizeComplexScript() { Val = "28" };
            Languages languages12 = new Languages() { Val = "ru-RU" };

            runProperties11.Append(runFonts14);
            runProperties11.Append(fontSize14);
            runProperties11.Append(fontSizeComplexScript14);
            runProperties11.Append(languages12);
            Text text11 = new Text() { Space = SpaceProcessingModeValues.Preserve };
            text11.Text = " и с помощью специализированных ";

            run11.Append(runProperties11);
            run11.Append(text11);

            Run run12 = new Run() { RsidRunProperties = "005B1369" };

            RunProperties runProperties12 = new RunProperties();
            RunFonts runFonts15 = new RunFonts() { Ascii = "Times New Roman", HighAnsi = "Times New Roman" };
            Bold bold4 = new Bold();
            FontSize fontSize15 = new FontSize() { Val = "28" };
            FontSizeComplexScript fontSizeComplexScript15 = new FontSizeComplexScript() { Val = "28" };
            Languages languages13 = new Languages() { Val = "ru-RU" };

            runProperties12.Append(runFonts15);
            runProperties12.Append(bold4);
            runProperties12.Append(fontSize15);
            runProperties12.Append(fontSizeComplexScript15);
            runProperties12.Append(languages13);
            Text text12 = new Text();
            text12.Text = "интерактивных технологий";

            run12.Append(runProperties12);
            run12.Append(text12);

            Run run13 = new Run() { RsidRunProperties = "005B1369" };

            RunProperties runProperties13 = new RunProperties();
            RunFonts runFonts16 = new RunFonts() { Ascii = "Times New Roman", HighAnsi = "Times New Roman" };
            FontSize fontSize16 = new FontSize() { Val = "28" };
            FontSizeComplexScript fontSizeComplexScript16 = new FontSizeComplexScript() { Val = "28" };
            Languages languages14 = new Languages() { Val = "ru-RU" };

            runProperties13.Append(runFonts16);
            runProperties13.Append(fontSize16);
            runProperties13.Append(fontSizeComplexScript16);
            runProperties13.Append(languages14);
            Text text13 = new Text() { Space = SpaceProcessingModeValues.Preserve };
            text13.Text = " (";

            run13.Append(runProperties13);
            run13.Append(text13);

            Run run14 = new Run() { RsidRunProperties = "005B1369" };

            RunProperties runProperties14 = new RunProperties();
            RunFonts runFonts17 = new RunFonts() { Ascii = "Times New Roman", HighAnsi = "Times New Roman" };
            Bold bold5 = new Bold();
            Italic italic2 = new Italic();
            FontSize fontSize17 = new FontSize() { Val = "28" };
            FontSizeComplexScript fontSizeComplexScript17 = new FontSizeComplexScript() { Val = "28" };
            Languages languages15 = new Languages() { Val = "ru-RU" };

            runProperties14.Append(runFonts17);
            runProperties14.Append(bold5);
            runProperties14.Append(italic2);
            runProperties14.Append(fontSize17);
            runProperties14.Append(fontSizeComplexScript17);
            runProperties14.Append(languages15);
            Text text14 = new Text();
            text14.Text = "лекция «обратной связи»";

            run14.Append(runProperties14);
            run14.Append(text14);

            Run run15 = new Run() { RsidRunProperties = "005B1369" };

            RunProperties runProperties15 = new RunProperties();
            RunFonts runFonts18 = new RunFonts() { Ascii = "Times New Roman", HighAnsi = "Times New Roman" };
            FontSize fontSize18 = new FontSize() { Val = "28" };
            FontSizeComplexScript fontSizeComplexScript18 = new FontSizeComplexScript() { Val = "28" };
            Languages languages16 = new Languages() { Val = "ru-RU" };

            runProperties15.Append(runFonts18);
            runProperties15.Append(fontSize18);
            runProperties15.Append(fontSizeComplexScript18);
            runProperties15.Append(languages16);
            Text text15 = new Text() { Space = SpaceProcessingModeValues.Preserve };
            text15.Text = " – лекция–провокация, в которой часть материала приводится с заранее запланированными ошибками, после чего завязывается лекция-беседа, лекция-дискуссия).";

            run15.Append(runProperties15);
            run15.Append(text15);

            paragraph3.Append(paragraphProperties3);
            paragraph3.Append(proofError5);
            paragraph3.Append(run10);
            paragraph3.Append(proofError6);
            paragraph3.Append(run11);
            paragraph3.Append(run12);
            paragraph3.Append(run13);
            paragraph3.Append(run14);
            paragraph3.Append(run15);

            Paragraph paragraph4 = new Paragraph() { RsidParagraphMarkRevision = "005B1369", RsidParagraphAddition = "005B1369", RsidParagraphProperties = "005B1369", RsidRunAdditionDefault = "005B1369" };

            ParagraphProperties paragraphProperties4 = new ParagraphProperties();
            Indentation indentation4 = new Indentation() { FirstLine = "567" };
            Justification justification4 = new Justification() { Val = JustificationValues.Both };

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

            paragraphMarkRunProperties4.Append(runFonts19);
            paragraphMarkRunProperties4.Append(fontSize19);
            paragraphMarkRunProperties4.Append(fontSizeComplexScript19);
            paragraphMarkRunProperties4.Append(languages17);

            paragraphProperties4.Append(indentation4);
            paragraphProperties4.Append(justification4);
            paragraphProperties4.Append(paragraphMarkRunProperties4);

            Run run16 = new Run() { RsidRunProperties = "005B1369" };

            RunProperties runProperties16 = new RunProperties();
            RunFonts runFonts20 = new RunFonts() { Ascii = "Times New Roman", HighAnsi = "Times New Roman" };
            FontSize fontSize20 = new FontSize() { Val = "28" };
            FontSizeComplexScript fontSizeComplexScript20 = new FontSizeComplexScript() { Val = "28" };
            Languages languages18 = new Languages() { Val = "ru-RU" };

            runProperties16.Append(runFonts20);
            runProperties16.Append(fontSize20);
            runProperties16.Append(fontSizeComplexScript20);
            runProperties16.Append(languages18);
            Text text16 = new Text() { Space = SpaceProcessingModeValues.Preserve };
            text16.Text = "На всех практических занятиях студенты выполняют задания на рабочем месте за персональным компьютером, пользуясь консультацией преподавателя на индивидуальном уровне. ";

            run16.Append(runProperties16);
            run16.Append(text16);

            paragraph4.Append(paragraphProperties4);
            paragraph4.Append(run16);

            Paragraph paragraph5 = new Paragraph() { RsidParagraphMarkRevision = "005B1369", RsidParagraphAddition = "005B1369", RsidParagraphProperties = "005B1369", RsidRunAdditionDefault = "005B1369" };

            ParagraphProperties paragraphProperties5 = new ParagraphProperties();
            Indentation indentation5 = new Indentation() { FirstLine = "567" };
            Justification justification5 = new Justification() { Val = JustificationValues.Both };

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

            paragraphMarkRunProperties5.Append(runFonts21);
            paragraphMarkRunProperties5.Append(fontSize21);
            paragraphMarkRunProperties5.Append(fontSizeComplexScript21);
            paragraphMarkRunProperties5.Append(languages19);

            paragraphProperties5.Append(indentation5);
            paragraphProperties5.Append(justification5);
            paragraphProperties5.Append(paragraphMarkRunProperties5);

            Run run17 = new Run() { RsidRunProperties = "005B1369" };

            RunProperties runProperties17 = new RunProperties();
            RunFonts runFonts22 = new RunFonts() { Ascii = "Times New Roman", HighAnsi = "Times New Roman" };
            FontSize fontSize22 = new FontSize() { Val = "28" };
            FontSizeComplexScript fontSizeComplexScript22 = new FontSizeComplexScript() { Val = "28" };
            Languages languages20 = new Languages() { Val = "ru-RU" };

            runProperties17.Append(runFonts22);
            runProperties17.Append(fontSize22);
            runProperties17.Append(fontSizeComplexScript22);
            runProperties17.Append(languages20);
            Text text17 = new Text();
            text17.Text = "В качестве домашних заданий студенты заканчивают работу, выданную на практических занятиях, а также выполняют индивидуальные задания, выдаваемые преподавателем, с проверкой и обсуждением результата выполнения на следующем занятии.";

            run17.Append(runProperties17);
            run17.Append(text17);

            paragraph5.Append(paragraphProperties5);
            paragraph5.Append(run17);

            Paragraph paragraph6 = new Paragraph() { RsidParagraphMarkRevision = "005B1369", RsidParagraphAddition = "005B1369", RsidParagraphProperties = "005B1369", RsidRunAdditionDefault = "005B1369" };

            ParagraphProperties paragraphProperties6 = new ParagraphProperties();
            Indentation indentation6 = new Indentation() { FirstLine = "567" };
            Justification justification6 = new Justification() { Val = JustificationValues.Both };

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

            paragraphMarkRunProperties6.Append(runFonts23);
            paragraphMarkRunProperties6.Append(fontSize23);
            paragraphMarkRunProperties6.Append(fontSizeComplexScript23);
            paragraphMarkRunProperties6.Append(languages21);

            paragraphProperties6.Append(indentation6);
            paragraphProperties6.Append(justification6);
            paragraphProperties6.Append(paragraphMarkRunProperties6);

            Run run18 = new Run() { RsidRunProperties = "005B1369" };

            RunProperties runProperties18 = new RunProperties();
            RunFonts runFonts24 = new RunFonts() { Ascii = "Times New Roman", HighAnsi = "Times New Roman" };
            FontSize fontSize24 = new FontSize() { Val = "28" };
            FontSizeComplexScript fontSizeComplexScript24 = new FontSizeComplexScript() { Val = "28" };
            Languages languages22 = new Languages() { Val = "ru-RU" };

            runProperties18.Append(runFonts24);
            runProperties18.Append(fontSize24);
            runProperties18.Append(fontSizeComplexScript24);
            runProperties18.Append(languages22);
            Text text18 = new Text();
            text18.Text = "С целью повышения эффективности учебного процесса, в ходе практических занятий используются:";

            run18.Append(runProperties18);
            run18.Append(text18);

            paragraph6.Append(paragraphProperties6);
            paragraph6.Append(run18);

            Paragraph paragraph7 = new Paragraph() { RsidParagraphMarkRevision = "005B1369", RsidParagraphAddition = "005B1369", RsidParagraphProperties = "005B1369", RsidRunAdditionDefault = "005B1369" };

            ParagraphProperties paragraphProperties7 = new ParagraphProperties();
            WidowControl widowControl1 = new WidowControl() { Val = false };

            NumberingProperties numberingProperties3 = new NumberingProperties();
            NumberingLevelReference numberingLevelReference3 = new NumberingLevelReference() { Val = 0 };
            NumberingId numberingId3 = new NumberingId() { Val = 5 };

            numberingProperties3.Append(numberingLevelReference3);
            numberingProperties3.Append(numberingId3);
            Indentation indentation7 = new Indentation() { Left = "641", Hanging = "357" };
            Justification justification7 = new Justification() { Val = JustificationValues.Both };

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

            paragraphMarkRunProperties7.Append(runFonts25);
            paragraphMarkRunProperties7.Append(fontSize25);
            paragraphMarkRunProperties7.Append(fontSizeComplexScript25);
            paragraphMarkRunProperties7.Append(languages23);

            paragraphProperties7.Append(widowControl1);
            paragraphProperties7.Append(numberingProperties3);
            paragraphProperties7.Append(indentation7);
            paragraphProperties7.Append(justification7);
            paragraphProperties7.Append(paragraphMarkRunProperties7);

            Run run19 = new Run() { RsidRunProperties = "005B1369" };

            RunProperties runProperties19 = new RunProperties();
            RunFonts runFonts26 = new RunFonts() { Ascii = "Times New Roman", HighAnsi = "Times New Roman" };
            Bold bold6 = new Bold();
            FontSize fontSize26 = new FontSize() { Val = "28" };
            FontSizeComplexScript fontSizeComplexScript26 = new FontSizeComplexScript() { Val = "28" };
            Languages languages24 = new Languages() { Val = "ru-RU" };

            runProperties19.Append(runFonts26);
            runProperties19.Append(bold6);
            runProperties19.Append(fontSize26);
            runProperties19.Append(fontSizeComplexScript26);
            runProperties19.Append(languages24);
            Text text19 = new Text();
            text19.Text = "Интерактивные технологии";

            run19.Append(runProperties19);
            run19.Append(text19);

            Run run20 = new Run() { RsidRunProperties = "005B1369" };

            RunProperties runProperties20 = new RunProperties();
            RunFonts runFonts27 = new RunFonts() { Ascii = "Times New Roman", HighAnsi = "Times New Roman" };
            FontSize fontSize27 = new FontSize() { Val = "28" };
            FontSizeComplexScript fontSizeComplexScript27 = new FontSizeComplexScript() { Val = "28" };
            Languages languages25 = new Languages() { Val = "ru-RU" };

            runProperties20.Append(runFonts27);
            runProperties20.Append(fontSize27);
            runProperties20.Append(fontSizeComplexScript27);
            runProperties20.Append(languages25);
            Text text20 = new Text();
            text20.Text = ", например, семинар-дискуссия – коллективное обсуждение какого-либо спорного вопроса, проблемы, выявление мнений в группе.";

            run20.Append(runProperties20);
            run20.Append(text20);

            paragraph7.Append(paragraphProperties7);
            paragraph7.Append(run19);
            paragraph7.Append(run20);

            Paragraph paragraph8 = new Paragraph() { RsidParagraphMarkRevision = "005B1369", RsidParagraphAddition = "005B1369", RsidParagraphProperties = "005B1369", RsidRunAdditionDefault = "005B1369" };

            ParagraphProperties paragraphProperties8 = new ParagraphProperties();
            WidowControl widowControl2 = new WidowControl() { Val = false };

            NumberingProperties numberingProperties4 = new NumberingProperties();
            NumberingLevelReference numberingLevelReference4 = new NumberingLevelReference() { Val = 0 };
            NumberingId numberingId4 = new NumberingId() { Val = 5 };

            numberingProperties4.Append(numberingLevelReference4);
            numberingProperties4.Append(numberingId4);
            Indentation indentation8 = new Indentation() { Left = "641", Hanging = "357" };
            Justification justification8 = new Justification() { Val = JustificationValues.Both };

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

            paragraphMarkRunProperties8.Append(runFonts28);
            paragraphMarkRunProperties8.Append(fontSize28);
            paragraphMarkRunProperties8.Append(fontSizeComplexScript28);
            paragraphMarkRunProperties8.Append(languages26);

            paragraphProperties8.Append(widowControl2);
            paragraphProperties8.Append(numberingProperties4);
            paragraphProperties8.Append(indentation8);
            paragraphProperties8.Append(justification8);
            paragraphProperties8.Append(paragraphMarkRunProperties8);

            Run run21 = new Run() { RsidRunProperties = "005B1369" };

            RunProperties runProperties21 = new RunProperties();
            RunFonts runFonts29 = new RunFonts() { Ascii = "Times New Roman", HighAnsi = "Times New Roman" };
            Bold bold7 = new Bold();
            FontSize fontSize29 = new FontSize() { Val = "28" };
            FontSizeComplexScript fontSizeComplexScript29 = new FontSizeComplexScript() { Val = "28" };
            Languages languages27 = new Languages() { Val = "ru-RU" };

            runProperties21.Append(runFonts29);
            runProperties21.Append(bold7);
            runProperties21.Append(fontSize29);
            runProperties21.Append(fontSizeComplexScript29);
            runProperties21.Append(languages27);
            Text text21 = new Text() { Space = SpaceProcessingModeValues.Preserve };
            text21.Text = "Информационно-коммуникационные образовательные технологии: ";

            run21.Append(runProperties21);
            run21.Append(text21);

            Run run22 = new Run() { RsidRunProperties = "005B1369" };

            RunProperties runProperties22 = new RunProperties();
            RunFonts runFonts30 = new RunFonts() { Ascii = "Times New Roman", HighAnsi = "Times New Roman" };
            FontSize fontSize30 = new FontSize() { Val = "28" };
            FontSizeComplexScript fontSizeComplexScript30 = new FontSizeComplexScript() { Val = "28" };
            Languages languages28 = new Languages() { Val = "ru-RU" };

            runProperties22.Append(runFonts30);
            runProperties22.Append(fontSize30);
            runProperties22.Append(fontSizeComplexScript30);
            runProperties22.Append(languages28);
            Text text22 = new Text() { Space = SpaceProcessingModeValues.Preserve };
            text22.Text = "практическое занятие в форме презентации (представление результатов исследовательской деятельности с использованием специализированных программных сред). ";

            run22.Append(runProperties22);
            run22.Append(text22);

            paragraph8.Append(paragraphProperties8);
            paragraph8.Append(run21);
            paragraph8.Append(run22);

            Paragraph paragraph9 = new Paragraph() { RsidParagraphMarkRevision = "005B1369", RsidParagraphAddition = "005B1369", RsidParagraphProperties = "005B1369", RsidRunAdditionDefault = "005B1369" };

            ParagraphProperties paragraphProperties9 = new ParagraphProperties();
            WidowControl widowControl3 = new WidowControl() { Val = false };

            NumberingProperties numberingProperties5 = new NumberingProperties();
            NumberingLevelReference numberingLevelReference5 = new NumberingLevelReference() { Val = 0 };
            NumberingId numberingId5 = new NumberingId() { Val = 5 };

            numberingProperties5.Append(numberingLevelReference5);
            numberingProperties5.Append(numberingId5);
            Indentation indentation9 = new Indentation() { Left = "641", Hanging = "357" };
            Justification justification9 = new Justification() { Val = JustificationValues.Both };

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

            paragraphMarkRunProperties9.Append(runFonts31);
            paragraphMarkRunProperties9.Append(fontSize31);
            paragraphMarkRunProperties9.Append(fontSizeComplexScript31);
            paragraphMarkRunProperties9.Append(languages29);

            paragraphProperties9.Append(widowControl3);
            paragraphProperties9.Append(numberingProperties5);
            paragraphProperties9.Append(indentation9);
            paragraphProperties9.Append(justification9);
            paragraphProperties9.Append(paragraphMarkRunProperties9);

            Run run23 = new Run() { RsidRunProperties = "005B1369" };

            RunProperties runProperties23 = new RunProperties();
            RunFonts runFonts32 = new RunFonts() { Ascii = "Times New Roman", HighAnsi = "Times New Roman" };
            Bold bold8 = new Bold();
            FontSize fontSize32 = new FontSize() { Val = "28" };
            FontSizeComplexScript fontSizeComplexScript32 = new FontSizeComplexScript() { Val = "28" };
            Languages languages30 = new Languages() { Val = "ru-RU" };

            runProperties23.Append(runFonts32);
            runProperties23.Append(bold8);
            runProperties23.Append(fontSize32);
            runProperties23.Append(fontSizeComplexScript32);
            runProperties23.Append(languages30);
            Text text23 = new Text();
            text23.Text = "Инновационные методы";

            run23.Append(runProperties23);
            run23.Append(text23);

            Run run24 = new Run() { RsidRunProperties = "005B1369" };

            RunProperties runProperties24 = new RunProperties();
            RunFonts runFonts33 = new RunFonts() { Ascii = "Times New Roman", HighAnsi = "Times New Roman" };
            FontSize fontSize33 = new FontSize() { Val = "28" };
            FontSizeComplexScript fontSizeComplexScript33 = new FontSizeComplexScript() { Val = "28" };
            Languages languages31 = new Languages() { Val = "ru-RU" };

            runProperties24.Append(runFonts33);
            runProperties24.Append(fontSize33);
            runProperties24.Append(fontSizeComplexScript33);
            runProperties24.Append(languages31);
            Text text24 = new Text() { Space = SpaceProcessingModeValues.Preserve };
            text24.Text = ": использование мультимедийных учебников, электронных версий эксклюзивных курсов в преподавании дисциплины; использование ";

            run24.Append(runProperties24);
            run24.Append(text24);
            ProofError proofError7 = new ProofError() { Type = ProofingErrorValues.SpellStart };

            Run run25 = new Run() { RsidRunProperties = "005B1369" };

            RunProperties runProperties25 = new RunProperties();
            RunFonts runFonts34 = new RunFonts() { Ascii = "Times New Roman", HighAnsi = "Times New Roman" };
            FontSize fontSize34 = new FontSize() { Val = "28" };
            FontSizeComplexScript fontSizeComplexScript34 = new FontSizeComplexScript() { Val = "28" };
            Languages languages32 = new Languages() { Val = "ru-RU" };

            runProperties25.Append(runFonts34);
            runProperties25.Append(fontSize34);
            runProperties25.Append(fontSizeComplexScript34);
            runProperties25.Append(languages32);
            Text text25 = new Text();
            text25.Text = "медиаресурсов";

            run25.Append(runProperties25);
            run25.Append(text25);
            ProofError proofError8 = new ProofError() { Type = ProofingErrorValues.SpellEnd };

            Run run26 = new Run() { RsidRunProperties = "005B1369" };

            RunProperties runProperties26 = new RunProperties();
            RunFonts runFonts35 = new RunFonts() { Ascii = "Times New Roman", HighAnsi = "Times New Roman" };
            FontSize fontSize35 = new FontSize() { Val = "28" };
            FontSizeComplexScript fontSizeComplexScript35 = new FontSizeComplexScript() { Val = "28" };
            Languages languages33 = new Languages() { Val = "ru-RU" };

            runProperties26.Append(runFonts35);
            runProperties26.Append(fontSize35);
            runProperties26.Append(fontSizeComplexScript35);
            runProperties26.Append(languages33);
            Text text26 = new Text() { Space = SpaceProcessingModeValues.Preserve };
            text26.Text = ", энциклопедий, электронных библиотек ";

            run26.Append(runProperties26);
            run26.Append(text26);
            ProofError proofError9 = new ProofError() { Type = ProofingErrorValues.GrammarStart };

            Run run27 = new Run() { RsidRunProperties = "005B1369" };

            RunProperties runProperties27 = new RunProperties();
            RunFonts runFonts36 = new RunFonts() { Ascii = "Times New Roman", HighAnsi = "Times New Roman" };
            FontSize fontSize36 = new FontSize() { Val = "28" };
            FontSizeComplexScript fontSizeComplexScript36 = new FontSizeComplexScript() { Val = "28" };
            Languages languages34 = new Languages() { Val = "ru-RU" };

            runProperties27.Append(runFonts36);
            runProperties27.Append(fontSize36);
            runProperties27.Append(fontSizeComplexScript36);
            runProperties27.Append(languages34);
            Text text27 = new Text();
            text27.Text = "и  Интернет";

            run27.Append(runProperties27);
            run27.Append(text27);
            ProofError proofError10 = new ProofError() { Type = ProofingErrorValues.GrammarEnd };

            Run run28 = new Run() { RsidRunProperties = "005B1369" };

            RunProperties runProperties28 = new RunProperties();
            RunFonts runFonts37 = new RunFonts() { Ascii = "Times New Roman", HighAnsi = "Times New Roman" };
            FontSize fontSize37 = new FontSize() { Val = "28" };
            FontSizeComplexScript fontSizeComplexScript37 = new FontSizeComplexScript() { Val = "28" };
            Languages languages35 = new Languages() { Val = "ru-RU" };

            runProperties28.Append(runFonts37);
            runProperties28.Append(fontSize37);
            runProperties28.Append(fontSizeComplexScript37);
            runProperties28.Append(languages35);
            Text text28 = new Text();
            text28.Text = "; использование программно-педагогических тестовых заданий для проверки знаний студентов и т.д.";

            run28.Append(runProperties28);
            run28.Append(text28);

            paragraph9.Append(paragraphProperties9);
            paragraph9.Append(run23);
            paragraph9.Append(run24);
            paragraph9.Append(proofError7);
            paragraph9.Append(run25);
            paragraph9.Append(proofError8);
            paragraph9.Append(run26);
            paragraph9.Append(proofError9);
            paragraph9.Append(run27);
            paragraph9.Append(proofError10);
            paragraph9.Append(run28);

            Paragraph paragraph10 = new Paragraph() { RsidParagraphMarkRevision = "005B1369", RsidParagraphAddition = "005B1369", RsidParagraphProperties = "005B1369", RsidRunAdditionDefault = "005B1369" };

            ParagraphProperties paragraphProperties10 = new ParagraphProperties();
            WidowControl widowControl4 = new WidowControl() { Val = false };

            Tabs tabs1 = new Tabs();
            TabStop tabStop1 = new TabStop() { Val = TabStopValues.Left, Position = 1080 };

            tabs1.Append(tabStop1);
            Indentation indentation10 = new Indentation() { Left = "851", FirstLine = "567" };
            Justification justification10 = new Justification() { Val = JustificationValues.Both };

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

            paragraphMarkRunProperties10.Append(runFonts38);
            paragraphMarkRunProperties10.Append(fontSize38);
            paragraphMarkRunProperties10.Append(fontSizeComplexScript38);
            paragraphMarkRunProperties10.Append(languages36);

            paragraphProperties10.Append(widowControl4);
            paragraphProperties10.Append(tabs1);
            paragraphProperties10.Append(indentation10);
            paragraphProperties10.Append(justification10);
            paragraphProperties10.Append(paragraphMarkRunProperties10);

            Run run29 = new Run() { RsidRunProperties = "005B1369" };

            RunProperties runProperties29 = new RunProperties();
            RunFonts runFonts39 = new RunFonts() { Ascii = "Times New Roman", HighAnsi = "Times New Roman" };
            FontSize fontSize39 = new FontSize() { Val = "28" };
            FontSizeComplexScript fontSizeComplexScript39 = new FontSizeComplexScript() { Val = "28" };
            Languages languages37 = new Languages() { Val = "ru-RU" };

            runProperties29.Append(runFonts39);
            runProperties29.Append(fontSize39);
            runProperties29.Append(fontSizeComplexScript39);
            runProperties29.Append(languages37);
            Text text29 = new Text();
            text29.Text = "Кроме того, инновационные методы также предполагают и применение методов активного обучения: интерактивные методы обучения: («метод кейсов», метод проектов), модульно-рейтинговые технологии организации учебного процесса и др.";

            run29.Append(runProperties29);
            run29.Append(text29);

            paragraph10.Append(paragraphProperties10);
            paragraph10.Append(run29);

            Paragraph paragraph11 = new Paragraph() { RsidParagraphMarkRevision = "005B1369", RsidParagraphAddition = "005E7445", RsidParagraphProperties = "005B1369", RsidRunAdditionDefault = "005E7445" };

            ParagraphProperties paragraphProperties11 = new ParagraphProperties();

            ParagraphMarkRunProperties paragraphMarkRunProperties11 = new ParagraphMarkRunProperties();
            Languages languages38 = new Languages() { Val = "ru-RU" };

            paragraphMarkRunProperties11.Append(languages38);

            paragraphProperties11.Append(paragraphMarkRunProperties11);

            paragraph11.Append(paragraphProperties11);

            SectionProperties sectionProperties1 = new SectionProperties() { RsidRPr = "005B1369", RsidR = "005E7445" };
            PageSize pageSize1 = new PageSize() { Width = (UInt32Value)11906U, Height = (UInt32Value)16838U };
            PageMargin pageMargin1 = new PageMargin() { Top = 1134, Right = (UInt32Value)850U, Bottom = 1134, Left = (UInt32Value)1701U, Header = (UInt32Value)708U, Footer = (UInt32Value)708U, Gutter = (UInt32Value)0U };
            Columns columns1 = new Columns() { Space = "708" };
            DocGrid docGrid1 = new DocGrid() { LinePitch = 360 };

            sectionProperties1.Append(pageSize1);
            sectionProperties1.Append(pageMargin1);
            sectionProperties1.Append(columns1);
            sectionProperties1.Append(docGrid1);

            var paraProp = new ParagraphProperties();
            var paragraph0 = new Paragraph();
            var runProp = new RunProperties();
            var run = new Run();

            paraProp = GetParagraphProperties("StyleWithoutIndentation");
            var paragraphStyleId = new ParagraphStyleId() { Val = "Header1" };
            paraProp.Append(paragraphStyleId);
            run.Append(new Text("5.	Образовательные технологии"));
            paragraph0.Append(paraProp);
            paragraph0.Append(run);

            var paragraph00 = new Paragraph();
            paraProp = GetParagraphProperties("StyleWithoutIndentation");
            run = new Run();
            runProp = new RunProperties { Color = new Color { Val = "FF0000" } };
            run.Append(runProp);
            run.Append(new Text("Данный раздел генерируется в стандартной форме. Возможно его требуется изменить."));
            paragraph00.Append(paraProp);
            paragraph00.Append(run);

            _body.Append(paragraph0);
            _body.Append(paragraph00);
            _body.Append(paragraph1);
            _body.Append(paragraph2);
            _body.Append(paragraph3);
            _body.Append(paragraph4);
            _body.Append(paragraph5);
            _body.Append(paragraph6);
            _body.Append(paragraph7);
            _body.Append(paragraph8);
            _body.Append(paragraph9);
            _body.Append(paragraph10);
            _body.Append(paragraph11);
            _body.Append(sectionProperties1);
        }
Ejemplo n.º 47
0
        public Style GenerateFooterStyle()
        {
            Style style1 = new Style() { Type = StyleValues.Paragraph, StyleId = "Footer" };
            StyleName styleName1 = new StyleName() { Val = "footer" };
            BasedOn basedOn1 = new BasedOn() { Val = "Normal" };
            LinkedStyle linkedStyle1 = new LinkedStyle() { Val = "FooterChar" };
            UIPriority uIPriority1 = new UIPriority() { Val = 99 };
            SemiHidden semiHidden1 = new SemiHidden();
            UnhideWhenUsed unhideWhenUsed1 = new UnhideWhenUsed();
            Rsid rsid1 = new Rsid() { Val = "005641D2" };

            StyleParagraphProperties styleParagraphProperties1 = new StyleParagraphProperties();

            Tabs tabs1 = new Tabs();
            TabStop tabStop1 = new TabStop() { Val = TabStopValues.Center, Position = 4680 };
            TabStop tabStop2 = new TabStop() { Val = TabStopValues.Right, Position = 9360 };

            tabs1.Append(tabStop1);
            tabs1.Append(tabStop2);
            SpacingBetweenLines spacingBetweenLines1 = new SpacingBetweenLines() { Line = "240", LineRule = LineSpacingRuleValues.Auto };

            styleParagraphProperties1.Append(tabs1);
            styleParagraphProperties1.Append(spacingBetweenLines1);

            style1.Append(styleName1);
            style1.Append(basedOn1);
            style1.Append(linkedStyle1);
            style1.Append(uIPriority1);
            style1.Append(semiHidden1);
            style1.Append(unhideWhenUsed1);
            style1.Append(rsid1);
            style1.Append(styleParagraphProperties1);
            return style1;
        }
Ejemplo n.º 48
0
        /// <summary>
        /// Bring this pane to its default state
        /// </summary>
        public static void Reset()
        {
            // TODO: figure out a better way to handle the first time selection (which is between Back and ApplicationName)

            SendKeyStrokes ("{TAB}"); // Tab
            currPos = TabStop.ApplicationName;
            selectionStatus = Selection.Launch;
        }
Ejemplo n.º 49
0
        /// <summary>
        /// Gets the resources of the current subpane
        /// Note: Assumes that the current control is at one of the subpanes
        /// -- Might throw a HolodeckExceptions.WindowNotFoundException
        /// -- Might throw a HolodeckExceptions.IncorrectOperationException
        /// </summary>
        /// <param name="resourceWindowHandle">handle to the subpane to get the resources from</param>
        /// <param name="pane">the TabStop representing the current pane</param>
        /// <returns>the resources associated with the current subpane entries</returns>
        protected static Resource[] GetResourceEntries(IntPtr resourceWindowHandle, TabStop pane)
        {
            string[][] resourceEntries = GetListViewEntries (resourceWindowHandle, 1);
            Resource[] retArray = new Resource[resourceEntries.Length];
            Holodeck.ResourcesPane.GoToFirstElement (); // This automatically updates the Property Pane
            for (int i = 0; i < retArray.Length; i++)
            {
                GoTo (TabStop.HeadLine);
                HolodeckPane.SelectPropertiesPane ();
                PropertiesPane.Reset ();
                retArray[i] = PropertiesPane.GetResourcePropertyGridViewElements ();
                HolodeckPane.SelectResourcesPane ();
                GoTo (pane);
                Holodeck.ResourcesPane.GoToNextElement (); // This automatically updates the Property Pane
            }

            return retArray;
        }
Ejemplo n.º 50
0
        /// <summary>
        /// Change the focus to the next control
        /// </summary>
        private static void GoToNext()
        {
            // TODO: figure out a better way if possible

            switch (selectionStatus)
            {
                case Selection.Launch:
                {
                    switch (currPos)
                    {
                        case TabStop.LaunchApplication:
                        {
                            if (newVersion)
                            {
                                //new version
                                currPos = TabStop.ApplicationName;
                            }

                            else
                            {
                                //old version
                                currPos = TabStop.PIDs;
                            }

                            SendKeyStrokes ("{TAB}"); // Tab
                            break;
                        }
                        case TabStop.AttachToApplication: // unreachable by TABs
                        {
                            throw new HolodeckExceptions.UnaccessableControlException ();
                        }
                        case TabStop.ApplicationName:
                        {
                            if (newVersion)
                            {
                                //new version
                                currPos = TabStop.Parameters;
                            }

                            else
                            {
                                //old version
                                currPos = TabStop.Browse;
                            }

                            SendKeyStrokes ("{TAB}"); // Tab
                            break;
                        }
                        case TabStop.Browse:
                        {
                            currPos = TabStop.LaunchApplication;
                            SendKeyStrokes ("{TAB}"); // Tab
                            break;
                        }
                        case TabStop.Parameters:
                        {
                            if (!NewProjectPane3.IsVisited ())
                            {
                                currPos = TabStop.Cancel;
                            }
                            else
                            {
                                currPos = TabStop.Finish;
                            }
                            SendKeyStrokes ("{TAB}"); // Tab
                            break;
                        }
                        case TabStop.Refresh: // disabled
                        {
                            throw new HolodeckExceptions.UnaccessableControlException ();
                        }
                        case TabStop.PIDs:
                        {
                            currPos = TabStop.Parameters;
                            SendKeyStrokes ("{TAB}"); // Tab
                            break;
                        }
                        case TabStop.Cancel:
                        {
                            if (newVersion)
                            {
                                currPos = TabStop.Back;
                            }

                            else
                            {
                                //old version
                                currPos = TabStop.Next;
                            }

                            SendKeyStrokes ("{TAB}"); // Tab
                            break;
                        }
                        case TabStop.Back:
                        {
                            if (newVersion)
                            {
                                //new version
                                currPos = TabStop.Next;
                            }
                            else
                            {
                                //old version
                                currPos = TabStop.ApplicationName;
                            }

                            SendKeyStrokes ("{TAB}"); // Tab
                            break;
                        }
                        case TabStop.Next:
                        {
                            if (newVersion)
                            {
                                //new version
                                currPos = TabStop.ApplicationName;
                            }

                            else
                            {
                                //old version
                                currPos = TabStop.Back;
                            }

                            SendKeyStrokes ("{TAB}"); // Tab
                            break;
                        }
                        case TabStop.Finish:
                        {
                            if (newVersion)
                            {
                                //new version
                                currPos = TabStop.ApplicationName;
                            }

                            else
                            {
                                //old version
                                currPos = TabStop.Cancel;
                            }

                            SendKeyStrokes ("{TAB}"); // Tab
                            break;
                        }
                        default :
                        {
                            break;
                        }
                    }
                    break;
                } // case Selection.Launch
                case Selection.Attach:
                {
                    switch (currPos)
                    {
                        case TabStop.LaunchApplication: // unreachable by TABs
                        {
                            throw new HolodeckExceptions.UnaccessableControlException ();
                        }
                        case TabStop.AttachToApplication:
                        {
                            currPos = TabStop.PIDs;
                            SendKeyStrokes ("{TAB}"); // Tab
                            break;
                        }
                        case TabStop.ApplicationName: // disabled
                        {
                            throw new HolodeckExceptions.UnaccessableControlException ();
                        }
                        case TabStop.Browse: // disabled
                        {
                            throw new HolodeckExceptions.UnaccessableControlException ();
                        }
                        case TabStop.Parameters: //disabled
                        {
                            throw new HolodeckExceptions.UnaccessableControlException ();
                        }
                        case TabStop.Refresh:
                        {
                            if (!NewProjectPane3.IsVisited ())
                            {
                                currPos = TabStop.Cancel;
                            }
                            else
                            {
                                currPos = TabStop.Finish;
                            }
                            SendKeyStrokes ("{TAB}"); // Tab
                            break;
                        }
                        case TabStop.PIDs:
                        {
                            currPos = TabStop.Refresh;
                            SendKeyStrokes ("{TAB}"); // Tab
                            break;
                        }
                        case TabStop.Cancel:
                        {
                            currPos = TabStop.Next;
                            SendKeyStrokes ("{TAB}"); // Tab
                            break;
                        }
                        case TabStop.Back:
                        {
                            currPos = TabStop.LaunchApplication;
                            SendKeyStrokes ("{TAB}"); // Tab
                            break;
                        }
                        case TabStop.Next:
                        {
                            currPos = TabStop.Back;
                            SendKeyStrokes ("{TAB}"); // Tab
                            break;
                        }
                        case TabStop.Finish:
                        {
                            currPos = TabStop.Cancel;
                            SendKeyStrokes ("{TAB}"); // Tab
                            break;
                        }
                        default :
                        {
                            throw new HolodeckExceptions.UnaccessableControlException ();
                        }
                    }
                    break;
                } // case Selection.Attach
                default:
                {
                    throw new HolodeckExceptions.UnaccessableControlException ();
                }
            }
        }
        public Paragraph GenerateLastParagraph(string company,string date,string code)
        {
            Paragraph paragraph1 = new Paragraph() { RsidParagraphAddition = "005D4399", RsidParagraphProperties = "001D44EB", RsidRunAdditionDefault = "005D4399" };

            ParagraphProperties paragraphProperties1 = new ParagraphProperties();

            Tabs tabs1 = new Tabs();

            TabStop tabStop1 = new TabStop() { Val = TabStopValues.Left, Position = 0 };
            TabStop tabStop2 = new TabStop() { Val = TabStopValues.Center, Position = 7300 };
            TabStop tabStop3 = new TabStop() { Val = TabStopValues.Right, Position = 14070 };

            tabs1.Append(tabStop1);
            tabs1.Append(tabStop2);
            tabs1.Append(tabStop3);

            ParagraphMarkRunProperties paragraphMarkRunProperties1 = new ParagraphMarkRunProperties();
            FontSizeComplexScript fontSizeComplexScript1 = new FontSizeComplexScript() { Val = "28" };

            paragraphMarkRunProperties1.Append(fontSizeComplexScript1);

            paragraphProperties1.Append(tabs1);
            paragraphProperties1.Append(paragraphMarkRunProperties1);

            Run run1 = new Run() { RsidRunProperties = "00200017" };

            RunProperties runProperties1 = new RunProperties();
            RunFonts runFonts1 = new RunFonts() { Hint = FontTypeHintValues.EastAsia };
            Bold bold1 = new Bold();
            FontSizeComplexScript fontSizeComplexScript2 = new FontSizeComplexScript() { Val = "28" };

            runProperties1.Append(runFonts1);
            runProperties1.Append(bold1);
            runProperties1.Append(fontSizeComplexScript2);
            Text text1 = new Text();
            text1.Text = " ";

            run1.Append(runProperties1);
            run1.Append(text1);

            Run run2 = new Run() { RsidRunAddition = "00CE1671" };

            RunProperties runProperties2 = new RunProperties();
            FontSizeComplexScript fontSizeComplexScript3 = new FontSizeComplexScript() { Val = "28" };

            runProperties2.Append(fontSizeComplexScript3);
            Text text2 = new Text();
            text2.Text = "填报单位:" +company;

            run2.Append(runProperties2);
            run2.Append(text2);

            Run run3 = new Run() { RsidRunAddition = "00CE1671" };

            RunProperties runProperties3 = new RunProperties();
            RunFonts runFonts2 = new RunFonts() { Hint = FontTypeHintValues.EastAsia };
            FontSizeComplexScript fontSizeComplexScript4 = new FontSizeComplexScript() { Val = "28" };

            runProperties3.Append(runFonts2);
            runProperties3.Append(fontSizeComplexScript4);
            TabChar tabChar1 = new TabChar();

            run3.Append(runProperties3);
            run3.Append(tabChar1);

            Run run4 = new Run() { RsidRunProperties = "00CE1671", RsidRunAddition = "00CE1671" };

            RunProperties runProperties4 = new RunProperties();
            RunFonts runFonts3 = new RunFonts() { Hint = FontTypeHintValues.EastAsia };
            Bold bold2 = new Bold();
            BoldComplexScript boldComplexScript1 = new BoldComplexScript();
            FontSizeComplexScript fontSizeComplexScript5 = new FontSizeComplexScript() { Val = "28" };

            runProperties4.Append(runFonts3);
            runProperties4.Append(bold2);
            runProperties4.Append(boldComplexScript1);
            runProperties4.Append(fontSizeComplexScript5);
            Text text3 = new Text();
            text3.Text = " ";

            run4.Append(runProperties4);
            run4.Append(text3);

            Run run5 = new Run() { RsidRunProperties = "00CE1671", RsidRunAddition = "00CE1671" };

            RunProperties runProperties5 = new RunProperties();
            BoldComplexScript boldComplexScript2 = new BoldComplexScript();
            FontSizeComplexScript fontSizeComplexScript6 = new FontSizeComplexScript() { Val = "28" };

            runProperties5.Append(boldComplexScript2);
            runProperties5.Append(fontSizeComplexScript6);
            Text text4 = new Text();

            text4.Text = "填报日期:" +date;

            run5.Append(runProperties5);
            run5.Append(text4);

            Run run6 = new Run() { RsidRunAddition = "00CE1671" };

            RunProperties runProperties6 = new RunProperties();
            RunFonts runFonts4 = new RunFonts() { Hint = FontTypeHintValues.EastAsia };
            Bold bold3 = new Bold();
            BoldComplexScript boldComplexScript3 = new BoldComplexScript();
            FontSizeComplexScript fontSizeComplexScript7 = new FontSizeComplexScript() { Val = "28" };

            runProperties6.Append(runFonts4);
            runProperties6.Append(bold3);
            runProperties6.Append(boldComplexScript3);
            runProperties6.Append(fontSizeComplexScript7);
            TabChar tabChar2 = new TabChar();

            run6.Append(runProperties6);
            run6.Append(tabChar2);

            Run run7 = new Run() { RsidRunProperties = "00200017" };

            RunProperties runProperties7 = new RunProperties();
            //RunFonts runFonts5 = new RunFonts() { Hint = FontTypeHintValues.EastAsia };
            //Bold bold4 = new Bold();
            FontSizeComplexScript fontSizeComplexScript8 = new FontSizeComplexScript() { Val = "28" };

            //runProperties7.Append(runFonts5);
            //runProperties7.Append(bold4);
            runProperties7.Append(fontSizeComplexScript8);
            Text text5 = new Text();
            text5.Text = "编号:" + code;

            run7.Append(runProperties7);
            run7.Append(text5);

            paragraph1.Append(paragraphProperties1);
            paragraph1.Append(run1);
            paragraph1.Append(run2);
            paragraph1.Append(run3);
            paragraph1.Append(run4);
            paragraph1.Append(run5);
            paragraph1.Append(run6);
            paragraph1.Append(run7);
            return paragraph1;
        }
Ejemplo n.º 52
0
        /// <summary>
        /// Bring this pane to its default state
        /// </summary>
        public static void Reset()
        {
            // TODO: figure out a better way to handle the first time selection (which is between Back and PauseApplication)

            SendKeyStrokes ("{TAB}"); // Tab
            currPos = TabStop.PauseApplication;
            isVisited = true;
        }
Ejemplo n.º 53
0
            /**
             * Adds a <CODE>PdfChunk</CODE> to the <CODE>PdfLine</CODE>.
             *
             * @param        chunk        the <CODE>PdfChunk</CODE> to add
             * @return        <CODE>null</CODE> if the chunk could be added completely; if not
             *                a <CODE>PdfChunk</CODE> containing the part of the chunk that could
             *                not be added is returned
             */
    
        internal PdfChunk Add(PdfChunk chunk) {
            // nothing happens if the chunk is null.
            if (chunk == null || chunk.ToString().Equals("")) {
                return null;
            }
        
            // we split the chunk to be added
            PdfChunk overflow = chunk.Split(width);
            newlineSplit = (chunk.IsNewlineSplit() || overflow == null);
            //        if (chunk.IsNewlineSplit() && alignment == Element.ALIGN_JUSTIFIED)
            //            alignment = Element.ALIGN_LEFT;
            if (chunk.IsTab()) {
                Object[] tab = (Object[]) chunk.GetAttribute(Chunk.TAB);
                if (chunk.IsAttribute(Chunk.TABSETTINGS)) {
                    bool isWhiteSpace = (bool) tab[1];
                    if (!isWhiteSpace || line.Count > 0) {
                        Flush();
                        tabStopAnchorPosition = float.NaN;
                        tabStop = PdfChunk.GetTabStop(chunk, originalWidth - width);
                        if (tabStop.Position > originalWidth) {
                            if (isWhiteSpace)
                                overflow = null;
                            else if (Math.Abs(originalWidth - width) < 0.001) {
                                AddToLine(chunk);
                                overflow = null;
                            } else {
                                overflow = chunk;
                            }
							width = 0;
                        } else {
                            chunk.TabStop = tabStop;
                            if (!isRTL && tabStop.Align == TabStop.Alignment.LEFT) {
                                width = originalWidth - tabStop.Position;
                                tabStop = null;
                                tabPosition = float.NaN;
                            } else
                                tabPosition = originalWidth - width;
                            AddToLine(chunk);
                        }
                    } else
                        return null;
                } else {
                    //Keep deprecated tab logic for backward compatibility...
                    float tabStopPosition = (float) tab[1];
                    bool newline = (bool) tab[2];
                    if (newline && tabStopPosition < originalWidth - width)
                        return chunk;
                    chunk.AdjustLeft(left);
                    width = originalWidth - tabStopPosition;
                    AddToLine(chunk);
                }
            } // if the length of the chunk > 0 we add it to the line 
            else if (chunk.Length > 0 || chunk.IsImage()) {
                if (overflow != null)
                    chunk.TrimLastSpace();
                width -= chunk.Width();
                AddToLine(chunk);
            }
        
            // if the length == 0 and there were no other chunks added to the line yet,
            // we risk to end up in an endless loop trying endlessly to add the same chunk
            else if (line.Count < 1) {
                chunk = overflow;
                overflow = chunk.Truncate(width);
                width -= chunk.Width();
                if (chunk.Length > 0) {
                    AddToLine(chunk);
                    return overflow;
                }
                // if the chunck couldn't even be truncated, we add everything, so be it
                else {
                    if (overflow != null)
                        AddToLine(chunk);
                    return null;
                }
            }
            else {
                width += line[line.Count - 1].TrimLastSpace();
            }
            return overflow;
        }
Ejemplo n.º 54
0
        public Style GenerateFooterStyle()
        {
            var style1 = new Style {Type = StyleValues.Paragraph, StyleId = "Footer"};
            var styleName1 = new StyleName {Val = "footer"};
            var basedOn1 = new BasedOn {Val = "Normal"};
            var linkedStyle1 = new LinkedStyle {Val = "FooterChar"};
            var uIPriority1 = new UIPriority {Val = 99};
            var semiHidden1 = new SemiHidden();
            var unhideWhenUsed1 = new UnhideWhenUsed();
            var rsid1 = new Rsid {Val = "005641D2"};

            var styleParagraphProperties1 = new StyleParagraphProperties();

            var tabs1 = new Tabs();
            var tabStop1 = new TabStop {Val = TabStopValues.Center, Position = 4680};
            var tabStop2 = new TabStop {Val = TabStopValues.Right, Position = 9360};

            tabs1.Append(tabStop1);
            tabs1.Append(tabStop2);
            var spacingBetweenLines1 = new SpacingBetweenLines {Line = "240", LineRule = LineSpacingRuleValues.Auto};

            styleParagraphProperties1.Append(tabs1);
            styleParagraphProperties1.Append(spacingBetweenLines1);

            style1.Append(styleName1);
            style1.Append(basedOn1);
            style1.Append(linkedStyle1);
            style1.Append(uIPriority1);
            style1.Append(semiHidden1);
            style1.Append(unhideWhenUsed1);
            style1.Append(rsid1);
            style1.Append(styleParagraphProperties1);
            return style1;
        }
        public Paragraph GenerateLastParagraph(int counts,float length,int page)
        {
            Paragraph paragraph1 = new Paragraph() { RsidParagraphAddition = "00000000", RsidParagraphProperties = "008A3B59", RsidRunAdditionDefault = "008A3B59" };

            ParagraphProperties paragraphProperties1 = new ParagraphProperties();

            Tabs tabs1 = new Tabs();

            TabStop tabStop1 = new TabStop() { Val = TabStopValues.Left, Position = 0 };
            TabStop tabStop2 = new TabStop() { Val = TabStopValues.Center, Position = 5000 };
            TabStop tabStop3 = new TabStop() { Val = TabStopValues.Right, Position = 10070 };

            tabs1.Append(tabStop1);
            tabs1.Append(tabStop2);
            tabs1.Append(tabStop3);

            ParagraphMarkRunProperties paragraphMarkRunProperties1 = new ParagraphMarkRunProperties();
            FontSizeComplexScript fontSizeComplexScript1 = new FontSizeComplexScript() { Val = "28" };

            paragraphMarkRunProperties1.Append(fontSizeComplexScript1);

            paragraphProperties1.Append(tabs1);
            paragraphProperties1.Append(paragraphMarkRunProperties1);

            Run run1 = new Run() { RsidRunProperties = "00200017" };

            RunProperties runProperties1 = new RunProperties();
            RunFonts runFonts1 = new RunFonts() { Hint = FontTypeHintValues.EastAsia };
            Bold bold1 = new Bold();
            FontSizeComplexScript fontSizeComplexScript2 = new FontSizeComplexScript() { Val = "28" };

            runProperties1.Append(runFonts1);
            runProperties1.Append(bold1);
            runProperties1.Append(fontSizeComplexScript2);
            Text text1 = new Text();
            text1.Text = " ";

            run1.Append(runProperties1);
            run1.Append(text1);

            Run run2 = new Run() { RsidRunAddition = "00CE1671" };

            RunProperties runProperties2 = new RunProperties();
            FontSizeComplexScript fontSizeComplexScript3 = new FontSizeComplexScript() { Val = "28" };

            runProperties2.Append(fontSizeComplexScript3);
            Text text2 = new Text();
            text2.Text = "共计:" + counts + "根";

            run2.Append(runProperties2);
            run2.Append(text2);

            Run run3 = new Run() { RsidRunAddition = "00CE1671" };

            RunProperties runProperties3 = new RunProperties();
            RunFonts runFonts2 = new RunFonts() { Hint = FontTypeHintValues.EastAsia };
            FontSizeComplexScript fontSizeComplexScript4 = new FontSizeComplexScript() { Val = "28" };

            runProperties3.Append(runFonts2);
            runProperties3.Append(fontSizeComplexScript4);
            TabChar tabChar1 = new TabChar();

            run3.Append(runProperties3);
            run3.Append(tabChar1);

            Run run4 = new Run() { RsidRunProperties = "00CE1671", RsidRunAddition = "00CE1671" };

            RunProperties runProperties4 = new RunProperties();
            RunFonts runFonts3 = new RunFonts() { Hint = FontTypeHintValues.EastAsia };
            Bold bold2 = new Bold();
            BoldComplexScript boldComplexScript1 = new BoldComplexScript();
            FontSizeComplexScript fontSizeComplexScript5 = new FontSizeComplexScript() { Val = "21" };

            runProperties4.Append(runFonts3);
            runProperties4.Append(bold2);
            runProperties4.Append(boldComplexScript1);
            runProperties4.Append(fontSizeComplexScript5);
            Text text3 = new Text();
            text3.Text = " ";

            run4.Append(runProperties4);
            run4.Append(text3);

            Run run5 = new Run() { RsidRunProperties = "00CE1671", RsidRunAddition = "00CE1671" };

            RunProperties runProperties5 = new RunProperties();
            BoldComplexScript boldComplexScript2 = new BoldComplexScript();
            FontSizeComplexScript fontSizeComplexScript6 = new FontSizeComplexScript() { Val = "21" };

            runProperties5.Append(boldComplexScript2);
            runProperties5.Append(fontSizeComplexScript6);
            Text text4 = new Text();

            text4.Text = "共计:" + length + "米";

            run5.Append(runProperties5);
            run5.Append(text4);

            Run run6 = new Run() { RsidRunAddition = "00CE1671" };

            RunProperties runProperties6 = new RunProperties();
            RunFonts runFonts4 = new RunFonts() { Hint = FontTypeHintValues.EastAsia };
            Bold bold3 = new Bold();
            BoldComplexScript boldComplexScript3 = new BoldComplexScript();
            FontSizeComplexScript fontSizeComplexScript7 = new FontSizeComplexScript() { Val = "21" };

            runProperties6.Append(runFonts4);
            runProperties6.Append(bold3);
            runProperties6.Append(boldComplexScript3);
            runProperties6.Append(fontSizeComplexScript7);
            TabChar tabChar2 = new TabChar();

            run6.Append(runProperties6);
            run6.Append(tabChar2);

            Run run7 = new Run() { RsidRunProperties = "00200017" };

            RunProperties runProperties7 = new RunProperties();
            //RunFonts runFonts5 = new RunFonts() { Hint = FontTypeHintValues.EastAsia };
            //Bold bold4 = new Bold();
            FontSizeComplexScript fontSizeComplexScript8 = new FontSizeComplexScript() { Val = "28" };

            //runProperties7.Append(runFonts5);
            //runProperties7.Append(bold4);
            runProperties7.Append(fontSizeComplexScript8);
            Text text5 = new Text();
            text5.Text = "共计:" + page + "页";

            run7.Append(runProperties7);
            run7.Append(text5);

            paragraph1.Append(paragraphProperties1);
            paragraph1.Append(run1);
            paragraph1.Append(run2);
            paragraph1.Append(run3);
            paragraph1.Append(run4);
            paragraph1.Append(run5);
            paragraph1.Append(run6);
            paragraph1.Append(run7);
            return paragraph1;
        }
Ejemplo n.º 56
0
 /// <summary>
 /// Go to the next visible pane at the Holodeck main window
 /// -- Might throw a HolodeckExceptions.UnaccessableControlException
 /// </summary>
 private static void GoToNext()
 {
     switch (currPos)
     {
         case TabStop.MainPane:
         {
             currPos = (TabStop) paneOrdering[GetNextPaneIndex (currPos)];
             SendKeyStrokes ("+{TAB}"); // Shift-Tab
             break;
         }
         default:
         {
             currPos = (TabStop) paneOrdering[GetNextPaneIndex (currPos)];
             SendKeyStrokes ("+{TAB}"); // Shift-Tab
             SendKeyStrokes ("+{TAB}"); // Shift-Tab
             break;
         }
     }
 }
Ejemplo n.º 57
0
        /// <summary>
        /// Change the focus to the specified control
        /// </summary>
        /// <param name="toPos">the desired control</param>
        private static void GoTo(TabStop toPos)
        {
            // TODO: Throw an exception if the specified control is unreachable in the current state

            while (currPos != toPos)
            {
                GoToNext ();
            }
        }
Ejemplo n.º 58
0
 /// <summary>
 /// Change the focus to the next control
 /// </summary>
 private static void GoToNext()
 {
     switch (currPos)
     {
         case TabStop.ProjectLocation:
         {
             currPos = TabStop.Browse;
             SendKeyStrokes ("{TAB}"); // Tab
             break;
         }
         case TabStop.Browse:
         {
             if (!NewProjectPane3.IsVisited ())
             {
                 currPos = TabStop.Cancel;
             }
             else
             {
                 currPos = TabStop.Finish;
             }
             SendKeyStrokes ("{TAB}"); // Tab
             break;
         }
         case TabStop.Cancel:
         {
             currPos = TabStop.Next;
             SendKeyStrokes ("{TAB}"); // Tab
             break;
         }
         case TabStop.Next:
         {
             currPos = TabStop.ProjectLocation;
             SendKeyStrokes ("{TAB}"); // Tab
             break;
         }
         case TabStop.Finish:
         {
             currPos = TabStop.Cancel;
             SendKeyStrokes ("{TAB}"); // Tab
             break;
         }
         default:
         {
             throw new HolodeckExceptions.UnaccessableControlException ();
         }
     }
 }
Ejemplo n.º 59
0
        /// <summary>
        /// Change the focus to the next control
        /// </summary>
        private static void GoToNext()
        {
            switch (currPos)
            {
                case TabStop.PauseApplication:
                {
                    if (newVersion)
                    {
                        //new version
                        SendKeyStrokes("{TAB}");
                    }

                    currPos = TabStop.ProcessChaining;
                    SendKeyStrokes ("{TAB}"); // Tab
                    break;
                }
                case TabStop.ProcessChaining:
                {
                    currPos = TabStop.Functions;
                    SendKeyStrokes ("{TAB}"); // Tab
                    break;
                }
                case TabStop.Functions:
                {
                    currPos = TabStop.Finish;
                    SendKeyStrokes ("{TAB}"); // Tab
                    break;
                }
                case TabStop.Cancel:
                {
                    currPos = TabStop.Back;
                    SendKeyStrokes ("{TAB}"); // Tab
                    break;
                }
                case TabStop.Back:
                {
                    currPos = TabStop.PauseApplication;
                    SendKeyStrokes ("{TAB}"); // Tab
                    break;
                }
                case TabStop.Finish:
                {
                    currPos = TabStop.Cancel;
                    SendKeyStrokes ("{TAB}"); // Tab
                    break;
                }
                default :
                {
                    throw new HolodeckExceptions.UnaccessableControlException ();
                }
            }
        }
Ejemplo n.º 60
0
        /// <summary>
        /// Change the focus to the next control
        /// </summary>
        private static void GoToNext()
        {
            switch (currPos) {
                case TabStop.Header: {
                    currPos = TabStop.DiskSlide;
                    SendKeyStrokes ("{TAB}"); // Tab
                    break;
                }
                case TabStop.DiskSlide: {
                    currPos = TabStop.DiskUsed;
                    SendKeyStrokes ("{TAB}"); // Tab
                    break;
                }
                case TabStop.DiskUsed: {
                    currPos = TabStop.DiskLimit;
                    SendKeyStrokes ("{TAB}"); // Tab
                    break;
                }
                case TabStop.DiskLimit: {
                    currPos = TabStop.DiskUnits;
                    SendKeyStrokes ("{TAB}"); // Tab
                    break;
                }
                case TabStop.DiskUnits: {
                    currPos = TabStop.MemorySlide;
                    SendKeyStrokes ("{TAB}"); // Tab
                    break;
                }
                case TabStop.MemorySlide:
                {
                    currPos = TabStop.MemoryUsed;
                    SendKeyStrokes ("{TAB}"); // Tab
                    break;
                }
                case TabStop.MemoryUsed:
                {
                    currPos = TabStop.MemoryLimit;
                    SendKeyStrokes ("{TAB}"); // Tab
                    break;
                }
                case TabStop.MemoryLimit:
                {
                    currPos = TabStop.MemoryUnits;
                    SendKeyStrokes ("{TAB}"); // Tab
                    break;
                }

                case TabStop.MemoryUnits:
                {
                    currPos = TabStop.NUBSlide;
                    SendKeyStrokes ("{TAB}"); // Tab
                    break;
                }

                case TabStop.NUBSlide:
                {
                    currPos = TabStop.NUBUsed;
                    SendKeyStrokes ("{TAB}"); // Tab
                    break;
                }

                case TabStop.NUBUsed:
                {
                    currPos = TabStop.NUBLimit;
                    SendKeyStrokes ("{TAB}"); // Tab
                    break;
                }

                case TabStop.NUBLimit:
                {
                    currPos = TabStop.NUBUnits;
                    SendKeyStrokes ("{TAB}"); // Tab
                    break;
                }

                case TabStop.NUBUnits:
                {
                    currPos = TabStop.NDBSlide;
                    SendKeyStrokes ("{TAB}"); // Tab
                    break;
                }

                case TabStop.NDBSlide:
                {
                    currPos = TabStop.NDBUsed;
                    SendKeyStrokes ("{TAB}"); // Tab
                    break;
                }

                case TabStop.NDBUsed:
                {
                    currPos = TabStop.NDBLimit;
                    SendKeyStrokes ("{TAB}"); // Tab
                    break;
                }

                case TabStop.NDBLimit:
                {
                    currPos = TabStop.NDBUnits;
                    SendKeyStrokes ("{TAB}"); // Tab
                    break;
                }

                case TabStop.NDBUnits:
                {
                    currPos = TabStop.Header;
                    SendKeyStrokes ("{TAB}"); // Tab
                    break;
                }
                default:
                {
                    throw new HolodeckExceptions.UnaccessableControlException ();
                }
            }
        }