Ejemplo n.º 1
0
        private void btnSM_ShowMap_Click(object sender, EventArgs e)
        {
            if (this.magSrf == null)
            {
                MessageBox.Show("Surface was not created...", "Error...");
                return;
            }
            int part_flag = 1;

            if (cbSI_PartSimple.Checked)
            {
                part_flag = 0;
            }

            StokesImaging.MagnetizedSurface boolSrf = new Maper.StokesImaging.MagnetizedSurface(0.0, 0.0, 0.0, 0.0,
                                                                                                this.magSrf.NLat, this.magSrf.NLong, part_flag);

            if (this.arcInitBox == null)
            {
                return;
            }

            for (int i = 0; i < this.arcInitBox.SpotsNumber; i++)
            {
                boolSrf.AddRectSpot(this.arcInitBox.spots[i].colatitude1 * Math.PI / 180,
                                    this.arcInitBox.spots[i].colatitude2 * Math.PI / 180,
                                    this.arcInitBox.spots[i].longitude1 * Math.PI / 180,
                                    this.arcInitBox.spots[i].longitude2 * Math.PI / 180,
                                    this.arcInitBox.spots[i].brightness);
            }

            SurfaceViewerForm svf = new SurfaceViewerForm();

            svf.color0 = Color.White;
            svf.color1 = Color.Black;
            svf.Init(boolSrf.GetPatchCoordMas(), boolSrf.GetBrightnessDensityMas());
            svf.ShowDialog();
        }