本文整理汇总了C#中Distance.toStringN方法的典型用法代码示例。如果您正苦于以下问题:C# Distance.toStringN方法的具体用法?C# Distance.toStringN怎么用?C# Distance.toStringN使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Distance
的用法示例。
在下文中一共展示了Distance.toStringN方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: setCoordTextBoxes
private void setCoordTextBoxes()
{
m_cameraManager.MarkLocation(m_cameraManager.Location, 0);
if(Project.coordStyle == 3) // UTM?
{
coordFormatLabel.Text = "type like 11S 432345E 3712345N";
latLabel.Text = "UTM:";
lngLabel.Visible = false;
longitudeTextBox.Visible = false;
latitudeTextBox.Text = m_cameraManager.Location.ToString();
}
else
{
coordFormatLabel.Text = (Project.coordStyle == 0) ?
"type like 117,33'35 - first comma, then quote"
: "type like 117,33.355 - first comma, then dot";
latLabel.Text = "Latitude:";
lngLabel.Visible = true;
longitudeTextBox.Visible = true;
latitudeTextBox.Text = "" + GeoCoord.latToString(m_cameraManager.Location.Lat, Project.coordStyle, true, true);
longitudeTextBox.Text = "" + GeoCoord.lngToString(m_cameraManager.Location.Lng, Project.coordStyle, true, true);
}
Distance elevDist = new Distance(m_cameraManager.Location.Elev);
int unitsCompl = elevDist.UnitsCompl;
elevationTextBox.Text = elevDist.toStringN(unitsCompl);
elevationUnitsLabel.Text = elevDist.toStringU(unitsCompl);
}
示例2: 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);
}
示例3: setFields
protected void setFields()
{
Distance elevDist = new Distance(altitude);
int elevUnitsCompl = elevDist.UnitsCompl;
elevationTextBox.Text = elevDist.toStringN(elevUnitsCompl);
elevationUnitsLabel.Text = elevDist.toStringU(elevUnitsCompl);
Speed speedDist = new Speed(speed);
int speedUnits = speedDist.Units;
speedTextBox.Text = speedDist.toStringN(speedUnits);
speedUnitsLabel.Text = speedDist.toStringU(speedUnits);
}