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


C# City.getName方法代码示例

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


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

示例1: PrintAddedCity

 /// <summary>
 /// Print information about the new city that was found
 /// </summary>
 /// <param name="city"></param>
 /// <param name="cityInfo"></param>
 public void PrintAddedCity(City city, CityInfo cityInfo)
 {
     PrintBreak();
     textBox.Dispatcher.Invoke(
         new Action(delegate()
             {
                 textBox.Text += string.Format("Add new city: {0}\n",
                     city.getName());
                 textBox.Text += string.Format("Distance from start: {0:0.##}\n",
                     cityInfo.FromStart);
                 textBox.Text += string.Format("Estimated path length: {0:0.##}\n",
                     cityInfo.PathDistance);
             }),
         DispatcherPriority.Normal, null);
 }
开发者ID:NikolaiSamteladze,项目名称:PathFinder,代码行数:20,代码来源:LogManager.cs

示例2: PrintBestCity

 /// <summary>
 /// Print information about the best city to explore next
 /// </summary>
 /// <param name="city"></param>
 /// <param name="cityInfo"></param>
 public void PrintBestCity(City city, CityInfo cityInfo)
 {
     PrintLineBreak();
     textBox.Dispatcher.Invoke(
         new Action(delegate()
             {
                 textBox.Text += string.Format("Next city to explore: {0}\n",
                     city.getName());
                 textBox.Text += string.Format("Estimated path distance: {0:0.##}\n",
                     cityInfo.PathDistance);
             }),
         DispatcherPriority.Normal, null);
 }
开发者ID:NikolaiSamteladze,项目名称:PathFinder,代码行数:18,代码来源:LogManager.cs

示例3: PrintStartAlg

 /// <summary>
 /// Print start message
 /// </summary>
 /// <param name="startCity"></param>
 /// <param name="finalCity"></param>
 /// <param name="heuristic"></param>
 public void PrintStartAlg(City startCity, City finalCity,
     Heuristic heuristic)
 {
     textBox.Dispatcher.Invoke(
         new Action(delegate()
             {
                 textBox.Text += "--== Starting A-star algorithm ==--\n";
                 PrintBreak();
                 if (heuristic == Heuristic.Distance)
                 {
                     textBox.Text += string.Format("Used heuristic: Minimum Distance\n");
                 }
                 else if (heuristic == Heuristic.Hops)
                 {
                     textBox.Text += string.Format("Used heuristic: Minimum Hops\n");
                 }
                 textBox.Text += string.Format("Start city: {0}\n",
                     startCity.getName());
                 textBox.Text += string.Format("Final city: {0}\n",
                     finalCity.getName());
             }),
         DispatcherPriority.Normal, null);
 }
开发者ID:NikolaiSamteladze,项目名称:PathFinder,代码行数:29,代码来源:LogManager.cs

示例4: PrintUpdatedCity

 /// <summary>
 /// Print information about the city that was updated
 /// </summary>
 /// <param name="city"></param>
 /// <param name="newCityInfo"></param>
 /// <param name="oldCityInfo"></param>
 public void PrintUpdatedCity(City city, CityInfo newCityInfo,
     CityInfo oldCityInfo)
 {
     PrintBreak();
     textBox.Dispatcher.Invoke(
         new Action(delegate()
         {
             textBox.Text += string.Format("Update city (shorter path): {0}\n",
                 city.getName());
             textBox.Text += string.Format("Old distance from start: {0:0.##}\n",
                 oldCityInfo.FromStart);
             textBox.Text += string.Format("New distance from start: {0:0.##}\n",
                 newCityInfo.FromStart);
             textBox.Text += string.Format("Estimated path length: {0:0.##}\n",
                 newCityInfo.PathDistance);
         }),
         DispatcherPriority.Normal, null);
 }
开发者ID:NikolaiSamteladze,项目名称:PathFinder,代码行数:24,代码来源:LogManager.cs

示例5: PrintRejectedCity

 /// <summary>
 /// Print information about the city that was rejected
 /// </summary>
 /// <param name="city"></param>
 /// <param name="newCityInfo"></param>
 /// <param name="oldCityInfo"></param>
 public void PrintRejectedCity(City city, CityInfo newCityInfo,
     CityInfo oldCityInfo)
 {
     PrintBreak();
     textBox.Dispatcher.Invoke(
         new Action(delegate()
         {
             textBox.Text += string.Format("Reject city (already visited): {0}\n",
                 city.getName());
             textBox.Text += string.Format("Old distance from start: {0:0.##}\n",
                 oldCityInfo.FromStart);
             textBox.Text += string.Format("New distance from start: {0:0.##}\n",
                 newCityInfo.FromStart);
         }),
         DispatcherPriority.Normal, null);
 }
开发者ID:NikolaiSamteladze,项目名称:PathFinder,代码行数:22,代码来源:LogManager.cs


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