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 addKrigingLayerButton_Click(object sender, EventArgs e, MainApp.Forms.KrigingLayerSelectionFrom fm)
        {
            foreach (var item in fm.LayersItem)
            {
                if (item.isSelected)
                {
                    var krigingField = new InterpolatedFields();
                    krigingField.ZData = item.getZData();
                    krigingField.Field = !string.IsNullOrEmpty(item.Layer.LegendText) ? item.Layer.LegendText : item.Layer.DataSet.Name;
                    krigingField.Image = item.ImagePath;
                    krigingField.PieChartData = item.PieChartData;
                    krigingField.ColorsCategories = Newtonsoft.Json.JsonConvert.SerializeObject(item.ColorsList);

                    fm.Close();


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

        }
        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();
            }
        }