private void InitData(GroupsOfSpreadsheetExamples examples) { #region GroupNodes examples.Add(new SpreadsheetNode("Worksheet")); examples.Add(new SpreadsheetNode("Rows and Columns")); examples.Add(new SpreadsheetNode("Cells")); examples.Add(new SpreadsheetNode("Formulas")); examples.Add(new SpreadsheetNode("Formatting")); examples.Add(new SpreadsheetNode("Import/Export")); examples.Add(new SpreadsheetNode("Printing")); #endregion #region ExampleNodes // Add nodes to the "Worksheet" group of examples. examples[0].Groups.Add(new SpreadsheetExample("Active Worksheet", WorksheetActions.AssignActiveWorksheetAction)); examples[0].Groups.Add(new SpreadsheetExample("New Worksheet", WorksheetActions.AddWorksheetAction)); examples[0].Groups.Add(new SpreadsheetExample("Delete a Worksheet", WorksheetActions.RemoveWorksheetAction)); examples[0].Groups.Add(new SpreadsheetExample("Rename a Worksheet", WorksheetActions.RenameWorksheetAction)); examples[0].Groups.Add(new SpreadsheetExample("Copy a Worksheet within a Workbook", WorksheetActions.CopyWorksheetWithinWorkbookAction)); examples[0].Groups.Add(new SpreadsheetExample("Move a Worksheet", WorksheetActions.MoveWorksheetAction)); examples[0].Groups.Add(new SpreadsheetExample("Show/Hide a Worksheet", WorksheetActions.ShowHideWorksheetAction)); examples[0].Groups.Add(new SpreadsheetExample("Show/Hide Gridlines", WorksheetActions.ShowHideGridlinesAction)); examples[0].Groups.Add(new SpreadsheetExample("Show/Hide Row and Column Headings", WorksheetActions.ShowHideHeadingsAction)); examples[0].Groups.Add(new SpreadsheetExample("Zoom a Worksheet", WorksheetActions.ZoomWorksheetAction)); // Add nodes to the "Rows and Columns" group of examples. examples[1].Groups.Add(new SpreadsheetExample("New Row/Column", RowAndColumnActions.InsertRowsColumnsAction)); examples[1].Groups.Add(new SpreadsheetExample("Delete a Row/Column", RowAndColumnActions.DeleteRowsColumnsAction)); examples[1].Groups.Add(new SpreadsheetExample("Copy a Row/Column", RowAndColumnActions.CopyRowsColumnsAction)); examples[1].Groups.Add(new SpreadsheetExample("Show or Hide a Row/Column", RowAndColumnActions.ShowHideRowsColumnsAction)); examples[1].Groups.Add(new SpreadsheetExample("Row Height and Column Width", RowAndColumnActions.SpecifyRowsHeightColumnsWidthAction)); // Add nodes to the "Cells" group of examples. examples[2].Groups.Add(new SpreadsheetExample("Create Ranges", CellActions.CreateSimpleAndComplexRangesAction)); examples[2].Groups.Add(new SpreadsheetExample("Cell Value", CellActions.ChangeCellValueAction)); examples[2].Groups.Add(new SpreadsheetExample("Cell Value From Text", CellActions.SetValueFromTextAction)); examples[2].Groups.Add(new SpreadsheetExample("Cell Value To/From Object", CellActions.CellValueToFromObjectAction)); examples[2].Groups.Add(new SpreadsheetExample("Cell Value From Object via Custom Converter", CellActions.CellValueFromObjectViaCustomConverterAction)); examples[2].Groups.Add(new SpreadsheetExample("Add Hyperlinks to Cells", CellActions.AddHyperlinkAction)); examples[2].Groups.Add(new SpreadsheetExample("Create, Edit and Copy Comments", CellActions.AddCommentAction)); examples[2].Groups.Add(new SpreadsheetExample("Copy Data Only, Style Only, or Data with Style", CellActions.CopyCellDataAndStyleAction)); examples[2].Groups.Add(new SpreadsheetExample("Merge/Split Cells", CellActions.MergeAndSplitCellsAction)); examples[2].Groups.Add(new SpreadsheetExample("Clear Cells", CellActions.ClearCellsAction)); // Add nodes to the "Formulas" group of examples. examples[3].Groups.Add(new SpreadsheetExample("Constants and Calculation Operators in Formulas", FormulaActions.UseConstantsAndCalculationOperatorsInFormulasAction)); examples[3].Groups.Add(new SpreadsheetExample("R1C1 References in Formulas", FormulaActions.R1C1ReferencesInFormulassAction)); examples[3].Groups.Add(new SpreadsheetExample("Names in Formulas", FormulaActions.UseNamesInFormulasAction)); examples[3].Groups.Add(new SpreadsheetExample("Create Named Formulas", FormulaActions.CreateNamedFormulasAction)); examples[3].Groups.Add(new SpreadsheetExample("Functions in Formulas", FormulaActions.UseFunctionsInFormulasAction)); examples[3].Groups.Add(new SpreadsheetExample("Shared and Array Formulas", FormulaActions.CreateSharedAndArrayFormulasAction)); // Add nodes to the "Formatting" group of examples. examples[4].Groups.Add(new SpreadsheetExample("Create, Modify and Apply a Style", FormattingActions.CreateModifyApplyStyleAction)); examples[4].Groups.Add(new SpreadsheetExample("Cell and Cell Range Formatting", FormattingActions.FormatCellAction)); examples[4].Groups.Add(new SpreadsheetExample("Date Formats", FormattingActions.SetDateFormatsAction)); examples[4].Groups.Add(new SpreadsheetExample("Number Formats", FormattingActions.SetNumberFormatsAction)); examples[4].Groups.Add(new SpreadsheetExample("Custom Number Format", FormattingActions.CustomNumberFormatAction)); examples[4].Groups.Add(new SpreadsheetExample("Cell Colors and Background", FormattingActions.ChangeCellColorsAction)); examples[4].Groups.Add(new SpreadsheetExample("Cell Gradient Fill", FormattingActions.ChangeCellGradientFillAction)); examples[4].Groups.Add(new SpreadsheetExample("Font Settings", FormattingActions.SpecifyCellFontAction)); examples[4].Groups.Add(new SpreadsheetExample("Cell Alignment", FormattingActions.AlignCellContentsAction)); examples[4].Groups.Add(new SpreadsheetExample("Cell Borders", FormattingActions.AddCellBordersAction)); // Add nodes to the "Import/Export" group of examples. examples[5].Groups.Add(new SpreadsheetExample("Export to Pdf", ImportExportActions.ExportToPdfAction)); // Add nodes to the "Printing" group of examples. examples[6].Groups.Add(new SpreadsheetExample("Print a Workbook", PrintingActions.PrintAction)); #endregion }
private void InitData(GroupsOfSpreadsheetExamples examples) { #region GroupNodes examples.Add(new SpreadsheetNode("Pictures")); examples.Add(new SpreadsheetNode("Custom Functions")); examples.Add(new SpreadsheetNode("Tables")); examples.Add(new SpreadsheetNode("Protection")); examples.Add(new SpreadsheetNode("Sort")); examples.Add(new SpreadsheetNode("Search")); examples.Add(new SpreadsheetNode("Export")); examples.Add(new SpreadsheetNode("Group Data")); examples.Add(new SpreadsheetNode("Filter Data")); examples.Add(new SpreadsheetNode("Document Properties")); #endregion #region ExampleNodes // Add nodes to the "Pictures" group of examples. examples[0].Groups.Add(new SpreadsheetExample("Insert picture", PictureActions.InsertPictureAction)); examples[0].Groups.Add(new SpreadsheetExample("Insert picture from URI", PictureActions.InsertPictureFromUriAction)); examples[0].Groups.Add(new SpreadsheetExample("Move picture", PictureActions.MovePictureAction)); examples[0].Groups.Add(new SpreadsheetExample("Rotate picture", PictureActions.RotatePictureAction)); examples[0].Groups.Add(new SpreadsheetExample("Bring picture to front", PictureActions.ChangeZOrderAction)); examples[0].Groups.Add(new SpreadsheetExample("Add hyperlink", PictureActions.InsertHyperlinkAction)); // Add nodes to the "Custom Functions" group of examples. examples[1].Groups.Add(new SpreadsheetExample("Add UDF(user defined function)", CustomFunctionActions.SphereMassAction)); // Add nodes to the "Tables" group of examples. examples[2].Groups.Add(new SpreadsheetExample("Create table", TableActions.CreateTableAction)); examples[2].Groups.Add(new SpreadsheetExample("Apply custom style", TableActions.CustomTableStyleAction)); // Add nodes to the "Protection" group of examples. examples[3].Groups.Add(new SpreadsheetExample("Protect workbook", ProtectionActions.ProtectWorkbookAction)); examples[3].Groups.Add(new SpreadsheetExample("Protect worksheet", ProtectionActions.ProtectWorksheetAction)); examples[3].Groups.Add(new SpreadsheetExample("Protect range", ProtectionActions.ProtectRangeAction)); // Add nodes to the "Sort" group of examples. examples[4].Groups.Add(new SpreadsheetExample("Simple sort", SortActions.SimpleSortAction)); examples[4].Groups.Add(new SpreadsheetExample("Sort in descending order", SortActions.DescendingOrderAction)); examples[4].Groups.Add(new SpreadsheetExample("Sort using custom comparer", SortActions.SelectComparerAction)); examples[4].Groups.Add(new SpreadsheetExample("Sort by column", SortActions.SortBySpecifiedColumnAction)); examples[4].Groups.Add(new SpreadsheetExample("Sort by multiple columns", SortActions.SortByMultipleColumnsAction)); // Add nodes to the "Search" group of examples. examples[5].Groups.Add(new SpreadsheetExample("Simple search", SearchActions.SimpleSearchAction)); examples[5].Groups.Add(new SpreadsheetExample("Search with options", SearchActions.AdvancedSearchAction)); // Add nodes to the "Export" group of examples. examples[6].Groups.Add(new SpreadsheetExample("Export to HTML", ExportActions.ExportToHTMLAction)); // Add nodes to the "Group Data" group of examples. examples[7].Groups.Add(new SpreadsheetExample("Group Rows", GroupAndOutlineActions.GroupRowsAction)); examples[7].Groups.Add(new SpreadsheetExample("Group Columns", GroupAndOutlineActions.GroupColumnsAction)); examples[7].Groups.Add(new SpreadsheetExample("Unroup Rows", GroupAndOutlineActions.UngroupRowsAction)); examples[7].Groups.Add(new SpreadsheetExample("Unroup Columns", GroupAndOutlineActions.UngroupColumnsAction)); examples[7].Groups.Add(new SpreadsheetExample("Create an Auto Outline", GroupAndOutlineActions.AutoOutlineAction)); examples[7].Groups.Add(new SpreadsheetExample("Insert Subtotals", GroupAndOutlineActions.SubtotalAction)); // Add nodes to the "Filter Data" group of examples. examples[8].Groups.Add(new SpreadsheetExample("Enable filtering", AutoFilterActions.ApplyFilterAction)); examples[8].Groups.Add(new SpreadsheetExample("Sort by single column", AutoFilterActions.FilterAndSortBySingleColumnAction)); examples[8].Groups.Add(new SpreadsheetExample("Sort by multiple columns", AutoFilterActions.FilterAndSortByMultipleColumnsAction)); examples[8].Groups.Add(new SpreadsheetExample("Custom number filter", AutoFilterActions.FilterNumericByConditionAction)); examples[8].Groups.Add(new SpreadsheetExample("Custom text filter", AutoFilterActions.FilterTextByConditionAction)); examples[8].Groups.Add(new SpreadsheetExample("Custom date filter", AutoFilterActions.FilterDatesByConditionAction)); examples[8].Groups.Add(new SpreadsheetExample("Filter by single value", AutoFilterActions.FilterByValuesAction)); examples[8].Groups.Add(new SpreadsheetExample("Filter by multiple values", AutoFilterActions.FilterByMultipleValuesAction)); examples[8].Groups.Add(new SpreadsheetExample("Filter mixed data types by values", AutoFilterActions.FilterMixedDataTypesByValuesAction)); examples[8].Groups.Add(new SpreadsheetExample("Apply Top 10 filter", AutoFilterActions.Top10FilterAction)); examples[8].Groups.Add(new SpreadsheetExample("Apply dynamic filter", AutoFilterActions.DynamicFilterAction)); examples[8].Groups.Add(new SpreadsheetExample("Reapply filter", AutoFilterActions.ReapplyFilterAction)); examples[8].Groups.Add(new SpreadsheetExample("Clear filter", AutoFilterActions.ClearFilterAction)); examples[8].Groups.Add(new SpreadsheetExample("Disable filtering", AutoFilterActions.DisableFilterAction)); // Add nodes to the "Document Properties" group of examples. examples[9].Groups.Add(new SpreadsheetExample("Built-in properties", DocumentPropertiesActions.BuiltInPropertiesAction)); examples[9].Groups.Add(new SpreadsheetExample("Custom properties", DocumentPropertiesActions.CustomPropertiesAction)); #endregion }