当前位置: 首页>>代码示例>>C#>>正文


C# GeoCoord.ToString方法代码示例

本文整理汇总了C#中LibGeo.GeoCoord.ToString方法的典型用法代码示例。如果您正苦于以下问题:C# GeoCoord.ToString方法的具体用法?C# GeoCoord.ToString怎么用?C# GeoCoord.ToString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在LibGeo.GeoCoord的用法示例。


在下文中一共展示了GeoCoord.ToString方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: DlgFavoritesAddTo

        // closest is SortedList of string (name) by key=double (distance meters)
        public DlgFavoritesAddTo(CamPos camPos, SortedList closest, MenuItem parentMenuItem, EventHandler eventHandler)
        {
            m_camPos = camPos;
            m_parentMenuItem = parentMenuItem;
            m_eventHandler = eventHandler;

            InitializeComponent();

            GeoCoord loc = new GeoCoord(m_camPos);

            Distance camHD = new Distance(m_camPos.H);
            int unitsCompl = camHD.UnitsCompl;
            locationLabel.Text = "Location: " + loc.ToString() + " / Camera at " + camHD.ToString(unitsCompl);
            nameComboBox.Text = m_camPos.Name;
            for(int i=0; i < closest.Count && i < 20 ;i++)
            {
                string name = ((LiveObject)closest.GetByIndex(i)).Name;
                nameComboBox.Items.Add(name);
            }
            Project.setDlgIcon(this);
        }
开发者ID:slgrobotics,项目名称:QuakeMap,代码行数:22,代码来源:DlgFavoritesAddTo.cs

示例2: Tile

        private bool m_triedReload = false; // limits reload attempts

        #endregion Fields

        #region Constructors

        public Tile(TileSet ts, string tileScale, GeoCoord topLeft, GeoCoord bottomRight)
        {
            m_tileSet = ts;
            m_tileScale = tileScale;
            m_topLeft = topLeft.Clone();
            m_bottomRight = bottomRight.Clone();
            #if DEBUG
            LibSys.StatusBar.Trace("Tile() topLeft=" + m_topLeft.ToString() + " bottomRight=" + m_bottomRight.ToString());
            #endif
        }
开发者ID:slgrobotics,项目名称:QuakeMap,代码行数:16,代码来源:Tile.cs

示例3: setCoordFields

        protected void setCoordFields(GeoCoord location)
        {
            speedLabel.Visible = false;
            speedTextBox.Visible = false;
            speedUnitsLabel.Visible = false;

            m_cameraManager.MarkLocation(location, 0);

            if(Project.coordStyle == 3)		// UTM?
            {
                coordFormatLabel.Text = "type like\r\n11S 432345E 3712345N";
                latLabel.Text = "* UTM:";
                lngLabel.Visible = false;
                longitudeTextBox.Visible = false;

                latitudeTextBox.Text = m_latText = location.ToString();
                m_lngText = longitudeTextBox.Text;	// will be a part of comparison later
            }
            else
            {
                coordFormatLabel.Text = "type like 117,33.355 -\r\nfirst comma, then dot";
                latLabel.Text = "* Latitude:";
                lngLabel.Visible = true;
                longitudeTextBox.Visible = true;

                latitudeTextBox.Text = m_latText = "" + GeoCoord.latToString(location.Lat, Project.coordStyle, true, true);
                longitudeTextBox.Text = m_lngText = "" + GeoCoord.lngToString(location.Lng, Project.coordStyle, true, true);
            }
            Distance elevDist = new Distance(location.Elev);
            int unitsCompl = elevDist.UnitsCompl;
            elevationTextBox.Text = m_elevText = elevDist.toStringN(unitsCompl);
            elevationUnitsLabel.Text = elevDist.toStringU(unitsCompl);
        }
开发者ID:slgrobotics,项目名称:QuakeMap,代码行数:33,代码来源:DlgMakeWaypoint.cs

示例4: DlgFavoritesOrganize

        public DlgFavoritesOrganize(CameraManager cameraManager)
        {
            m_cameraManager = cameraManager;

            InitializeComponent();

            makeFavoritesDataSet();
            makeDataGridTableStyle();

            int id = 0;
            foreach(CamPos camPos in Project.favorites)
            {
                GeoCoord loc = new GeoCoord(camPos);
                string sLoc = loc.ToString() + "  /  " + loc.heightToString();

                object[] values = new Object[7];
                values[0] = camPos.Name;
                values[1] = camPos.Lat;
                values[2] = camPos.Lng;
                values[3] = camPos.Elev;
                values[4] = sLoc;
                values[5] = id++;
                values[6] = camPos.Type;

                favoritesDataSet.Tables["favoritesTable"].LoadDataRow(values, true);
            }

            favoritesDataGrid.TableStyles.Add(this.dataGridTableStyle);
            favoritesDataGrid.SetDataBinding(favoritesDataSet, "favoritesTable");
            //no adding of new rows thru dataview...
            CurrencyManager cm = (CurrencyManager)this.BindingContext[favoritesDataGrid.DataSource, favoritesDataGrid.DataMember];
            ((DataView)cm.List).AllowNew = false;
            Project.setDlgIcon(this);
        }
开发者ID:slgrobotics,项目名称:QuakeMap,代码行数:34,代码来源:DlgFavoritesOrganize.cs


注:本文中的LibGeo.GeoCoord.ToString方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。