From: <gre...@us...> - 2007-08-27 14:36:34
|
Revision: 869 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=869&view=rev Author: gregmac45 Date: 2007-08-26 22:44:33 -0700 (Sun, 26 Aug 2007) Log Message: ----------- start of "add video detail screen for apple trailers" Modified Paths: -------------- trunk/plugins/OnlineVideos/Source/OnlineVideos/GUIOnlineVideos.cs trunk/plugins/OnlineVideos/Source/OnlineVideos/OnlineVideos.csproj trunk/plugins/OnlineVideos/Source/OnlineVideos/SiteUtilBase.cs Modified: trunk/plugins/OnlineVideos/Source/OnlineVideos/GUIOnlineVideos.cs =================================================================== --- trunk/plugins/OnlineVideos/Source/OnlineVideos/GUIOnlineVideos.cs 2007-08-26 18:25:08 UTC (rev 868) +++ trunk/plugins/OnlineVideos/Source/OnlineVideos/GUIOnlineVideos.cs 2007-08-27 05:44:33 UTC (rev 869) @@ -48,7 +48,8 @@ { home = 0, categories = 1, - videos = 2 + videos = 2, + info = 3 } public enum View { @@ -216,18 +217,21 @@ { DisplayCategories(); } - else + else if (_CurrentState == State.videos) { DisplayVideos(false); facadeView.SelectedListItemIndex = miSelectedIndex; } + else{ + DisplayVideoDetails(); + } UpdateViewSate(); //base.OnPageLoad(); } protected override void OnShowContextMenu() { int liSelected = facadeView.SelectedListItemIndex-1; - if (liSelected < 0 || msSelectedSiteId=="99" || _CurrentState!=State.videos) + if (liSelected < 0 || msSelectedSiteId=="99" || _CurrentState!=State.videos || _CurrentState!=State.info) { return; } @@ -294,6 +298,14 @@ { if (action.wID == Action.ActionType.ACTION_PREVIOUS_MENU) { + if (_CurrentState == State.info) + { + Log.Info("Set the stopDownload to true 1"); + ImageDownloader._stopDownload = true; + DisplayVideos(false); + _CurrentState = State.videos; + return; + } if (_CurrentState == State.videos) { Log.Info("Set the stopDownload to true 1"); @@ -307,7 +319,8 @@ DisplaySites(); _CurrentState = State.home; return; - } + } + } base.OnAction(action); } @@ -350,11 +363,32 @@ } else { - miSelectedIndex = facadeView.SelectedListItemIndex; + miSelectedIndex = facadeView.SelectedListItemIndex; + if(msSelectedCategory == "20"){ + DiplayVideoDetails(moCurrentVideoList[facadeView.SelectedListItemIndex - 1]); + }else{ + //play the video Play(moCurrentVideoList[facadeView.SelectedListItemIndex -1]); + } } } + else if (_CurrentState == State.info) + { + //Log.Info("Set the stopDownload to true 2"); + ImageDownloader._stopDownload = true; + if (facadeView.SelectedListItemIndex == 0) + { + DisplayVideos(false); + _CurrentState = State.videos; + } + else + { + miSelectedIndex = facadeView.SelectedListItemIndex; + //play the video + Play(moCurrentVideoList[facadeView.SelectedListItemIndex -1]); + } + } UpdateViewSate(); } else if (control == btnViewAs) @@ -367,6 +401,11 @@ } base.OnClicked(controlId, control, actionType); } + + private void DiplayVideoDetails(VideoInfo videoInfo) + { + throw new Exception("The method or operation is not implemented."); + } public override bool OnMessage(GUIMessage message) { /* @@ -791,6 +830,11 @@ GUIPropertyManager.SetProperty("#header.image","OnlineVidlogo"+msSelectedSiteId+".jpeg"); DisplayVideoInfo(null); break; + case State.info: + GUIPropertyManager.SetProperty("#header.label",String.Empty); + GUIPropertyManager.SetProperty("#header.image",String.Empty); + DisplayVideoInfo(null); + break; } } private void ChangeFacadeView(){ Modified: trunk/plugins/OnlineVideos/Source/OnlineVideos/OnlineVideos.csproj =================================================================== --- trunk/plugins/OnlineVideos/Source/OnlineVideos/OnlineVideos.csproj 2007-08-26 18:25:08 UTC (rev 868) +++ trunk/plugins/OnlineVideos/Source/OnlineVideos/OnlineVideos.csproj 2007-08-27 05:44:33 UTC (rev 869) @@ -37,15 +37,13 @@ <WarningLevel>4</WarningLevel> </PropertyGroup> <ItemGroup> - <Reference Include="Core, Version=0.2.2.0, Culture=neutral, processorArchitecture=x86"> + <Reference Include="Core, Version=0.2.2.9991, Culture=neutral, processorArchitecture=x86"> <SpecificVersion>False</SpecificVersion> - <HintPath>..\..\..\..\Mediaportal\Core\bin\Release\Core.DLL</HintPath> - <Private>False</Private> + <HintPath>C:\Program Files\Team MediaPortal\MediaPortal\Core.DLL</HintPath> </Reference> - <Reference Include="Databases"> - <HintPath>..\..\..\..\Mediaportal\Databases\bin\Debug\Databases.dll</HintPath> + <Reference Include="Databases, Version=0.2.2.9991, Culture=neutral, processorArchitecture=x86"> <SpecificVersion>False</SpecificVersion> - <Private>False</Private> + <HintPath>C:\Program Files\Team MediaPortal\MediaPortal\Databases.DLL</HintPath> </Reference> <Reference Include="Dialogs, Version=0.0.0.0, Culture=neutral, processorArchitecture=x86"> <SpecificVersion>False</SpecificVersion> @@ -68,14 +66,15 @@ <Reference Include="System.Xml"> <Private>False</Private> </Reference> - <Reference Include="Utils, Version=2.1.2.0, Culture=neutral, processorArchitecture=x86"> + <Reference Include="Utils, Version=0.2.2.9991, Culture=neutral, processorArchitecture=x86"> <SpecificVersion>False</SpecificVersion> - <HintPath>..\..\..\..\Mediaportal\Utils\bin\Release\Utils.DLL</HintPath> - <Private>False</Private> + <HintPath>C:\Program Files\Team MediaPortal\MediaPortal\Utils.DLL</HintPath> </Reference> </ItemGroup> <ItemGroup> - <Compile Include="Configuration.cs" /> + <Compile Include="Configuration.cs"> + <SubType>Form</SubType> + </Compile> <Compile Include="Configuration.Designer.cs"> <DependentUpon>Configuration.cs</DependentUpon> </Compile> @@ -124,6 +123,7 @@ <Compile Include="BreakUtil.cs" /> <EmbeddedResource Include="Configuration.resx"> <DependentUpon>Configuration.Designer.cs</DependentUpon> + <SubType>Designer</SubType> </EmbeddedResource> </ItemGroup> <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> Modified: trunk/plugins/OnlineVideos/Source/OnlineVideos/SiteUtilBase.cs =================================================================== --- trunk/plugins/OnlineVideos/Source/OnlineVideos/SiteUtilBase.cs 2007-08-26 18:25:08 UTC (rev 868) +++ trunk/plugins/OnlineVideos/Source/OnlineVideos/SiteUtilBase.cs 2007-08-27 05:44:33 UTC (rev 869) @@ -293,7 +293,7 @@ _workerCompleted = true; //return HTMLdownload; } - public abstract String getSiteId(); + public static abstract String getSiteId(); protected bool isPossibleVideo(string fsUrl){ string extensionFile = System.IO.Path.GetExtension(fsUrl).ToLower(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |