Esempio n. 1
0
 private void AddReportDataToLinesTable(LinesLayer layer, SpatialDataTable linesTable)
 {
     foreach (IReportScriptContext sc in ForeachReportDataRow())
     {
         AddLinesRow(layer, linesTable, sc);
     }
 }
Esempio n. 2
0
 private void AddCustomDataToLinesTable(LinesLayer layer, SpatialDataTable linesTable)
 {
     using (var dtCustom = MakeCustomData(layer.RecordSource))
         foreach (IReportScriptContext sc in DataTableReportScriptContext.Foreach(dtCustom))
         {
             AddLinesRow(layer, linesTable, sc);
         }
 }
Esempio n. 3
0
        private void AddSampleDataToLinesTable(LinesLayer layer, SpatialDataTable dt)
        {
            int nplines = 15 / Layers.CountAll((l) => l.Visible && l is LinesLayer);
            var rnd     = new Random(Layers.IndexOf(layer)); // this ensures same data for same layer but different points for different layers

            for (int i = 0; i < nplines; ++i)
            {
                LinesDataRow row       = (LinesDataRow)dt.NewRow();
                var          lineStyle = layer.LineStyle;
                row.Latitude0  = rnd.Next(SampleLatMin, SampleLatMax);
                row.Longitude0 = rnd.Next(SampleLonMin, SampleLonMax);
                row.Latitude1  = rnd.Next(SampleLatMin, SampleLatMax);
                row.Longitude1 = rnd.Next(SampleLonMin, SampleLonMax);
                row.LineStroke = lineStyle.StrokeColor;
                row.DashStyle  = lineStyle.DashStyle;
                dt.Add(row);
            }
        }
Esempio n. 4
0
        private void AddLinesRow(LinesLayer layer, SpatialDataTable linesTable, IReportScriptContext sc)
        {
            bool pointsOk;
            var  locs = GetLocations(layer, sc, out pointsOk);

            if (pointsOk)
            {
                var row       = (LinesDataRow)linesTable.NewRow();
                var lineStyle = EvalStyleExpr <LineStyle>(layer.LineStyleExpr, LineStyles, ExternalLineStyle, layer.LineStyle, sc);
                row.Longitude0    = locs[0].Longitude;
                row.Latitude0     = locs[0].Latitude;
                row.Longitude1    = locs[1].Longitude;
                row.Latitude1     = locs[1].Latitude;
                row.LineStroke    = lineStyle.StrokeColor;
                row.DashStyle     = lineStyle.DashStyle;
                row.LineThickness = Maps.Util.GetDouble(ParentReport.Evaluate(lineStyle.ThicknessExpr, sc), LineStyle.c_LineThickness);
                linesTable.Add(row);
            }
        }