INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Need help with EnableSkinning() function...  (Read 1912 times)

Doof

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 5908
  • Farm Animal Stupid
Need help with EnableSkinning() function...
« on: August 17, 2006, 05:48:07 pm »

How do I use the EnableSkinning function to disable skinning of my plugins? Ever since MC12 began better skinning of plugins, the file list coloring doesn't work. So I decided to use the EnableSkinning function to disable it. But I can't figure out where to call it.

'lil help?
Logged

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 42378
  • Shoes gone again!
Re: Need help with EnableSkinning() function...
« Reply #1 on: August 17, 2006, 06:00:07 pm »

Ideally:

pMJ->EnableSkinning(FALSE)
.. create control + child controls ..
pMJ->EnableSkinning(TRUE)

Another approach would be to have a registry value for a plugin like "DisableSkinning" that could be set to 1.  If this is desired, let us know and we'll hook it up.
Logged
Matt Ashland, JRiver Media Center

Doof

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 5908
  • Farm Animal Stupid
Re: Need help with EnableSkinning() function...
« Reply #2 on: August 17, 2006, 06:10:02 pm »

Yeah, I think I'm calling it right... I'm just having a hell of a time figuring out when to call it. The registry setting might be a good idea.

Mr Chriz? You're the .NET guru around here... ;)
Logged

Mr ChriZ

  • Citizen of the Universe
  • *****
  • Posts: 4375
  • :-D
Re: Need help with EnableSkinning() function...
« Reply #3 on: August 18, 2006, 06:09:17 am »

Ideally:

pMJ->EnableSkinning(FALSE)
.. create control + child controls ..
pMJ->EnableSkinning(TRUE)

Another approach would be to have a registry value for a plugin like "DisableSkinning" that could be set to 1.  If this is desired, let us know and we'll hook it up.

Should work fine with .NET, I'd guess call it here
pMJ->EnableSkinning(FALSE)
InitializeComponent ( );
pMJ->EnableSkinning(TRUE)

Haven't got time to play around with it at the moment....

Just got back from a garage where I had some work done on my car last year.
They bodged it up, they're even admitting they bodged it up, but they won't fix it
because it's was 15 months ago, and the warranty's 12 months or 12000 miles whichevers
first.  I've done 10,000 miles.  The fact that it was bodged only became apparent
on the MOT on monday.  What frustrates me is it was a fairly expensive garage too,
normally i take it to the cheapest one I can find, but at the time it was critical to get it back
on the road. >:( Not what I need 2 days before I leave the continent.

Doof

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 5908
  • Farm Animal Stupid
Re: Need help with EnableSkinning() function...
« Reply #4 on: August 18, 2006, 09:19:51 am »

Yeah, I tried that. I got the infamous 'Interface Plug-in 'Lyrics Editor' could not be found or created".
Logged

Doof

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 5908
  • Farm Animal Stupid
Re: Need help with EnableSkinning() function...
« Reply #5 on: August 29, 2006, 10:40:56 am »

So how about that registry setting, Matt?
Logged

Mr ChriZ

  • Citizen of the Universe
  • *****
  • Posts: 4375
  • :-D
Re: Need help with EnableSkinning() function...
« Reply #6 on: October 05, 2006, 10:25:26 am »

Doof.  Don't know if you're still having problems here.
Just had another play with this in a plugin I'm working on.
What you need to do is move
 InitializeComponent from the constructor
to the Init method so it looks something like this:
public void Init ( MediaJukebox.MJAutomation mediaCenterReference )
{   
      try
      {                 
                this.mediaCenterReference = mediaCenterReference;
                this.mediaCenterReference.EnableSkinning(0);
                InitializeComponent();
                this.mediaCenterReference.EnableSkinning(1);
      }
      catch (Exception e)
      {
               MessageBox.Show ( "A Fatal error has occured while creating CS Template plugin:-" + e.Message +
                                "\n The Failure Occured" +
                                "\n In Class Object " + e.Source +
                                "\n when calling Method " + e.TargetSite +
                                "\n \n The following Inner Exception was caused" + e.InnerException +
                                "\n \n The Stack Trace Follows: \n\n" + e.StackTrace );
                        this.Enabled = false;
      }
      //Placing anything outside of this
      //try catch may cause MC to fail to open.
      //Play safe and insert it in the try area!
}
Pages: [1]   Go Up