private void addKrigingButton_Click(object sender, EventArgs e, GeoSoft.Plugins.Interpolation.Forms.KrigingForm fm)
        {
            if (fm != null && fm.KrigingFields.Count > 0)
            {
                var tempField = fm.KrigingFields.Last();

                KrigingField.ZData = tempField.OutputZ;
                KrigingField.Field = tempField.Field;
                KrigingField.PieChartData = Newtonsoft.Json.JsonConvert.SerializeObject(tempField.PieChartData);
                KrigingField.Image = getMapImage();

                ColorsList = fm.ColorsList;

                fm.Close();

                pictureBox1.SizeMode = PictureBoxSizeMode.Zoom;
                pictureBox1.Image = Image.FromFile(KrigingField.Image);
            }

        }
        private void addSavedInterpolation_Click(object sender, EventArgs e, GeoSoft.Plugins.Customer.Forms.ManageCustomerInterpolationForm fm)
        {
            var interpolationList = fm.getSelectedFields();

            foreach (var item in interpolationList)
            {
                var ctrl = new SelectedKrigingItem(item, flowLayoutPanel1.Controls.Count + 1);
                flowLayoutPanel1.Controls.Add(ctrl);
            }

            fm.Close();
        }
        private void addKrigingButton_Click(object sender, EventArgs e, GeoSoft.Plugins.Interpolation.Forms.KrigingForm fm)
        {
            if (fm != null && fm.KrigingFields.Count > 0)
            {
                foreach (var item in fm.KrigingFields)
                {
                    var krigingField = new InterpolatedFields();
                    krigingField.ZData = item.OutputZ;
                    krigingField.Field = item.Field;
                    krigingField.PieChartData = Newtonsoft.Json.JsonConvert.SerializeObject(item.PieChartData);
                    krigingField.Image = item.Image;

                    krigingField.ColorsCategories = Newtonsoft.Json.JsonConvert.SerializeObject(fm.ColorsList);

                    var ctrl = new SelectedKrigingItem(krigingField, flowLayoutPanel1.Controls.Count + 1);
                    flowLayoutPanel1.Controls.Add(ctrl);
                }

                fm.Close();
            }
        }