- August 6, 2006
- 68
- 1
- 37
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:
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
}
}