private bool ConvertAcukwikTable(string acukwikName)
        {
            switch (acukwikName.ToString())
            {
            case "Airports":
                AirportsData airportData = new AirportsData();
                return(airportData.IsConvertSuccessful(_SuppoortedSheetCollection, _UploadedSheetTable));

            case "Countries":
                CountriesData countryData = new CountriesData();
                return(countryData.IsConvertSuccessful(_SuppoortedSheetCollection, _UploadedSheetTable));

            case "FBOHandlerDetail":
                FBOHandlerDetailData handlerData = new FBOHandlerDetailData();
                return(handlerData.IsConvertSuccessful(_SuppoortedSheetCollection, _UploadedSheetTable));

            case "SubdivisionStates":
                SubdivisionStatesData statesData = new SubdivisionStatesData();
                return(statesData.IsConvertSuccessful(_SuppoortedSheetCollection, _UploadedSheetTable));

            case "SupplierDetail":
                SupplierDetailData supplierData = new SupplierDetailData();
                return(supplierData.IsConvertSuccessful(_SuppoortedSheetCollection, _UploadedSheetTable));

            default:
                return(false);
            }
        }
Exemple #2
0
    public static void build_geometry(Mesh mesh_country, Mesh mesh_coast)
    {
        CountriesData cd = Resources.Load <CountriesData>("Datas/CountriesData");

        if (cd != null)
        {
            for (int i = 0; i < cd.dic_pick_keys.Length; ++i)
            {
                dic_pick_index.Add(cd.dic_pick_keys[i], cd.dic_pick_values[i]);
            }

            mesh_country.SetVertices(cd.country_pos0);
            //mesh_country.SetNormals(country_normal0);
            mesh_country.subMeshCount = 4;
            mesh_country.SetIndices(cd.country_index, MeshTopology.Triangles, 0);
            mesh_country.SetIndices(cd.boundary_index, MeshTopology.Lines, 1);
            mesh_country.SetIndices(dic_pick_index[0].picked_index, MeshTopology.Triangles, 2);
            mesh_country.SetIndices(dic_pick_index[0].border_index, MeshTopology.Lines, 3);
            mesh_country.SetUVs(0, cd.country_tex);
            mesh_country.SetUVs(1, cd.country_pos1);
            mesh_country.SetUVs(2, cd.country_normal1);

            mesh_coast.SetVertices(cd.coast_pos0);
            mesh_coast.SetNormals(cd.coast_normal0);
            mesh_coast.SetIndices(cd.coast_index, MeshTopology.Triangles, 0);
            mesh_coast.SetUVs(0, cd.coast_tex);
            mesh_coast.SetUVs(1, cd.coast_pos1);
            mesh_coast.SetUVs(2, cd.coast_normal1);
        }
        cd = null;
    }
 public void SetMapItems(IList <MapItem> layerMapItemCollection)
 {
     foreach (MapItem item in layerMapItemCollection)
     {
         string shapeName = (string)item.Attributes["NAME"].Value;
         if (shapeName == "Others")
         {
             item.Visible = false;
         }
         CountryStatisticInfo countryInfo = CountriesData.Find(info => info.Name == shapeName);
         if (countryInfo != null)
         {
             countryInfo.Shape = item;
             item.Attributes.Add(new MapItemAttribute()
             {
                 Name = "CountryInfo", Type = typeof(CountryStatisticInfo), Value = countryInfo
             });
         }
     }
     SelectedCountry = CountriesData[25];
 }
 public CountryList()
 {
     this.CountriesData = new ObservableCollection <Countries>();
     CountriesData.Add(new Countries()
     {
         ShapeCollection = new ShapeProperty()
         {
             Country = "USA", ShapeFill = "LightBlue", Uri = "SampleBrowser.Assets.ShapeFiles.states.shp"
         }
     });
     CountriesData.Add(new Countries()
     {
         ShapeCollection = new ShapeProperty()
         {
             Country = "Argentina", ShapeFill = "Orange", Uri = "SampleBrowser.Assets.ShapeFiles.Argentina.shp"
         }
     });
     CountriesData.Add(new Countries()
     {
         ShapeCollection = new ShapeProperty()
         {
             Country = "Brazil", ShapeFill = "#88B061", Uri = "SampleBrowser.Assets.ShapeFiles.Brazil.shp"
         }
     });
     CountriesData.Add(new Countries()
     {
         ShapeCollection = new ShapeProperty()
         {
             Country = "Colombia", ShapeFill = "#68A79B", Uri = "SampleBrowser.Assets.ShapeFiles.Colombia.shp"
         }
     });
     CountriesData.Add(new Countries()
     {
         ShapeCollection = new ShapeProperty()
         {
             Country = "WorldMap", ShapeFill = "#DF9C61", Uri = "SampleBrowser.Assets.ShapeFiles.world1.shp"
         }
     });
     this.SelectedValue = this.CountriesData[0].ShapeCollection;
 }
 /// <summary>
 /// Updates the nations database with the geographical info.
 /// </summary>
 /// <param name="countriesData">The set of geographical data for the countries.</param>
 public void UpdateNationsDatabase(CountriesData countriesData)
 {
     foreach (CountryGeography country in countriesData.Countries)
     {
         foreach (Nation nation in LoadedItems)
         {
             if (country.Name == nation.Name)
             {
                 if (country.XmlElement != null)
                 {
                     if (nation.GeographyXml == null ||
                         (nation.GeographyXml != null &&
                          country.XmlElement.OuterXml.Length != nation.GeographyXml.Length))
                     {
                         nation.GeographyXml = country.XmlElement.OuterXml;
                         UpdateDatabaseItem(nation);
                         break;
                     }
                 }
             }
         }
     }
 }