Пример #1
0
 private void ToolStripButtonSaveFile_Click(object sender, EventArgs e)
 {
     if (saveFileDialog.ShowDialog() == DialogResult.OK)
     {
         ExportClicked?.Invoke(this, new EventArgs <string>(saveFileDialog.FileName));
     }
 }
Пример #2
0
 private void Export_Executed(object sender, ExecutedRoutedEventArgs e)
 {
     if (ExportClicked != null)
     {
         ExportClicked.Invoke();
     }
 }
Пример #3
0
 private void Button_Click(object sender, RoutedEventArgs e)
 {
     ExportClicked?.Invoke(this, new FreqEventArgs()
     {
         From = fromFreq.Value,
         To   = toFreq.Value,
         Step = stepFreq.Value,
     });
     Close();
 }
Пример #4
0
 private void ExportClick(object sender, RoutedEventArgs e) => ExportClicked?.Invoke(sender, e);
Пример #5
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;
                }
            };
        }