public ActionResult Get(GeneratorSetupData generatorSetupData)
        {
            CSVColumnGenerator columnGenerator = new CSVColumnGenerator(dataContext);
            CSVTableGenerator  tableGenerator  = new CSVTableGenerator(columnGenerator);

            byte[] csvFile = tableGenerator.GenerateTable(generatorSetupData.tables[0], generatorSetupData.settings);
            return(File(csvFile, "application/csv", "my_file.csv"));
        }
 public AlternatingColorContourMapGenerator(GeneratorSetupData setupData) : base(setupData)
 {
 }
Beispiel #3
0
 public NormalTopoMapGenerator(GeneratorSetupData setupData)
     : base(setupData)
 {
 }
Beispiel #4
0
        // ---- factory function ----
        public static TopoMapGenerator getGenerator( GeneratorSetupData setupData )
        {
            TopoMapGenerator generator = null;

            switch ( setupData.Type )
            {
                case MapType.Normal :
                    generator = new NormalTopoMapGenerator( setupData );
                    break;
                case MapType.Gradient :
                    generator = new GradientTopoMapGenerator( setupData );
                    break;
                case MapType.AlternatingColors :
                    generator = new AlternatingColorContourMapGenerator( setupData );
                    break;
                case MapType.HorizontalSlice :
                    generator = new HorizontalSlicesTopoMapGenerator( setupData );
                    break;
                case MapType.VerticalSliceNS :
                    generator = new VerticalSlicesTopoMapGenerator( VerticalSlicesTopoMapGenerator.SliceDirectionType.NS, setupData );
                    break;
                case MapType.VerticalSliceEW :
                    generator = new VerticalSlicesTopoMapGenerator( VerticalSlicesTopoMapGenerator.SliceDirectionType.EW, setupData );
                    break;
                default:
                    throw new System.InvalidOperationException("unknown OutputModeType : " + setupData.Type.ToString());
            }

            return generator;
        }
Beispiel #5
0
        // ------------------------------------------------------
        // ---- constructor ----
        // note : as the generators are pixel focused, we'll only work with indices into the topo data (for now)
        public TopoMapGenerator( GeneratorSetupData setupData )
        {
            /*
            (    FLTTopoData data,
                                    int contourHeights,
                                    String outputFilename,
                                    int[] rectIndices,
                                    int imageWidth, int imageHeight
                                )
             */
            _data = setupData.Data;

            _contourHeights = setupData.ContourHeights;

            _outputFilename = setupData.OutputFilename;

            if ( setupData.RectIndices.Length < 4 )
            {
                throw new System.InvalidOperationException( "Expected four indices, got : " + setupData.RectIndices.Length );
            }
            else
            {
                _rectIndices = setupData.RectIndices;
            }

            _imageWidth = setupData.ImageWidth;
            _imageHeight = setupData.ImageHeight;

            addTimingHandler = null;
        }
Beispiel #6
0
 public NormalTopoMapGenerator( GeneratorSetupData setupData )
     : base(setupData)
 {
 }
Beispiel #7
0
 public HorizontalSlicesTopoMapGenerator( GeneratorSetupData setupData )
     : base(setupData)
 {
 }
Beispiel #8
0
 public AlternatingColorContourMapGenerator( GeneratorSetupData setupData )
     : base(setupData)
 {
 }
Beispiel #9
0
 public VerticalSlicesTopoMapGenerator( SliceDirectionType sliceDir, GeneratorSetupData setupData )
     : base(setupData)
 {
     _sliceDirection = sliceDir;
     _appendCoordinatesToFilenames = setupData.AppendCoordinatesToFilenames;
     _imageHeightScale = setupData.ImageHeightScale;
 }
Beispiel #10
0
 public GradientTopoMapGenerator( GeneratorSetupData setupData )
     : base(setupData)
 {
 }