////happens befor solution
        //private void OnScaleParam_ObjectChanged(IGH_DocumentObject sender, GH_ObjectChangedEventArgs e)
        //{
        //    this.TempExtrCoordinates = new List<Drawing.Point>(this.ExtrCoordinates);
        //}

        //happens after solution
        private void OnScale_SolutionExpired(IGH_DocumentObject sender, GH_SolutionExpiredEventArgs e)
        {
            //((GH_Slider)sender).ValueChanged
            if (this.Params.Input[2].SourceCount > 0)
            {
                this.ExtractedCoordinates = this.TempExtrCoordinates2;
                this.TempExtrCoordinates2 = new List <Drawing.Point>();

                if (this.ifSaveAll)
                {
                    this.ExtractedColors = GetColors(this.ExtractedCoordinates, this.Bitmaps);
                }
                else
                {
                    this.ExtractedColors[0] = GetColors(this.ExtractedCoordinates, this.Bitmap);
                }

                this.UpdateValueOutputData();
                GH.Instances.ActiveCanvas.Document.NewSolution(false);
            }
            else
            {
                sender.SolutionExpired -= this.OnScale_SolutionExpired;
            }
        }
Esempio n. 2
0
 private void OnGridExpired(IGH_DocumentObject sender, GH_SolutionExpiredEventArgs e)
 {
     // throw new NotImplementedException();
 }