private void ButtonX_Import_Click(object sender, EventArgs e)
        {
            var import = GetSelectedImport();

            if (import is object)
            {
                ImportClicked?.Invoke(import);
            }
        }
Beispiel #2
0
 private void ImportClick(object sender, RoutedEventArgs e) => ImportClicked?.Invoke(sender, e);
Beispiel #3
0
        private void SetupMenuItems()
        {
            _toolbar.InflateMenu(Resource.Menu.listviewmenu);
            _toolbar.MenuItemClick += (sender, args) =>
            {
                switch (args.Item.ItemId)
                {
                case Resource.Id.ordernumberascending:
                    OrderByNumberAscendingClicked?.Invoke(this, EventArgs.Empty);
                    return;

                case Resource.Id.ordernumberdescending:
                    OrderByNumberDescendingClicked?.Invoke(this, EventArgs.Empty);
                    return;

                case Resource.Id.orderreleasedateascending:
                    OrderByReleaseDateAscendingClicked?.Invoke(this, EventArgs.Empty);
                    return;

                case Resource.Id.orderreleasedatedescending:
                    OrderByReleaseDateDescendingClicked?.Invoke(this, EventArgs.Empty);
                    return;

                case Resource.Id.ordernameascending:
                    OrderByNameAscendingClicked?.Invoke(this, EventArgs.Empty);
                    return;

                case Resource.Id.ordernamedescending:
                    OrderByNameDescendingClicked?.Invoke(this, EventArgs.Empty);
                    return;

                case Resource.Id.heardfirst:
                    OrderByHeardFirstClicked?.Invoke(this, EventArgs.Empty);
                    return;

                case Resource.Id.heardlast:
                    OrderByHeardLastClicked?.Invoke(this, EventArgs.Empty);
                    return;

                case Resource.Id.favoritesfirst:
                    OrderByIsFavoriteFirstClicked?.Invoke(this, EventArgs.Empty);
                    return;

                case Resource.Id.favoriteslast:
                    OrderByIsFavoriteLastClicked?.Invoke(this, EventArgs.Empty);
                    return;

                case Resource.Id.showall:
                    AllClicked?.Invoke(this, EventArgs.Empty);
                    return;

                case Resource.Id.mainsonly:
                    MainsOnlyClicked?.Invoke(this, EventArgs.Empty);
                    return;

                case Resource.Id.specialsonly:
                    SpecialsOnlyClicked?.Invoke(this, EventArgs.Empty);
                    return;

                case Resource.Id.favoritesonly:
                    FavoritesOnlyClicked?.Invoke(this, EventArgs.Empty);
                    return;

                case Resource.Id.unheardsonly:
                    UnheardOnlyClicked?.Invoke(this, EventArgs.Empty);
                    return;

                case Resource.Id.action_contribute:
                    ContributeClicked?.Invoke(this, EventArgs.Empty);
                    return;

                case Resource.Id.action_export:
                    ExportClicked?.Invoke(this, EventArgs.Empty);
                    return;

                case Resource.Id.action_import:
                    ImportClicked?.Invoke(this, EventArgs.Empty);
                    return;
                }
            };
        }