MediaPortal Forums HTPC/MediaCenter

Go Back   MediaPortal Forum » MediaPortal 1 » Community Skins and Plugins » Plugins


Plugins Plugins developed and maintained by users. Want to create your own plugin? Start a thread in here.

Reply
 
Thread Tools Display Modes
Old 2007-09-25, 10:29   #1 (permalink)
Docs Team
 
charli181's Avatar
 
Join Date: Aug 2007
Location: Sydney
Age: 36
Posts: 640
Thanks: 33
Thanked 34 Times in 27 Posts

Country:

My System

Send a message via MSN to charli181
Default Example to open Config Form on Non Gui Plugin

Hi,
Still learning C# and cannot seem to get it to open my config Form. The project wont even build. I keep getting errors here....

public void ShowPlugin()
{
SetupForm SetupForm1 = new SetupForm();
SetupForm1.ShowDialog();
}

I have a form in the project called SetupForm

C#2005 shows error....

Error 1 The type or namespace name 'Form1' could not be found (are you missing a using directive or an assembly reference?) C:\project\1- MediaPortal Plugins\Voicemail\Voicemail1\Class1.cs 144 13 Voicemail1


Any Ideas as the doco's just show a message box for the config option.....

Thanks in advance and sorry to pester all.
charli181 is offline   Reply With Quote
Old 2007-09-25, 12:04   #2 (permalink)
Portal Developer
 
and-81's Avatar
 
Join Date: Mar 2005
Location: Melbourne
Age: 27
Posts: 2,251
Thanks: 30
Thanked 145 Times in 88 Posts

Country:

My System

Default

Hey again,

The error message you quote doesn't match the code in question. The error message says "Form1" but you're referencing "SetupForm1" in the code. Are you sure this is where the error is?

Maybe you pasted the message and then changed the code... so here's what it could be in that case...

Maybe your form is in a different namespace to the rest of the code. So you may need to add a "using plugin.forms;"

Or you may need to refer to the SetupForm class by it's fully qualified name, something like:

MediaPortal.Plugins.Forms.SetupForm SetupForm1 = new MediaPortal.Plugins.Forms.SetupForm();

If you get really stuck you could attach the full source (zipped up) to this post and I could take a look for you?

Cheers,
and-81 is offline   Reply With Quote
Old 2007-09-25, 13:04   #3 (permalink)
Docs Team
 
charli181's Avatar
 
Join Date: Aug 2007
Location: Sydney
Age: 36
Posts: 640
Thanks: 33
Thanked 34 Times in 27 Posts

Country:

My System

Send a message via MSN to charli181
Default

Aaron,

I am going to start the project again, as it seems to be giving strange errors. I have been changing things in the code and names of forms so many times. I even found some source files in the forums and set it up the same way and still no go so that why I am starting again. not much code to copy and paste. WIll attack it again tomorrow.

Thanks Again

Sean
charli181 is offline   Reply With Quote
Old 2007-09-25, 14:11   #4 (permalink)
Portal Developer
 
and-81's Avatar
 
Join Date: Mar 2005
Location: Melbourne
Age: 27
Posts: 2,251
Thanks: 30
Thanked 145 Times in 88 Posts

Country:

My System

Default

Try looking in the Plugin SVN.

http://forum.team-mediaportal.com/pl...vn-t15863.html

Lots of good exampes there.

Cheers,
and-81 is offline   Reply With Quote
Reply

Bookmarks

Tags
config, form, gui, open, plugin

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
[lyrics 0.14] lyrics get found in config.exe but not in gui idioteque My Lyrics Plugin 16 2007-03-13 19:19
open fire plugin cPH Plugins 7 2006-12-22 11:18
Open/Close CD tray Plugin natrlhy Plugins 6 2006-09-15 10:26
PLEASE HELP!! Messanger Plugin Not Even open the GUI Screen. callmesnake Plugins 0 2005-08-26 04:36
GUI and non-GUI plugin combined Anonymous Plugins 2 2004-12-17 01:18


All times are GMT +1. The time now is 09:52.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0 Protected by Akismet Blog with WordPress
Advertisement System V2.6 By   Branden