예제 #1
0
        private static void Main(string[] args)
        {
            Thread.CurrentThread.CurrentCulture = new System.Globalization.CultureInfo("en-US");

            //Paragraphs
            ParagraphSample.SimpleFormattedParagraphs();
            ParagraphSample.ForceParagraphOnSinglePage();
            ParagraphSample.ForceMultiParagraphsOnSinglePage();
            ParagraphSample.TextActions();
            ParagraphSample.Heading();

            //Document
            DocumentSample.AddCustomProperties();
            DocumentSample.AddAppProperties();
            DocumentSample.ReplaceText();
            DocumentSample.ApplyTemplate();
            DocumentSample.AppendDocument();

            //Images
            ImageSample.AddPicture();
            ImageSample.CopyPicture();
            ImageSample.ModifyImage();

            //Indentation/Direction/Margins
            MarginSample.SetDirection();
            MarginSample.Indentation();
            MarginSample.Margins();

            //Header/Footers
            HeaderFooterSample.HeadersFooters();

            //Tables
            TableSample.InsertRowAndImageTable();
            TableSample.TextDirectionTable();
            TableSample.CreateRowsFromTemplate();
            TableSample.ColumnsWidth();
            TableSample.MergeCells();

            //Hyperlink
            HyperlinkSample.Hyperlinks();

            //Section
            SectionSample.InsertSections();

            //Lists
            ListSample.AddList();

            //Equations
            EquationSample.InsertEquation();

            //Bookmarks
            BookmarkSample.InsertBookmarks();
            BookmarkSample.ReplaceText();

            //Charts
            ChartSample.BarChart();
            ChartSample.LineChart();
            ChartSample.PieChart();
            ChartSample.Chart3D();

            //Tale of Content
            TableOfContentSample.InsertTableOfContent();
            TableOfContentSample.InsertTableOfContentWithReference();

            //Lines
            LineSample.InsertHorizontalLine();

            //Protection
            ProtectionSample.AddPasswordProtection();
            ProtectionSample.AddProtection();

            //Parallel
            ParallelSample.DoParallelActions();

            //Others
            MiscellaneousSample.CreateRecipe();
            MiscellaneousSample.CompanyReport();
            MiscellaneousSample.CreateInvoice();

            Console.WriteLine("\nPress any key to exit.");
            Console.ReadKey();
        }
예제 #2
0
파일: Program.cs 프로젝트: ysking/DocX
        private static void Main(string[] args)
        {
            var version       = Assembly.GetExecutingAssembly().GetName().Version;
            var versionNumber = version.Major + "." + version.Minor;

            Console.WriteLine("\nRunning Examples of Xceed Words for .NET version " + versionNumber + ".\n");

            //Paragraphs
            ParagraphSample.SimpleFormattedParagraphs();
            ParagraphSample.ForceParagraphOnSinglePage();
            ParagraphSample.ForceMultiParagraphsOnSinglePage();
            ParagraphSample.TextActions();
            ParagraphSample.Heading();
            ParagraphSample.AddObjectsFromOtherDocument();
            ParagraphSample.AddHtml();
            ParagraphSample.AddRtf();

            //Document
            DocumentSample.AddCustomProperties();
            DocumentSample.ReplaceTextWithText();
            DocumentSample.ReplaceTextWithObjects();
            DocumentSample.ApplyTemplate();
            DocumentSample.AppendDocument();
            DocumentSample.LoadDocumentWithFilename();
            DocumentSample.LoadDocumentWithStream();
            DocumentSample.LoadDocumentWithStringUrl();
            DocumentSample.AddHtmlFromFile();
            DocumentSample.AddRtfFromFile();

            //Images
            ImageSample.AddPicture();
            ImageSample.AddPictureWithTextWrapping();
            ImageSample.CopyPicture();
            ImageSample.ModifyImage();

            // Indentation / Direction / Margins
            MarginSample.SetDirection();
            MarginSample.Indentation();
            MarginSample.Margins();

            //Header/Footers
            HeaderFooterSample.HeadersFooters();

            //Tables
            TableSample.InsertRowAndImageTable();
            TableSample.CloneTable();
            TableSample.AddTableWithTextWrapping();
            TableSample.TextDirectionTable();
            TableSample.CreateRowsFromTemplate();
            TableSample.ColumnsWidth();
            TableSample.MergeCells();

            //Hyperlink
            HyperlinkSample.Hyperlinks();

            //Section
            SectionSample.InsertSections();
            SectionSample.SetPageOrientations();

            //Lists
            ListSample.AddList();
            ListSample.CloneLists();

            //Equations
            EquationSample.InsertEquation();

            //Bookmarks
            BookmarkSample.InsertBookmarks();
            BookmarkSample.ReplaceText();

            //Charts
            ChartSample.BarChart();
            ChartSample.LineChart();
            ChartSample.PieChart();
            ChartSample.Chart3D();
            ChartSample.ModifyChartData();

            //Tale of Content
            TableOfContentSample.InsertTableOfContent();
            TableOfContentSample.InsertTableOfContentWithReference();
            TableOfContentSample.UpdateTableOfContent();

            //Lines
            LineSample.InsertHorizontalLine();

            //Protection
            ProtectionSample.AddPasswordProtection();
            ProtectionSample.AddProtection();

            //Parallel
            ParallelSample.DoParallelActions();

            //Others
            MiscellaneousSample.CreateRecipe();
            MiscellaneousSample.CompanyReport();
            MiscellaneousSample.CreateInvoice();
            MiscellaneousSample.MailMerge();

            //PDF
            PdfSample.ConvertToPDF();

            //Shape
            ShapeSample.AddShape();
            ShapeSample.AddShapeWithTextWrapping();
            ShapeSample.AddTextBox();
            ShapeSample.AddTextBoxWithTextWrapping();

            //CheckBox
            CheckBoxSample.ModifyCheckBox();
            CheckBoxSample.AddCheckBox();

            Console.WriteLine("\nDone running Examples of Xceed Words for .NET version " + versionNumber + ".\n");
            Console.WriteLine("\nPress any key to exit.");
            Console.ReadKey();
        }