Ejemplo n.º 1
0
        void LoadData1()
        {
            Lat_GrVal.Value  = (decimal)CMBaseGeoPoint.GetDegree(mCheckedGeoPoint.Lat);
            Lat_MinVal.Value = (decimal)CMBaseGeoPoint.GetMinutes(mCheckedGeoPoint.Lat);
            Lat_SecVal.Value = (decimal)CMBaseGeoPoint.GetSeconds(mCheckedGeoPoint.Lat);

            Lng_GrVal.Value  = (decimal)CMBaseGeoPoint.GetDegree(mCheckedGeoPoint.Lng);
            Lng_MinVal.Value = (decimal)CMBaseGeoPoint.GetMinutes(mCheckedGeoPoint.Lng);
            Lng_SecVal.Value = (decimal)CMBaseGeoPoint.GetSeconds(mCheckedGeoPoint.Lng);
        }
Ejemplo n.º 2
0
        private void btnFileSave_Click(object sender, EventArgs e)
        {
            if (mCheckedGeoPoin.Count > 0)
            {
                if (saveFileDialog1.ShowDialog() == System.Windows.Forms.DialogResult.OK)
                {
                    string FileName = saveFileDialog1.FileName;

                    StreamWriter sw = new StreamWriter(FileName, false, Encoding.Default);

                    sw.WriteLine("PointName;LatDegree;LatMinutes;LatSeconds;LngDegree;LngMinutes;LngSeconds;X;Y;Angle;Distance;Height;Description");

                    for (int i = 0; i < mCheckedGeoPoin.Count; i++)
                    {
                        string sGeoPoint;
                        //sGeoPoint = string.Format("{0};{1};{2}", ((CLMGeo.CMGeoPoint)(mCheckedGeoPoin[0])).Lat, ((CLMGeo.CMGeoPoint)(mCheckedGeoPoin[0])).Lng, ((CLMGeo.CMGeoPoint)(mCheckedGeoPoin[0])).Height);

                        sGeoPoint = string.Format("{0};{1};{2};{3};{4};{5};{6};{7};{8};{9};{10};{11};{12}",
                                                  ((CLMGeo.CMCheckedGeoPoint)(mCheckedGeoPoin[i])).Text
                                                  , CMBaseGeoPoint.GetDegree(((CLMGeo.CMCheckedGeoPoint)(mCheckedGeoPoin[i])).Lat)
                                                  , CMBaseGeoPoint.GetMinutes(((CLMGeo.CMCheckedGeoPoint)(mCheckedGeoPoin[i])).Lat)
                                                  , CMBaseGeoPoint.GetSeconds(((CLMGeo.CMCheckedGeoPoint)(mCheckedGeoPoin[i])).Lat)
                                                  , CMBaseGeoPoint.GetDegree(((CLMGeo.CMCheckedGeoPoint)(mCheckedGeoPoin[i])).Lng)
                                                  , CMBaseGeoPoint.GetMinutes(((CLMGeo.CMCheckedGeoPoint)(mCheckedGeoPoin[i])).Lng)
                                                  , CMBaseGeoPoint.GetSeconds(((CLMGeo.CMCheckedGeoPoint)(mCheckedGeoPoin[i])).Lng)
                                                  , mCheckedGeoPoin[i].Offset.Lat
                                                  , mCheckedGeoPoin[i].Offset.Lng
                                                  , mCheckedGeoPoin[i].Angle
                                                  , mCheckedGeoPoin[i].Distance
                                                  , ((CLMGeo.CMGeoPoint)(mCheckedGeoPoin[i])).Height
                                                  , ((CLMGeo.CMCheckedGeoPoint)(mCheckedGeoPoin[i])).Description
                                                  );
                        sw.WriteLine(sGeoPoint);
                        TextResult.Text += sGeoPoint + " \r\n";
                    }
                    sw.Close();
                }
            }
            //
        }