Author Topic: Add process bar feature  (Read 9481 times)

Steven

  • Administrator
  • Sr. Member
  • *****
  • Posts: 34350
any time you touch the progress bar control, its needs to be done in the same thread as musicbee is running. This gets it working to a point,
but when the song starts playing, although MB is returning the position and duration, the control is throwing an exception when being assigned the value. I spent as much time as i can, but i think you should be able to figure it out by debugging what is happening when assigning a non-zero value

http://www.mediafire.com/?d49l8z47ive3o5n

zzh1989829

  • Guest
I just found out that if i click "Disable" button in the preference, this plugin(the version you uploaded) still works, and no more new threads are created. So is there a compromise solution that execute the procudure of what the Disable button do in the plugin code (what does the disable button do)?

also , about the exception you mentioned before, i have no idea of how to analysis it cuz seems that no exception was thrown when assigning a value

PS: anybody interested , will you help me ?
Last Edit: December 04, 2010, 05:05:20 AM by zzh1989829

Steven

  • Administrator
  • Sr. Member
  • *****
  • Posts: 34350
the disable button calls:
public void Close(PluginCloseReason reason)
in your code. You need to take whatever action necessary to close the plugin

my suggestion is to get it working with a standalone form (not using musicbee at all) first

edit:
what reason do you think new threads are being created? the only other thing when a plugin is disabled is MB will no longer call
ReceiveNotification(string sourceFileUrl, NotificationType type) any more
Last Edit: December 04, 2010, 08:47:53 AM by Steven

zzh1989829

  • Guest
as i've mentioned , I barely have used C# before and totally have no idea how code work inside.

since it is ReceiveNotification(string sourceFileUrl, NotificationType type) will be no longer called after Close(PluginCloseReason reason) , i removed about.ReceiveNotifications = ReceiveNotificationFlags.PlayerEvents; no new thread will be created. but this also caused the plugin not running full functionally.

why don't you just add this feature to MB instead of making it a plugin?
Last Edit: December 05, 2010, 07:33:35 AM by zzh1989829

Steven

  • Administrator
  • Sr. Member
  • *****
  • Posts: 34350
i can add it to MB but there are many other wishlist items before i can look at it so thats why its better if someone can do it as a plugin