home
products
contribute
download
documentation
forum
Home
Forums
New posts
Search forums
What's new
New posts
All posts
Latest activity
Members
Registered members
Current visitors
Donate
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Search titles only
By:
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
MediaPortal 1
MediaPortal 1 Plugins
"Calendar" plugin
Contact us
RSS
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="carreno" data-source="post: 21440" data-attributes="member: 14126"><p><strong>Smirnuff</strong></p><p></p><p>My code</p><p>[code]</p><p>using System;</p><p>using System.Windows.Forms;</p><p>using MediaPortal.GUI.Library;</p><p>namespace Calendrier</p><p>{</p><p> /// <summary></p><p> /// Summary description for Class1.</p><p> /// </summary></p><p> public class Class1 : GUIWindow, ISetupForm</p><p> {</p><p> public Class1()</p><p> {</p><p> //</p><p> // TODO: Add constructor logic here</p><p> //</p><p> }</p><p> #region ISetupForm Members</p><p></p><p> // Returns the name of the plugin which is shown in the plugin menu</p><p> public string PluginName()</p><p> {</p><p> return "Calendrier";</p><p> }</p><p></p><p> // Returns the description of the plugin is shown in the plugin menu</p><p> public string Description()</p><p> {</p><p> return "Calendrier pour MEDIAPORTAL";</p><p> }</p><p></p><p> // Returns the author of the plugin which is shown in the plugin menu</p><p> public string Author() </p><p> {</p><p> return "Carreno";</p><p> } </p><p> </p><p> // show the setup dialog</p><p> public void ShowPlugin() </p><p> {</p><p> MessageBox.Show("Rien");</p><p> } </p><p></p><p> // Indicates whether plugin can be enabled/disabled</p><p> public bool CanEnable() </p><p> {</p><p> return true;</p><p> } </p><p></p><p> // get ID of windowplugin belonging to this setup</p><p> public int GetWindowId() </p><p> {</p><p> return 5678;</p><p> } </p><p> </p><p> // Indicates if plugin is enabled by default;</p><p> public bool DefaultEnabled()</p><p> {</p><p> return true;</p><p> } </p><p> </p><p></p><p></p><p> // indicates if a plugin has its own setup screen</p><p> public bool HasSetup() </p><p> {</p><p> return true;</p><p> } </p><p> </p><p> /// <summary></p><p> /// If the plugin should have its own button on the main menu of Media Portal then it</p><p> /// should return true to this method, otherwise if it should not be on home</p><p> /// it should return false</p><p> /// </summary></p><p> /// <param name="strButtonText">text the button should have</param></p><p> /// <param name="strButtonImage">image for the button, or empty for default</param></p><p> /// <param name="strButtonImageFocus">image for the button, or empty for default</param></p><p> /// <param name="strPictureImage">subpicture for the button or empty for none</param></p><p> /// <returns>true : plugin needs its own button on home</p><p> /// false : plugin does not need its own button on home</returns></p><p> public bool GetHome(out string strButtonText, out string strButtonImage, </p><p> out string strButtonImageFocus, out string strPictureImage) </p><p> {</p><p> strButtonText=PluginName();</p><p> strButtonImage=String.Empty;</p><p> strButtonImageFocus=String.Empty;</p><p> strPictureImage=String.Empty;</p><p> return true;</p><p> }</p><p> #endregion</p><p> </p><p> public override int GetID</p><p> {</p><p> get</p><p> {</p><p> return 5678;</p><p> }</p><p> set</p><p> {</p><p> }</p><p> }</p><p></p><p> public override bool Init()</p><p> {</p><p> return Load(GUIGraphicsContext.Skin+@"\Calendrier.xml");</p><p> }</p><p> [SkinControlAttribute(2)] protected GUIButtonControl nov=null;</p><p> [SkinControlAttribute(3)] protected GUIButtonControl sept=null;</p><p> [SkinControlAttribute(4)] protected GUIButtonControl dece=null;</p><p> [SkinControlAttribute(5)] protected GUIButtonControl octo=null;</p><p> [SkinControlAttribute(6)] protected GUIButtonControl aout=null;</p><p> [SkinControlAttribute(7)] protected GUIButtonControl juil=null;</p><p> [SkinControlAttribute(8)] protected GUIButtonControl juin=null;</p><p> [SkinControlAttribute(9)] protected GUIButtonControl mai=null;</p><p> [SkinControlAttribute(10)] protected GUIButtonControl avri=null;</p><p> [SkinControlAttribute(11)] protected GUIButtonControl mars=null;</p><p> [SkinControlAttribute(12)] protected GUIButtonControl fevr=null;</p><p> [SkinControlAttribute(13)] protected GUIButtonControl janv=null;</p><p>[/code]</p><p></p><p>can you make me the first for example. I would like that when one clic on the button "OCTOBER", the calendar of October appears. (by indicating the complete code.)</p><p></p><p>thank you.</p><p> :wink:</p></blockquote><p></p>
[QUOTE="carreno, post: 21440, member: 14126"] [b]Smirnuff[/b] My code [code] using System; using System.Windows.Forms; using MediaPortal.GUI.Library; namespace Calendrier { /// <summary> /// Summary description for Class1. /// </summary> public class Class1 : GUIWindow, ISetupForm { public Class1() { // // TODO: Add constructor logic here // } #region ISetupForm Members // Returns the name of the plugin which is shown in the plugin menu public string PluginName() { return "Calendrier"; } // Returns the description of the plugin is shown in the plugin menu public string Description() { return "Calendrier pour MEDIAPORTAL"; } // Returns the author of the plugin which is shown in the plugin menu public string Author() { return "Carreno"; } // show the setup dialog public void ShowPlugin() { MessageBox.Show("Rien"); } // Indicates whether plugin can be enabled/disabled public bool CanEnable() { return true; } // get ID of windowplugin belonging to this setup public int GetWindowId() { return 5678; } // Indicates if plugin is enabled by default; public bool DefaultEnabled() { return true; } // indicates if a plugin has its own setup screen public bool HasSetup() { return true; } /// <summary> /// If the plugin should have its own button on the main menu of Media Portal then it /// should return true to this method, otherwise if it should not be on home /// it should return false /// </summary> /// <param name="strButtonText">text the button should have</param> /// <param name="strButtonImage">image for the button, or empty for default</param> /// <param name="strButtonImageFocus">image for the button, or empty for default</param> /// <param name="strPictureImage">subpicture for the button or empty for none</param> /// <returns>true : plugin needs its own button on home /// false : plugin does not need its own button on home</returns> public bool GetHome(out string strButtonText, out string strButtonImage, out string strButtonImageFocus, out string strPictureImage) { strButtonText=PluginName(); strButtonImage=String.Empty; strButtonImageFocus=String.Empty; strPictureImage=String.Empty; return true; } #endregion public override int GetID { get { return 5678; } set { } } public override bool Init() { return Load(GUIGraphicsContext.Skin+@"\Calendrier.xml"); } [SkinControlAttribute(2)] protected GUIButtonControl nov=null; [SkinControlAttribute(3)] protected GUIButtonControl sept=null; [SkinControlAttribute(4)] protected GUIButtonControl dece=null; [SkinControlAttribute(5)] protected GUIButtonControl octo=null; [SkinControlAttribute(6)] protected GUIButtonControl aout=null; [SkinControlAttribute(7)] protected GUIButtonControl juil=null; [SkinControlAttribute(8)] protected GUIButtonControl juin=null; [SkinControlAttribute(9)] protected GUIButtonControl mai=null; [SkinControlAttribute(10)] protected GUIButtonControl avri=null; [SkinControlAttribute(11)] protected GUIButtonControl mars=null; [SkinControlAttribute(12)] protected GUIButtonControl fevr=null; [SkinControlAttribute(13)] protected GUIButtonControl janv=null; [/code] can you make me the first for example. I would like that when one clic on the button "OCTOBER", the calendar of October appears. (by indicating the complete code.) thank you. :wink: [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 1
MediaPortal 1 Plugins
"Calendar" plugin
Contact us
RSS
Top
Bottom