private void OnMenuItemClicked(object sender, RoutedEventArgs args) { var menuItem = (MenuItem)sender; MediaItemsListModelItem mediaItem = (MediaItemsListModelItem)menuItem.CommandParameter; var tag = menuItem.Tag.ToString(); switch (tag) { case DeleteTag: DeleteLibraryItemCommand.GetCommand().Execute(mediaItem); break; case AddToQueueTag: AddItemToQueueCommand.GetCommand().Execute(mediaItem); break; case DownloadNowTag: DownloadNowCommand.GetCommand().Execute(mediaItem); break; case ShowLinksTag: ShowLinksCommand.GetCommand().Execute(mediaItem); break; case ShowDescriptionTag: ShowDescriptionCommand.GetCommand().Execute(mediaItem); break; default: break; } }
public static ShowLinksCommand GetCommand() { if (mInstance == null) { mInstance = new ShowLinksCommand(); } return(mInstance); }
public static ShowLinksCommand GetCommand() { if (mInstance == null) mInstance = new ShowLinksCommand(); return mInstance; }
private void OnLinksButtonClicked(object sender, EventArgs args) { ShowLinksCommand.GetCommand().Execute(MediaItemModel); }