Doloro GDK 22 .1.0 Beta
by Tauri Interactive
How to ...

Set column\row name

via Editor

Warning
NOT IMPLEMENTED YET
Will be added at following updates.

via code

using Doloro.DataManagement.Tables;
// Creating a table and a spreadsheet for it.
Table source = new Table();
var sheet = new Spreadsheet(source);
// Defining columns\rows titles.
sheet.SetColumnTitle(CULUMN_IDX, "New column name");
sheet.SetRowTitle(ROW_IDX, "New row name");
Member Type Meaning
CULUMN_IDX int Index of the column to value set.
ROW_IDX int Index of the row to value set.

Set column\row size

via Editor

At the side panels press and drag splitter between cells to adjust a size of a zone.

via code

You may setup both:

  • default cell layout size
  • size of certain column \ row.
using Doloro.DataManagement.Tables;
// Creating a table and a spreadsheet for it.
Table source = new Table();
var sheet = new Spreadsheet(source);
// GLOBAL SET -------------------------------------------------
// Overriding default sizes
// for all not customized columns\rows.
sheet.DefaultCellSize = new Vector2(DEFAULT_COLUMN_SIZE, DEFAULT_ROW_SIZE);
// PERSONALISED SET -------------------------------------------
// Defining customg sizes to certain rows/columns by its index.
sheet.SetRowSize( ROW_IDX, ROW_SIZE );
sheet.SetColumnSize( COLUMN_IDX, COLUMN_SIZE );

See also: Doloro.DataManagement.Tables.Spreadsheet

Member Type Meaning
CULUMN_IDX int Index of the column to value set.
ROW_IDX int Index of the row to value set.
COLUMN_SIZE float Size of the column to set.
ROW_SIZE float Size of the row to set.
DEFAULT_COLUMN_SIZE float Size of the column to set as default.
DEFAULT_ROW_SIZE float Size of the row to set as default.

Set cell value

via Editor

To set a value to a cell via editor enough to press over it.
After that you can start entering the value like in a regular text field.

Warning
Spreadsheet displaying into the GUI must be not read only.

See also: Doloro.DataManagement.Tables.Spreadsheet

via Editor

using Doloro.DataManagement.Tables;
Table source = new Table();
source.Set(CELL_X_COORD, CELL_Y_COORD, VALUE);

See also: Doloro.DataManagement.Tables.Table

Member Type Meaning
CELL_X_COORD int X coordinate of the cell in the table.
CELL_Y_COORD int Y coordinate of the cell in the table.
VALUE string Value to set.

Set cell properties

Cell can has a custom properties like a:

Property Purpose
TextColor Defines custom color of a text in cell.
BackgroundColor Defines cell filling color.

See also: Doloro.DataManagement.Tables.Cell

To define a property you should follow next template:

using Doloro.DataManagement.Tables;
// Operating table.
Table source = new Table();
// Getting cell info container.
Cell info = source.GetInfo(CELL_X_COORD, CELL_Y_COORD);
// Modifying the cell properties.
info.TextColor = Color.black;
info.BackgroundColor = Color.yellow;

To drop a property to default you have to call related handler for destination cell.

Handler Operation
DropPalette() Drops entire custom color properties over the cell.
DropTextColor() Sets content color in cell to default.
DropBackgroundColor() Sets background color in cell to default.

Turn-on read-only mode

Read-only state available only for an editor representation of the Table.
When its enabled SpreadsheetEditor will not allow data change via GUI elements.

using Doloro.DataManagement.Tables;
// Creating a table and a spreadsheet for it.
Table source = new Table();
var sheet = new Spreadsheet(source);
// Switching to read-only state.
sheet.isReadOnly = true;
// Drawing read-only table at the editor GUI.
SpreadsheetEditor.Draw(RECT, sheet)

Where RECT is a Rect value that defined in-window position of the SpreadsheetEditor GUI element.

See also:


Turn-on endless mode

SpreadsheetEditor can work in two modes:

Mode Behavior
Clamped Draws table limited with a table size.
Endless Draws a table that has no end and can be resized during scroll over it.

To manage it follow the next example:

using Doloro.DataManagement.Tables;
// Creating a table and a spreadsheet for it.
Table source = new Table();
var sheet = new Spreadsheet(source);
// Switching to clamed mode.
sheet.isClamped = true;
// Switching to endless mode.
sheet.isClamped = false;

See also:


Serialization

Entire distributing entities of the module, like a Table, Spreadsheet, Solution derived from a StorableAsset class.

That allows a simple save process of asset management via the
Doloro.DataManagement.Serialization.StorableAsset.IO API.

using Doloro.DataManagement.Tables;
// Creating a table and a spreadsheet for it.
var source = new Table();
var sheet = new Spreadsheet(source);
// ----------------------------------
// Doing something with the data.
// ----------------------------------
// Saving data to binary containers.
Table.IO.SaveAs(table, TABLE_ASSET_PATH);
Spreadsheet.IO.SaveAs(sheet, TABLE_ASSET_PATH);
// Loading data to the instance
// `Table` related to the spreadsheet should be loaded automatically in case it
// still follows the same path.
Spreadsheet.IO.Load(ref sheet);

See also: Doloro.DataManagement.Serialization.StorableAsset

Member Type Meaning
TABLE_ASSET_PATH string Full path to asset including .asset extension.

Export\import data to Excel

Tables module allows you to convert data of Table into Excel supporting format.
See also: Doloro.DataManagement.Tables.LinqXMLConverter

Export

namespace Doloro.DataManagement.Tables;
Table source;
// Table initialization ----------------------------
....
// -------------------------------------------------
// Creating converter instance.
var converter = new LinqXMLConverter();
// Starting environment services.
converter.StartEnvironment();
// Opening directory to the file to create\override.
converter.Open(FILE_DIR + FILE_NAME + ".xml");
// Exporting data to the file.
converter.Write(source);
// Closing file\directory access.
converter.Close();
// Finalizing environment services.
converter.FinishEnvironment();

Import

Warning
NOT IMPLEMENTED YET
Will be added at following updates.