Exemplo n.º 1
0
        private void event_GenerateFileTypeObject(DataGridViewRow row)
        {
            string        filePath      = event_RetrieveColumnDataValue(row);
            ModelFileType modelFileType = new ModelFileType(filePath);

            objectList.Add(modelFileType);
        }
Exemplo n.º 2
0
        private void event_GenerateRecordForFile(int rowIndex)
        {
            if (fileType.Equals("XML"))
            {
                xml.WriteStartElement(labelText);
            }

            foreach (DataGridViewRow gridRow in gridviewDataSetup.Rows)
            {
                string dataType    = gridRow.Cells["DataType"].Value.ToString();
                int    columnIndex = gridRow.Index;

                string randomData;

                switch (dataType)
                {
                case "Custom Data File":
                    ModelFileType modelFileType = (ModelFileType)objectList[columnIndex];
                    randomData = modelFileType.event_RetrieveRandomDataValue();
                    break;

                case "Custom Data Values":
                    ModelListType modelListType = (ModelListType)objectList[columnIndex];
                    randomData = modelListType.event_RetrieveRandomDataValue();
                    break;

                default:
                    ModelPresetType modelPresetType = (ModelPresetType)objectList[columnIndex];
                    randomData = modelPresetType.event_RetrieveRandomDataValue();
                    break;
                }

                event_AppendToCurrentRecord(randomData, rowIndex, columnIndex);
            }

            event_FinalizeNewRecord();
        }