Exemplo n.º 1
0
        protected override void SolveInstance(IGH_DataAccess DA)
        {
            bool          showGraph = false;
            string        title     = "";
            List <double> xValues   = new List <double>();
            List <double> yValues   = new List <double>();
            string        xName     = "";
            string        yName     = "";
            Color         color     = new Color();
            string        path      = "";

            DA.GetData(0, ref showGraph);
            DA.GetData(1, ref title);
            DA.GetDataList(2, xValues);
            DA.GetDataList(3, yValues);
            DA.GetData(4, ref xName);
            DA.GetData(5, ref yName);
            DA.GetData(6, ref color);
            DA.GetData(7, ref path);

            PointGraph graphObject = new PointGraph();

            graphObject.PointGraphData(showGraph, title, xValues, yValues, xName, yName, color, path);
            if (showGraph)
            {
                graphObject.ShowDialog();
            }

            graphObject.Export();
            string reportPart = graphObject.Create();

            DA.SetData(0, reportPart);
        }
Exemplo n.º 2
0
        protected override void SolveInstance(IGH_DataAccess DA)
        {
            string        title   = "";
            List <double> xValues = new List <double>();
            List <double> yValues = new List <double>();
            string        xName   = "";
            string        yName   = "";
            Color         color   = new Color();

            DA.GetData(0, ref title);
            DA.GetDataList(1, xValues);
            DA.GetDataList(2, yValues);
            DA.GetData(3, ref xName);
            DA.GetData(4, ref yName);
            DA.GetData(5, ref color);

            PointGraph graphObject = new PointGraph();

            dialogImage = graphObject;
            PterodactylGrasshopperBitmapGoo GH_bmp = new PterodactylGrasshopperBitmapGoo();

            graphObject.PointGraphData(true, title, xValues, yValues, xName, yName, color, GH_bmp.ReferenceTag);
            using (Bitmap b = graphObject.ExportBitmap())
            {
                GH_bmp.Value      = b.Clone(new Rectangle(0, 0, b.Width, b.Height), b.PixelFormat);
                GH_bmp.ReportPart = graphObject.Create();
                DA.SetData(0, GH_bmp);
            }
        }