INTERACT FORUM

Please login or register.

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

Author Topic: Busy Box C#.NET  (Read 7470 times)

Mr ChriZ

  • Citizen of the Universe
  • *****
  • Posts: 4375
  • :-D
Busy Box C#.NET
« on: December 30, 2005, 06:19:06 pm »

I've run a utility to convert my busybox VB.NET to C#.NET

Edit 19/04/2006
A tutorial for how this was done can be found here.
http://yabb.jriver.com/interact/index.php?topic=31109.msg213863#msg213863

Doof

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 5908
  • Farm Animal Stupid
Re: Busy Box C#.NET
« Reply #1 on: April 19, 2006, 02:48:08 pm »

How does one go about getting into the Gmail account?

I tried u: mcfiles p: mediacenter

but it doesn't let me in.
Logged

Mr ChriZ

  • Citizen of the Universe
  • *****
  • Posts: 4375
  • :-D
Re: Busy Box C#.NET
« Reply #2 on: April 19, 2006, 04:27:36 pm »

Looks like someones taken it out of service or something.
What were you looking for exactly?
The BusyBox C# Sample? Binary or Source? or both?

I can probably find them somewhere, in the depths of my disks!

You'll excuse me if I don't upload it imediatly.
32 Hours without sleep (Seriously, got to the point where i was seeing flying pixi dust!)
However Disertation Project is at the binders though at long last  :)
(Had to explain to course mates that perhaps it would be a better
idea if we took a taxi this time, since i was a danger to life just by walking
let alone driving...)

Doof

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 5908
  • Farm Animal Stupid
Re: Busy Box C#.NET
« Reply #3 on: April 19, 2006, 04:45:22 pm »

Yeah, I was looking for the sample.

Take your time with it. After looking into C# a bit more, I've decided I need to get back to basics. This is a far cry from the C++ I learned in college. :P

Hello World, here I come. ;)
Logged

Mr ChriZ

  • Citizen of the Universe
  • *****
  • Posts: 4375
  • :-D
Re: Busy Box C#.NET
« Reply #4 on: April 19, 2006, 04:56:43 pm »

Yeh despite it's name C# is quite different to C++
In many ways it's closer to Java. (-=most the bad bits)

It is actually dead easy to get to grips with in the end however
especially if using one of the RAD tools such as Visual Studio.NET
or #Develop.  If you have any general C#/.NET questions feel free
to ask. 

You can play around with the Media Center Interface
using the C# Script plugin, it compiles and runs C# on the fly
and is fully C# Compliant, including all of .NET's rich class libraries. 

Doof

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 5908
  • Farm Animal Stupid
Re: Busy Box C#.NET
« Reply #5 on: April 20, 2006, 09:46:40 am »

I was just looking at your C# Script plugin. Not sure it's going to help me in my endeavors...

But I was wondering... is it possible to write an MC plugin that's basically just a wrapper to another plugin? So while I'm writing and debugging my plugin, I don't have to kill MC, unregister the dll, then recompile, re-register the dll, then fire up MC again?

Or do I not have to do that now, but I'm too stupid to know it? :P

I thought I could just register the dll file that's in the build folder, and then just hide the plugin in MC's plugin manager, rebuild the project, then show the plugin and test. But of course the .dll is always in use and so the build fails.

So is there an easier way to do this?
Logged

Mr ChriZ

  • Citizen of the Universe
  • *****
  • Posts: 4375
  • :-D
Re: Busy Box C#.NET
« Reply #6 on: April 21, 2006, 10:45:41 am »

I was just looking at your C# Script plugin. Not sure it's going to help me in my endeavors...

But I was wondering... is it possible to write an MC plugin that's basically just a wrapper to another plugin? So while I'm writing and debugging my plugin, I don't have to kill MC, unregister the dll, then recompile, re-register the dll, then fire up MC again?

Or do I not have to do that now, but I'm too stupid to know it? :P

I thought I could just register the dll file that's in the build folder, and then just hide the plugin in MC's plugin manager, rebuild the project, then show the plugin and test. But of course the .dll is always in use and so the build fails.

So is there an easier way to do this?

I do intend to a create a wrapper like you've mentioned for exactly that reason,
but haven't had time to think about it yet!
However I've streamlined the process to just this....
presuming that you are creating a .NET plugin still
and you are using Register for Com Interopt then once the plugin has been registered
with Media Center, then every time Visual Studio builds
it will re-register the plugin.  However Media Center must be closed first,
which is still iritating.  When you reopen Media Center the new updated
build will be used.  No need to move DLL's around or anything.

Doof

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 5908
  • Farm Animal Stupid
Re: Busy Box C#.NET
« Reply #7 on: April 21, 2006, 01:45:29 pm »

That would be a big help in itself. How do I enable the Register for Com Interop option?
Logged

Mr ChriZ

  • Citizen of the Universe
  • *****
  • Posts: 4375
  • :-D
Re: Busy Box C#.NET
« Reply #8 on: April 23, 2006, 02:05:09 pm »

In Visual Studio 2003
Go to the projects property pages
by right clicking on the project within the soloution explorer
and clicking properties.
Then go to configuration properties->build->output->Register for COM interop

In Visual Studio 2005.
Go to the projects property pages
by right clicking on the project within the soloution explorer
and clicking properties.
Then go to Build -> Output->Register for COM interop

jss1015

  • Recent member
  • *
  • Posts: 5
Re: Busy Box C#.NET
« Reply #9 on: April 25, 2006, 11:44:14 am »

is a BusyBox C# example ( or other simple C# plug-in example) floating around?  If someone has one can you post it?

-JSS
Logged

Mr ChriZ

  • Citizen of the Universe
  • *****
  • Posts: 4375
  • :-D
Re: Busy Box C#.NET
« Reply #10 on: April 25, 2006, 12:16:51 pm »

http://yabb.jriver.com/interact/index.php?topic=31946.0

Is a C# Template Plugin, which I'm in the process of creating instructions
on use. 

I've posted instructions on how to convert the VB6 BusyBox
to VB.NET
and then convert the VB.NET into C#.

I am intending to upload a C# Busybox over the next couple of days,
although I'm having a fairly busy week.
Regardless I recommend reading the instructions I've posted
on how I created the C# Busybox since it helps
 if you understand COM Interop, and the wrapped type library
dll that is created.

Doof

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 5908
  • Farm Animal Stupid
Re: Busy Box C#.NET
« Reply #11 on: May 03, 2006, 09:35:53 am »

I'm having some difficulties with this COM Interop option.

At first, it looks like your template doesn't have it totally (?) enabled. I went to the Project Properties, and the box wasn't checked. It had a little green box inside of it, which I took to mean that some, but not all components are registered for COM Interop. I have no idea how that would work, but there it was. I clicked it again and it went all blank, then again and it actually showed a checkmark. And then it seemed to work.

But then I started getting "Couldn't create plugin" messages from MC. I thougt at first that it must have been something screwy in my code, so I commented it all out (I really hadn't done much), rebuilt the solution and started up MC. Same thing.

Anything in particular I should look at?
Logged

Mr ChriZ

  • Citizen of the Universe
  • *****
  • Posts: 4375
  • :-D
Re: Busy Box C#.NET
« Reply #12 on: May 03, 2006, 10:48:48 am »

I'm having some difficulties with this COM Interop option.

At first, it looks like your template doesn't have it totally (?) enabled. I went to the Project Properties, and the box wasn't checked. It had a little green box inside of it, which I took to mean that some, but not all components are registered for COM Interop. I have no idea how that would work, but there it was. I clicked it again and it went all blank, then again and it actually showed a checkmark. And then it seemed to work.

But then I started getting "Couldn't create plugin" messages from MC. I thougt at first that it must have been something screwy in my code, so I commented it all out (I really hadn't done much), rebuilt the solution and started up MC. Same thing.

Anything in particular I should look at?

Intreguing. It's possible that I got ahead of myself and had a different version
of the template on my machine to whats currently uploaded.  I'm currently away from my
development machine, I may get time to take a look tonight, when
I get back to Bournemouth. 
You may be the first person trying those instructions
out so they may not be perfect. 

Just for reference, in Visual Studio 2005 you can actually run the control in a test
window just by pressing the run button.  That may give you more idea of whats wrong
relating to the private message you sent me.
It's unusual not to get any error message at all however.  C#'s pretty good with
that sort of stuff.

Doof

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 5908
  • Farm Animal Stupid
Re: Busy Box C#.NET
« Reply #13 on: May 03, 2006, 05:21:05 pm »

Ok, I got it working really smoothly now.

Basically I followed all of your directions except I had to fully check that Register for COM Interop box, and then I changed the Output path to the "Build Files" folder. I also deleted everything in the various output folders that still had the "MC_CSPlugin_Template" name.

One of those steps seems to have smoothed everything out.
Logged

Mr ChriZ

  • Citizen of the Universe
  • *****
  • Posts: 4375
  • :-D
Re: Busy Box C#.NET
« Reply #14 on: May 03, 2006, 05:28:10 pm »

Ok, I got it working really smoothly now.

Basically I followed all of your directions except I had to fully check that Register for COM Interop box, and then I changed the Output path to the "Build Files" folder. I also deleted everything in the various output folders that still had the "MC_CSPlugin_Template" name.

One of those steps seems to have smoothed everything out.

Brilliant =)
I've been trying to download the template for the past hour, but
Saveafile seems to be down.  Moving the output to build files does
make sense, in the past I've set it up copy to the build files directory, with release builds.
I just wanted to get the basics down for the moment, and sort out the twiddly bits
like that later.

Mr ChriZ

  • Citizen of the Universe
  • *****
  • Posts: 4375
  • :-D
Re: Busy Box C#.NET
« Reply #15 on: May 03, 2006, 05:51:23 pm »

Ok, I got it working really smoothly now.

Basically I followed all of your directions except I had to fully check that Register for COM Interop box.

Are you using Visual Studio 2005? 
I still haven't managed to download from Savefile, however I've found a back
up of the template I made back in February which I'm fairly sure is the
most recent uploaded version, and Register for COM interop is fully
turned on there.  I'm also curious as I've never seen it half enabled as you describe.
It's either on or off!  May need to test this on another development machine.

Doof

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 5908
  • Farm Animal Stupid
Re: Busy Box C#.NET
« Reply #16 on: May 03, 2006, 06:48:51 pm »

I'm using Visual C# 2005 Express Edition.

Just to make sure, I extracted a whole new copy of the template plugin and went straight to the Project Properties, just to make sure it wasn't related to any of the renaming changes I was making. It's there even on a fresh copy.

Here's a screenshot. The topmost image is what it looks like right out of the box, then when I click it once, and then once again...



You can also download the template from here as well...
Logged

Mr ChriZ

  • Citizen of the Universe
  • *****
  • Posts: 4375
  • :-D
Re: Busy Box C#.NET
« Reply #17 on: May 04, 2006, 04:17:33 am »

Interesting!  Thats completley different from Visual Studio 2005,
which only provides one black tick box!

I'll integrate your findings in to the documentation.
Cheers
Chris

Mr ChriZ

  • Citizen of the Universe
  • *****
  • Posts: 4375
  • :-D
Re: Busy Box C#.NET
« Reply #18 on: May 05, 2006, 01:43:42 pm »

Pages: [1]   Go Up