From: <dal...@us...> - 2007-02-02 07:47:28
|
Revision: 79 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=79&view=rev Author: dalanorth Date: 2007-02-01 23:47:21 -0800 (Thu, 01 Feb 2007) Log Message: ----------- Added WebBrowser Added Paths: ----------- trunk/plugins/WebBrowser/ trunk/plugins/WebBrowser/AxMOZILLACONTROLLib.dll trunk/plugins/WebBrowser/Common.cs trunk/plugins/WebBrowser/GUIFavorites.cs trunk/plugins/WebBrowser/GUIWebBrowser.cs trunk/plugins/WebBrowser/GUIWebBrowser.csproj trunk/plugins/WebBrowser/GUIWebBrowser.sln trunk/plugins/WebBrowser/GUIWebBrowser.suo trunk/plugins/WebBrowser/INIFile.cs trunk/plugins/WebBrowser/MOZILLACONTROLLib.dll trunk/plugins/WebBrowser/Properties/ trunk/plugins/WebBrowser/Properties/AssemblyInfo.cs trunk/plugins/WebBrowser/Readme.txt trunk/plugins/WebBrowser/WebBrowserControl.Designer.cs trunk/plugins/WebBrowser/WebBrowserControl.cs trunk/plugins/WebBrowser/WebBrowserControl.resx trunk/plugins/WebBrowser/WebBrowserSetup.Designer.cs trunk/plugins/WebBrowser/WebBrowserSetup.cs trunk/plugins/WebBrowser/WebBrowserSetup.resx Added: trunk/plugins/WebBrowser/AxMOZILLACONTROLLib.dll =================================================================== (Binary files differ) Property changes on: trunk/plugins/WebBrowser/AxMOZILLACONTROLLib.dll ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/plugins/WebBrowser/Common.cs =================================================================== --- trunk/plugins/WebBrowser/Common.cs (rev 0) +++ trunk/plugins/WebBrowser/Common.cs 2007-02-02 07:47:21 UTC (rev 79) @@ -0,0 +1,56 @@ +#region Copyright (C) 2005-2007 Team MediaPortal + +/* + * Copyright (C) 2005-2007 Team MediaPortal + * http://www.team-mediaportal.com + * + * 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. + * http://www.gnu.org/copyleft/gpl.html + * + */ + +#endregion + +using System; +using System.Collections.Generic; +using System.Text; + +namespace MediaPortal.GUI.WebBrowser +{ + class Common + { + /// <summary> + /// Menu state enum + /// </summary> + public enum MenuState + { + Browser = 0, + TopBar = 1 + } + /// <summary> + /// Gets the user configured home page from the mediaportal settings + /// </summary> + public static string HomePage + { + get + { + using (MediaPortal.Profile.Settings xmlreader = new MediaPortal.Profile.Settings("MediaPortal.xml")) + { + return xmlreader.GetValueAsString("webbrowser", "homePage", string.Empty); + } + } + } + } +} Added: trunk/plugins/WebBrowser/GUIFavorites.cs =================================================================== --- trunk/plugins/WebBrowser/GUIFavorites.cs (rev 0) +++ trunk/plugins/WebBrowser/GUIFavorites.cs 2007-02-02 07:47:21 UTC (rev 79) @@ -0,0 +1,224 @@ +#region Copyright (C) 2005-2007 Team MediaPortal + +/* + * Copyright (C) 2005-2007 Team MediaPortal + * http://www.team-mediaportal.com + * + * 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. + * http://www.gnu.org/copyleft/gpl.html + * + */ + +#endregion + +using System; +using System.Collections; +using MediaPortal.GUI.Library; +using MediaPortal.Util; +using MediaPortal.Dialogs; + +namespace MediaPortal.GUI.WebBrowser +{ + /// <summary> + /// A web browser plugin for mediaportal + /// </summary> + public class GUIFavorites : GUIWindow + { + public const int WINDOW_FAVORITES = 5501; + + DirectoryHistory m_history = new DirectoryHistory(); + string currentFolder = String.Empty; + [SkinControlAttribute(50)] protected GUIFacadeControl facadeView=null; + + #region Constructor + public GUIFavorites() + { + GetID = WINDOW_FAVORITES; + } + #endregion + + #region Private Enumerations + /// <summary> + /// Gui Widgets + /// </summary> + enum Controls + { + BackButton = 3, + } + + #endregion + + #region Overrides + public override bool Init() + { + return Load (GUIGraphicsContext.Skin+@"\WebFavorites.xml"); + } + + protected override void OnPageLoad() + { + base.OnPageLoad(); + if (FavoritesPath.Length != 0) + { + LoadDirectory(FavoritesPath); + } + else + { + //no favorites folder specified. + ShowErrorDialog(4003); + } + + } + + public override bool OnMessage(GUIMessage message) + { + switch ( message.Message ) + { + + case GUIMessage.MessageType.GUI_MSG_WINDOW_INIT: + { + base.OnMessage(message); + GUIPropertyManager.SetProperty("#currentmodule", GUILocalizeStrings.Get(4001)); + return true; + } + case GUIMessage.MessageType.GUI_MSG_CLICKED: + { + //get sender control + base.OnMessage(message); + int iControl=message.SenderControlId; + + if (iControl==(int)Controls.BackButton) + { + GUIWindowManager.ShowPreviousWindow(); + break; + } + if (iControl==facadeView.GetID) + { + if(facadeView.SelectedListItem.IsFolder) + { + LoadDirectory(facadeView.SelectedListItem.Path); + } + else + { + // The URL file is in standard "INI" format + if (facadeView.SelectedListItem != null) + { + try + { + IniFile objINI = new IniFile(facadeView.SelectedListItem.Path); + WebBrowserControl.Instance.Browser.Navigate(objINI.IniReadValue("InternetShortcut", "URL")); + GUIWindowManager.ShowPreviousWindow(); + + } + catch + { + ShowErrorDialog(4002); + } + } + } + break; + } + + + return true; + } + case GUIMessage.MessageType.GUI_MSG_WINDOW_DEINIT: + { + break; + } + case GUIMessage.MessageType.GUI_MSG_SHOW_DIRECTORY: + { + currentFolder=message.Label; + LoadDirectory(currentFolder); + break; + } + + } + return base.OnMessage(message); + } + + + #endregion + + #region Private Properties + /// <summary> + /// Gets the Internet Favorites path selected by the user + /// </summary> + private static string FavoritesPath + { + get + { + using (MediaPortal.Profile.Settings xmlreader = new MediaPortal.Profile.Settings("MediaPortal.xml")) + { + return xmlreader.GetValueAsString("webbrowser", "favoritesFolder", string.Empty); + } + } + } + #endregion + + #region Private Methods + /// <summary> + /// Loads the directory. + /// </summary> + /// <param name="newFolderName">New name of the folder.</param> + private void LoadDirectory(string newFolderName) + { + GUIListItem selectedListItem = facadeView.SelectedListItem; + + if (selectedListItem != null) + { + if (selectedListItem.IsFolder && selectedListItem.Label != "..") + { + m_history.Set(selectedListItem.Label, currentFolder); + } + } + currentFolder = newFolderName; + + GUIControl.ClearControl(GetID, facadeView.GetID); + VirtualDirectory Directory; + ArrayList itemlist; + ArrayList UrlExtensions = new ArrayList(); + UrlExtensions.Add(".url"); + + Directory = new VirtualDirectory(); + Directory.SetExtensions(UrlExtensions); + + itemlist = Directory.GetDirectory(currentFolder); + + foreach (GUIListItem item in itemlist) + { + GUIControl.AddListItemControl(GetID, facadeView.GetID, item); + } + } + + /// <summary> + /// Shows the Error Dialog + /// </summary> + private void ShowErrorDialog(int messsageNumber) + { + GUIDialogOK dlgOK = (GUIDialogOK)GUIWindowManager.GetWindow((int)GUIWindow.Window.WINDOW_DIALOG_OK); + if (dlgOK != null) + { + dlgOK.SetHeading(257); + dlgOK.SetLine(1, messsageNumber); + dlgOK.SetLine(2, ""); + dlgOK.DoModal(GetID); + } + return; + } + + #endregion + + } +} Added: trunk/plugins/WebBrowser/GUIWebBrowser.cs =================================================================== --- trunk/plugins/WebBrowser/GUIWebBrowser.cs (rev 0) +++ trunk/plugins/WebBrowser/GUIWebBrowser.cs 2007-02-02 07:47:21 UTC (rev 79) @@ -0,0 +1,336 @@ +#region Copyright (C) 2005-2007 Team MediaPortal + +/* + * Copyright (C) 2005-2007 Team MediaPortal + * http://www.team-mediaportal.com + * + * 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. + * http://www.gnu.org/copyleft/gpl.html + * + */ + +#endregion + +/* + * + * Thanks to Adam Lock for making the Mozilla ActiveX Control + * Licensed under the MPL - http://www.mozilla.org/MPL/MPL-1.1.txt + * + * http://www.iol.ie/~locka/mozilla/mozilla.htm + * + */ + +using System; +using System.Collections; +using MediaPortal.GUI.Library; +using MediaPortal.Util; +using MediaPortal.Dialogs; +using System.Windows.Forms; + +namespace MediaPortal.GUI.WebBrowser +{ + /// <summary> + /// A web browser plugin for mediaportal + /// </summary> + public class GUIWebBrowser : GUIWindow + { + public const int WINDOW_WEB_BROWSER = 5500; + + private WebBrowserControl wb; + + #region Constructor + /// <summary> + /// Initializes a new instance of the <see cref="GUIWebBrowser"/> class. + /// </summary> + public GUIWebBrowser() + { + GetID = WINDOW_WEB_BROWSER; + } + #endregion + + #region Enumerations + /// <summary> + /// Gui Widgets + /// </summary> + public enum Controls + { + BackButton = 2, + ForwardButton = 3, + RefreshButton = 4, + StopButton = 5, + FavoritesButton = 6, + UrlButton = 7, + Progress = 8, + HomeButton = 9 + } + + #endregion + + #region Overrides + + public override bool SupportsDelayedLoad + { + get { return true; } + } + /// <summary> + /// Inits this instance. + /// </summary> + /// <returns></returns> + public override bool Init() + { + try + { + + wb = WebBrowserControl.Instance; + GUIGraphicsContext.form.Controls.Add(wb); + wb.Visible = false; + wb.Enabled = false; + //set focus back to the form after loading web browser + GUIGraphicsContext.form.Focus(); + wb.Browser.NavigateComplete2 += new AxMOZILLACONTROLLib.DWebBrowserEvents2_NavigateComplete2EventHandler(Browser_NavigateComplete2); + wb.Browser.DownloadBegin += new EventHandler(Browser_DownloadBegin); + wb.Browser.DownloadComplete += new EventHandler(Browser_DownloadComplete); + wb.Browser.BeforeNavigate2 += new AxMOZILLACONTROLLib.DWebBrowserEvents2_BeforeNavigate2EventHandler(Browser_BeforeNavigate2); + wb.Browser.StatusTextChange += new AxMOZILLACONTROLLib.DWebBrowserEvents2_StatusTextChangeEventHandler(Browser_StatusTextChange); + wb.Browser.ProgressChange += new AxMOZILLACONTROLLib.DWebBrowserEvents2_ProgressChangeEventHandler(Browser_ProgressChange); + return Load(GUIGraphicsContext.Skin + @"\webbrowser.xml"); + } + catch + { + Log.Error("Unable to load the web browser plugin, verify that Mozilla ActiveX Control is installed"); + } + return false; + } + + public override void DeInit() + { + base.DeInit(); + wb.Dispose(); + WebBrowserControl.Instance.Dispose(); + } + + /// <summary> + /// Called when [action]. + /// </summary> + /// <param name="action">The action.</param> + public override void OnAction(Action action) + { + switch (action.wID) + { + case Action.ActionType.ACTION_SHOW_INFO: + { + GUIWindowManager.ActivateWindow(GUIFavorites.WINDOW_FAVORITES); + break; + } + case Action.ActionType.ACTION_CONTEXT_MENU: + { + wb.ToggleMenu(); + break; + } + case Action.ActionType.ACTION_PREVIOUS_MENU: + { + GUIWindowManager.ShowPreviousWindow(); + return; + } + } + base.OnAction(action); + } + + /// <summary> + /// Called when [message]. + /// </summary> + /// <param name="message">The message.</param> + /// <returns></returns> + public override bool OnMessage(GUIMessage message) + { + switch (message.Message) + { + + case GUIMessage.MessageType.GUI_MSG_WINDOW_INIT: + { + base.OnMessage(message); + GUIPropertyManager.SetProperty("#currentmodule", GUILocalizeStrings.Get(4000)); + //make web browser visible + wb.Visible = true; + wb.Enabled = true; + wb.Focus(); + return true; + } + case GUIMessage.MessageType.GUI_MSG_CLICKED: + { + //get sender control + base.OnMessage(message); + int iControl = message.SenderControlId; + + if (iControl == (int)Controls.BackButton) + { + wb.Browser.GoBack(); + break; + } + if (iControl == (int)Controls.ForwardButton) + { + wb.Browser.GoForward(); + break; + } + if (iControl == (int)Controls.RefreshButton) + { + wb.RefreshBrowser(); + break; + } + if (iControl == (int)Controls.StopButton) + { + wb.Browser.Stop(); + break; + } + if (iControl == (int)Controls.HomeButton) + { + if (Common.HomePage.Length != 0) + wb.Browser.Navigate(Common.HomePage); + break; + } + if (iControl == (int)Controls.FavoritesButton) + { + GUIWindowManager.ActivateWindow(GUIFavorites.WINDOW_FAVORITES); + break; + } + if (iControl == (int)Controls.UrlButton) + { + //hide browser control for keyboard display + wb.Visible = false; + //set focus to main form to avoid browser caputuring entered text + GUIGraphicsContext.form.Focus(); + wb.Enabled = false; + string strName = string.Empty; + GetStringFromKeyboard(ref strName); + if (strName.Length != 0) + { + wb.Browser.Navigate(strName); + GUIPropertyManager.SetProperty("#location.url", strName); + GUIPropertyManager.SetProperty("#location.name", string.Empty); + } + wb.Visible = true; + wb.Enabled = true; + break; + } + return true; + } + case GUIMessage.MessageType.GUI_MSG_WINDOW_DEINIT: + { + //hide the browser + wb.Visible = false; + wb.Enabled = false; + GUIGraphicsContext.form.Focus(); + } + break; + } + return base.OnMessage(message); + } + #endregion + protected override void OnPageDestroy(int new_windowId) + { + base.OnPageDestroy(new_windowId); + + //hide the browser + wb.Visible = false; + wb.Enabled = false; + GUIGraphicsContext.form.Focus(); + } + + #region Private Methods + /// <summary> + /// Gets the input from the virtual keyboard window + /// </summary> + /// <param name="strLine">The STR line.</param> + private void GetStringFromKeyboard(ref string strLine) + { + + VirtualWebKeyboard keyboard = (VirtualWebKeyboard)GUIWindowManager.GetWindow((int)GUIWindow.Window.WINDOW_VIRTUAL_WEB_KEYBOARD); + if (null == keyboard) return; + keyboard.Reset(); + keyboard.Text = strLine; + keyboard.DoModal(GetID); + if (keyboard.IsConfirmed) + { + strLine = keyboard.Text; + } + + } + #endregion + + #region Browser Events + /// <summary> + /// Handles the NavigateComplete2 event of the Browser control. + /// </summary> + /// <param name="sender">The sender.</param> + /// <param name="e">The e.</param> + private void Browser_NavigateComplete2(object sender, AxMOZILLACONTROLLib.DWebBrowserEvents2_NavigateComplete2Event e) + { + GUIPropertyManager.SetProperty("#location.name", wb.Browser.LocationName); + GUIPropertyManager.SetProperty("#location.url", wb.Browser.LocationURL); + } + /// <summary> + /// Handles the DownloadBegin event of the Browser control. + /// </summary> + /// <param name="sender">The source of the event.</param> + /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param> + private void Browser_DownloadBegin(object sender, EventArgs e) + { + GUIMessage msg = new GUIMessage(GUIMessage.MessageType.GUI_MSG_VISIBLE, GetID, 0, (int)Controls.Progress, 0, 0, null); + OnMessage(msg); + } + /// <summary> + /// Handles the BeforeNavigate2 event of the Browser control. + /// </summary> + /// <param name="sender">The sender.</param> + /// <param name="e">The e.</param> + private void Browser_BeforeNavigate2(object sender, AxMOZILLACONTROLLib.DWebBrowserEvents2_BeforeNavigate2Event e) + { + GUIPropertyManager.SetProperty("#location.url", e.uRL.ToString()); + GUIPropertyManager.SetProperty("#status", "Loading " + e.uRL.ToString()); + } + /// <summary> + /// Handles the StatusTextChange event of the Browser control. + /// </summary> + /// <param name="sender">The sender.</param> + /// <param name="e">The e.</param> + private void Browser_StatusTextChange(object sender, AxMOZILLACONTROLLib.DWebBrowserEvents2_StatusTextChangeEvent e) + { + GUIPropertyManager.SetProperty("#status", e.text); + } + /// <summary> + /// Handles the ProgressChange event of the Browser control. + /// </summary> + /// <param name="sender">The sender.</param> + /// <param name="e">The e.</param> + private void Browser_ProgressChange(object sender, AxMOZILLACONTROLLib.DWebBrowserEvents2_ProgressChangeEvent e) + { + double Progress; + GUIProgressControl pControl = (GUIProgressControl)GetControl((int)Controls.Progress); + Progress = (e.progress * 100) / e.progressMax; + pControl.Percentage = Convert.ToInt32(Progress); + } + /// <summary> + /// Handles the DownloadComplete event of the Browser control. + /// </summary> + /// <param name="sender">The source of the event.</param> + /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param> + private void Browser_DownloadComplete(object sender, EventArgs e) + { + GUIMessage msg = new GUIMessage(GUIMessage.MessageType.GUI_MSG_HIDDEN, GetID, 0, (int)Controls.Progress, 0, 0, null); + OnMessage(msg); + } + #endregion + } +} Added: trunk/plugins/WebBrowser/GUIWebBrowser.csproj =================================================================== --- trunk/plugins/WebBrowser/GUIWebBrowser.csproj (rev 0) +++ trunk/plugins/WebBrowser/GUIWebBrowser.csproj 2007-02-02 07:47:21 UTC (rev 79) @@ -0,0 +1,107 @@ +<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <PropertyGroup> + <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> + <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> + <ProductVersion>8.0.50727</ProductVersion> + <SchemaVersion>2.0</SchemaVersion> + <ProjectGuid>{E11423D6-9D7B-4304-9967-077885F58373}</ProjectGuid> + <OutputType>Library</OutputType> + <AppDesignerFolder>Properties</AppDesignerFolder> + <RootNamespace>GUIWebBrowser</RootNamespace> + <AssemblyName>WebBrowser</AssemblyName> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> + <DebugSymbols>true</DebugSymbols> + <DebugType>full</DebugType> + <Optimize>true</Optimize> + <OutputPath>bin\Debug\</OutputPath> + <DefineConstants>DEBUG;TRACE</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> + <DebugType>pdbonly</DebugType> + <Optimize>true</Optimize> + <OutputPath>bin\Release\</OutputPath> + <DefineConstants>TRACE</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + <PlatformTarget>AnyCPU</PlatformTarget> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' "> + <DebugSymbols>true</DebugSymbols> + <OutputPath>bin\Debug\</OutputPath> + <DefineConstants>DEBUG;TRACE</DefineConstants> + <DebugType>full</DebugType> + <PlatformTarget>x86</PlatformTarget> + <ErrorReport>prompt</ErrorReport> + <Optimize>true</Optimize> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' "> + <OutputPath>bin\Release\</OutputPath> + <DefineConstants>TRACE</DefineConstants> + <Optimize>true</Optimize> + <DebugType>pdbonly</DebugType> + <PlatformTarget>x86</PlatformTarget> + <ErrorReport>prompt</ErrorReport> + </PropertyGroup> + <ItemGroup> + <Reference Include="AxMOZILLACONTROLLib, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL"> + <SpecificVersion>False</SpecificVersion> + <HintPath>.\AxMOZILLACONTROLLib.dll</HintPath> + </Reference> + <Reference Include="Core, Version=1.0.2587.17398, Culture=neutral, processorArchitecture=MSIL"> + <SpecificVersion>False</SpecificVersion> + <HintPath>..\..\..\MediaPortal\xbmc\bin\Release\Core.dll</HintPath> + </Reference> + <Reference Include="Dialogs, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL"> + <SpecificVersion>False</SpecificVersion> + <HintPath>..\..\..\MediaPortal\Dialogs\bin\Release\Dialogs.dll</HintPath> + </Reference> + <Reference Include="System" /> + <Reference Include="System.Data" /> + <Reference Include="System.Drawing" /> + <Reference Include="System.Windows.Forms" /> + <Reference Include="Utils, Version=1.0.2587.17396, Culture=neutral, processorArchitecture=MSIL"> + <SpecificVersion>False</SpecificVersion> + <HintPath>..\..\..\MediaPortal\Utils\bin\Release\Utils.dll</HintPath> + </Reference> + </ItemGroup> + <ItemGroup> + <Compile Include="Common.cs" /> + <Compile Include="GUIFavorites.cs" /> + <Compile Include="GUIWebBrowser.cs" /> + <Compile Include="INIFile.cs" /> + <Compile Include="Properties\AssemblyInfo.cs" /> + <Compile Include="WebBrowserControl.cs"> + <SubType>UserControl</SubType> + </Compile> + <Compile Include="WebBrowserControl.Designer.cs"> + <DependentUpon>WebBrowserControl.cs</DependentUpon> + </Compile> + <Compile Include="WebBrowserSetup.cs"> + <SubType>Form</SubType> + </Compile> + <Compile Include="WebBrowserSetup.Designer.cs"> + <DependentUpon>WebBrowserSetup.cs</DependentUpon> + </Compile> + </ItemGroup> + <ItemGroup> + <EmbeddedResource Include="WebBrowserControl.resx"> + <DependentUpon>WebBrowserControl.cs</DependentUpon> + <SubType>Designer</SubType> + </EmbeddedResource> + <EmbeddedResource Include="WebBrowserSetup.resx"> + <DependentUpon>WebBrowserSetup.cs</DependentUpon> + <SubType>Designer</SubType> + </EmbeddedResource> + </ItemGroup> + <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> + <!-- To modify your build process, add your task inside one of the targets below and uncomment it. + Other similar extension points exist, see Microsoft.Common.targets. + <Target Name="BeforeBuild"> + </Target> + <Target Name="AfterBuild"> + </Target> + --> +</Project> \ No newline at end of file Added: trunk/plugins/WebBrowser/GUIWebBrowser.sln =================================================================== --- trunk/plugins/WebBrowser/GUIWebBrowser.sln (rev 0) +++ trunk/plugins/WebBrowser/GUIWebBrowser.sln 2007-02-02 07:47:21 UTC (rev 79) @@ -0,0 +1,26 @@ + +Microsoft Visual Studio Solution File, Format Version 9.00 +# Visual Studio 2005 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GUIWebBrowser", "GUIWebBrowser.csproj", "{E11423D6-9D7B-4304-9967-077885F58373}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Debug|x86 = Debug|x86 + Release|Any CPU = Release|Any CPU + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {E11423D6-9D7B-4304-9967-077885F58373}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E11423D6-9D7B-4304-9967-077885F58373}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E11423D6-9D7B-4304-9967-077885F58373}.Debug|x86.ActiveCfg = Debug|x86 + {E11423D6-9D7B-4304-9967-077885F58373}.Debug|x86.Build.0 = Debug|x86 + {E11423D6-9D7B-4304-9967-077885F58373}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E11423D6-9D7B-4304-9967-077885F58373}.Release|Any CPU.Build.0 = Release|Any CPU + {E11423D6-9D7B-4304-9967-077885F58373}.Release|x86.ActiveCfg = Release|x86 + {E11423D6-9D7B-4304-9967-077885F58373}.Release|x86.Build.0 = Release|x86 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal Added: trunk/plugins/WebBrowser/GUIWebBrowser.suo =================================================================== (Binary files differ) Property changes on: trunk/plugins/WebBrowser/GUIWebBrowser.suo ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/plugins/WebBrowser/INIFile.cs =================================================================== --- trunk/plugins/WebBrowser/INIFile.cs (rev 0) +++ trunk/plugins/WebBrowser/INIFile.cs 2007-02-02 07:47:21 UTC (rev 79) @@ -0,0 +1,83 @@ +#region Copyright (C) 2005-2007 Team MediaPortal + +/* + * Copyright (C) 2005-2007 Team MediaPortal + * http://www.team-mediaportal.com + * + * 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. + * http://www.gnu.org/copyleft/gpl.html + * + */ + +#endregion + +using System; +using System.Runtime.InteropServices; +using System.Text; + +namespace MediaPortal.GUI.WebBrowser +{ + /// <summary> + /// Windows INI File Helper Class + /// </summary> + public class IniFile + { + public string path; + + [DllImport("kernel32")] + private static extern long WritePrivateProfileString(string section, + string key,string val,string filePath); + [DllImport("kernel32")] + private static extern int GetPrivateProfileString(string section, + string key,string def, StringBuilder retVal, + int size,string filePath); + + /// <summary> + /// INIFile Constructor. + /// </summary> + /// <PARAM name="INIPath"></PARAM> + public IniFile(string INIPath) + { + path = INIPath; + } + /// <summary> + /// Write Data to the INI File + /// </summary> + /// <PARAM name="Section"></PARAM> + /// Section name + /// <PARAM name="Key"></PARAM> + /// Key Name + /// <PARAM name="Value"></PARAM> + /// Value Name + public void IniWriteValue(string Section,string Key,string Value) + { + WritePrivateProfileString(Section,Key,Value,this.path); + } + + /// <summary> + /// Read Data Value From the Ini File + /// </summary> + /// <PARAM name="Section"></PARAM> + /// <PARAM name="Key"></PARAM> + /// <PARAM name="Path"></PARAM> + /// <returns></returns> + public string IniReadValue(string Section,string Key) + { + StringBuilder temp = new StringBuilder(255); + int i = GetPrivateProfileString(Section, Key, "", temp, 255, this.path); + return temp.ToString(); + } + } +} Added: trunk/plugins/WebBrowser/MOZILLACONTROLLib.dll =================================================================== (Binary files differ) Property changes on: trunk/plugins/WebBrowser/MOZILLACONTROLLib.dll ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/plugins/WebBrowser/Properties/AssemblyInfo.cs =================================================================== --- trunk/plugins/WebBrowser/Properties/AssemblyInfo.cs (rev 0) +++ trunk/plugins/WebBrowser/Properties/AssemblyInfo.cs 2007-02-02 07:47:21 UTC (rev 79) @@ -0,0 +1,35 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("GUIWebBrowser")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("GUIWebBrowser")] +[assembly: AssemblyCopyright("Copyright © 2006")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("e3f43670-40d9-47a7-8b28-3129c45f0238")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Revision and Build Numbers +// by using the '*' as shown below: +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] Added: trunk/plugins/WebBrowser/Readme.txt =================================================================== --- trunk/plugins/WebBrowser/Readme.txt (rev 0) +++ trunk/plugins/WebBrowser/Readme.txt 2007-02-02 07:47:21 UTC (rev 79) @@ -0,0 +1,14 @@ +Plugin originally developed by Devo + +This plugin requires Mozilla ActiveX Control version 1.7.12 + +Homepage link: http://www.iol.ie/~locka/mozilla/control.htm +Download link: http://www.iol.ie/~locka/mozilla/MozillaControl1712.exe + +The following DLLs need to be placed in the Plugins\Windows directory of the installed MediaPortal for the plugin to work: + +MOZILLACONTROLLib.dll +AxMOZILLACONTROLLib.dll +WebBrowser.dll (output when the project is built) + +Skin files are already in the main MP distribution. If that ever changes, they will be added to this SVN instead. \ No newline at end of file Added: trunk/plugins/WebBrowser/WebBrowserControl.Designer.cs =================================================================== --- trunk/plugins/WebBrowser/WebBrowserControl.Designer.cs (rev 0) +++ trunk/plugins/WebBrowser/WebBrowserControl.Designer.cs 2007-02-02 07:47:21 UTC (rev 79) @@ -0,0 +1,88 @@ +#region Copyright (C) 2005-2007 Team MediaPortal + +/* + * Copyright (C) 2005-2007 Team MediaPortal + * http://www.team-mediaportal.com + * + * 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. + * http://www.gnu.org/copyleft/gpl.html + * + */ + +#endregion + +namespace MediaPortal.GUI.WebBrowser +{ + partial class WebBrowserControl + { + /// <summary> + /// Required designer variable. + /// </summary> + private System.ComponentModel.IContainer components = null; + + /// <summary> + /// Clean up any resources being used. + /// </summary> + /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Component Designer generated code + + /// <summary> + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// </summary> + private void InitializeComponent() + { + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(WebBrowserControl)); + this.axMozillaBrowser1 = new AxMOZILLACONTROLLib.AxMozillaBrowser(); + ((System.ComponentModel.ISupportInitialize)(this.axMozillaBrowser1)).BeginInit(); + this.SuspendLayout(); + // + // axMozillaBrowser1 + // + this.axMozillaBrowser1.Enabled = true; + this.axMozillaBrowser1.Location = new System.Drawing.Point(0, 0); + this.axMozillaBrowser1.Margin = new System.Windows.Forms.Padding(0); + this.axMozillaBrowser1.OcxState = ((System.Windows.Forms.AxHost.State)(resources.GetObject("axMozillaBrowser1.OcxState"))); + this.axMozillaBrowser1.Size = new System.Drawing.Size(720, 473); + this.axMozillaBrowser1.TabIndex = 0; + // + // WebBrowserControl + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Controls.Add(this.axMozillaBrowser1); + this.Margin = new System.Windows.Forms.Padding(0); + this.Name = "WebBrowserControl"; + this.Size = new System.Drawing.Size(720, 473); + this.Layout += new System.Windows.Forms.LayoutEventHandler(this.WebBrowserControl_Layout); + ((System.ComponentModel.ISupportInitialize)(this.axMozillaBrowser1)).EndInit(); + this.ResumeLayout(false); + + } + + #endregion + + private AxMOZILLACONTROLLib.AxMozillaBrowser axMozillaBrowser1; + } +} Added: trunk/plugins/WebBrowser/WebBrowserControl.cs =================================================================== --- trunk/plugins/WebBrowser/WebBrowserControl.cs (rev 0) +++ trunk/plugins/WebBrowser/WebBrowserControl.cs 2007-02-02 07:47:21 UTC (rev 79) @@ -0,0 +1,231 @@ +#region Copyright (C) 2005-2007 Team MediaPortal + +/* + * Copyright (C) 2005-2007 Team MediaPortal + * http://www.team-mediaportal.com + * + * 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. + * http://www.gnu.org/copyleft/gpl.html + * + */ + +#endregion + +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Drawing; +using System.Data; +using System.Text; +using System.Windows.Forms; +using MediaPortal.GUI.Library; + +namespace MediaPortal.GUI.WebBrowser +{ + public sealed partial class WebBrowserControl : UserControl + { + static readonly WebBrowserControl instance = new WebBrowserControl(); + private const int TOP = 55; + private const int LEFT = 4; + private const int HEIGHT = 493; + private Common.MenuState _CurrentMenuState; + + /// <summary> + /// Enumeration for refresh constants + /// </summary> + public enum RefreshConstants + { + REFRESH_NORMAL = 0, + REFRESH_IFEXPIRED = 1, + REFRESH_CONTINUE = 2, + REFRESH_COMPLETELY = 3 + } + + #region Constructor + /// <summary> + /// WebBrowserControl contstructor + /// </summary> + private WebBrowserControl() + { + try + { + + InitializeComponent(); + this.Top = 55; + this.Left = 4; + if (Common.HomePage.Length != 0) + Browser.Navigate(Common.HomePage); + } + catch + { + Log.Error("Unable to load the web browser plugin, verify that Mozilla ActiveX Control is installed"); + } + } + #endregion + + #region Properties + /// <summary> + /// Gets the Mozilla web browser control + /// </summary> + public AxMOZILLACONTROLLib.AxMozillaBrowser Browser + { + get { return axMozillaBrowser1; } + } + /// <summary> + /// Gets the instance. + /// </summary> + /// <value>The instance.</value> + public static WebBrowserControl Instance + { + get + { + return instance; + } + } + #endregion + + #region Private Methods + /// <summary> + /// Rescales & Reszies the browser and control when MediaPortal changes its size + /// </summary> + private void ResizeBrowser() + { + //rescale & resize control + int left = LEFT; + int top = TOP; + int right = this.Right; + int bottom = this.Bottom; + + GUIGraphicsContext.ScaleRectToScreenResolution(ref left, ref top, ref right, ref bottom); + this.Left = left; + this.Top = top; + ScaleVertical(); + ScaleHorizontal(); + } + + /// <summary> + /// Scale y position for current resolution + /// </summary> + private void ScaleVertical() + { + float fSkinHeight = (float)GUIGraphicsContext.SkinSize.Height; ; + float fPercentY = ((float)GUIGraphicsContext.Height) / fSkinHeight; + this.Height = (int)Math.Round(((float)HEIGHT) * fPercentY); + this.Browser.Height = this.Height; + } + + /// <summary> + /// Scale y position for current resolution + /// </summary> + private void ScaleHorizontal() + { + this.Width = GUIGraphicsContext.Width - 4; + this.Browser.Width = this.Width; + } + + /// <summary> + /// Handles the Layout event of the WebBrowserControl control. + /// </summary> + /// <param name="sender">The source of the event.</param> + /// <param name="e">The <see cref="System.Windows.Forms.LayoutEventArgs"/> instance containing the event data.</param> + private void WebBrowserControl_Layout(object sender, LayoutEventArgs e) + { + ResizeBrowser(); + } + #endregion + + #region Public Methods + /// <summary> + /// Toggles the menu between the web browser and the web browser topbar. + /// </summary> + public void ToggleMenu() + { + if (_CurrentMenuState == Common.MenuState.Browser) + { + this.Enabled = false; + GUIGraphicsContext.form.Focus(); + GUIControl.FocusControl(GUIWebBrowser.WINDOW_WEB_BROWSER, (int)GUIWebBrowser.Controls.UrlButton); + _CurrentMenuState = Common.MenuState.TopBar; + } + else + { + this.Enabled = true; + _CurrentMenuState = Common.MenuState.Browser; + } + } + + /// <summary> + /// Refreshes the browser page. + /// </summary> + public void RefreshBrowser() + { + object refreshType = RefreshConstants.REFRESH_COMPLETELY; + this.Browser.Refresh2(ref refreshType); + } + + /// <summary> + /// Navigates to a url + /// </summary> + /// <param name="url">url</param> + public static void OpenUrl(string url) + { + //impliment method to navigate to a url from other controls. + } + #endregion + + #region Protected Methods + /// <summary> + /// Caputures key presses at a lower level than the windows form keypress event. + /// </summary> + /// <param name="msg">A <see cref="T:System.Windows.Forms.Message"/>, passed by reference, that represents the window message to process.</param> + /// <param name="keyData">One of the <see cref="T:System.Windows.Forms.Keys"/> values that represents the key to process.</param> + /// <returns> + /// <see langword="true"/> if the character was processed by + /// the control; otherwise, <see langword="false"/> . + /// </returns> + protected override bool ProcessCmdKey(ref Message msg, Keys keyData) + { + const int WM_KEYDOWN = 0x100; + const int WM_SYSKEYDOWN = 0x104; + bool handled = false; + + if ((msg.Msg == WM_KEYDOWN) || (msg.Msg == WM_SYSKEYDOWN)) + { + switch (keyData) + { + case Keys.F9: //Toggles Menu + ToggleMenu(); + handled = true; + break; + case Keys.F3: //Favorites + GUIWindowManager.ActivateWindow(GUIFavorites.WINDOW_FAVORITES); + handled = true; + break; + case Keys.Escape: //Return to previous screen. + GUIWindowManager.ShowPreviousWindow(); + handled = true; + break; + } + } + + if (!handled) + handled = base.ProcessCmdKey(ref msg, keyData); + + return handled; + } + #endregion + + } +} Added: trunk/plugins/WebBrowser/WebBrowserControl.resx =================================================================== --- trunk/plugins/WebBrowser/WebBrowserControl.resx (rev 0) +++ trunk/plugins/WebBrowser/WebBrowserControl.resx 2007-02-02 07:47:21 UTC (rev 79) @@ -0,0 +1,128 @@ +<?xml version="1.0" encoding="utf-8"?> +<root> + <!-- + Microsoft ResX Schema + + Version 2.0 + + The primary goals of this format is to allow a simple XML format + that is mostly human readable. The generation and parsing of the + various data types are done through the TypeConverter classes + associated with the data types. + + Example: + + ... ado.net/XML headers & schema ... + <resheader name="resmimetype">text/microsoft-resx</resheader> + <resheader name="version">2.0</resheader> + <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> + <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> + <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> + <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> + <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> + <value>[base64 mime encoded serialized .NET Framework object]</value> + </data> + <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> + <comment>This is a comment</comment> + </data> + + There are any number of "resheader" rows that contain simple + name/value pairs. + + Each data row contains a name, and value. The row also contains a + type or mimetype. Type corresponds to a .NET class that support + text/value conversion through the TypeConverter architecture. + Classes that don't support this are serialized and stored with the + mimetype set. + + The mimetype is used for serialized objects, and tells the + ResXResourceReader how to depersist the object. This is currently not + extensible. For a given mimetype the value must be set accordingly: + + Note - application/x-microsoft.net.object.binary.base64 is the format + that the ResXResourceWriter will generate, however the reader can + read any of the formats listed below. + + mimetype: application/x-microsoft.net.object.binary.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.soap.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Soap.SoapFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.bytearray.base64 + value : The object must be serialized into a byte array + : using a System.ComponentModel.TypeConverter + : and then encoded with base64 encoding. + --> + <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> + <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> + <xsd:element name="root" msdata:IsDataSet="true"> + <xsd:complexType> + <xsd:choice maxOccurs="unbounded"> + <xsd:element name="metadata"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" /> + </xsd:sequence> + <xsd:attribute name="name" use="required" type="xsd:string" /> + <xsd:attribute name="type" type="xsd:string" /> + <xsd:attribute name="mimetype" type="xsd:string" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="assembly"> + <xsd:complexType> + <xsd:attribute name="alias" type="xsd:string" /> + <xsd:attribute name="name" type="xsd:string" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="data"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> + <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> + <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="resheader"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" /> + </xsd:complexType> + </xsd:element> + </xsd:choice> + </xsd:complexType> + </xsd:element> + </xsd:schema> + <resheader name="resmimetype"> + <value>text/microsoft-resx</value> + </resheader> + <resheader name="version"> + <value>2.0</value> + </resheader> + <resheader name="reader"> + <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <resheader name="writer"> + <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <data name="axMozillaBrowser1.OcxState" mimetype="application/x-microsoft.net.object.binary.base64"> + <value> + AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj0yLjAuMC4w + LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACFTeXN0 + ZW0uV2luZG93cy5Gb3Jtcy5BeEhvc3QrU3RhdGUBAAAABERhdGEHAgIAAAAJAwAAAA8DAAAAIQAAAAIB + AAAAAQAAAAAAAAAAAAAAAAwAAAAAAwAA2BMAANgTAAAL +</value> + </data> +</root> \ No newline at end of file Added: trunk/plugins/WebBrowser/WebBrowserSetup.Designer.cs =================================================================== --- trunk/plugins/WebBrowser/WebBrowserSetup.Designer.cs (rev 0) +++ trunk/plugins/WebBrowser/WebBrowserSetup.Designer.cs 2007-02-02 07:47:21 UTC (rev 79) @@ -0,0 +1,163 @@ +#region Copyright (C) 2005-2007 Team MediaPortal + +/* + * Copyright (C) 2005-2007 Team MediaPortal + * http://www.team-mediaportal.com + * + * 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. + * http://www.gnu.org/copyleft/gpl.html + * + */ + +#endregion + +namespace MediaPortal.GUI.WebBrowser +{ + partial class WebBrowserSetup + { + /// <summary> + /// Required designer variable. + /// </summary> + private System.ComponentModel.IContainer components = null; + + /// <summary> + /// Clean up any resources being used. + /// </summary> + /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// <summary> + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// </summary> + private void InitializeComponent() + { + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(WebBrowserSetup)); + this.Ok = new MediaPortal.UserInterface.Controls.MPButton(); + this.Cancel = new MediaPortal.UserInterface.Controls.MPButton(); + this.folderBrowserDialog = new System.Windows.Forms.FolderBrowserDialog(); + this.PickFavoritesFolder = new MediaPortal.UserInterface.Controls.MPButton(); + this.FavoritesFolder = new MediaPortal.UserInterface.Controls.MPTextBox(); + this.label1 = new MediaPortal.UserInterface.Controls.MPLabel(); + this.HomePage = new MediaPortal.UserInterface.Controls.MPTextBox(); + this.label2 = new MediaPortal.UserInterface.Controls.MPLabel(); + this.SuspendLayout(); + // + // Ok + // + this.Ok.Location = new System.Drawing.Point(234, 64); + this.Ok.Name = "Ok"; + this.Ok.Size = new System.Drawing.Size(75, 23); + this.Ok.TabIndex = 0; + this.Ok.Text = "&Ok"; + this.Ok.Click += new System.EventHandler(this.Ok_Click); + // + // Cancel + // + this.Cancel.DialogResult = System.Windows.Forms.DialogResult.Cancel; + this.Cancel.Location = new System.Drawing.Point(315, 64); + this.Cancel.Name = "Cancel"; + this.Cancel.Size = new System.Drawing.Size(75, 23); + this.Cancel.TabIndex = 1; + this.Cancel.Text = "&Cancel"; + this.Cancel.Click += new System.EventHandler(this.Cancel_Click); + // + // folderBrowserDialog + // + this.folderBrowserDialog.RootFolder = System.Environment.SpecialFolder.Favorites; + // + // PickFavoritesFolder + // + this.PickFavoritesFolder.Location = new System.Drawing.Point(315, 9); + this.PickFavoritesFolder.Name = "PickFavoritesFolder"; + this.PickFavoritesFolder.Size = new System.Drawing.Size(75, 23); + this.PickFavoritesFolder.TabIndex = 2; + this.PickFavoritesFolder.Text = "Browse..."; + this.PickFavoritesFolder.Click += new System.EventHandler(this.PickFavoritesFolder_Click); + // + // FavoritesFolder + // + this.FavoritesFolder.Location = new System.Drawing.Point(103, 12); + this.FavoritesFolder.Name = "FavoritesFolder"; + this.FavoritesFolder.Size = new System.Drawing.Size(206, 20); + this.FavoritesFolder.TabIndex = 3; + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Location = new System.Drawing.Point(12, 15); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(85, 13); + this.label1.TabIndex = 4; + this.label1.Text = "Favorites Folder:"; + // + // HomePage + // + this.HomePage.Location = new System.Drawing.Point(103, 38); + this.HomePage.Name = "HomePage"; + this.HomePage.Size = new System.Drawing.Size(206, 20); + this.HomePage.TabIndex = 6; + // + // label2 + // + this.label2.AutoSize = true; + this.label2.Location = new System.Drawing.Point(12, 41); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(66, 13); + this.label2.TabIndex = 5; + this.label2.Text = "Home Page:"; + // + // WebBrowserSetup + // + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; + this.ClientSize = new System.Drawing.Size(384, 85); + this.Controls.Add(this.HomePage); + this.Controls.Add(this.label2); + this.Controls.Add(this.label1); + this.Controls.Add(this.FavoritesFolder); + this.Controls.Add(this.PickFavoritesFolder); + this.Controls.Add(this.Cancel); + this.Controls.Add(this.Ok); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle; + this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); + this.Name = "WebBrowserSetup"; + this.Text = "Web Browser Setup"; + this.Load += new System.EventHandler(this.WebBrowserSetup_Load); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private MediaPortal.UserInterface.Controls.MPButton Ok; + private MediaPortal.UserInterface.Controls.MPButton Cancel; + private System.Windows.Forms.FolderBrowserDialog folderBrowserDialog; + private MediaPortal.UserInterface.Controls.MPButton PickFavoritesFolder; + private MediaPortal.UserInterface.Controls.MPTextBox FavoritesFolder; + private MediaPortal.UserInterface.Controls.MPLabel label1; + privat... [truncated message content] |