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
Process plugins
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="dipunm" data-source="post: 73006" data-attributes="member: 23758"><p>I tried to start a process plugin, ive got the first version of the code ready to test but even though ive implemented isetupform, (and iplugin) it doesnt appear in mediaportal setup screen.</p><p></p><p>am using vc#express</p><p>referenced:</p><p></p><p>core</p><p>system</p><p>system.data</p><p>system.windows.forms</p><p>system.xml</p><p></p><p>files</p><p></p><p>BgHack.cs</p><p></p><p>contents of BgHack:</p><p></p><p></p><p></p><p>[CODE]#region Copyright (C) 2006 Team MediaPortal</p><p></p><p>/* </p><p> * Copyright (C) 2005-2006 Team MediaPortal</p><p> * [url]https://www.team-mediaportal.com[/url]</p><p> *</p><p> * This Program is free software; you can redistribute it and/or modify</p><p> * it under the terms of the GNU General Public License as published by</p><p> * the Free Software Foundation; either version 2, or (at your option)</p><p> * any later version.</p><p> * </p><p> * This Program is distributed in the hope that it will be useful,</p><p> * but WITHOUT ANY WARRANTY; without even the implied warranty of</p><p> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the</p><p> * GNU General Public License for more details.</p><p> * </p><p> * You should have received a copy of the GNU General Public License</p><p> * along with GNU Make; see the file COPYING. If not, write to</p><p> * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. </p><p> * [url]http://www.gnu.org/copyleft/gpl.html[/url]</p><p> *</p><p> */</p><p></p><p>#endregion</p><p></p><p>using System;</p><p>using System.Windows.Forms;</p><p></p><p>using MediaPortal.GUI.Library;</p><p></p><p>namespace ProcessPlugins.BgHackPlugin</p><p>{</p><p> class BgHack : ISetupForm, IPlugin</p><p> {</p><p> public BgHack()</p><p> {</p><p></p><p> }</p><p></p><p> #region ISetupForm Members</p><p></p><p> public bool CanEnable()</p><p> {</p><p> return true;</p><p> }</p><p></p><p> public string Description()</p><p> {</p><p></p><p> return "Defaults the video to play behind menu where possible";</p><p> }</p><p></p><p> public bool DefaultEnabled()</p><p> {</p><p> return true;</p><p> }</p><p></p><p> public int GetWindowId()</p><p> {</p><p> return -1;</p><p> }</p><p></p><p> public bool GetHome(out string strButtonText, out string strButtonImage, out string strButtonImageFocus, out string strPictureImage)</p><p> {</p><p> strButtonText = null;</p><p> strButtonImage = null;</p><p> strButtonImageFocus = null;</p><p> strPictureImage = null;</p><p> return false;</p><p> }</p><p></p><p> public string Author()</p><p> {</p><p> return "dipunm";</p><p> }</p><p></p><p> public string PluginName()</p><p> {</p><p> return "BgHack";</p><p> }</p><p></p><p> public bool HasSetup()</p><p> {</p><p> return false;</p><p> }</p><p></p><p> public void ShowPlugin()</p><p> {</p><p></p><p> }</p><p></p><p> #endregion</p><p></p><p> #region My Code</p><p> void onMyAction(Action action)</p><p> {</p><p> if (!(GUIWindowManager.ActiveWindow == (int)GUIWindow.Window.WINDOW_FULLSCREEN_VIDEO || GUIWindowManager.ActiveWindow == (int)GUIWindow.Window.WINDOW_FULLSCREEN_TELETEXT))</p><p> {</p><p> //check n doodledoo</p><p> if (GUIGraphicsContext.ShowBackground)</p><p> {</p><p> if (GUIGraphicsContext.Vmr9Active)</p><p> {</p><p> GUIGraphicsContext.ShowBackground = false;</p><p> GUIGraphicsContext.ARType = Geometry.Type.Stretch;</p><p> }</p><p> else</p><p> {</p><p> // return;</p><p> }</p><p> }</p><p> }</p><p> }</p><p></p><p></p><p> #endregion</p><p></p><p> #region IPlugin Members</p><p> public void Start()</p><p> {</p><p> GUIWindowManager.OnNewAction += new OnActionHandler(OnMyAction);</p><p> }</p><p></p><p> public void Stop()</p><p> {</p><p></p><p> }</p><p> #endregion</p><p></p><p> }</p><p>}[/CODE]</p></blockquote><p></p>
[QUOTE="dipunm, post: 73006, member: 23758"] I tried to start a process plugin, ive got the first version of the code ready to test but even though ive implemented isetupform, (and iplugin) it doesnt appear in mediaportal setup screen. am using vc#express referenced: core system system.data system.windows.forms system.xml files BgHack.cs contents of BgHack: [CODE]#region Copyright (C) 2006 Team MediaPortal /* * Copyright (C) 2005-2006 Team MediaPortal * [url]https://www.team-mediaportal.com[/url] * * This Program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2, or (at your option) * any later version. * * This Program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with GNU Make; see the file COPYING. If not, write to * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. * [url]http://www.gnu.org/copyleft/gpl.html[/url] * */ #endregion using System; using System.Windows.Forms; using MediaPortal.GUI.Library; namespace ProcessPlugins.BgHackPlugin { class BgHack : ISetupForm, IPlugin { public BgHack() { } #region ISetupForm Members public bool CanEnable() { return true; } public string Description() { return "Defaults the video to play behind menu where possible"; } public bool DefaultEnabled() { return true; } public int GetWindowId() { return -1; } public bool GetHome(out string strButtonText, out string strButtonImage, out string strButtonImageFocus, out string strPictureImage) { strButtonText = null; strButtonImage = null; strButtonImageFocus = null; strPictureImage = null; return false; } public string Author() { return "dipunm"; } public string PluginName() { return "BgHack"; } public bool HasSetup() { return false; } public void ShowPlugin() { } #endregion #region My Code void onMyAction(Action action) { if (!(GUIWindowManager.ActiveWindow == (int)GUIWindow.Window.WINDOW_FULLSCREEN_VIDEO || GUIWindowManager.ActiveWindow == (int)GUIWindow.Window.WINDOW_FULLSCREEN_TELETEXT)) { //check n doodledoo if (GUIGraphicsContext.ShowBackground) { if (GUIGraphicsContext.Vmr9Active) { GUIGraphicsContext.ShowBackground = false; GUIGraphicsContext.ARType = Geometry.Type.Stretch; } else { // return; } } } } #endregion #region IPlugin Members public void Start() { GUIWindowManager.OnNewAction += new OnActionHandler(OnMyAction); } public void Stop() { } #endregion } }[/CODE] [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 1
MediaPortal 1 Plugins
Process plugins
Contact us
RSS
Top
Bottom