Digital Twin - GUI
Public Member Functions | Public Attributes | Private Member Functions | Private Attributes | List of all members
GUI.IO_Modules.CheckboxCreator Class Reference

This class reads all the important data out of an Excel file and creates all the Checkboxes we need. More...

Public Member Functions

 CheckboxCreator (String dir)
 Constructor. More...
 
void Create ()
 Reads all the Data from Dir + "\\Dataset.xlsx". More...
 
LocationCB[] GetAllLocations ()
 Grants access to the location array. More...
 
List< MachineCB >[] GetAllMachines ()
 Grants access to the machine checkboxes. More...
 
List< ProductCB >[] GetAllProducts ()
 Grants access to the product checkboxes. More...
 
Dictionary< String, int > GetLocationDict ()
 Grants access to the location dictionary. More...
 
String[] GetLocationNames ()
 Grants access to the all the location names. More...
 

Public Attributes

String Dir
 Directory CheckboxCreator reads from. More...
 

Private Member Functions

void createLocations (DataTable sheet)
 Creates the location Checkboxes. More...
 
void createMachines (DataTable sheet, String LocationName)
 Creates the machine Checkboxes. More...
 
void createProducts (DataTable sheet, MachineCB m, int indexOfMachine)
 Creates the product Checkboxes. More...
 

Private Attributes

Dictionary< String, int > locationDictionary = new Dictionary<String, int>()
 Dictionary that maps a location's name to its position in the locations array. More...
 
String[] locationNames
 Array that contains all of the locations' names. More...
 
LocationCB[] locations
 Array that contains all of the locations. More...
 
List< MachineCB >[] machinesAtLocation
 All machines at a specific location. More...
 
List< ProductCB >[] productsAtLocation
 All products at a specific location. More...
 

Detailed Description

This class reads all the important data out of an Excel file and creates all the Checkboxes we need.

Constructor & Destructor Documentation

GUI.IO_Modules.CheckboxCreator.CheckboxCreator ( String  dir)

Constructor.

Parameters
dirDirectory CheckboxCreator reads from.

Member Function Documentation

void GUI.IO_Modules.CheckboxCreator.Create ( )

Reads all the Data from Dir + "\\Dataset.xlsx".

void GUI.IO_Modules.CheckboxCreator.createLocations ( DataTable  sheet)
private

Creates the location Checkboxes.

Parameters
sheetDataTable that is extracted from an Excel worksheet.
void GUI.IO_Modules.CheckboxCreator.createMachines ( DataTable  sheet,
String  LocationName 
)
private

Creates the machine Checkboxes.

Parameters
sheetDataTable that is extracted from an Excel worksheet.
LocationNameName of the location we want to create the machine Checkboxes for.
void GUI.IO_Modules.CheckboxCreator.createProducts ( DataTable  sheet,
MachineCB  m,
int  indexOfMachine 
)
private

Creates the product Checkboxes.

Parameters
sheetDataTable that is extracted from an Excel worksheet.
mMachine Checkbox we want to create the product Checkboxes for.
indexOfMachineIndex of Machine m in the Excel sheet.
LocationCB [] GUI.IO_Modules.CheckboxCreator.GetAllLocations ( )

Grants access to the location array.

Returns
Array of all location checkboxes.
List<MachineCB> [] GUI.IO_Modules.CheckboxCreator.GetAllMachines ( )

Grants access to the machine checkboxes.

Returns
All machines at a specific location.
List<ProductCB> [] GUI.IO_Modules.CheckboxCreator.GetAllProducts ( )

Grants access to the product checkboxes.

Returns
All products at a specific location.
Dictionary<String, int> GUI.IO_Modules.CheckboxCreator.GetLocationDict ( )

Grants access to the location dictionary.

Returns
Dictionary maps all the location names to their indices in the locations array.
String [] GUI.IO_Modules.CheckboxCreator.GetLocationNames ( )

Grants access to the all the location names.

Returns
An array consisting of location names.

Member Data Documentation

String GUI.IO_Modules.CheckboxCreator.Dir

Directory CheckboxCreator reads from.

Dictionary<String, int> GUI.IO_Modules.CheckboxCreator.locationDictionary = new Dictionary<String, int>()
private

Dictionary that maps a location's name to its position in the locations array.

String [] GUI.IO_Modules.CheckboxCreator.locationNames
private

Array that contains all of the locations' names.

LocationCB [] GUI.IO_Modules.CheckboxCreator.locations
private

Array that contains all of the locations.

List<MachineCB> [] GUI.IO_Modules.CheckboxCreator.machinesAtLocation
private

All machines at a specific location.

List<ProductCB> [] GUI.IO_Modules.CheckboxCreator.productsAtLocation
private

All products at a specific location.


The documentation for this class was generated from the following file: