شركة التطبيقات المتكاملة لتصميم النظم البرمجية الخاصة ش.ش.و.

Integrated Applications Programming Company

Skip Navigation LinksHome » Code Library » ApplicationInformation

Public general use code classes and xml files that we've compiled and used over the years:

ApplicationInformation Support class for TentPlay Trek data model

   1:  using System;
   2:  using System.Collections.Generic;
   3:  using System.Linq;
   4:  using System.Text.RegularExpressions;
   5:  using System.Xml.Linq;
   6:  using System.IO;
   7:  using System.Reflection;
   8:  using System.Web;
   9:   
  10:  namespace Ia.TentPlay.Cl.Model.Data.Trek
  11:  {
  12:      ////////////////////////////////////////////////////////////////////////////
  13:   
  14:      /// <summary publish="true">
  15:      /// ApplicationInformation Support class for TentPlay Trek data model
  16:      /// </summary>
  17:      /// 
  18:      /// <remarks> 
  19:      /// Copyright © 2006-2018 Jasem Y. Al-Shamlan (info@ia.com.kw), Integrated Applications - Kuwait. All Rights Reserved.
  20:      ///
  21:      /// This library is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by
  22:      /// the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
  23:      ///
  24:      /// This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
  25:      /// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
  26:      /// 
  27:      /// You should have received a copy of the GNU General Public License along with this library. If not, see http://www.gnu.org/licenses.
  28:      /// 
  29:      /// Copyright notice: This notice may not be removed or altered from any source distribution.
  30:      /// </remarks> 
  31:      public class ApplicationInformation
  32:      {
  33:          private static XDocument xDocument;
  34:          private static List<Country> countryList;
  35:          private static List<Translation> translationList;
  36:   
  37:          ////////////////////////////////////////////////////////////////////////////
  38:   
  39:          /// <summary>
  40:          ///
  41:          /// </summary>
  42:          public ApplicationInformation() { }
  43:   
  44:          ////////////////////////////////////////////////////////////////////////////
  45:          ////////////////////////////////////////////////////////////////////////////
  46:   
  47:          /// <summary>
  48:          ///
  49:          /// </summary>
  50:          public class Country
  51:          {
  52:              private List<Ia.TentPlay.Cl.Model.Data.Trek.ApplicationInformation.Translation> translationList;
  53:   
  54:              /// <summary/>
  55:              public Country() { }
  56:   
  57:              /// <summary/>
  58:              public string Iso2 { get; set; }
  59:   
  60:              /// <summary/>
  61:              public string Name { get; set; }
  62:   
  63:              /// <summary/>
  64:              public Dictionary<string, string> NameDictionary { get; set; }
  65:   
  66:              /// <summary/>
  67:              public string ManifestPackagePrefix { get; set; }
  68:   
  69:              /// <summary/>
  70:              public Dictionary<string, string> ApplicationNameDictionary { get; set; }
  71:   
  72:              /// <summary/>
  73:              public string WhatsNew { get; set; }
  74:   
  75:              /// <summary/>
  76:              public string VersionName { get; set; }
  77:   
  78:              /// <summary/>
  79:              public string CopyrightYear { get; set; }
  80:   
  81:              /// <summary/>
  82:              public string ManifestPackage { get; set; }
  83:   
  84:              /// <summary/>
  85:              public string ApplicationUrl { get; set; }
  86:   
  87:              /// <summary/>
  88:              public string GoogleMapsDebugApiKey { get; set; }
  89:   
  90:              /// <summary/>
  91:              public string GoogleMapsProductionApiKey { get; set; }
  92:   
  93:              /// <summary/>
  94:              public string GoogleAdMobAdUnitDebugId { get; set; }
  95:   
  96:              /// <summary/>
  97:              public string GoogleAdMobAppId { get; set; }
  98:   
  99:              /// <summary/>
 100:              public string GoogleAdMobAdUnitProductionId { get; set; }
 101:   
 102:              /// <summary/>
 103:              public DateTime Published { get; set; }
 104:   
 105:              /// <summary/>
 106:              public int FeatureCount { get; set; }
 107:   
 108:              /// <summary/>
 109:              public int AdministrativeFeatureCount { get; set; }
 110:   
 111:              /// <summary/>
 112:              public int PopulatedFeatureCount { get; set; }
 113:   
 114:              /// <summary/>
 115:              public int VegetationFeatureCount { get; set; }
 116:   
 117:              /// <summary/>
 118:              public int LocalityFeatureCount { get; set; }
 119:   
 120:              /// <summary/>
 121:              public int UnderseaFeatureCount { get; set; }
 122:   
 123:              /// <summary/>
 124:              public int StreetFeatureCount { get; set; }
 125:   
 126:              /// <summary/>
 127:              public int HypsographicFeatureCount { get; set; }
 128:   
 129:              /// <summary/>
 130:              public int HydrographicFeatureCount { get; set; }
 131:   
 132:              /// <summary/>
 133:              public int SpotFeatureCount { get; set; }
 134:   
 135:              /// <summary/>
 136:              public string ColorPrimary { get; set; }
 137:   
 138:              /// <summary/>
 139:              public string ColorPrimaryDark { get; set; }
 140:   
 141:              /// <summary/>
 142:              public string ColorAccent { get; set; }
 143:   
 144:              /// <summary/>
 145:              public bool LanguageListMatchesTranslationList
 146:              {
 147:                  get
 148:                  {
 149:                      bool b;
 150:   
 151:                      if (Languages != null && Translations != null)
 152:                      {
 153:                          b = Languages.All(u => Translations.Any(y => y.Iso6391 == u.Iso6391)) && Translations.All(u => Languages.Any(y => y.Iso6391 == u.Iso6391)) && Languages.Count == Translations.Count;
 154:                      }
 155:                      else b = false;
 156:   
 157:                      return b;
 158:                  }
 159:              }
 160:   
 161:              /// <summary/>
 162:              public virtual List<Image> NavigationHeaderImages { get; set; }
 163:   
 164:              /// <summary/>
 165:              public virtual List<Ia.Cl.Model.Language> Languages { get; set; }
 166:   
 167:              /// <summary/>
 168:              public virtual ICollection<Translation> Translations
 169:              {
 170:                  get
 171:                  {
 172:                      if (translationList == null || translationList.Count == 0)
 173:                      {
 174:                          translationList = TranslationList(this);
 175:                      }
 176:   
 177:                      return translationList;
 178:                  }
 179:              }
 180:   
 181:              ////////////////////////////////////////////////////////////////////////////
 182:   
 183:              /// <summary>
 184:              ///
 185:              /// </summary>
 186:              public string FeatureGraphicImageUrl
 187:              {
 188:                  get
 189:                  {
 190:                      return "https://cdn.tentplay.com/trek/country/" + this.Iso2 + @"/images/feature-graphic.png";
 191:                  }
 192:              }
 193:   
 194:              ////////////////////////////////////////////////////////////////////////////
 195:   
 196:              /// <summary>
 197:              ///
 198:              /// </summary>
 199:              public string PromoGraphicImageUrl
 200:              {
 201:                  get
 202:                  {
 203:                      return "https://cdn.tentplay.com/trek/country/" + this.Iso2 + @"/images/promo-graphic.png";
 204:                  }
 205:              }
 206:   
 207:              ////////////////////////////////////////////////////////////////////////////
 208:   
 209:              /// <summary>
 210:              ///
 211:              /// </summary>
 212:              public string HiResIconImageUrl
 213:              {
 214:                  get
 215:                  {
 216:                      return "https://cdn.tentplay.com/trek/country/" + this.Iso2 + @"/images/hi-res-icon.png";
 217:                  }
 218:              }
 219:   
 220:              ////////////////////////////////////////////////////////////////////////////
 221:              ////////////////////////////////////////////////////////////////////////////
 222:   
 223:              /// <summary>
 224:              ///
 225:              /// </summary>
 226:              public string MipMapLdpiIcLauncherImage
 227:              {
 228:                  get
 229:                  {
 230:                      return MipMapXIcLauncherImage("ldpi");
 231:                  }
 232:              }
 233:   
 234:              ////////////////////////////////////////////////////////////////////////////
 235:   
 236:              /// <summary>
 237:              ///
 238:              /// </summary>
 239:              public string MipMapMdpiIcLauncherImage
 240:              {
 241:                  get
 242:                  {
 243:                      return MipMapXIcLauncherImage("mdpi");
 244:                  }
 245:              }
 246:   
 247:              ////////////////////////////////////////////////////////////////////////////
 248:   
 249:              /// <summary>
 250:              ///
 251:              /// </summary>
 252:              public string MipMapHdpiIcLauncherImage
 253:              {
 254:                  get
 255:                  {
 256:                      return MipMapXIcLauncherImage("hdpi");
 257:                  }
 258:              }
 259:   
 260:              ////////////////////////////////////////////////////////////////////////////
 261:   
 262:              /// <summary>
 263:              ///
 264:              /// </summary>
 265:              public string MipMapXhdpiIcLauncherImage
 266:              {
 267:                  get
 268:                  {
 269:                      return MipMapXIcLauncherImage("xhdpi");
 270:                  }
 271:              }
 272:   
 273:              ////////////////////////////////////////////////////////////////////////////
 274:   
 275:              /// <summary>
 276:              ///
 277:              /// </summary>
 278:              public string MipMapXxhdpiIcLauncherImage
 279:              {
 280:                  get
 281:                  {
 282:                      return MipMapXIcLauncherImage("xxhdpi");
 283:                  }
 284:              }
 285:   
 286:              ////////////////////////////////////////////////////////////////////////////
 287:   
 288:              /// <summary>
 289:              ///
 290:              /// </summary>
 291:              public string MipMapXxxhdpiIcLauncherImage
 292:              {
 293:                  get
 294:                  {
 295:                      return MipMapXIcLauncherImage("xxxhdpi");
 296:                  }
 297:              }
 298:   
 299:              ////////////////////////////////////////////////////////////////////////////
 300:   
 301:              /// <summary>
 302:              ///
 303:              /// </summary>
 304:              public string MipMapXIcLauncherImage(string x)
 305:              {
 306:                  return "https://cdn.tentplay.com/trek/country/" + this.Iso2 + @"/images/mipmap-" + x + "/ic_launcher.png";
 307:              }
 308:   
 309:              ////////////////////////////////////////////////////////////////////////////
 310:              ////////////////////////////////////////////////////////////////////////////
 311:   
 312:              /// <summary>
 313:              ///
 314:              /// </summary>
 315:              public string MipMapLdpiSplashScreenImage
 316:              {
 317:                  get
 318:                  {
 319:                      return MipMapXSplashScreenImage("ldpi");
 320:                  }
 321:              }
 322:   
 323:              ////////////////////////////////////////////////////////////////////////////
 324:   
 325:              /// <summary>
 326:              ///
 327:              /// </summary>
 328:              public string MipMapMdpiSplashScreenImage
 329:              {
 330:                  get
 331:                  {
 332:                      return MipMapXSplashScreenImage("mdpi");
 333:                  }
 334:              }
 335:   
 336:              ////////////////////////////////////////////////////////////////////////////
 337:   
 338:              /// <summary>
 339:              ///
 340:              /// </summary>
 341:              public string MipMapHdpiSplashScreenImage
 342:              {
 343:                  get
 344:                  {
 345:                      return MipMapXSplashScreenImage("hdpi");
 346:                  }
 347:              }
 348:   
 349:              ////////////////////////////////////////////////////////////////////////////
 350:   
 351:              /// <summary>
 352:              ///
 353:              /// </summary>
 354:              public string MipMapXhdpiSplashScreenImage
 355:              {
 356:                  get
 357:                  {
 358:                      return MipMapXSplashScreenImage("xhdpi");
 359:                  }
 360:              }
 361:   
 362:              ////////////////////////////////////////////////////////////////////////////
 363:   
 364:              /// <summary>
 365:              ///
 366:              /// </summary>
 367:              public string MipMapXxhdpiSplashScreenImage
 368:              {
 369:                  get
 370:                  {
 371:                      return MipMapXSplashScreenImage("xxhdpi");
 372:                  }
 373:              }
 374:   
 375:              ////////////////////////////////////////////////////////////////////////////
 376:   
 377:              /// <summary>
 378:              ///
 379:              /// </summary>
 380:              public string MipMapXxxhdpiSplashScreenImage
 381:              {
 382:                  get
 383:                  {
 384:                      return MipMapXSplashScreenImage("xxxhdpi");
 385:                  }
 386:              }
 387:   
 388:              ////////////////////////////////////////////////////////////////////////////
 389:   
 390:              /// <summary>
 391:              ///
 392:              /// </summary>
 393:              public string MipMapXSplashScreenImage(string x)
 394:              {
 395:                  return "https://cdn.tentplay.com/trek/country/" + this.Iso2 + @"/images/mipmap-" + x + "/splash_screen.png";
 396:              }
 397:   
 398:              ////////////////////////////////////////////////////////////////////////////    
 399:              ////////////////////////////////////////////////////////////////////////////
 400:   
 401:              /// <summary>
 402:              ///
 403:              /// </summary>
 404:              public string StoreListingSampleScreenCapture1Image
 405:              {
 406:                  get
 407:                  {
 408:                      return StoreListingSampleScreenCaptureXImage(1);
 409:                  }
 410:              }
 411:   
 412:              ////////////////////////////////////////////////////////////////////////////
 413:   
 414:              /// <summary>
 415:              ///
 416:              /// </summary>
 417:              public string StoreListingSampleScreenCapture2Image
 418:              {
 419:                  get
 420:                  {
 421:                      return StoreListingSampleScreenCaptureXImage(2);
 422:                  }
 423:              }
 424:   
 425:              ////////////////////////////////////////////////////////////////////////////
 426:   
 427:              /// <summary>
 428:              ///
 429:              /// </summary>
 430:              public string StoreListingSampleScreenCapture3Image
 431:              {
 432:                  get
 433:                  {
 434:                      return StoreListingSampleScreenCaptureXImage(3);
 435:                  }
 436:              }
 437:   
 438:              ////////////////////////////////////////////////////////////////////////////
 439:   
 440:              /// <summary>
 441:              ///
 442:              /// </summary>
 443:              public string StoreListingSampleScreenCapture4Image
 444:              {
 445:                  get
 446:                  {
 447:                      return StoreListingSampleScreenCaptureXImage(4);
 448:                  }
 449:              }
 450:   
 451:              ////////////////////////////////////////////////////////////////////////////
 452:   
 453:              /// <summary>
 454:              ///
 455:              /// </summary>
 456:              public string StoreListingSampleScreenCapture5Image
 457:              {
 458:                  get
 459:                  {
 460:                      return StoreListingSampleScreenCaptureXImage(5);
 461:                  }
 462:              }
 463:   
 464:              ////////////////////////////////////////////////////////////////////////////
 465:   
 466:              /// <summary>
 467:              ///
 468:              /// </summary>
 469:              public string StoreListingSampleScreenCapture6Image
 470:              {
 471:                  get
 472:                  {
 473:                      return StoreListingSampleScreenCaptureXImage(6);
 474:                  }
 475:              }
 476:   
 477:              ////////////////////////////////////////////////////////////////////////////
 478:   
 479:              /// <summary>
 480:              ///
 481:              /// </summary>
 482:              public string StoreListingSampleScreenCapture7Image
 483:              {
 484:                  get
 485:                  {
 486:                      return StoreListingSampleScreenCaptureXImage(7);
 487:                  }
 488:              }
 489:   
 490:              ////////////////////////////////////////////////////////////////////////////
 491:   
 492:              /// <summary>
 493:              ///
 494:              /// </summary>
 495:              public string StoreListingSampleScreenCapture8Image
 496:              {
 497:                  get
 498:                  {
 499:                      return StoreListingSampleScreenCaptureXImage(8);
 500:                  }
 501:              }
 502:   
 503:              ////////////////////////////////////////////////////////////////////////////
 504:   
 505:              /// <summary>
 506:              ///
 507:              /// </summary>
 508:              public string StoreListingSampleScreenCaptureXImage(int i)
 509:              {
 510:                  return "https://cdn.tentplay.com/trek/country/" + this.Iso2 + @"/images/" + i + ".png";
 511:              }
 512:   
 513:              ////////////////////////////////////////////////////////////////////////////    
 514:              ////////////////////////////////////////////////////////////////////////////    
 515:          }
 516:   
 517:          ////////////////////////////////////////////////////////////////////////////    
 518:   
 519:          public class Image
 520:          {
 521:              /// <summary/>
 522:              //public string Caption { get; set; }
 523:   
 524:              /// <summary/>
 525:              //public string Photographer { get; set; }
 526:   
 527:              /// <summary/>
 528:              //public string Source { get; set; }
 529:   
 530:              /// <summary/>
 531:              public string AndroidFileName { get; set; }
 532:   
 533:              /// <summary/>
 534:              public string FileName { get; set; }
 535:          }
 536:   
 537:          ////////////////////////////////////////////////////////////////////////////    
 538:   
 539:          public class Translation
 540:          {
 541:              /// <summary/>
 542:              public Translation() { }
 543:   
 544:              /// <summary/>
 545:              public string CountryIso2 { get; set; }
 546:              /// <summary/>
 547:              public string Iso6391 { get; set; }
 548:              /// <summary/>
 549:              public string SiteName { get; set; }
 550:              /// <summary/>
 551:              public string CompanyName { get; set; }
 552:              /// <summary/>
 553:              public string ShortDescription { get; set; }
 554:              /// <summary/>
 555:              public string LongDescription { get; set; }
 556:   
 557:              /// <summary/>
 558:              public string About { get; set; }
 559:              /// <summary/>
 560:              public string AboutTitle { get; set; }
 561:              /// <summary/>
 562:              public string SearchSearchHint { get; set; }
 563:              /// <summary/>
 564:              public string Statistic { get; set; }
 565:              /// <summary/>
 566:              public string StatisticTitle { get; set; }
 567:              /// <summary/>
 568:              public string Setting { get; set; }
 569:              /// <summary/>
 570:              public string SettingTitle { get; set; }
 571:   
 572:              /// <summary/>
 573:              public string ShareTitle { get; set; }
 574:              /// <summary/>
 575:              public string ShareApplication { get; set; }
 576:              /// <summary/>
 577:              public string ShareTrek { get; set; }
 578:              /// <summary/>
 579:              public string ShareNoEmailClientInstalled { get; set; }
 580:              /// <summary/>
 581:              public string ShareContactUs { get; set; }
 582:   
 583:              /// <summary/>
 584:              public string HelpFeedbackTitle { get; set; }
 585:              /// <summary/>
 586:              public string Help { get; set; }
 587:              /// <summary/>
 588:              public string HelpTitle { get; set; }
 589:              /// <summary/>
 590:              public string HelpMagnifiyingGlass { get; set; }
 591:              /// <summary/>
 592:              public string HelpMainListOrder { get; set; }
 593:              /// <summary/>
 594:              public string HelpMapType { get; set; }
 595:              /// <summary/>
 596:              public string HelpGoogleMapRoute { get; set; }
 597:              /// <summary/>
 598:              public string HelpGoogleMapMarker { get; set; }
 599:              /// <summary/>
 600:              public string Feedback { get; set; }
 601:              /// <summary/>
 602:              public string FeedbackTitle { get; set; }
 603:              /// <summary/>
 604:              public string FeedbackEmailSubject { get; set; }
 605:   
 606:              /// <summary/>
 607:              public string Legal { get; set; }
 608:              /// <summary/>
 609:              public string LegalTitle { get; set; }
 610:              /// <summary/>
 611:              public string FeatureClassName { get; set; }
 612:              /// <summary/>
 613:              public string FeatureClassCaption { get; set; }
 614:              /// <summary/>
 615:              public string FeatureClassDescription { get; set; }
 616:              /// <summary/>
 617:              public string FeatureClassAdministrativeName { get; set; }
 618:              /// <summary/>
 619:              public string FeatureClassAdministrativeCaption { get; set; }
 620:              /// <summary/>
 621:              public string FeatureClassAdministrativeClassId { get; set; }
 622:              /// <summary/>
 623:              public string FeatureClassAdministrativeDescription { get; set; }
 624:              /// <summary/>
 625:              public string FeatureClassPopulatedName { get; set; }
 626:              /// <summary/>
 627:              public string FeatureClassPopulatedCaption { get; set; }
 628:              /// <summary/>
 629:              public string FeatureClassPopulatedClassId { get; set; }
 630:              /// <summary/>
 631:              public string FeatureClassPopulatedDescription { get; set; }
 632:              /// <summary/>
 633:              public string FeatureClassVegetationName { get; set; }
 634:              /// <summary/>
 635:              public string FeatureClassVegetationCaption { get; set; }
 636:              /// <summary/>
 637:              public string FeatureClassVegetationClassId { get; set; }
 638:              /// <summary/>
 639:              public string FeatureClassVegetationDescription { get; set; }
 640:              /// <summary/>
 641:              public string FeatureClassLocalityName { get; set; }
 642:              /// <summary/>
 643:              public string FeatureClassLocalityCaption { get; set; }
 644:              /// <summary/>
 645:              public string FeatureClassLocalityClassId { get; set; }
 646:              /// <summary/>
 647:              public string FeatureClassLocalityDescription { get; set; }
 648:              /// <summary/>
 649:              public string FeatureClassUnderseaName { get; set; }
 650:              /// <summary/>
 651:              public string FeatureClassUnderseaCaption { get; set; }
 652:              /// <summary/>
 653:              public string FeatureClassUnderseaClassId { get; set; }
 654:              /// <summary/>
 655:              public string FeatureClassUnderseaDescription { get; set; }
 656:              /// <summary/>
 657:              public string FeatureClassStreetName { get; set; }
 658:              /// <summary/>
 659:              public string FeatureClassStreetCaption { get; set; }
 660:              /// <summary/>
 661:              public string FeatureClassStreetClassId { get; set; }
 662:              /// <summary/>
 663:              public string FeatureClassStreetDescription { get; set; }
 664:              /// <summary/>
 665:              public string FeatureClassHypsographicName { get; set; }
 666:              /// <summary/>
 667:              public string FeatureClassHypsographicCaption { get; set; }
 668:              /// <summary/>
 669:              public string FeatureClassHypsographicClassId { get; set; }
 670:              /// <summary/>
 671:              public string FeatureClassHypsographicDescription { get; set; }
 672:              /// <summary/>
 673:              public string FeatureClassHydrographicName { get; set; }
 674:              /// <summary/>
 675:              public string FeatureClassHydrographicCaption { get; set; }
 676:              /// <summary/>
 677:              public string FeatureClassHydrographicClassId { get; set; }
 678:              /// <summary/>
 679:              public string FeatureClassHydrographicDescription { get; set; }
 680:              /// <summary/>
 681:              public string FeatureClassSpotName { get; set; }
 682:              /// <summary/>
 683:              public string FeatureClassSpotCaption { get; set; }
 684:              /// <summary/>
 685:              public string FeatureClassSpotClassId { get; set; }
 686:              /// <summary/>
 687:              public string FeatureClassSpotDescription { get; set; }
 688:              /// <summary/>
 689:              public virtual ICollection<Country> Countries
 690:              {
 691:                  get
 692:                  {
 693:                      return (from c in CountryList where c.Languages.Any(u => u.Iso6391 == this.Iso6391) select c).ToList();
 694:                  }
 695:              }
 696:              /// <summary/>
 697:              public List<Ia.TentPlay.Cl.Model.Business.Trek.FeatureClass> FeatureClassList
 698:              {
 699:                  get
 700:                  {
 701:                      Ia.TentPlay.Cl.Model.Business.Trek.FeatureClass fc;
 702:                      List<Ia.TentPlay.Cl.Model.Business.Trek.FeatureClass> list;
 703:   
 704:                      list = new List<Ia.TentPlay.Cl.Model.Business.Trek.FeatureClass>();
 705:   
 706:                      fc = new Ia.TentPlay.Cl.Model.Business.Trek.FeatureClass();
 707:   
 708:                      fc.Id = this.FeatureClassAdministrativeClassId;
 709:                      fc.Name = this.FeatureClassAdministrativeName;
 710:                      fc.Caption = this.FeatureClassAdministrativeCaption;
 711:                      fc.Description = this.FeatureClassAdministrativeDescription;
 712:   
 713:                      list.Add(fc);
 714:   
 715:   
 716:                      fc = new Ia.TentPlay.Cl.Model.Business.Trek.FeatureClass();
 717:   
 718:                      fc.Id = this.FeatureClassPopulatedClassId;
 719:                      fc.Name = this.FeatureClassPopulatedName;
 720:                      fc.Caption = this.FeatureClassPopulatedCaption;
 721:                      fc.Description = this.FeatureClassPopulatedDescription;
 722:   
 723:                      list.Add(fc);
 724:   
 725:   
 726:                      fc = new Ia.TentPlay.Cl.Model.Business.Trek.FeatureClass();
 727:   
 728:                      fc.Id = this.FeatureClassVegetationClassId;
 729:                      fc.Name = this.FeatureClassVegetationName;
 730:                      fc.Caption = this.FeatureClassVegetationCaption;
 731:                      fc.Description = this.FeatureClassVegetationDescription;
 732:   
 733:                      list.Add(fc);
 734:   
 735:   
 736:                      fc = new Ia.TentPlay.Cl.Model.Business.Trek.FeatureClass();
 737:   
 738:                      fc.Id = this.FeatureClassLocalityClassId;
 739:                      fc.Name = this.FeatureClassLocalityName;
 740:                      fc.Caption = this.FeatureClassLocalityCaption;
 741:                      fc.Description = this.FeatureClassLocalityDescription;
 742:   
 743:                      list.Add(fc);
 744:   
 745:   
 746:                      fc = new Ia.TentPlay.Cl.Model.Business.Trek.FeatureClass();
 747:   
 748:                      fc.Id = this.FeatureClassUnderseaClassId;
 749:                      fc.Name = this.FeatureClassUnderseaName;
 750:                      fc.Caption = this.FeatureClassUnderseaCaption;
 751:                      fc.Description = this.FeatureClassUnderseaDescription;
 752:   
 753:                      list.Add(fc);
 754:   
 755:   
 756:                      fc = new Ia.TentPlay.Cl.Model.Business.Trek.FeatureClass();
 757:   
 758:                      fc.Id = this.FeatureClassStreetClassId;
 759:                      fc.Name = this.FeatureClassStreetName;
 760:                      fc.Caption = this.FeatureClassStreetCaption;
 761:                      fc.Description = this.FeatureClassStreetDescription;
 762:   
 763:                      list.Add(fc);
 764:   
 765:   
 766:                      fc = new Ia.TentPlay.Cl.Model.Business.Trek.FeatureClass();
 767:   
 768:                      fc.Id = this.FeatureClassHypsographicClassId;
 769:                      fc.Name = this.FeatureClassHypsographicName;
 770:                      fc.Caption = this.FeatureClassHypsographicCaption;
 771:                      fc.Description = this.FeatureClassHypsographicDescription;
 772:   
 773:                      list.Add(fc);
 774:   
 775:   
 776:                      fc = new Ia.TentPlay.Cl.Model.Business.Trek.FeatureClass();
 777:   
 778:                      fc.Id = this.FeatureClassHydrographicClassId;
 779:                      fc.Name = this.FeatureClassHydrographicName;
 780:                      fc.Caption = this.FeatureClassHydrographicCaption;
 781:                      fc.Description = this.FeatureClassHydrographicDescription;
 782:   
 783:                      list.Add(fc);
 784:   
 785:   
 786:                      fc = new Ia.TentPlay.Cl.Model.Business.Trek.FeatureClass();
 787:   
 788:                      fc.Id = this.FeatureClassSpotClassId;
 789:                      fc.Name = this.FeatureClassSpotName;
 790:                      fc.Caption = this.FeatureClassSpotCaption;
 791:                      fc.Description = this.FeatureClassSpotDescription;
 792:   
 793:                      list.Add(fc);
 794:   
 795:                      return list;
 796:                  }
 797:              }
 798:          }
 799:   
 800:          ////////////////////////////////////////////////////////////////////////////
 801:   
 802:          /// <summary>
 803:          ///
 804:          /// </summary>
 805:          public static List<Ia.TentPlay.Cl.Model.Data.Trek.ApplicationInformation.Country> CountryList
 806:          {
 807:              get
 808:              {
 809:                  if (countryList == null || countryList.Count == 0)
 810:                  {
 811:                      if (HttpContext.Current != null && HttpContext.Current.Application["countryList"] != null)
 812:                      {
 813:                          countryList = (List<Country>)HttpContext.Current.Application["countryList"];
 814:                      }
 815:                      else
 816:                      {
 817:                          countryList = Ia.TentPlay.Cl.Model.Data.Trek.ApplicationInformation._CountryList;
 818:   
 819:                          if (HttpContext.Current != null) HttpContext.Current.Application["countryList"] = countryList;
 820:                      }
 821:                  }
 822:   
 823:                  return countryList;
 824:              }
 825:          }
 826:   
 827:          ////////////////////////////////////////////////////////////////////////////
 828:   
 829:          /// <summary>
 830:          ///
 831:          /// </summary>
 832:          private static List<Ia.TentPlay.Cl.Model.Data.Trek.ApplicationInformation.Country> _CountryList
 833:          {
 834:              get
 835:              {
 836:                  if (countryList == null || countryList.Count == 0)
 837:                  {
 838:                      Country country;
 839:   
 840:                      countryList = new List<Country>(100);
 841:   
 842:                      foreach (XElement x in XDocument.Element("applicationInformation").Element("countryList").Elements("country"))
 843:                      {
 844:                          country = new Country();
 845:                          country.Iso2 = x.Attribute("id").Value;
 846:   
 847:                          country.Name = (from c in Ia.Cl.Model.Country.List where c.Iso2 == country.Iso2.ToUpper() select c.Name).SingleOrDefault();
 848:                          country.NameDictionary = (from c in Ia.Cl.Model.Country.List where c.Iso2 == country.Iso2.ToUpper() select c.NameDictionary).SingleOrDefault();
 849:   
 850:                          country.ManifestPackagePrefix = x.Parent.Parent.Element("manifestPackagePrefix").Value;
 851:   
 852:                          country.GoogleMapsDebugApiKey = x.Parent.Parent.Element("googleMapsDebugApiKey").Value;
 853:                          country.GoogleAdMobAdUnitDebugId = x.Parent.Parent.Element("googleAdMobAdUnitDebugId").Value;
 854:   
 855:                          country.ApplicationNameDictionary = ApplicationNameDictionary(x);
 856:   
 857:                          country.WhatsNew = Regex.Replace(x.Parent.Parent.Element("googleStoreWhatsNew").Value.Trim(), @"\n[ ]+", "\n");
 858:   
 859:                          country.VersionName = x.Element("version").Attribute("name").Value;
 860:                          country.CopyrightYear = x.Element("version").Attribute("copyrightYear").Value;
 861:                          country.ManifestPackage = x.Element("manifestPackage").Value;
 862:   
 863:                          country.ApplicationUrl = ReplaceNameVariableWithName(Ia.TentPlay.Cl.Model.Data.CompanyInformation.ApplicationDownloadLink, country);
 864:   
 865:                          country.GoogleMapsProductionApiKey = x.Element("googleMapsProductionApiKey").Value;
 866:                          country.GoogleAdMobAppId = x.Element("googleAdMobAppId").Value;
 867:                          country.GoogleAdMobAdUnitProductionId = x.Element("googleAdMobAdUnitId").Value;
 868:   
 869:                          country.Published = (x.Element("version").Attribute("published") != null && x.Element("version").Attribute("published").Value != string.Empty) ? DateTime.Parse(x.Element("version").Attribute("published").Value) : DateTime.MinValue;
 870:   
 871:                          country.ColorPrimary = (from e in x.Element("colorTheme").Elements("color") where e.Attribute("name").Value == "colorPrimary" select e.Attribute("value").Value).SingleOrDefault();
 872:                          country.ColorPrimaryDark = (from e in x.Element("colorTheme").Elements("color") where e.Attribute("name").Value == "colorPrimaryDark" select e.Attribute("value").Value).SingleOrDefault();
 873:                          country.ColorAccent = (from e in x.Element("colorTheme").Elements("color") where e.Attribute("name").Value == "colorAccent" select e.Attribute("value").Value).SingleOrDefault();
 874:   
 875:                          country.NavigationHeaderImages = ApplicationImageList(x.Element("navigationHeader").Element("imageList"));
 876:   
 877:                          country.Languages = ApplicationLanguageList(country.Iso2, country.ApplicationNameDictionary);
 878:   
 879:                          countryList.Add(country);
 880:                      }
 881:                  }
 882:   
 883:                  return countryList.ToList();
 884:              }
 885:          }
 886:   
 887:          ////////////////////////////////////////////////////////////////////////////
 888:   
 889:          /// <summary>
 890:          ///
 891:          /// </summary>
 892:          public static void CountryStatisticCalcucation(ref Ia.TentPlay.Cl.Model.Data.Trek.ApplicationInformation.Country country)
 893:          {
 894:              int featureCount, administrative, populated, vegetation, locality, undersea, street, hypsographic, hydrographic, spot;
 895:              Ia.Cl.Model.Result result;
 896:   
 897:              Ia.TentPlay.Cl.Model.Data.Trek.Feature.Statistic(country.Iso2, out featureCount, out administrative, out populated, out vegetation, out locality, out undersea, out street, out hypsographic, out hydrographic, out spot, out result);
 898:   
 899:              country.FeatureCount = featureCount;
 900:              country.AdministrativeFeatureCount = administrative;
 901:              country.PopulatedFeatureCount = populated;
 902:              country.VegetationFeatureCount = vegetation;
 903:              country.LocalityFeatureCount = locality;
 904:              country.UnderseaFeatureCount = undersea;
 905:              country.StreetFeatureCount = street;
 906:              country.HypsographicFeatureCount = hypsographic;
 907:              country.HydrographicFeatureCount = hydrographic;
 908:              country.SpotFeatureCount = spot;
 909:          }
 910:   
 911:          ////////////////////////////////////////////////////////////////////////////
 912:   
 913:          /// <summary>
 914:          /// 
 915:          /// </summary>
 916:          private static Dictionary<string, string> ApplicationNameDictionary(XElement xElement)
 917:          {
 918:              XElement xe;
 919:              IEnumerable<XAttribute> list;
 920:              Dictionary<string, string> dictionary;
 921:   
 922:              dictionary = new Dictionary<string, string>();
 923:   
 924:              xe = xElement.Element("applicationName");
 925:   
 926:              if (xe.HasAttributes)
 927:              {
 928:                  list = xe.Attributes();
 929:   
 930:                  foreach (XAttribute xa in list)
 931:                  {
 932:                      dictionary.Add(xa.Name.LocalName, xa.Value);
 933:                  }
 934:              }
 935:   
 936:              return dictionary;
 937:          }
 938:   
 939:          ////////////////////////////////////////////////////////////////////////////
 940:   
 941:          /// <summary>
 942:          /// 
 943:          /// </summary>
 944:          private static List<Ia.Cl.Model.Language> ApplicationLanguageList(string fileCountry, Dictionary<string, string> countryApplicationNameDictionary)
 945:          {
 946:              List<Ia.Cl.Model.Language> list, countrySpokenLanguageList, featureDesignationLanguageList;
 947:   
 948:              list = new List<Ia.Cl.Model.Language>();
 949:   
 950:              if (fileCountry == "uk") fileCountry = "gb";
 951:   
 952:              countrySpokenLanguageList = (from c in Ia.Cl.Model.Country.List where c.Iso2 == fileCountry.ToUpper() select c.SpokenLanguageList).SingleOrDefault();
 953:   
 954:              featureDesignationLanguageList = Ia.TentPlay.Cl.Model.Data.Trek.FeatureDesignation.LanguageList;
 955:   
 956:              // make sure to select only languages defined in application title
 957:   
 958:              list = (from c in countrySpokenLanguageList
 959:                      join n in featureDesignationLanguageList on c.Symbol equals n.Symbol
 960:                      join cand in countryApplicationNameDictionary on n.Symbol equals cand.Key
 961:                      select c).ToList();
 962:   
 963:              // below: add English to all language lists for all countries
 964:              if (list.Find(u => u.Symbol == "en") == null) list.Add(Ia.Cl.Model.Language.List.Single(u => u.Symbol == "en"));
 965:   
 966:              return list;
 967:          }
 968:   
 969:          ////////////////////////////////////////////////////////////////////////////
 970:   
 971:          /// <summary>
 972:          /// 
 973:          /// </summary>
 974:          private static List<Image> ApplicationImageList(XElement imageList)
 975:          {
 976:              Image image;
 977:              List<Image> list;
 978:   
 979:              list = new List<Image>();
 980:   
 981:              foreach (XElement x in imageList.Elements("image"))
 982:              {
 983:                  image = new Image();
 984:   
 985:                  // Attribute
 986:                  //image.Caption = x.Attribute("caption").Value;
 987:                  //image.Photographer = x.Attribute("photographer").Value.Replace(" ", "").ToLower();
 988:                  //image.Source = x.Attribute("source").Value.ToLower();
 989:                  image.FileName = x.Attribute("fileName").Value;
 990:                  image.AndroidFileName = x.Attribute("fileName").Value.Replace("-", "_");
 991:   
 992:                  list.Add(image);
 993:              }
 994:   
 995:              return list;
 996:          }
 997:   
 998:          ////////////////////////////////////////////////////////////////////////////
 999:          ////////////////////////////////////////////////////////////////////////////
 
        /// <summary>
        ///
        /// </summary>
        private static List<Ia.TentPlay.Cl.Model.Data.Trek.ApplicationInformation.Translation> TranslationList(Ia.TentPlay.Cl.Model.Data.Trek.ApplicationInformation.Country country)
        {
            string s;
            Ia.Cl.Model.Result result;
            Ia.TentPlay.Cl.Model.Data.Trek.ApplicationInformation.Translation translation;
            List<Ia.TentPlay.Cl.Model.Data.Trek.ApplicationInformation.Translation> translationList;
            List<Ia.TentPlay.Cl.Model.Business.Trek.FeatureDesignation> featureDesignationNameAndCountList;
 
            translationList = new List<Translation>(100);
 
            foreach (Ia.TentPlay.Cl.Model.Data.Trek.ApplicationInformation.Translation rawTranslation in RawTranslationList)
            {
                if (country.Languages.Any(u => u.Iso6391 == rawTranslation.Iso6391))
                {
                    featureDesignationNameAndCountList = Ia.TentPlay.Cl.Model.Data.Trek.Default.FeatureDesignationNameAndCountWithinDatabaseList(country.Iso2, rawTranslation, out result);
 
                    translation = new Translation();
                    translation.CountryIso2 = country.Iso2;
                    translation.Iso6391 = rawTranslation.Iso6391;
 
                    translation.SiteName = rawTranslation.SiteName;
                    translation.CompanyName = rawTranslation.CompanyName;
 
                    translation.About = ReplaceNameVariableWithName(rawTranslation.About, country, translation.Iso6391);
                    translation.AboutTitle = rawTranslation.AboutTitle;
 
                    translation.ShortDescription = ReplaceNameVariableWithName(rawTranslation.ShortDescription, country, translation.Iso6391);
 
                    translation.LongDescription = ReplaceNameVariableWithName(rawTranslation.LongDescription, country, translation.Iso6391);
                    s = Ia.TentPlay.Cl.Model.Data.Trek.ApplicationInformation.BuildRandomDesignationListString(featureDesignationNameAndCountList);
                    translation.LongDescription = translation.LongDescription.Replace("#randomDesignationList", s);
 
                    translation.SearchSearchHint = rawTranslation.SearchSearchHint;
 
                    translation.Statistic = ReplaceNameVariableWithName(rawTranslation.Statistic, country, translation.Iso6391);
                    translation.StatisticTitle = rawTranslation.StatisticTitle;
                    translation.Setting = rawTranslation.Setting;
                    translation.SettingTitle = rawTranslation.SettingTitle;
 
                    translation.ShareTitle = rawTranslation.ShareTitle;
                    translation.ShareApplication = ReplaceNameVariableWithName(rawTranslation.ShareApplication, country, translation.Iso6391);
                    translation.ShareTrek = ReplaceNameVariableWithName(rawTranslation.ShareTrek, country, translation.Iso6391);
                    translation.ShareNoEmailClientInstalled = rawTranslation.ShareNoEmailClientInstalled;
                    translation.ShareContactUs = rawTranslation.ShareContactUs;
 
                    translation.HelpFeedbackTitle = rawTranslation.HelpFeedbackTitle;
                    translation.Help = rawTranslation.Help;
                    translation.HelpTitle = rawTranslation.HelpTitle;
                    translation.HelpMainListOrder = rawTranslation.HelpMainListOrder;
                    translation.HelpGoogleMapRoute = rawTranslation.HelpGoogleMapRoute;
                    translation.HelpGoogleMapMarker = rawTranslation.HelpGoogleMapMarker;
                    translation.HelpMagnifiyingGlass = rawTranslation.HelpMagnifiyingGlass;
                    translation.HelpMapType = rawTranslation.HelpMapType;
                    translation.Feedback = ReplaceNameVariableWithName(rawTranslation.Feedback, country, translation.Iso6391);
                    translation.FeedbackTitle = rawTranslation.FeedbackTitle;
                    translation.FeedbackEmailSubject = rawTranslation.FeedbackEmailSubject;
 
                    translation.Legal = ReplaceNameVariableWithName(rawTranslation.Legal, country, translation.Iso6391);
                    translation.LegalTitle = rawTranslation.LegalTitle;
 
                    translation.FeatureClassName = rawTranslation.FeatureClassName;
                    translation.FeatureClassDescription = rawTranslation.FeatureClassDescription;
 
                    translation.FeatureClassAdministrativeName = rawTranslation.FeatureClassAdministrativeName;
                    translation.FeatureClassAdministrativeCaption = rawTranslation.FeatureClassAdministrativeCaption;
                    translation.FeatureClassAdministrativeClassId = rawTranslation.FeatureClassAdministrativeClassId;
                    translation.FeatureClassAdministrativeDescription = rawTranslation.FeatureClassAdministrativeDescription;
 
                    translation.FeatureClassPopulatedName = rawTranslation.FeatureClassPopulatedName;
                    translation.FeatureClassPopulatedCaption = rawTranslation.FeatureClassPopulatedCaption;
                    translation.FeatureClassPopulatedClassId = rawTranslation.FeatureClassPopulatedClassId;
                    translation.FeatureClassPopulatedDescription = rawTranslation.FeatureClassPopulatedDescription;
 
                    translation.FeatureClassVegetationName = rawTranslation.FeatureClassVegetationName;
                    translation.FeatureClassVegetationCaption = rawTranslation.FeatureClassVegetationCaption;
                    translation.FeatureClassVegetationClassId = rawTranslation.FeatureClassVegetationClassId;
                    translation.FeatureClassVegetationDescription = rawTranslation.FeatureClassVegetationDescription;
 
                    translation.FeatureClassLocalityName = rawTranslation.FeatureClassLocalityName;
                    translation.FeatureClassLocalityCaption = rawTranslation.FeatureClassLocalityCaption;
                    translation.FeatureClassLocalityClassId = rawTranslation.FeatureClassLocalityClassId;
                    translation.FeatureClassLocalityDescription = rawTranslation.FeatureClassLocalityDescription;
 
                    translation.FeatureClassUnderseaName = rawTranslation.FeatureClassUnderseaName;
                    translation.FeatureClassUnderseaCaption = rawTranslation.FeatureClassUnderseaCaption;
                    translation.FeatureClassUnderseaClassId = rawTranslation.FeatureClassUnderseaClassId;
                    translation.FeatureClassUnderseaDescription = rawTranslation.FeatureClassUnderseaDescription;
 
                    translation.FeatureClassStreetName = rawTranslation.FeatureClassStreetName;
                    translation.FeatureClassStreetCaption = rawTranslation.FeatureClassStreetCaption;
                    translation.FeatureClassStreetClassId = rawTranslation.FeatureClassStreetClassId;
                    translation.FeatureClassStreetDescription = rawTranslation.FeatureClassStreetDescription;
 
                    translation.FeatureClassHypsographicName = rawTranslation.FeatureClassHypsographicName;
                    translation.FeatureClassHypsographicCaption = rawTranslation.FeatureClassHypsographicCaption;
                    translation.FeatureClassHypsographicClassId = rawTranslation.FeatureClassHypsographicClassId;
                    translation.FeatureClassHypsographicDescription = rawTranslation.FeatureClassHypsographicDescription;
 
                    translation.FeatureClassHydrographicName = rawTranslation.FeatureClassHydrographicName;
                    translation.FeatureClassHydrographicCaption = rawTranslation.FeatureClassHydrographicCaption;
                    translation.FeatureClassHydrographicClassId = rawTranslation.FeatureClassHydrographicClassId;
                    translation.FeatureClassHydrographicDescription = rawTranslation.FeatureClassHydrographicDescription;
 
                    translation.FeatureClassSpotName = rawTranslation.FeatureClassSpotName;
                    translation.FeatureClassSpotCaption = rawTranslation.FeatureClassSpotCaption;
                    translation.FeatureClassSpotClassId = rawTranslation.FeatureClassSpotClassId;
                    translation.FeatureClassSpotDescription = rawTranslation.FeatureClassSpotDescription;
 
                    translationList.Add(translation);
                }
            }
 
            return translationList.ToList();
        }
 
        ////////////////////////////////////////////////////////////////////////////
 
        /// <summary>
        /// 
        /// </summary>
        private static string ReplaceNameVariableWithName(string line, Ia.TentPlay.Cl.Model.Data.Trek.ApplicationInformation.Country applicationCountry)
        {
            return ReplaceNameVariableWithName(line, applicationCountry, null);
        }
 
        ////////////////////////////////////////////////////////////////////////////
 
        /// <summary>
        /// 
        /// </summary>
        private static string ReplaceNameVariableWithName(string line, Ia.TentPlay.Cl.Model.Data.Trek.ApplicationInformation.Country applicationCountry, string iso6391)
        {
            string s;
 
            s = line;
 
            // this must be before $manifestPackage
            s = Replace(s, "$applicationUrl", applicationCountry.ApplicationUrl);
 
            if (!string.IsNullOrEmpty(iso6391))
            {
                s = Replace(s, "$applicationName", applicationCountry.ApplicationNameDictionary[iso6391]);
                s = Replace(s, "$countryName", applicationCountry.NameDictionary[iso6391]);
            }
 
            s = Replace(s, "$countryIso2", applicationCountry.Iso2);
            s = Replace(s, "$version", applicationCountry.VersionName);
            s = Replace(s, "$manifestPackagePrefix", applicationCountry.ManifestPackagePrefix);
            s = Replace(s, "$manifestPackage", applicationCountry.ManifestPackage);
            s = Replace(s, "$copyrightYear", applicationCountry.CopyrightYear);
            s = Replace(s, "$featureCount", applicationCountry.FeatureCount.ToString());
 
            s = Replace(s, "$companyName", Ia.TentPlay.Cl.Model.Data.CompanyInformation.CompanyName);
            s = Replace(s, "$companyEmail", Ia.TentPlay.Cl.Model.Data.CompanyInformation.CompanyEmail);
            s = Replace(s, "$companyUrl", Ia.TentPlay.Cl.Model.Data.CompanyInformation.CompanyUrl);
 
            s = Replace(s, "$applicationCompanyName", Ia.TentPlay.Cl.Model.Data.CompanyInformation.ApplicationCompanyName);
            s = Replace(s, "$applicationCompanyEmail", Ia.TentPlay.Cl.Model.Data.CompanyInformation.ApplicationCompanyEmail);
            s = Replace(s, "$applicationCompanyUrl", Ia.TentPlay.Cl.Model.Data.CompanyInformation.ApplicationCompanyUrl);
 
            return s;
        }
 
        ////////////////////////////////////////////////////////////////////////////
 
        /// <summary>
        /// 
        /// </summary>
        private static string Replace(string content, string term, string replacementTerm)
        {
            return content.Replace(term, replacementTerm);
        }
 
        ////////////////////////////////////////////////////////////////////////////
 
        /// <summary>
        /// 
        /// </summary>
        public static string BuildRandomDesignationListString(List<Ia.TentPlay.Cl.Model.Business.Trek.FeatureDesignation> featureDesignationNameAndCountList)
        {
            string s;
 
            s = string.Join(", ", (from f in featureDesignationNameAndCountList where f.Name.Length < 16 select Ia.Cl.Model.Language.Pluralize(f.Name)).PickRandom(19).ToArray());
            s = Ia.Cl.Model.Language.FirstCharacterToUpper(s);
 
            return s;
 
        }
 
        ////////////////////////////////////////////////////////////////////////////
 
        /// <summary>
        ///
        /// </summary>
        public static List<Ia.TentPlay.Cl.Model.Data.Trek.ApplicationInformation.Translation> RawTranslationList
        {
            get
            {
                if (translationList == null || translationList.Count == 0)
                {
                    if (HttpContext.Current != null && HttpContext.Current.Application["rawTranslationList"] != null)
                    {
                        translationList = (List<Translation>)HttpContext.Current.Application["rawTranslationList"];
                    }
                    else
                    {
                        translationList = Ia.TentPlay.Cl.Model.Data.Trek.ApplicationInformation._RawTranslationList;
 
                        if (HttpContext.Current != null) HttpContext.Current.Application["rawTranslationList"] = translationList;
                    }
                }
 
                return translationList;
            }
        }
 
        ////////////////////////////////////////////////////////////////////////////
 
        /// <summary>
        ///
        /// </summary>
        private static List<Ia.TentPlay.Cl.Model.Data.Trek.ApplicationInformation.Translation> _RawTranslationList
        {
            get
            {
                if (translationList == null || translationList.Count == 0)
                {
                    Translation translation;
 
                    translationList = new List<Translation>(100);
 
                    foreach (XElement x in XDocument.Element("applicationInformation").Element("translationList").Elements("translation"))
                    {
                        translation = new Translation();
                        translation.Iso6391 = x.Attribute("id").Value;
                        translation.SiteName = x.Element("siteName").Value;
                        translation.CompanyName = x.Element("companyName").Value;
 
                        translation.About = x.Element("about").Value.Trim();
                        translation.AboutTitle = x.Element("about").Attribute("title").Value;
 
                        translation.ShortDescription = Regex.Replace(x.Element("shortDescription").Value.Trim(), @"\n[ ]+", "\n");
                        translation.LongDescription = Regex.Replace(translation.About, @"\n[ ]+", "\n");
 
                        translation.SearchSearchHint = x.Element("search").Attribute("searchHint").Value;
 
                        translation.Statistic = x.Element("statistic").Value.Trim();
                        translation.StatisticTitle = x.Element("statistic").Attribute("title").Value;
                        translation.Setting = x.Element("setting").Value.Trim();
                        translation.SettingTitle = x.Element("setting").Attribute("title").Value;
 
                        translation.ShareTitle = x.Element("share").Attribute("title").Value;
                        translation.ShareApplication = x.Element("share").Element("application").Value.Trim();
                        translation.ShareTrek = x.Element("share").Element("trek").Value.Trim();
                        translation.ShareNoEmailClientInstalled = x.Element("share").Attribute("noEmailClientInstalled").Value;
                        translation.ShareContactUs = x.Element("share").Attribute("contactUs").Value;
 
                        translation.HelpFeedbackTitle = x.Element("help_feedback").Attribute("title").Value;
                        translation.Help = x.Element("help_feedback").Element("help").Value.Trim();
                        translation.HelpTitle = x.Element("help_feedback").Element("help").Attribute("title").Value;
                        translation.HelpMainListOrder = x.Element("help_feedback").Element("help").Attribute("mainListOrder").Value;
                        translation.HelpGoogleMapRoute = x.Element("help_feedback").Element("help").Attribute("googleMapRoute").Value;
                        translation.HelpGoogleMapMarker = x.Element("help_feedback").Element("help").Attribute("googleMapMarker").Value;
                        translation.HelpMagnifiyingGlass = x.Element("help_feedback").Element("help").Attribute("magnifiyingGlass").Value;
                        translation.HelpMapType = x.Element("help_feedback").Element("help").Attribute("mapType").Value;
                        translation.Feedback = x.Element("help_feedback").Element("feedback").Value.Trim();
                        translation.FeedbackTitle = x.Element("help_feedback").Element("feedback").Attribute("title").Value;
                        translation.FeedbackEmailSubject = x.Element("help_feedback").Element("feedback").Attribute("feedbackEmailSubject").Value;
 
                        translation.Legal = x.Element("legal").Value.Trim();
                        translation.LegalTitle = x.Element("legal").Attribute("title").Value;
 
                        translation.FeatureClassName = x.Element("featureClass").Attribute("caption").Value;
                        translation.FeatureClassDescription = x.Element("featureClass").Attribute("description").Value;
 
                        translation.FeatureClassAdministrativeName = x.Element("featureClass").Element("administrative").Attribute("name").Value;
                        translation.FeatureClassAdministrativeCaption = x.Element("featureClass").Element("administrative").Attribute("caption").Value;
                        translation.FeatureClassAdministrativeClassId = x.Element("featureClass").Element("administrative").Attribute("classId").Value;
                        translation.FeatureClassAdministrativeDescription = x.Element("featureClass").Element("administrative").Attribute("description").Value;
 
                        translation.FeatureClassPopulatedName = x.Element("featureClass").Element("populated").Attribute("name").Value;
                        translation.FeatureClassPopulatedCaption = x.Element("featureClass").Element("populated").Attribute("caption").Value;
                        translation.FeatureClassPopulatedClassId = x.Element("featureClass").Element("populated").Attribute("classId").Value;
                        translation.FeatureClassPopulatedDescription = x.Element("featureClass").Element("populated").Attribute("description").Value;
 
                        translation.FeatureClassVegetationName = x.Element("featureClass").Element("vegetation").Attribute("name").Value;
                        translation.FeatureClassVegetationCaption = x.Element("featureClass").Element("vegetation").Attribute("caption").Value;
                        translation.FeatureClassVegetationClassId = x.Element("featureClass").Element("vegetation").Attribute("classId").Value;
                        translation.FeatureClassVegetationDescription = x.Element("featureClass").Element("vegetation").Attribute("description").Value;
 
                        translation.FeatureClassLocalityName = x.Element("featureClass").Element("locality").Attribute("name").Value;
                        translation.FeatureClassLocalityCaption = x.Element("featureClass").Element("locality").Attribute("caption").Value;
                        translation.FeatureClassLocalityClassId = x.Element("featureClass").Element("locality").Attribute("classId").Value;
                        translation.FeatureClassLocalityDescription = x.Element("featureClass").Element("locality").Attribute("description").Value;
 
                        translation.FeatureClassUnderseaName = x.Element("featureClass").Element("undersea").Attribute("name").Value;
                        translation.FeatureClassUnderseaCaption = x.Element("featureClass").Element("undersea").Attribute("caption").Value;
                        translation.FeatureClassUnderseaClassId = x.Element("featureClass").Element("undersea").Attribute("classId").Value;
                        translation.FeatureClassUnderseaDescription = x.Element("featureClass").Element("undersea").Attribute("description").Value;
 
                        translation.FeatureClassStreetName = x.Element("featureClass").Element("street").Attribute("name").Value;
                        translation.FeatureClassStreetCaption = x.Element("featureClass").Element("street").Attribute("caption").Value;
                        translation.FeatureClassStreetClassId = x.Element("featureClass").Element("street").Attribute("classId").Value;
                        translation.FeatureClassStreetDescription = x.Element("featureClass").Element("street").Attribute("description").Value;
 
                        translation.FeatureClassHypsographicName = x.Element("featureClass").Element("hypsography").Attribute("name").Value;
                        translation.FeatureClassHypsographicCaption = x.Element("featureClass").Element("hypsography").Attribute("caption").Value;
                        translation.FeatureClassHypsographicClassId = x.Element("featureClass").Element("hypsography").Attribute("classId").Value;
                        translation.FeatureClassHypsographicDescription = x.Element("featureClass").Element("hypsography").Attribute("description").Value;
 
                        translation.FeatureClassHydrographicName = x.Element("featureClass").Element("hydrographic").Attribute("name").Value;
                        translation.FeatureClassHydrographicCaption = x.Element("featureClass").Element("hydrographic").Attribute("caption").Value;
                        translation.FeatureClassHydrographicClassId = x.Element("featureClass").Element("hydrographic").Attribute("classId").Value;
                        translation.FeatureClassHydrographicDescription = x.Element("featureClass").Element("hydrographic").Attribute("description").Value;
 
                        translation.FeatureClassSpotName = x.Element("featureClass").Element("spot").Attribute("name").Value;
                        translation.FeatureClassSpotCaption = x.Element("featureClass").Element("spot").Attribute("caption").Value;
                        translation.FeatureClassSpotClassId = x.Element("featureClass").Element("spot").Attribute("classId").Value;
                        translation.FeatureClassSpotDescription = x.Element("featureClass").Element("spot").Attribute("description").Value;
 
                        translationList.Add(translation);
                    }
                }
 
                return translationList.ToList();
            }
        }
 
        ////////////////////////////////////////////////////////////////////////////
        ////////////////////////////////////////////////////////////////////////////
 
        /// <summary>
        /// 
        /// How to embed and access resources by using Visual C# http://support.microsoft.com/kb/319292/en-us
        /// 
        /// 1. Change the "Build Action" property of your XML file from "Content" to "Embedded Resource".
        /// 2. Add "using System.Reflection".
        /// 3. Manifest resource stream will start with the project namespace, the location of XML file.
        /// 
        /// </summary>
 
        private static XDocument XDocument
        {
            get
            {
                Assembly _assembly;
                StreamReader streamReader;
 
                if (xDocument == null)
                {
                    _assembly = Assembly.GetExecutingAssembly();
                    streamReader = new StreamReader(_assembly.GetManifestResourceStream("Ia.TentPlay.Cl.model.data.trek.application-information.xml"));
 
                    try
                    {
                        if (streamReader.Peek() != -1) xDocument = System.Xml.Linq.XDocument.Load(streamReader);
                    }
                    catch (Exception)
                    {
                    }
                    finally
                    {
                    }
                }
 
                return xDocument;
            }
        }
 
        ////////////////////////////////////////////////////////////////////////////
        ////////////////////////////////////////////////////////////////////////////    
    }
}