Author Topic: How to add an Context Menu?  (Read 3740 times)

tatoosh

  • Newbie
  • *
  • Posts: 11
I am wirting a Plugin for musicgraph.

With this c# code i got a menu Item, but i want a contect Menu Item?


 private void createMenuItem()
  {
       // TATOOSH
      mbApiInterface.MB_AddMenuItem("mnuTools/Genre Web", "Genre Web Import", Genre);
  }
       

Next question:
I got only a reference to the current playing file.
How to get the reference from the selected library?


     public void Genre(object sender, EventArgs e)
        {
            // read Genre current playing
            String genre = mbApiInterface.NowPlaying_GetFileTag(MetaDataType.Genre);


.....

Thanks a lot

Steven

  • Administrator
  • Sr. Member
  • *****
  • Posts: 34350
have a look at the source code for the tag tools plugin.
To get the selected files(s) call Library_QueryFilesEx("domain=SelectedFiles", files)