Exemplo n.º 1
0
 void client_GetAllCategoriesCompleted(object sender, GetAllCategoriesCompletedEventArgs e)
 {
     client.GetAuthoritiesByCategoryIdCompleted += new EventHandler<GetAuthoritiesByCategoryIdCompletedEventArgs>(client_GetAuthoritiesByCategoryIdCompleted);
     ss.Clear();
     ss = new ObservableCollection<Stats>();
     int categoryCount = e.Result.Count;
     int i = 1;
     foreach (Category c in e.Result.Cast<Category>())
     {
         if (i == categoryCount)
         {
             loading.Visibility = Visibility.Collapsed;
         }
         client.GetAuthoritiesByCategoryIdAsync(c.CategoryId);
         i++;
     }
 }
Exemplo n.º 2
0
        void proxy_GetAllCategoriesCompleted(object sender, GetAllCategoriesCompletedEventArgs e)
        {
            try
            {
                leftList.ItemsSource = e.Result;

                for (int i = 0; i < leftList.Items.Count; i++)
                {
                    if (((Categories_RequirementsAndPatterns)leftList.Items[i]).Categorie.CategorieID == SelectedElement.Instance.SelectedTP)
                    {
                        leftList.SelectedIndex = i;
                    }
                }

                ProgressBarRight.Visibility = Visibility.Collapsed;
                ProgressBarLeft.Visibility = Visibility.Collapsed;
            }
            catch (Exception)
            {
                ProgressBarRight.Visibility = Visibility.Collapsed;
                ProgressBarLeft.Visibility = Visibility.Collapsed;
            }
        }
Exemplo n.º 3
0
        //protected override void OnNavigatedTo(System.Windows.Navigation.NavigationEventArgs e)
        //{
        //    base.OnNavigatedTo(e);

            
        //    client.GetReportsByUserIdCompleted += new EventHandler<GetReportsByUserIdCompletedEventArgs>(client_FindReportCompleted);
        //    client.GetReportsByUserIdAsync(States.userId);
            
            



        //}
        //olga - itemsource or datacontext for pushpin - tells what to bind. binding is needed to be at scope.
        void client_GetAllCategoriesCompleted(object sender, GetAllCategoriesCompletedEventArgs e)
        {
            client.GetAuthoritiesByCategoryIdCompleted += new EventHandler<GetAuthoritiesByCategoryIdCompletedEventArgs>(client_GetAuthoritiesByCategoryIdCompleted);
            ss.Clear();
            ss = new ObservableCollection<Stats>();
            foreach (Category c in e.Result.Cast<Category>())
            {
                
                client.GetAuthoritiesByCategoryIdAsync(c.CategoryId);
            }

            

        }