Esempio n. 1
0
        void ShapeItemsLoaded(object sender, ItemsLoadedEventArgs e)
        {
            List <string> countriesNames = new List <string>();

            foreach (MapItem item in e.Items)
            {
                string countryName = GetCountryNameFromItem(item);
                if (!String.IsNullOrEmpty(countryName))
                {
                    countriesNames.Add(countryName);
                }
            }
            CreateGameCore(countriesNames);
        }
Esempio n. 2
0
 void OnFileLoaded(object sender, ItemsLoadedEventArgs e)
 {
     foreach (var item in e.Items)
     {
         MapItemAttribute attr = new MapItemAttribute();
         attr.Name = "RevenueYTD";
         decimal value = 0;
         if (item.Attributes["NAME"] != null)
         {
             value = SalesPerformanceDataGenerator.Current.TotalSales.Where(d => string.Equals(d.State, item.Attributes["NAME"].Value.ToString())).Sum(d => d.RevenueYTD);
         }
         attr.Value = value;
         if (value == 0)
         {
             item.Visible = false;
         }
         item.Attributes.Add(attr);
     }
 }
 protected virtual void OnItemsLoaded(ItemsLoadedEventArgs e)
 {
     ItemsLoaded?.Invoke(this, e);
 }
Esempio n. 4
0
 private void OnItemsLoaded(object sender, ItemsLoadedEventArgs e)
 {
     Mvx.TaggedTrace(nameof(IncrementalListViewModel), "OnItemsLoaded (current count={0}, total count={1})", e.CurrentLoadCount, e.TotalRecordCount);
 }
Esempio n. 5
0
 void OnItemsLoaded(object sender, ItemsLoadedEventArgs e)
 {
     this.items = e.Items;
     this.mapControl1.ZoomToFit(e.Items);
     this.comboBox1.SelectedIndex = 1;
 }