Exemplo n.º 1
2
        public override void Selected(UIPickerView pickerView, System.nint row, System.nint compononet)
        {
            string category = columnCategory[(int)row];

            SelectedCategory = category;

            CategoryChanged?.Invoke(null, null);
        }
Exemplo n.º 2
0
        public ComponentList AddList()
        {
            var newList = new ComponentList();

            _components.Add(newList);

            CategoryChanged?.Invoke(this, new CategoryChangedEventArgs(newList));
            return(newList);
        }
Exemplo n.º 3
0
        private void ApplyFilter()
        {
            var index = lvCategory.SelectedIndex;

            if (index == 0)
            {
                lvInProgress.Visibility = Visibility.Visible;
                lvFinished.Visibility   = Visibility.Collapsed;
                InProgressListViewInitialSortIfNotAlreadySorted();

                CategoryChanged?.Invoke(this, new CategoryChangedEventArgs {
                    Level = 0, Index = 0
                });
            }
            else if (index > 0)
            {
                lvInProgress.Visibility = Visibility.Collapsed;
                lvFinished.Visibility   = Visibility.Visible;

                ListCollectionView view = (ListCollectionView)
                                          CollectionViewSource.GetDefaultView(lvFinished.ItemsSource);
                if (index > 1)
                {
                    CategoryWrapper?cat = (CategoryWrapper)lvCategory.SelectedItem;
                    view.Filter = a => IsCategoryMatched((FinishedDownloadEntryWrapper)a, cat);
                    CategoryChanged?.Invoke(this, new CategoryChangedEventArgs
                    {
                        Level    = 1,
                        Index    = index - 2,
                        Category = cat.category
                    });
                }
                else
                {
                    view.Filter = a => IsCategoryMatched((FinishedDownloadEntryWrapper)a, null);
                    CategoryChanged?.Invoke(this, new CategoryChangedEventArgs {
                        Level = 0, Index = 1
                    });
                }
            }

            SelectionChanged?.Invoke(this, EventArgs.Empty);
        }
Exemplo n.º 4
0
 private void OnCategoryChanged(CategoryChanged e)
 {
     CategoryId = e.NewCategoryId;
     Properties = e.Properties;
 }
Exemplo n.º 5
0
 private async Task OnCategoryChanged(CategoryDto cat)
 {
     await CategoryChanged.InvokeAsync(cat);
 }
Exemplo n.º 6
0
 protected virtual void OnCategoryChanged(EventArgs e)
 {
     CategoryChanged?.Invoke(this, e);
 }
Exemplo n.º 7
0
 private void FireCategoryChanged(Category cat)
 {
     CategoryChanged?.Invoke(this, new CategoryEventArgs {
         Category = cat
     });
 }
Exemplo n.º 8
0
 private void OnCategoryChanged(Object sender, EventArgs args)
 {
     CategoryChanged?.Invoke(sender, args);
 }
Exemplo n.º 9
0
 public void RemoveList(int index)
 {
     _components.RemoveAt(index);
     CategoryChanged?.Invoke(this, new CategoryChangedEventArgs(index));
 }