From: <jmb...@us...> - 2013-06-27 08:19:54
|
Revision: 4581 http://sourceforge.net/p/mp-plugins/code/4581 Author: jmbillings Date: 2013-06-27 08:19:45 +0000 (Thu, 27 Jun 2013) Log Message: ----------- Change to add 1.4 compatibility. Still trouble moving back where image not found to be fixed. Modified Paths: -------------- trunk/plugins/APODPlugin/APODPlugin/APODDownloader.cs trunk/plugins/APODPlugin/APODPlugin/APODPlugin.cs trunk/plugins/APODPlugin/APODPlugin/Properties/AssemblyInfo.cs trunk/plugins/APODPlugin/APODPlugin/bin/Debug/APODPlugin.dll trunk/plugins/APODPlugin/APODPlugin/bin/Debug/APODPlugin.pdb trunk/plugins/APODPlugin/APODPlugin/bin/Debug/Bass.Net.dll trunk/plugins/APODPlugin/APODPlugin/bin/Debug/BassRegistration.dll trunk/plugins/APODPlugin/APODPlugin/bin/Debug/BassVisAPI.Net.dll trunk/plugins/APODPlugin/APODPlugin/bin/Debug/Common.Utils.dll trunk/plugins/APODPlugin/APODPlugin/bin/Debug/Core.dll trunk/plugins/APODPlugin/APODPlugin/bin/Debug/Dialogs.dll trunk/plugins/APODPlugin/APODPlugin/bin/Debug/DirectShowLib.dll trunk/plugins/APODPlugin/APODPlugin/bin/Debug/MediaPortal.Support.dll trunk/plugins/APODPlugin/APODPlugin/bin/Debug/Utils.dll trunk/plugins/APODPlugin/APODPlugin/bin/Debug/log4net.dll trunk/plugins/APODPlugin/APODPlugin/bin/Debug/taglib-sharp.dll trunk/plugins/APODPlugin/APODPlugin/obj/Debug/APODPlugin.csproj.FileListAbsolute.txt trunk/plugins/APODPlugin/APODPlugin/obj/Debug/APODPlugin.dll trunk/plugins/APODPlugin/APODPlugin/obj/Debug/APODPlugin.pdb Modified: trunk/plugins/APODPlugin/APODPlugin/APODDownloader.cs =================================================================== --- trunk/plugins/APODPlugin/APODPlugin/APODDownloader.cs 2013-06-21 22:22:46 UTC (rev 4580) +++ trunk/plugins/APODPlugin/APODPlugin/APODDownloader.cs 2013-06-27 08:19:45 UTC (rev 4581) @@ -28,11 +28,19 @@ apodURLs.Add(APODURL); } - internal void GetImage(int step) + internal bool GetImage(int step) { - currentStep = step; - client.OpenReadCompleted += new OpenReadCompletedEventHandler(readComplete); - client.OpenReadAsync(new Uri(apodURLs[step])); + try + { + currentStep = step; + client.OpenReadCompleted += new OpenReadCompletedEventHandler(readComplete); + client.OpenReadAsync(new Uri(apodURLs[step])); + return true; + } + catch (IndexOutOfRangeException ex) + { + return false; //no image to get! + } } private void readComplete(object sender, OpenReadCompletedEventArgs args) Modified: trunk/plugins/APODPlugin/APODPlugin/APODPlugin.cs =================================================================== --- trunk/plugins/APODPlugin/APODPlugin/APODPlugin.cs 2013-06-21 22:22:46 UTC (rev 4580) +++ trunk/plugins/APODPlugin/APODPlugin/APODPlugin.cs 2013-06-27 08:19:45 UTC (rev 4581) @@ -133,7 +133,18 @@ GUIWaitCursor.Show(); downloading = true; imageStep = imageStep + 1; - downloader.GetImage(imageStep); + if (!downloader.GetImage(imageStep)) + { + GUIDialogOK dlgOK = (GUIDialogOK)GUIWindowManager.GetWindow((int)GUIWindow.Window.WINDOW_DIALOG_OK); + if (dlgOK != null) + { + dlgOK.SetHeading("Info"); + dlgOK.SetLine(1, "This is the first image!"); + dlgOK.DoModal(this.GetWindowId()); + } + downloading = false; + imageStep = imageStep - 1; //set counter back to where we were + } } else if (action.wID == MediaPortal.GUI.Library.Action.ActionType.ACTION_MOVE_RIGHT) { @@ -147,6 +158,7 @@ dlgOK.SetLine(1, "This is the most recent image!"); dlgOK.DoModal(this.GetWindowId()); } + downloading = false; return; } GUIWaitCursor.Show(); @@ -193,7 +205,7 @@ GUIDialogOK dlgOK = (GUIDialogOK)GUIWindowManager.GetWindow((int)GUIWindow.Window.WINDOW_DIALOG_OK); if (dlgOK != null) { - dlgOK.SetHeading("Error" /* or Message */); + dlgOK.SetHeading("Error"); dlgOK.SetLine(1, "An exception occurred during download:"); dlgOK.SetLine(2, e.downloadException.Message); dlgOK.DoModal(this.GetWindowId()); Modified: trunk/plugins/APODPlugin/APODPlugin/Properties/AssemblyInfo.cs =================================================================== --- trunk/plugins/APODPlugin/APODPlugin/Properties/AssemblyInfo.cs 2013-06-21 22:22:46 UTC (rev 4580) +++ trunk/plugins/APODPlugin/APODPlugin/Properties/AssemblyInfo.cs 2013-06-27 08:19:45 UTC (rev 4581) @@ -14,7 +14,7 @@ [assembly: AssemblyCopyright("Copyright © 2013")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] -[assembly: CompatibleVersion("1.2.300.0")] +[assembly: CompatibleVersion("1.4.0.0")] [assembly: UsesSubsystem("MP.SkinEngine")] [assembly: UsesSubsystem("MP.Config")] Modified: trunk/plugins/APODPlugin/APODPlugin/bin/Debug/APODPlugin.dll =================================================================== (Binary files differ) Modified: trunk/plugins/APODPlugin/APODPlugin/bin/Debug/APODPlugin.pdb =================================================================== (Binary files differ) Modified: trunk/plugins/APODPlugin/APODPlugin/bin/Debug/Bass.Net.dll =================================================================== (Binary files differ) Modified: trunk/plugins/APODPlugin/APODPlugin/bin/Debug/BassRegistration.dll =================================================================== (Binary files differ) Modified: trunk/plugins/APODPlugin/APODPlugin/bin/Debug/BassVisAPI.Net.dll =================================================================== (Binary files differ) Modified: trunk/plugins/APODPlugin/APODPlugin/bin/Debug/Common.Utils.dll =================================================================== (Binary files differ) Modified: trunk/plugins/APODPlugin/APODPlugin/bin/Debug/Core.dll =================================================================== (Binary files differ) Modified: trunk/plugins/APODPlugin/APODPlugin/bin/Debug/Dialogs.dll =================================================================== (Binary files differ) Modified: trunk/plugins/APODPlugin/APODPlugin/bin/Debug/DirectShowLib.dll =================================================================== (Binary files differ) Modified: trunk/plugins/APODPlugin/APODPlugin/bin/Debug/MediaPortal.Support.dll =================================================================== (Binary files differ) Modified: trunk/plugins/APODPlugin/APODPlugin/bin/Debug/Utils.dll =================================================================== (Binary files differ) Modified: trunk/plugins/APODPlugin/APODPlugin/bin/Debug/log4net.dll =================================================================== (Binary files differ) Modified: trunk/plugins/APODPlugin/APODPlugin/bin/Debug/taglib-sharp.dll =================================================================== (Binary files differ) Modified: trunk/plugins/APODPlugin/APODPlugin/obj/Debug/APODPlugin.csproj.FileListAbsolute.txt =================================================================== --- trunk/plugins/APODPlugin/APODPlugin/obj/Debug/APODPlugin.csproj.FileListAbsolute.txt 2013-06-21 22:22:46 UTC (rev 4580) +++ trunk/plugins/APODPlugin/APODPlugin/obj/Debug/APODPlugin.csproj.FileListAbsolute.txt 2013-06-27 08:19:45 UTC (rev 4581) @@ -18,3 +18,5 @@ c:\Users\jamesb\Documents\Visual Studio 2012\Projects\APODPlugin\APODPlugin\obj\Debug\APODPlugin.dll c:\Users\jamesb\Documents\Visual Studio 2012\Projects\APODPlugin\APODPlugin\obj\Debug\APODPlugin.pdb c:\Users\jamesb\Documents\Visual Studio 2012\Projects\APODPlugin\APODPlugin\bin\Debug\APODPlugin.xml +C:\Users\jamesb\documents\visual studio 2012\Projects\APODPlugin\APODPlugin\bin\Debug\Microsoft.WindowsAPICodePack.Shell.dll +C:\Users\jamesb\documents\visual studio 2012\Projects\APODPlugin\APODPlugin\bin\Debug\Microsoft.WindowsAPICodePack.dll Modified: trunk/plugins/APODPlugin/APODPlugin/obj/Debug/APODPlugin.dll =================================================================== (Binary files differ) Modified: trunk/plugins/APODPlugin/APODPlugin/obj/Debug/APODPlugin.pdb =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jmb...@us...> - 2013-06-27 15:24:18
|
Revision: 4582 http://sourceforge.net/p/mp-plugins/code/4582 Author: jmbillings Date: 2013-06-27 15:24:14 +0000 (Thu, 27 Jun 2013) Log Message: ----------- Modified Paths: -------------- trunk/plugins/APODPlugin/APODPlugin/APODPlugin.cs trunk/plugins/APODPlugin/APODPlugin/bin/Debug/APODPlugin.dll trunk/plugins/APODPlugin/APODPlugin/bin/Debug/APODPlugin.pdb trunk/plugins/APODPlugin/APODPlugin/obj/Debug/APODPlugin.csproj.FileListAbsolute.txt trunk/plugins/APODPlugin/APODPlugin/obj/Debug/APODPlugin.dll trunk/plugins/APODPlugin/APODPlugin/obj/Debug/APODPlugin.pdb trunk/plugins/APODPlugin/APODPlugin/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache Modified: trunk/plugins/APODPlugin/APODPlugin/APODPlugin.cs =================================================================== --- trunk/plugins/APODPlugin/APODPlugin/APODPlugin.cs 2013-06-27 08:19:45 UTC (rev 4581) +++ trunk/plugins/APODPlugin/APODPlugin/APODPlugin.cs 2013-06-27 15:24:14 UTC (rev 4582) @@ -139,7 +139,7 @@ if (dlgOK != null) { dlgOK.SetHeading("Info"); - dlgOK.SetLine(1, "This is the first image!"); + dlgOK.SetLine(1, "This is the first image, no more to see!"); dlgOK.DoModal(this.GetWindowId()); } downloading = false; Modified: trunk/plugins/APODPlugin/APODPlugin/bin/Debug/APODPlugin.dll =================================================================== (Binary files differ) Modified: trunk/plugins/APODPlugin/APODPlugin/bin/Debug/APODPlugin.pdb =================================================================== (Binary files differ) Modified: trunk/plugins/APODPlugin/APODPlugin/obj/Debug/APODPlugin.csproj.FileListAbsolute.txt =================================================================== --- trunk/plugins/APODPlugin/APODPlugin/obj/Debug/APODPlugin.csproj.FileListAbsolute.txt 2013-06-27 08:19:45 UTC (rev 4581) +++ trunk/plugins/APODPlugin/APODPlugin/obj/Debug/APODPlugin.csproj.FileListAbsolute.txt 2013-06-27 15:24:14 UTC (rev 4582) @@ -20,3 +20,20 @@ c:\Users\jamesb\Documents\Visual Studio 2012\Projects\APODPlugin\APODPlugin\bin\Debug\APODPlugin.xml C:\Users\jamesb\documents\visual studio 2012\Projects\APODPlugin\APODPlugin\bin\Debug\Microsoft.WindowsAPICodePack.Shell.dll C:\Users\jamesb\documents\visual studio 2012\Projects\APODPlugin\APODPlugin\bin\Debug\Microsoft.WindowsAPICodePack.dll +C:\Users\james.billings\Documents\Visual Studio 2012\Projects\APODPlugin\APODPlugin\bin\Debug\APODPlugin.xml +C:\Users\james.billings\Documents\Visual Studio 2012\Projects\APODPlugin\APODPlugin\bin\Debug\APODPlugin.dll +C:\Users\james.billings\Documents\Visual Studio 2012\Projects\APODPlugin\APODPlugin\bin\Debug\APODPlugin.pdb +C:\Users\james.billings\Documents\Visual Studio 2012\Projects\APODPlugin\APODPlugin\bin\Debug\log4net.dll +C:\Users\james.billings\Documents\Visual Studio 2012\Projects\APODPlugin\APODPlugin\bin\Debug\Bass.Net.dll +C:\Users\james.billings\Documents\Visual Studio 2012\Projects\APODPlugin\APODPlugin\bin\Debug\DirectShowLib.dll +C:\Users\james.billings\Documents\Visual Studio 2012\Projects\APODPlugin\APODPlugin\bin\Debug\Utils.dll +C:\Users\james.billings\Documents\Visual Studio 2012\Projects\APODPlugin\APODPlugin\bin\Debug\BassVisAPI.Net.dll +C:\Users\james.billings\Documents\Visual Studio 2012\Projects\APODPlugin\APODPlugin\bin\Debug\taglib-sharp.dll +C:\Users\james.billings\Documents\Visual Studio 2012\Projects\APODPlugin\APODPlugin\bin\Debug\AxInterop.WMPLib.dll +C:\Users\james.billings\Documents\Visual Studio 2012\Projects\APODPlugin\APODPlugin\bin\Debug\edtftpnet-1.2.2.dll +C:\Users\james.billings\Documents\Visual Studio 2012\Projects\APODPlugin\APODPlugin\bin\Debug\BassRegistration.dll +C:\Users\james.billings\Documents\Visual Studio 2012\Projects\APODPlugin\APODPlugin\bin\Debug\Interop.WMPLib.dll +C:\Users\james.billings\Documents\Visual Studio 2012\Projects\APODPlugin\APODPlugin\bin\Debug\Ionic.Zip.dll +C:\Users\james.billings\Documents\Visual Studio 2012\Projects\APODPlugin\APODPlugin\obj\Debug\APODPlugin.csprojResolveAssemblyReference.cache +C:\Users\james.billings\Documents\Visual Studio 2012\Projects\APODPlugin\APODPlugin\obj\Debug\APODPlugin.dll +C:\Users\james.billings\Documents\Visual Studio 2012\Projects\APODPlugin\APODPlugin\obj\Debug\APODPlugin.pdb Modified: trunk/plugins/APODPlugin/APODPlugin/obj/Debug/APODPlugin.dll =================================================================== (Binary files differ) Modified: trunk/plugins/APODPlugin/APODPlugin/obj/Debug/APODPlugin.pdb =================================================================== (Binary files differ) Modified: trunk/plugins/APODPlugin/APODPlugin/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jmb...@us...> - 2013-07-01 16:21:22
|
Revision: 4586 http://sourceforge.net/p/mp-plugins/code/4586 Author: jmbillings Date: 2013-07-01 16:21:19 +0000 (Mon, 01 Jul 2013) Log Message: ----------- Update AssemblyInfo.cs Modified Paths: -------------- trunk/plugins/APODPlugin/APODPlugin/Properties/AssemblyInfo.cs trunk/plugins/APODPlugin/APODPlugin/bin/Debug/APODPlugin.dll trunk/plugins/APODPlugin/APODPlugin/bin/Debug/APODPlugin.pdb trunk/plugins/APODPlugin/APODPlugin/obj/Debug/APODPlugin.dll trunk/plugins/APODPlugin/APODPlugin/obj/Debug/APODPlugin.pdb Modified: trunk/plugins/APODPlugin/APODPlugin/Properties/AssemblyInfo.cs =================================================================== --- trunk/plugins/APODPlugin/APODPlugin/Properties/AssemblyInfo.cs 2013-07-01 16:16:42 UTC (rev 4585) +++ trunk/plugins/APODPlugin/APODPlugin/Properties/AssemblyInfo.cs 2013-07-01 16:21:19 UTC (rev 4586) @@ -7,7 +7,7 @@ // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle("APODPlugin")] -[assembly: AssemblyDescription("")] +[assembly: AssemblyDescription("APOD Plugin")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("APODPlugin")] Modified: trunk/plugins/APODPlugin/APODPlugin/bin/Debug/APODPlugin.dll =================================================================== (Binary files differ) Modified: trunk/plugins/APODPlugin/APODPlugin/bin/Debug/APODPlugin.pdb =================================================================== (Binary files differ) Modified: trunk/plugins/APODPlugin/APODPlugin/obj/Debug/APODPlugin.dll =================================================================== (Binary files differ) Modified: trunk/plugins/APODPlugin/APODPlugin/obj/Debug/APODPlugin.pdb =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jmb...@us...> - 2013-07-01 16:28:55
|
Revision: 4587 http://sourceforge.net/p/mp-plugins/code/4587 Author: jmbillings Date: 2013-07-01 16:28:48 +0000 (Mon, 01 Jul 2013) Log Message: ----------- Set PostDeploy.ps1 as "content" Modified Paths: -------------- trunk/plugins/APODPlugin/APODPlugin/APODPlugin.csproj trunk/plugins/APODPlugin/APODPlugin/bin/Debug/APODPlugin.dll trunk/plugins/APODPlugin/APODPlugin/bin/Debug/APODPlugin.pdb trunk/plugins/APODPlugin/APODPlugin/obj/Debug/APODPlugin.dll trunk/plugins/APODPlugin/APODPlugin/obj/Debug/APODPlugin.pdb Modified: trunk/plugins/APODPlugin/APODPlugin/APODPlugin.csproj =================================================================== --- trunk/plugins/APODPlugin/APODPlugin/APODPlugin.csproj 2013-07-01 16:21:19 UTC (rev 4586) +++ trunk/plugins/APODPlugin/APODPlugin/APODPlugin.csproj 2013-07-01 16:28:48 UTC (rev 4587) @@ -66,9 +66,9 @@ </Content> </ItemGroup> <ItemGroup> - <None Include="PostDeploy.ps1"> + <Content Include="PostDeploy.ps1"> <CopyToOutputDirectory>Always</CopyToOutputDirectory> - </None> + </Content> </ItemGroup> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <!-- To modify your build process, add your task inside one of the targets below and uncomment it. Modified: trunk/plugins/APODPlugin/APODPlugin/bin/Debug/APODPlugin.dll =================================================================== (Binary files differ) Modified: trunk/plugins/APODPlugin/APODPlugin/bin/Debug/APODPlugin.pdb =================================================================== (Binary files differ) Modified: trunk/plugins/APODPlugin/APODPlugin/obj/Debug/APODPlugin.dll =================================================================== (Binary files differ) Modified: trunk/plugins/APODPlugin/APODPlugin/obj/Debug/APODPlugin.pdb =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jmb...@us...> - 2013-07-08 08:11:21
|
Revision: 4598 http://sourceforge.net/p/mp-plugins/code/4598 Author: jmbillings Date: 2013-07-08 08:11:17 +0000 (Mon, 08 Jul 2013) Log Message: ----------- Fix for pages where no image is present so we skip over them Modified Paths: -------------- trunk/plugins/APODPlugin/APODPlugin/APODDownloader.cs trunk/plugins/APODPlugin/APODPlugin/APODPlugin.cs trunk/plugins/APODPlugin/APODPlugin/APODPlugin.csproj trunk/plugins/APODPlugin/APODPlugin/bin/Debug/APODPlugin.dll trunk/plugins/APODPlugin/APODPlugin/bin/Debug/APODPlugin.pdb trunk/plugins/APODPlugin/APODPlugin/bin/Debug/PostDeploy.ps1 trunk/plugins/APODPlugin/APODPlugin/obj/Debug/APODPlugin.csproj.FileListAbsolute.txt trunk/plugins/APODPlugin/APODPlugin/obj/Debug/APODPlugin.dll trunk/plugins/APODPlugin/APODPlugin/obj/Debug/APODPlugin.pdb trunk/plugins/APODPlugin/APODPlugin/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache Added Paths: ----------- trunk/plugins/APODPlugin/APODPlugin/directions.cs Modified: trunk/plugins/APODPlugin/APODPlugin/APODDownloader.cs =================================================================== --- trunk/plugins/APODPlugin/APODPlugin/APODDownloader.cs 2013-07-05 20:44:18 UTC (rev 4597) +++ trunk/plugins/APODPlugin/APODPlugin/APODDownloader.cs 2013-07-08 08:11:17 UTC (rev 4598) @@ -14,12 +14,15 @@ String APODURL = "http://apod.nasa.gov/apod/astropix.html"; internal event downloadErrorEvent onDownloadError; internal event downloadCompleteEvent onDownloadComplete; + internal event downloadNoImageFound onDownloadNoImageFound; public delegate void downloadErrorEvent(object sender, downloadErrorEventArgs e); public delegate void downloadCompleteEvent(object sender, downloadCompleteEventArgs e); + public delegate void downloadNoImageFound(object sender, downloadNoImageEventArgs e); WebClient client; WebClient imageClient; List<String> apodURLs; int currentStep = 0; + directions direction; internal APODDownloader() { @@ -28,10 +31,11 @@ apodURLs.Add(APODURL); } - internal bool GetImage(int step) + internal bool GetImage(int step, directions d) { try { + direction = d; currentStep = step; client.OpenReadCompleted += new OpenReadCompletedEventHandler(readComplete); client.OpenReadAsync(new Uri(apodURLs[step])); @@ -67,6 +71,13 @@ client.OpenReadCompleted -= readComplete; client.Dispose(); + //Find the previous page URL as well... i.e. <a href="ap130319.html"><</a> + Match prevMatcher = Regex.Match(pagesource, "(?<=<a href=\")(.+?)(?=\"><</a>)"); + String prevURL = "http://apod.nasa.gov/apod/" + prevMatcher.Value; + if (!apodURLs.Contains(prevURL)) + apodURLs.Add(prevURL); + + //Now look for image Match sourceMatcher = Regex.Match(pagesource, "(?<=<IMG SRC=\")(.+?)(?=\")", RegexOptions.Singleline); if (sourceMatcher.Success) { @@ -75,14 +86,9 @@ } else { - onDownloadError(this, new downloadErrorEventArgs(new Exception("Couldn't find image source :("))); + onDownloadNoImageFound(this, new downloadNoImageEventArgs(direction)); + //onDownloadError(this, new downloadErrorEventArgs(new Exception("No image found, this one might have been a Video... :)"))); } - - //Find the previous page URL as well... i.e. <a href="ap130319.html"><</a> - Match prevMatcher = Regex.Match(pagesource, "(?<=<a href=\")(.+?)(?=\"><</a>)"); - String prevURL = "http://apod.nasa.gov/apod/" + prevMatcher.Value; - if (!apodURLs.Contains(prevURL)) - apodURLs.Add(prevURL); } catch (Exception ex) { @@ -134,4 +140,13 @@ bitmap = b; } } + + internal class downloadNoImageEventArgs : EventArgs + { + internal directions scrollDirection; + internal downloadNoImageEventArgs(directions d) + { + scrollDirection = d; + } + } } Modified: trunk/plugins/APODPlugin/APODPlugin/APODPlugin.cs =================================================================== --- trunk/plugins/APODPlugin/APODPlugin/APODPlugin.cs 2013-07-05 20:44:18 UTC (rev 4597) +++ trunk/plugins/APODPlugin/APODPlugin/APODPlugin.cs 2013-07-08 08:11:17 UTC (rev 4598) @@ -119,7 +119,8 @@ downloader = new APODDownloader(); downloader.onDownloadError += downloader_onDownloadError; downloader.onDownloadComplete += downloader_onDownloadComplete; - downloader.GetImage(imageStep); + downloader.onDownloadNoImageFound += downloader_onDownloadNoImageFound; + downloader.GetImage(imageStep, directions.LEFT); } public override void OnAction(MediaPortal.GUI.Library.Action action) @@ -129,11 +130,28 @@ if (action.wID == MediaPortal.GUI.Library.Action.ActionType.ACTION_MOVE_LEFT) { + doDownload(directions.LEFT); + } + else if (action.wID == MediaPortal.GUI.Library.Action.ActionType.ACTION_MOVE_RIGHT) + { + doDownload(directions.RIGHT); + } + else if (action.wID == MediaPortal.GUI.Library.Action.ActionType.ACTION_SHOW_INFO) + { + //User pressed i + + } + } + + private void doDownload(directions d) + { + if (d == directions.LEFT) + { //User pressed Left GUIWaitCursor.Show(); downloading = true; imageStep = imageStep + 1; - if (!downloader.GetImage(imageStep)) + if (!downloader.GetImage(imageStep, directions.LEFT)) { GUIDialogOK dlgOK = (GUIDialogOK)GUIWindowManager.GetWindow((int)GUIWindow.Window.WINDOW_DIALOG_OK); if (dlgOK != null) @@ -146,7 +164,7 @@ imageStep = imageStep - 1; //set counter back to where we were } } - else if (action.wID == MediaPortal.GUI.Library.Action.ActionType.ACTION_MOVE_RIGHT) + else if (d == directions.RIGHT) { //User pressed right if (imageStep == 0) @@ -164,15 +182,17 @@ GUIWaitCursor.Show(); downloading = true; imageStep = imageStep - 1; - downloader.GetImage(imageStep); + downloader.GetImage(imageStep, directions.RIGHT); } - else if (action.wID == MediaPortal.GUI.Library.Action.ActionType.ACTION_SHOW_INFO) - { - //User pressed i - - } } + void downloader_onDownloadNoImageFound(object sender, downloadNoImageEventArgs e) + { + //happens when no image found; skip next back/forwards in series. + GUIWaitCursor.Hide(); + doDownload(e.scrollDirection); + } + void downloader_onDownloadComplete(object sender, downloadCompleteEventArgs e) { Rectangle screenRect = Screen.PrimaryScreen.Bounds; Modified: trunk/plugins/APODPlugin/APODPlugin/APODPlugin.csproj =================================================================== --- trunk/plugins/APODPlugin/APODPlugin/APODPlugin.csproj 2013-07-05 20:44:18 UTC (rev 4597) +++ trunk/plugins/APODPlugin/APODPlugin/APODPlugin.csproj 2013-07-08 08:11:17 UTC (rev 4598) @@ -57,6 +57,7 @@ <ItemGroup> <Compile Include="APODDownloader.cs" /> <Compile Include="APODPlugin.cs" /> + <Compile Include="directions.cs" /> <Compile Include="Properties\AssemblyInfo.cs" /> </ItemGroup> <ItemGroup> Modified: trunk/plugins/APODPlugin/APODPlugin/bin/Debug/APODPlugin.dll =================================================================== (Binary files differ) Modified: trunk/plugins/APODPlugin/APODPlugin/bin/Debug/APODPlugin.pdb =================================================================== (Binary files differ) Modified: trunk/plugins/APODPlugin/APODPlugin/bin/Debug/PostDeploy.ps1 =================================================================== --- trunk/plugins/APODPlugin/APODPlugin/bin/Debug/PostDeploy.ps1 2013-07-05 20:44:18 UTC (rev 4597) +++ trunk/plugins/APODPlugin/APODPlugin/bin/Debug/PostDeploy.ps1 2013-07-08 08:11:17 UTC (rev 4598) @@ -1 +1,59 @@ -print "test" \ No newline at end of file +write "Copying Files to Mediaportal folders" +if ([System.IntPtr]::Size -eq 4) +{ + write "32-bit OS detected..." + if (Test-Path 'C:\Program Files\team mediaportal\mediaportal\plugins\windows') + { + Copy-Item -Path '.\lib\net35\APODPlugin.dll' -Destination 'C:\Program Files\team mediaportal\mediaportal\plugins\windows' + write "Copied plugin DLL to Mediaportal Plugins folder" + } + else + { + write "Mediaportal plugins folder not found. Is Mediaportal installed..?" + } +} +else +{ + write "64-bit OS detected..." + if (Test-Path 'C:\Program Files (x86)\team mediaportal\mediaportal\plugins\windows') + { + Copy-Item -Path '.\lib\net35\APODPlugin.dll' -Destination 'C:\Program Files (x86)\team mediaportal\mediaportal\plugins\windows' + write "Copied plugin DLL to Mediaportal Plugins folder" + } + else + { + write "Mediaportal plugins folder not found. Is Mediaportal installed..?" + } +} + +if (Test-Path 'C:\ProgramData\Team Mediaportal\Mediaportal\Skin\Default') +{ + Copy-Item -Path '.\content\APODPlugin.xml' -Destination 'C:\ProgramData\Team Mediaportal\Mediaportal\Skin\Default' + write "Copied Plugin XML to Default skin folder" +} +else +{ + write "Default skin folder not found, skipping file copy" +} + +if (Test-Path 'C:\ProgramData\Team Mediaportal\Mediaportal\Skin\DefaultWide') +{ + Copy-Item -Path '.\content\APODPlugin.xml' -Destination 'C:\ProgramData\Team Mediaportal\Mediaportal\Skin\DefaultWide' + write "Copied Plugin XML to DefaultWide skin folder" +} +else +{ + write "DefaultWide skin folder not found, skipping file copy" +} + +if (Test-Path 'C:\ProgramData\Team Mediaportal\Mediaportal\Skin\Titan') +{ + Copy-Item -Path '.\content\APODPlugin.xml' -Destination 'C:\ProgramData\Team Mediaportal\Mediaportal\Skin\Titan' + write "Copied Plugin XML to Titan skin folder" +} +else +{ + write "Titan skin folder not found, skipping file copy" +} + +write "Plugin installation ended" Added: trunk/plugins/APODPlugin/APODPlugin/directions.cs =================================================================== --- trunk/plugins/APODPlugin/APODPlugin/directions.cs (rev 0) +++ trunk/plugins/APODPlugin/APODPlugin/directions.cs 2013-07-08 08:11:17 UTC (rev 4598) @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace APODPlugin +{ + public enum directions + { + LEFT, + RIGHT + } +} Modified: trunk/plugins/APODPlugin/APODPlugin/obj/Debug/APODPlugin.csproj.FileListAbsolute.txt =================================================================== --- trunk/plugins/APODPlugin/APODPlugin/obj/Debug/APODPlugin.csproj.FileListAbsolute.txt 2013-07-05 20:44:18 UTC (rev 4597) +++ trunk/plugins/APODPlugin/APODPlugin/obj/Debug/APODPlugin.csproj.FileListAbsolute.txt 2013-07-08 08:11:17 UTC (rev 4598) @@ -38,3 +38,5 @@ C:\Users\james.billings\Documents\Visual Studio 2012\Projects\APODPlugin\APODPlugin\obj\Debug\APODPlugin.dll C:\Users\james.billings\Documents\Visual Studio 2012\Projects\APODPlugin\APODPlugin\obj\Debug\APODPlugin.pdb C:\Users\james.billings\Documents\Visual Studio 2012\Projects\APODPlugin\APODPlugin\bin\Debug\PostDeploy.ps1 +C:\Users\jamesb\Documents\Visual Studio 2012\Projects\APODPlugin\APODPlugin\bin\Debug\PostDeploy.ps1 +C:\Users\jamesb\Documents\Visual Studio 2012\Projects\APODPlugin\APODPlugin\obj\Debug\APODPlugin.csprojResolveAssemblyReference.cache Modified: trunk/plugins/APODPlugin/APODPlugin/obj/Debug/APODPlugin.dll =================================================================== (Binary files differ) Modified: trunk/plugins/APODPlugin/APODPlugin/obj/Debug/APODPlugin.pdb =================================================================== (Binary files differ) Modified: trunk/plugins/APODPlugin/APODPlugin/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jmb...@us...> - 2013-07-09 08:19:45
|
Revision: 4601 http://sourceforge.net/p/mp-plugins/code/4601 Author: jmbillings Date: 2013-07-09 08:19:38 +0000 (Tue, 09 Jul 2013) Log Message: ----------- minor update Modified Paths: -------------- trunk/plugins/APODPlugin/APODPlugin/Properties/AssemblyInfo.cs trunk/plugins/APODPlugin/APODPlugin/bin/Debug/APODPlugin.dll trunk/plugins/APODPlugin/APODPlugin/bin/Debug/APODPlugin.pdb trunk/plugins/APODPlugin/APODPlugin/obj/Debug/APODPlugin.dll trunk/plugins/APODPlugin/APODPlugin/obj/Debug/APODPlugin.pdb Modified: trunk/plugins/APODPlugin/APODPlugin/Properties/AssemblyInfo.cs =================================================================== --- trunk/plugins/APODPlugin/APODPlugin/Properties/AssemblyInfo.cs 2013-07-08 15:13:26 UTC (rev 4600) +++ trunk/plugins/APODPlugin/APODPlugin/Properties/AssemblyInfo.cs 2013-07-09 08:19:38 UTC (rev 4601) @@ -36,5 +36,5 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.2.0")] -[assembly: AssemblyFileVersion("1.0.2.0")] +[assembly: AssemblyVersion("1.0.5.0")] +[assembly: AssemblyFileVersion("1.0.5.0")] Modified: trunk/plugins/APODPlugin/APODPlugin/bin/Debug/APODPlugin.dll =================================================================== (Binary files differ) Modified: trunk/plugins/APODPlugin/APODPlugin/bin/Debug/APODPlugin.pdb =================================================================== (Binary files differ) Modified: trunk/plugins/APODPlugin/APODPlugin/obj/Debug/APODPlugin.dll =================================================================== (Binary files differ) Modified: trunk/plugins/APODPlugin/APODPlugin/obj/Debug/APODPlugin.pdb =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jmb...@us...> - 2013-07-10 20:51:16
|
Revision: 4602 http://sourceforge.net/p/mp-plugins/code/4602 Author: jmbillings Date: 2013-07-10 20:51:10 +0000 (Wed, 10 Jul 2013) Log Message: ----------- Add code to get Description and initial skin mods Modified Paths: -------------- trunk/plugins/APODPlugin/APODPlugin/APODDownloader.cs trunk/plugins/APODPlugin/APODPlugin/APODPlugin.cs trunk/plugins/APODPlugin/APODPlugin/APODPlugin.xml trunk/plugins/APODPlugin/APODPlugin/bin/Debug/APODPlugin.dll trunk/plugins/APODPlugin/APODPlugin/bin/Debug/APODPlugin.pdb trunk/plugins/APODPlugin/APODPlugin/bin/Debug/APODPlugin.xml trunk/plugins/APODPlugin/APODPlugin/obj/Debug/APODPlugin.dll trunk/plugins/APODPlugin/APODPlugin/obj/Debug/APODPlugin.pdb Modified: trunk/plugins/APODPlugin/APODPlugin/APODDownloader.cs =================================================================== --- trunk/plugins/APODPlugin/APODPlugin/APODDownloader.cs 2013-07-09 08:19:38 UTC (rev 4601) +++ trunk/plugins/APODPlugin/APODPlugin/APODDownloader.cs 2013-07-10 20:51:10 UTC (rev 4602) @@ -23,6 +23,7 @@ List<String> apodURLs; int currentStep = 0; directions direction; + string information; internal APODDownloader() { @@ -77,6 +78,13 @@ if (!apodURLs.Contains(prevURL)) apodURLs.Add(prevURL); + //Look for information + Match infoMatcher = Regex.Match(pagesource, "(?<=<b> Explanation: </b>)(.+?)(?=<p> <center>)", RegexOptions.Singleline); + if (infoMatcher.Success) + information = StripTagsCharArray(infoMatcher.Value).Replace("\n"," "); + else + information = "No information found!"; + //Now look for image Match sourceMatcher = Regex.Match(pagesource, "(?<=<IMG SRC=\")(.+?)(?=\")", RegexOptions.Singleline); if (sourceMatcher.Success) @@ -118,9 +126,37 @@ resultStream.Dispose(); imageClient.Dispose(); - onDownloadComplete(this, new downloadCompleteEventArgs(bitmap)); + onDownloadComplete(this, new downloadCompleteEventArgs(bitmap, information)); } } + + public static string StripTagsCharArray(string source) + { + char[] array = new char[source.Length]; + int arrayIndex = 0; + bool inside = false; + + for (int i = 0; i < source.Length; i++) + { + char let = source[i]; + if (let == '<') + { + inside = true; + continue; + } + if (let == '>') + { + inside = false; + continue; + } + if (!inside) + { + array[arrayIndex] = let; + arrayIndex++; + } + } + return new string(array, 0, arrayIndex); + } } internal class downloadErrorEventArgs : EventArgs @@ -135,9 +171,11 @@ internal class downloadCompleteEventArgs : EventArgs { internal Image bitmap; - internal downloadCompleteEventArgs(Image b) + internal string infostring; + internal downloadCompleteEventArgs(Image b, string info) { bitmap = b; + infostring = info; } } Modified: trunk/plugins/APODPlugin/APODPlugin/APODPlugin.cs =================================================================== --- trunk/plugins/APODPlugin/APODPlugin/APODPlugin.cs 2013-07-09 08:19:38 UTC (rev 4601) +++ trunk/plugins/APODPlugin/APODPlugin/APODPlugin.cs 2013-07-10 20:51:10 UTC (rev 4602) @@ -14,6 +14,8 @@ { [SkinControlAttribute(4)] protected GUIImage image = null; + [SkinControlAttribute(5)] + protected GUITextScrollUpControl info = null; int imageStep = 0; APODDownloader downloader; bool downloading = true; @@ -195,6 +197,10 @@ void downloader_onDownloadComplete(object sender, downloadCompleteEventArgs e) { + //set infotext + info.Label = e.infostring; + + //size and set image Rectangle screenRect = Screen.PrimaryScreen.Bounds; Bitmap resizedBitmap = new Bitmap(screenRect.Width, screenRect.Height); Bitmap originalBitmap = (Bitmap)e.bitmap; Modified: trunk/plugins/APODPlugin/APODPlugin/APODPlugin.xml =================================================================== --- trunk/plugins/APODPlugin/APODPlugin/APODPlugin.xml 2013-07-09 08:19:38 UTC (rev 4601) +++ trunk/plugins/APODPlugin/APODPlugin/APODPlugin.xml 2013-07-10 20:51:10 UTC (rev 4602) @@ -11,6 +11,22 @@ <posX>0</posX> <posY>0</posY> </control> + + <control> + <description>info</description> + <type>textboxscrollup</type> + <id>5</id> + <posX>48</posX> + <posY>48</posY> + <width>1824</width> + <height>256</height> + <font>font13</font> + <textcolor>ffffffff</textcolor> + <colordiffuse>ffffffff</colordiffuse> + <seperator>--------------------------------</seperator> + <scrollStartDelaySec>3</scrollStartDelaySec> + <spaceBetweenItems>4</spaceBetweenItems> + </control> </controls> </window> \ No newline at end of file Modified: trunk/plugins/APODPlugin/APODPlugin/bin/Debug/APODPlugin.dll =================================================================== (Binary files differ) Modified: trunk/plugins/APODPlugin/APODPlugin/bin/Debug/APODPlugin.pdb =================================================================== (Binary files differ) Modified: trunk/plugins/APODPlugin/APODPlugin/bin/Debug/APODPlugin.xml =================================================================== --- trunk/plugins/APODPlugin/APODPlugin/bin/Debug/APODPlugin.xml 2013-07-09 08:19:38 UTC (rev 4601) +++ trunk/plugins/APODPlugin/APODPlugin/bin/Debug/APODPlugin.xml 2013-07-10 20:51:10 UTC (rev 4602) @@ -11,6 +11,22 @@ <posX>0</posX> <posY>0</posY> </control> + + <control> + <description>info</description> + <type>textboxscrollup</type> + <id>5</id> + <posX>48</posX> + <posY>48</posY> + <width>1824</width> + <height>256</height> + <font>font13</font> + <textcolor>ffffffff</textcolor> + <colordiffuse>ffffffff</colordiffuse> + <seperator>--------------------------------</seperator> + <scrollStartDelaySec>3</scrollStartDelaySec> + <spaceBetweenItems>4</spaceBetweenItems> + </control> </controls> </window> \ No newline at end of file Modified: trunk/plugins/APODPlugin/APODPlugin/obj/Debug/APODPlugin.dll =================================================================== (Binary files differ) Modified: trunk/plugins/APODPlugin/APODPlugin/obj/Debug/APODPlugin.pdb =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jmb...@us...> - 2013-07-11 18:20:09
|
Revision: 4603 http://sourceforge.net/p/mp-plugins/code/4603 Author: jmbillings Date: 2013-07-11 18:20:07 +0000 (Thu, 11 Jul 2013) Log Message: ----------- Move skin to folders Modified Paths: -------------- trunk/plugins/APODPlugin/APODPlugin/APODPlugin.csproj trunk/plugins/APODPlugin/APODPlugin/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache Added Paths: ----------- trunk/plugins/APODPlugin/APODPlugin/Default/ trunk/plugins/APODPlugin/APODPlugin/Default/APODPlugin.xml trunk/plugins/APODPlugin/APODPlugin/DefaultWide/ trunk/plugins/APODPlugin/APODPlugin/DefaultWide/APODPlugin.xml trunk/plugins/APODPlugin/APODPlugin/Titan/ trunk/plugins/APODPlugin/APODPlugin/Titan/APODPlugin.xml Modified: trunk/plugins/APODPlugin/APODPlugin/APODPlugin.csproj =================================================================== --- trunk/plugins/APODPlugin/APODPlugin/APODPlugin.csproj 2013-07-10 20:51:10 UTC (rev 4602) +++ trunk/plugins/APODPlugin/APODPlugin/APODPlugin.csproj 2013-07-11 18:20:07 UTC (rev 4603) @@ -61,10 +61,18 @@ <Compile Include="Properties\AssemblyInfo.cs" /> </ItemGroup> <ItemGroup> - <Content Include="APODPlugin.xml"> + <Content Include="DefaultWide\APODPlugin.xml"> + <SubType>Designer</SubType> <CopyToOutputDirectory>Always</CopyToOutputDirectory> + </Content> + <Content Include="Default\APODPlugin.xml"> <SubType>Designer</SubType> + <CopyToOutputDirectory>Always</CopyToOutputDirectory> </Content> + <Content Include="Titan\APODPlugin.xml"> + <CopyToOutputDirectory>Always</CopyToOutputDirectory> + <SubType>Designer</SubType> + </Content> </ItemGroup> <ItemGroup> <Content Include="PostDeploy.ps1"> Added: trunk/plugins/APODPlugin/APODPlugin/Default/APODPlugin.xml =================================================================== --- trunk/plugins/APODPlugin/APODPlugin/Default/APODPlugin.xml (rev 0) +++ trunk/plugins/APODPlugin/APODPlugin/Default/APODPlugin.xml 2013-07-11 18:20:07 UTC (rev 4603) @@ -0,0 +1,32 @@ +<window> + <id>3355</id> + <defaultcontrol>4</defaultcontrol> + <allowoverlay>yes</allowoverlay> + <controls> + + <control> + <description>image</description> + <type>image</type> + <id>4</id> + <posX>0</posX> + <posY>0</posY> + </control> + + <control> + <description>info</description> + <type>textboxscrollup</type> + <id>5</id> + <posX>48</posX> + <posY>48</posY> + <width>1824</width> + <height>256</height> + <font>font13</font> + <textcolor>ffffffff</textcolor> + <colordiffuse>ffffffff</colordiffuse> + <seperator>--------------------------------</seperator> + <scrollStartDelaySec>3</scrollStartDelaySec> + <spaceBetweenItems>4</spaceBetweenItems> + </control> + + </controls> +</window> \ No newline at end of file Added: trunk/plugins/APODPlugin/APODPlugin/DefaultWide/APODPlugin.xml =================================================================== --- trunk/plugins/APODPlugin/APODPlugin/DefaultWide/APODPlugin.xml (rev 0) +++ trunk/plugins/APODPlugin/APODPlugin/DefaultWide/APODPlugin.xml 2013-07-11 18:20:07 UTC (rev 4603) @@ -0,0 +1,32 @@ +<window> + <id>3355</id> + <defaultcontrol>4</defaultcontrol> + <allowoverlay>yes</allowoverlay> + <controls> + + <control> + <description>image</description> + <type>image</type> + <id>4</id> + <posX>0</posX> + <posY>0</posY> + </control> + + <control> + <description>info</description> + <type>textboxscrollup</type> + <id>5</id> + <posX>48</posX> + <posY>48</posY> + <width>1824</width> + <height>256</height> + <font>font13</font> + <textcolor>ffffffff</textcolor> + <colordiffuse>ffffffff</colordiffuse> + <seperator>--------------------------------</seperator> + <scrollStartDelaySec>3</scrollStartDelaySec> + <spaceBetweenItems>4</spaceBetweenItems> + </control> + + </controls> +</window> \ No newline at end of file Added: trunk/plugins/APODPlugin/APODPlugin/Titan/APODPlugin.xml =================================================================== --- trunk/plugins/APODPlugin/APODPlugin/Titan/APODPlugin.xml (rev 0) +++ trunk/plugins/APODPlugin/APODPlugin/Titan/APODPlugin.xml 2013-07-11 18:20:07 UTC (rev 4603) @@ -0,0 +1,32 @@ +<window> + <id>3355</id> + <defaultcontrol>4</defaultcontrol> + <allowoverlay>yes</allowoverlay> + <controls> + + <control> + <description>image</description> + <type>image</type> + <id>4</id> + <posX>0</posX> + <posY>0</posY> + </control> + + <control> + <description>info</description> + <type>textboxscrollup</type> + <id>5</id> + <posX>48</posX> + <posY>48</posY> + <width>1824</width> + <height>256</height> + <font>font13</font> + <textcolor>ffffffff</textcolor> + <colordiffuse>ffffffff</colordiffuse> + <seperator>--------------------------------</seperator> + <scrollStartDelaySec>3</scrollStartDelaySec> + <spaceBetweenItems>4</spaceBetweenItems> + </control> + + </controls> +</window> \ No newline at end of file Modified: trunk/plugins/APODPlugin/APODPlugin/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jmb...@us...> - 2013-07-13 10:34:46
|
Revision: 4605 http://sourceforge.net/p/mp-plugins/code/4605 Author: jmbillings Date: 2013-07-13 10:34:43 +0000 (Sat, 13 Jul 2013) Log Message: ----------- Pull down title, update skins Modified Paths: -------------- trunk/plugins/APODPlugin/APODPlugin/APODDownloader.cs trunk/plugins/APODPlugin/APODPlugin/APODPlugin.cs trunk/plugins/APODPlugin/APODPlugin/DefaultWide/APODPlugin.xml trunk/plugins/APODPlugin/APODPlugin/Titan/APODPlugin.xml trunk/plugins/APODPlugin/APODPlugin/bin/Debug/APODPlugin.dll trunk/plugins/APODPlugin/APODPlugin/bin/Debug/APODPlugin.pdb trunk/plugins/APODPlugin/APODPlugin/obj/Debug/APODPlugin.csproj.FileListAbsolute.txt trunk/plugins/APODPlugin/APODPlugin/obj/Debug/APODPlugin.dll trunk/plugins/APODPlugin/APODPlugin/obj/Debug/APODPlugin.pdb Modified: trunk/plugins/APODPlugin/APODPlugin/APODDownloader.cs =================================================================== --- trunk/plugins/APODPlugin/APODPlugin/APODDownloader.cs 2013-07-11 18:24:15 UTC (rev 4604) +++ trunk/plugins/APODPlugin/APODPlugin/APODDownloader.cs 2013-07-13 10:34:43 UTC (rev 4605) @@ -24,6 +24,7 @@ int currentStep = 0; directions direction; string information; + string title; internal APODDownloader() { @@ -85,6 +86,14 @@ else information = "No information found!"; + //Look for the title. + //e.g. <center><b> Sunspot at Sunset </b> <br> + Match titleMatcher = Regex.Match(pagesource, "(?<=<b>)(.+?)(?=</b>\\s<br>)", RegexOptions.Singleline | RegexOptions.IgnorePatternWhitespace); + if (titleMatcher.Success) + title = titleMatcher.Value; + else + title = "Untitled"; + //Now look for image Match sourceMatcher = Regex.Match(pagesource, "(?<=<IMG SRC=\")(.+?)(?=\")", RegexOptions.Singleline); if (sourceMatcher.Success) @@ -126,7 +135,7 @@ resultStream.Dispose(); imageClient.Dispose(); - onDownloadComplete(this, new downloadCompleteEventArgs(bitmap, information)); + onDownloadComplete(this, new downloadCompleteEventArgs(bitmap, information, title)); } } @@ -172,10 +181,12 @@ { internal Image bitmap; internal string infostring; - internal downloadCompleteEventArgs(Image b, string info) + internal string titlestring; + internal downloadCompleteEventArgs(Image b, string info, string title) { bitmap = b; infostring = info; + titlestring = title; } } Modified: trunk/plugins/APODPlugin/APODPlugin/APODPlugin.cs =================================================================== --- trunk/plugins/APODPlugin/APODPlugin/APODPlugin.cs 2013-07-11 18:24:15 UTC (rev 4604) +++ trunk/plugins/APODPlugin/APODPlugin/APODPlugin.cs 2013-07-13 10:34:43 UTC (rev 4605) @@ -16,6 +16,8 @@ protected GUIImage image = null; [SkinControlAttribute(5)] protected GUITextScrollUpControl info = null; + [SkinControlAttribute(6)] + protected GUITextControl title = null; int imageStep = 0; APODDownloader downloader; bool downloading = true; @@ -200,6 +202,9 @@ //set infotext info.Label = e.infostring; + //set title + title.Label = e.titlestring; + //size and set image Rectangle screenRect = Screen.PrimaryScreen.Bounds; Bitmap resizedBitmap = new Bitmap(screenRect.Width, screenRect.Height); Modified: trunk/plugins/APODPlugin/APODPlugin/DefaultWide/APODPlugin.xml =================================================================== --- trunk/plugins/APODPlugin/APODPlugin/DefaultWide/APODPlugin.xml 2013-07-11 18:24:15 UTC (rev 4604) +++ trunk/plugins/APODPlugin/APODPlugin/DefaultWide/APODPlugin.xml 2013-07-13 10:34:43 UTC (rev 4605) @@ -1,4 +1,5 @@ <window> + <!--DefaultWide--> <id>3355</id> <defaultcontrol>4</defaultcontrol> <allowoverlay>yes</allowoverlay> @@ -8,25 +9,38 @@ <description>image</description> <type>image</type> <id>4</id> - <posX>0</posX> - <posY>0</posY> + <posX>16</posX> + <posY>64</posY> + <width>992</width> + <height>640</height> </control> - <control> + <description>title</description> + <type>textbox</type> + <id>6</id> + <posX>16</posX> + <posY>16</posY> + <width>1280</width> + <height>48</height> + <font>font16</font> + <textcolor>ffffffff</textcolor> + <colordiffuse>ffffffff</colordiffuse> + </control> + <control> <description>info</description> <type>textboxscrollup</type> <id>5</id> - <posX>48</posX> - <posY>48</posY> - <width>1824</width> - <height>256</height> - <font>font13</font> + <posX>1024</posX> + <posY>64</posY> + <width>240</width> + <height>640</height> + <font>font14</font> <textcolor>ffffffff</textcolor> <colordiffuse>ffffffff</colordiffuse> <seperator>--------------------------------</seperator> <scrollStartDelaySec>3</scrollStartDelaySec> <spaceBetweenItems>4</spaceBetweenItems> </control> - + </controls> </window> \ No newline at end of file Modified: trunk/plugins/APODPlugin/APODPlugin/Titan/APODPlugin.xml =================================================================== --- trunk/plugins/APODPlugin/APODPlugin/Titan/APODPlugin.xml 2013-07-11 18:24:15 UTC (rev 4604) +++ trunk/plugins/APODPlugin/APODPlugin/Titan/APODPlugin.xml 2013-07-13 10:34:43 UTC (rev 4605) @@ -1,4 +1,5 @@ <window> + <!--Titan--> <id>3355</id> <defaultcontrol>4</defaultcontrol> <allowoverlay>yes</allowoverlay> @@ -8,19 +9,32 @@ <description>image</description> <type>image</type> <id>4</id> - <posX>0</posX> - <posY>0</posY> + <posX>32</posX> + <posY>128</posY> + <width>1520</width> + <height>884</height> </control> - <control> + <description>title</description> + <type>textbox</type> + <id>6</id> + <posX>32</posX> + <posY>32</posY> + <width>1900</width> + <height>96</height> + <font>fontB16</font> + <textcolor>ffffffff</textcolor> + <colordiffuse>ffffffff</colordiffuse> + </control> + <control> <description>info</description> <type>textboxscrollup</type> <id>5</id> - <posX>48</posX> - <posY>48</posY> - <width>1824</width> - <height>256</height> - <font>font13</font> + <posX>1584</posX> + <posY>128</posY> + <width>324</width> + <height>920</height> + <font>font14</font> <textcolor>ffffffff</textcolor> <colordiffuse>ffffffff</colordiffuse> <seperator>--------------------------------</seperator> Modified: trunk/plugins/APODPlugin/APODPlugin/bin/Debug/APODPlugin.dll =================================================================== (Binary files differ) Modified: trunk/plugins/APODPlugin/APODPlugin/bin/Debug/APODPlugin.pdb =================================================================== (Binary files differ) Modified: trunk/plugins/APODPlugin/APODPlugin/obj/Debug/APODPlugin.csproj.FileListAbsolute.txt =================================================================== --- trunk/plugins/APODPlugin/APODPlugin/obj/Debug/APODPlugin.csproj.FileListAbsolute.txt 2013-07-11 18:24:15 UTC (rev 4604) +++ trunk/plugins/APODPlugin/APODPlugin/obj/Debug/APODPlugin.csproj.FileListAbsolute.txt 2013-07-13 10:34:43 UTC (rev 4605) @@ -17,7 +17,6 @@ c:\Users\jamesb\Documents\Visual Studio 2012\Projects\APODPlugin\APODPlugin\bin\Debug\Ionic.Zip.dll c:\Users\jamesb\Documents\Visual Studio 2012\Projects\APODPlugin\APODPlugin\obj\Debug\APODPlugin.dll c:\Users\jamesb\Documents\Visual Studio 2012\Projects\APODPlugin\APODPlugin\obj\Debug\APODPlugin.pdb -c:\Users\jamesb\Documents\Visual Studio 2012\Projects\APODPlugin\APODPlugin\bin\Debug\APODPlugin.xml C:\Users\jamesb\documents\visual studio 2012\Projects\APODPlugin\APODPlugin\bin\Debug\Microsoft.WindowsAPICodePack.Shell.dll C:\Users\jamesb\documents\visual studio 2012\Projects\APODPlugin\APODPlugin\bin\Debug\Microsoft.WindowsAPICodePack.dll C:\Users\james.billings\Documents\Visual Studio 2012\Projects\APODPlugin\APODPlugin\bin\Debug\APODPlugin.xml @@ -40,3 +39,6 @@ C:\Users\james.billings\Documents\Visual Studio 2012\Projects\APODPlugin\APODPlugin\bin\Debug\PostDeploy.ps1 C:\Users\jamesb\Documents\Visual Studio 2012\Projects\APODPlugin\APODPlugin\bin\Debug\PostDeploy.ps1 C:\Users\jamesb\Documents\Visual Studio 2012\Projects\APODPlugin\APODPlugin\obj\Debug\APODPlugin.csprojResolveAssemblyReference.cache +C:\Users\jamesb\documents\visual studio 2012\Projects\APODPlugin\APODPlugin\bin\Debug\DefaultWide\APODPlugin.xml +C:\Users\jamesb\documents\visual studio 2012\Projects\APODPlugin\APODPlugin\bin\Debug\Default\APODPlugin.xml +C:\Users\jamesb\documents\visual studio 2012\Projects\APODPlugin\APODPlugin\bin\Debug\Titan\APODPlugin.xml Modified: trunk/plugins/APODPlugin/APODPlugin/obj/Debug/APODPlugin.dll =================================================================== (Binary files differ) Modified: trunk/plugins/APODPlugin/APODPlugin/obj/Debug/APODPlugin.pdb =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jmb...@us...> - 2013-07-17 09:08:04
|
Revision: 4609 http://sourceforge.net/p/mp-plugins/code/4609 Author: jmbillings Date: 2013-07-17 09:08:00 +0000 (Wed, 17 Jul 2013) Log Message: ----------- Update skins Modified Paths: -------------- trunk/plugins/APODPlugin/APODPlugin/APODPlugin.cs trunk/plugins/APODPlugin/APODPlugin/APODPlugin.csproj trunk/plugins/APODPlugin/APODPlugin/Default/APODPlugin.xml trunk/plugins/APODPlugin/APODPlugin/DefaultWide/APODPlugin.xml trunk/plugins/APODPlugin/APODPlugin/Titan/APODPlugin.xml trunk/plugins/APODPlugin/APODPlugin/bin/Debug/APODPlugin.dll trunk/plugins/APODPlugin/APODPlugin/bin/Debug/APODPlugin.pdb trunk/plugins/APODPlugin/APODPlugin/bin/Debug/Default/APODPlugin.xml trunk/plugins/APODPlugin/APODPlugin/bin/Debug/DefaultWide/APODPlugin.xml trunk/plugins/APODPlugin/APODPlugin/bin/Debug/Titan/APODPlugin.xml trunk/plugins/APODPlugin/APODPlugin/obj/Debug/APODPlugin.csproj.FileListAbsolute.txt trunk/plugins/APODPlugin/APODPlugin/obj/Debug/APODPlugin.dll trunk/plugins/APODPlugin/APODPlugin/obj/Debug/APODPlugin.pdb Added Paths: ----------- trunk/plugins/APODPlugin/APODPlugin/bin/Debug/PureVisionHD 1080/ trunk/plugins/APODPlugin/APODPlugin/bin/Debug/PureVisionHD 1080/APODPlugin.xml Modified: trunk/plugins/APODPlugin/APODPlugin/APODPlugin.cs =================================================================== --- trunk/plugins/APODPlugin/APODPlugin/APODPlugin.cs 2013-07-16 18:39:31 UTC (rev 4608) +++ trunk/plugins/APODPlugin/APODPlugin/APODPlugin.cs 2013-07-17 09:08:00 UTC (rev 4609) @@ -144,11 +144,6 @@ { doDownload(directions.RIGHT); } - else if (action.wID == MediaPortal.GUI.Library.Action.ActionType.ACTION_SHOW_INFO) - { - //User pressed i - - } } private void doDownload(directions d) Modified: trunk/plugins/APODPlugin/APODPlugin/APODPlugin.csproj =================================================================== --- trunk/plugins/APODPlugin/APODPlugin/APODPlugin.csproj 2013-07-16 18:39:31 UTC (rev 4608) +++ trunk/plugins/APODPlugin/APODPlugin/APODPlugin.csproj 2013-07-17 09:08:00 UTC (rev 4609) @@ -69,7 +69,9 @@ <SubType>Designer</SubType> <CopyToOutputDirectory>Always</CopyToOutputDirectory> </Content> - <Content Include="PureVisionHD 1080\APODPlugin.xml" /> + <Content Include="PureVisionHD 1080\APODPlugin.xml"> + <CopyToOutputDirectory>Always</CopyToOutputDirectory> + </Content> <Content Include="Titan\APODPlugin.xml"> <CopyToOutputDirectory>Always</CopyToOutputDirectory> <SubType>Designer</SubType> Modified: trunk/plugins/APODPlugin/APODPlugin/Default/APODPlugin.xml =================================================================== --- trunk/plugins/APODPlugin/APODPlugin/Default/APODPlugin.xml 2013-07-16 18:39:31 UTC (rev 4608) +++ trunk/plugins/APODPlugin/APODPlugin/Default/APODPlugin.xml 2013-07-17 09:08:00 UTC (rev 4609) @@ -1,45 +1,77 @@ <window> - <!--Default 720x576--> + <!--Default 960x720--> <id>3355</id> <defaultcontrol>4</defaultcontrol> <allowoverlay>yes</allowoverlay> <controls> - <control> <description>image</description> <type>image</type> + <id>0</id> + <posX>0</posX> + <posY>0</posY> + <width>960</width> + <height>720</height> + <texture>black.jpg</texture> + </control> + <control> + <description>image</description> + <type>image</type> <id>4</id> - <posX>16</posX> - <posY>48</posY> - <width>540</width> - <height>512</height> + <posX>0</posX> + <posY>0</posY> + <onup>2</onup> + <ondown>2</ondown> </control> <control> <description>title</description> <type>textbox</type> <id>6</id> - <posX>16</posX> - <posY>8</posY> - <width>540</width> - <height>40</height> + <posX>0</posX> + <posY>16</posY> + <width>960</width> + <height>64</height> <font>font16</font> <textcolor>ffffffff</textcolor> + <textalign>center</textalign> <colordiffuse>ffffffff</colordiffuse> </control> <control> + <description>image</description> + <type>image</type> + <id>0</id> + <posX>30</posX> + <posY>520</posY> + <width>930</width> + <height>180</height> + <texture>BH background2.png</texture> + <animation effect="fade" start="0" end="100" time="1000" reversible="true">visiblechange</animation> + <visible>control.hasfocus(2)</visible> + </control> + <control> <description>info</description> <type>textboxscrollup</type> <id>5</id> - <posX>556</posX> - <posY>48</posY> - <width>156</width> - <height>512</height> + <posX>50</posX> + <posY>540</posY> + <width>890</width> + <height>160</height> <font>font14</font> <textcolor>ffffffff</textcolor> <colordiffuse>ffffffff</colordiffuse> <seperator>--------------------------------</seperator> - <scrollStartDelaySec>3</scrollStartDelaySec> - <spaceBetweenItems>4</spaceBetweenItems> + <scrollStartDelaySec>10</scrollStartDelaySec> + <animation effect="fade" start="0" end="100" time="1000" reversible="true">visiblechange</animation> + <visible>control.hasfocus(2)</visible> </control> + <control> + <description>Show Text</description> + <type>button</type> + <id>2</id> + <posX>768</posX> + <posY>16</posY> + <width>160</width> + <label>Show Text</label> + </control> </controls> </window> \ No newline at end of file Modified: trunk/plugins/APODPlugin/APODPlugin/DefaultWide/APODPlugin.xml =================================================================== --- trunk/plugins/APODPlugin/APODPlugin/DefaultWide/APODPlugin.xml 2013-07-16 18:39:31 UTC (rev 4608) +++ trunk/plugins/APODPlugin/APODPlugin/DefaultWide/APODPlugin.xml 2013-07-17 09:08:00 UTC (rev 4609) @@ -4,43 +4,74 @@ <defaultcontrol>4</defaultcontrol> <allowoverlay>yes</allowoverlay> <controls> - <control> <description>image</description> <type>image</type> + <id>0</id> + <posX>0</posX> + <posY>0</posY> + <width>1280</width> + <height>720</height> + <texture>black.jpg</texture> + </control> + <control> + <description>image</description> + <type>image</type> <id>4</id> - <posX>16</posX> - <posY>64</posY> - <width>992</width> - <height>640</height> + <posX>0</posX> + <posY>0</posY> + <onup>2</onup> + <ondown>2</ondown> </control> <control> <description>title</description> <type>textbox</type> <id>6</id> - <posX>16</posX> + <posX>0</posX> <posY>16</posY> <width>1280</width> - <height>48</height> + <height>96</height> <font>font16</font> <textcolor>ffffffff</textcolor> + <textalign>center</textalign> <colordiffuse>ffffffff</colordiffuse> </control> <control> + <description>image</description> + <type>image</type> + <id>0</id> + <posX>30</posX> + <posY>500</posY> + <width>1250</width> + <height>200</height> + <texture>BH background2.png</texture> + <animation effect="fade" start="0" end="100" time="1000" reversible="true">visiblechange</animation> + <visible>control.hasfocus(2)</visible> + </control> + <control> <description>info</description> <type>textboxscrollup</type> <id>5</id> - <posX>1024</posX> - <posY>64</posY> - <width>240</width> - <height>640</height> + <posX>50</posX> + <posY>520</posY> + <width>1230</width> + <height>160</height> <font>font14</font> <textcolor>ffffffff</textcolor> <colordiffuse>ffffffff</colordiffuse> <seperator>--------------------------------</seperator> - <scrollStartDelaySec>3</scrollStartDelaySec> - <spaceBetweenItems>4</spaceBetweenItems> + <scrollStartDelaySec>10</scrollStartDelaySec> + <animation effect="fade" start="0" end="100" time="1000" reversible="true">visiblechange</animation> + <visible>control.hasfocus(2)</visible> </control> - + <control> + <description>Show Text</description> + <type>button</type> + <id>2</id> + <posX>980</posX> + <posY>16</posY> + <width>192</width> + <label>Show Text</label> + </control> </controls> </window> \ No newline at end of file Modified: trunk/plugins/APODPlugin/APODPlugin/Titan/APODPlugin.xml =================================================================== --- trunk/plugins/APODPlugin/APODPlugin/Titan/APODPlugin.xml 2013-07-16 18:39:31 UTC (rev 4608) +++ trunk/plugins/APODPlugin/APODPlugin/Titan/APODPlugin.xml 2013-07-17 09:08:00 UTC (rev 4609) @@ -4,52 +4,74 @@ <defaultcontrol>4</defaultcontrol> <allowoverlay>yes</allowoverlay> <controls> - <control> <description>image</description> <type>image</type> + <id>0</id> + <posX>0</posX> + <posY>0</posY> + <width>1920</width> + <height>1080</height> + <texture>black.jpg</texture> + </control> + <control> + <description>image</description> + <type>image</type> <id>4</id> - <posX>32</posX> - <posY>128</posY> - <width>1520</width> - <height>884</height> + <posX>0</posX> + <posY>0</posY> + <onup>2</onup> + <ondown>2</ondown> </control> <control> <description>title</description> <type>textbox</type> <id>6</id> - <posX>32</posX> + <posX>0</posX> <posY>32</posY> - <width>1900</width> + <width>1920</width> <height>96</height> <font>fontB16</font> <textcolor>ffffffff</textcolor> + <textalign>center</textalign> <colordiffuse>ffffffff</colordiffuse> </control> <control> + <description>image</description> + <type>image</type> + <id>0</id> + <posX>30</posX> + <posY>680</posY> + <width>1860</width> + <height>390</height> + <texture>panel_now_playing_info.png</texture> + <animation effect="fade" start="0" end="100" time="1000" reversible="true">visiblechange</animation> + <visible>control.hasfocus(2)</visible> + </control> + <control> <description>info</description> <type>textboxscrollup</type> <id>5</id> - <posX>1584</posX> - <posY>128</posY> - <width>324</width> - <height>920</height> + <posX>90</posX> + <posY>730</posY> + <width>1740</width> + <height>275</height> <font>font14</font> <textcolor>ffffffff</textcolor> <colordiffuse>ffffffff</colordiffuse> <seperator>--------------------------------</seperator> - <scrollStartDelaySec>3</scrollStartDelaySec> - <spaceBetweenItems>4</spaceBetweenItems> + <scrollStartDelaySec>10</scrollStartDelaySec> + <animation effect="fade" start="0" end="100" time="1000" reversible="true">visiblechange</animation> + <visible>control.hasfocus(2)</visible> </control> <control> - <description>verticalbar</description> - <type>image</type> - <id>4</id> - <posX>1558</posX> - <posY>128</posY> - <width>1</width> - <height>920</height> - <texture>bar_vert.png</texture> + <description>Show Text</description> + <type>button</type> + <id>2</id> + <posX>1660</posX> + <posY>32</posY> + <width>240</width> + <label>Show Text</label> </control> </controls> </window> \ No newline at end of file Modified: trunk/plugins/APODPlugin/APODPlugin/bin/Debug/APODPlugin.dll =================================================================== (Binary files differ) Modified: trunk/plugins/APODPlugin/APODPlugin/bin/Debug/APODPlugin.pdb =================================================================== (Binary files differ) Modified: trunk/plugins/APODPlugin/APODPlugin/bin/Debug/Default/APODPlugin.xml =================================================================== --- trunk/plugins/APODPlugin/APODPlugin/bin/Debug/Default/APODPlugin.xml 2013-07-16 18:39:31 UTC (rev 4608) +++ trunk/plugins/APODPlugin/APODPlugin/bin/Debug/Default/APODPlugin.xml 2013-07-17 09:08:00 UTC (rev 4609) @@ -1,45 +1,77 @@ <window> - <!--Default 720x576--> + <!--Default 960x720--> <id>3355</id> <defaultcontrol>4</defaultcontrol> <allowoverlay>yes</allowoverlay> <controls> - <control> <description>image</description> <type>image</type> + <id>0</id> + <posX>0</posX> + <posY>0</posY> + <width>960</width> + <height>720</height> + <texture>black.jpg</texture> + </control> + <control> + <description>image</description> + <type>image</type> <id>4</id> - <posX>16</posX> - <posY>48</posY> - <width>540</width> - <height>512</height> + <posX>0</posX> + <posY>0</posY> + <onup>2</onup> + <ondown>2</ondown> </control> <control> <description>title</description> <type>textbox</type> <id>6</id> - <posX>16</posX> - <posY>8</posY> - <width>540</width> - <height>40</height> + <posX>0</posX> + <posY>16</posY> + <width>960</width> + <height>64</height> <font>font16</font> <textcolor>ffffffff</textcolor> + <textalign>center</textalign> <colordiffuse>ffffffff</colordiffuse> </control> <control> + <description>image</description> + <type>image</type> + <id>0</id> + <posX>30</posX> + <posY>520</posY> + <width>930</width> + <height>180</height> + <texture>BH background2.png</texture> + <animation effect="fade" start="0" end="100" time="1000" reversible="true">visiblechange</animation> + <visible>control.hasfocus(2)</visible> + </control> + <control> <description>info</description> <type>textboxscrollup</type> <id>5</id> - <posX>556</posX> - <posY>48</posY> - <width>156</width> - <height>512</height> + <posX>50</posX> + <posY>540</posY> + <width>890</width> + <height>160</height> <font>font14</font> <textcolor>ffffffff</textcolor> <colordiffuse>ffffffff</colordiffuse> <seperator>--------------------------------</seperator> - <scrollStartDelaySec>3</scrollStartDelaySec> - <spaceBetweenItems>4</spaceBetweenItems> + <scrollStartDelaySec>10</scrollStartDelaySec> + <animation effect="fade" start="0" end="100" time="1000" reversible="true">visiblechange</animation> + <visible>control.hasfocus(2)</visible> </control> + <control> + <description>Show Text</description> + <type>button</type> + <id>2</id> + <posX>768</posX> + <posY>16</posY> + <width>160</width> + <label>Show Text</label> + </control> </controls> </window> \ No newline at end of file Modified: trunk/plugins/APODPlugin/APODPlugin/bin/Debug/DefaultWide/APODPlugin.xml =================================================================== --- trunk/plugins/APODPlugin/APODPlugin/bin/Debug/DefaultWide/APODPlugin.xml 2013-07-16 18:39:31 UTC (rev 4608) +++ trunk/plugins/APODPlugin/APODPlugin/bin/Debug/DefaultWide/APODPlugin.xml 2013-07-17 09:08:00 UTC (rev 4609) @@ -4,43 +4,74 @@ <defaultcontrol>4</defaultcontrol> <allowoverlay>yes</allowoverlay> <controls> - <control> <description>image</description> <type>image</type> + <id>0</id> + <posX>0</posX> + <posY>0</posY> + <width>1280</width> + <height>720</height> + <texture>black.jpg</texture> + </control> + <control> + <description>image</description> + <type>image</type> <id>4</id> - <posX>16</posX> - <posY>64</posY> - <width>992</width> - <height>640</height> + <posX>0</posX> + <posY>0</posY> + <onup>2</onup> + <ondown>2</ondown> </control> <control> <description>title</description> <type>textbox</type> <id>6</id> - <posX>16</posX> + <posX>0</posX> <posY>16</posY> <width>1280</width> - <height>48</height> + <height>96</height> <font>font16</font> <textcolor>ffffffff</textcolor> + <textalign>center</textalign> <colordiffuse>ffffffff</colordiffuse> </control> <control> + <description>image</description> + <type>image</type> + <id>0</id> + <posX>30</posX> + <posY>500</posY> + <width>1250</width> + <height>200</height> + <texture>BH background2.png</texture> + <animation effect="fade" start="0" end="100" time="1000" reversible="true">visiblechange</animation> + <visible>control.hasfocus(2)</visible> + </control> + <control> <description>info</description> <type>textboxscrollup</type> <id>5</id> - <posX>1024</posX> - <posY>64</posY> - <width>240</width> - <height>640</height> + <posX>50</posX> + <posY>520</posY> + <width>1230</width> + <height>160</height> <font>font14</font> <textcolor>ffffffff</textcolor> <colordiffuse>ffffffff</colordiffuse> <seperator>--------------------------------</seperator> - <scrollStartDelaySec>3</scrollStartDelaySec> - <spaceBetweenItems>4</spaceBetweenItems> + <scrollStartDelaySec>10</scrollStartDelaySec> + <animation effect="fade" start="0" end="100" time="1000" reversible="true">visiblechange</animation> + <visible>control.hasfocus(2)</visible> </control> - + <control> + <description>Show Text</description> + <type>button</type> + <id>2</id> + <posX>980</posX> + <posY>16</posY> + <width>192</width> + <label>Show Text</label> + </control> </controls> </window> \ No newline at end of file Added: trunk/plugins/APODPlugin/APODPlugin/bin/Debug/PureVisionHD 1080/APODPlugin.xml =================================================================== --- trunk/plugins/APODPlugin/APODPlugin/bin/Debug/PureVisionHD 1080/APODPlugin.xml (rev 0) +++ trunk/plugins/APODPlugin/APODPlugin/bin/Debug/PureVisionHD 1080/APODPlugin.xml 2013-07-17 09:08:00 UTC (rev 4609) @@ -0,0 +1,75 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<window> + <!--PureVisionHD 1080--> + <id>3355</id> + <defaultcontrol>4</defaultcontrol> + <allowoverlay>yes</allowoverlay> + <controls> + <control> + <description>image</description> + <type>image</type> + <id>0</id> + <posX>0</posX> + <posY>0</posY> + <width>1920</width> + <height>1080</height> + <texture>black.jpg</texture> + </control> + <control> + <description>image</description> + <type>image</type> + <id>4</id> + <posX>0</posX> + <posY>0</posY> + <onup>2</onup> + <ondown>2</ondown> + </control> + <control> + <description>title</description> + <type>textbox</type> + <id>6</id> + <posX>0</posX> + <posY>10</posY> + <width>1920</width> + <height>45</height> + <font>Menutitle</font> + <textcolor>ffffffff</textcolor> + <textalign>center</textalign> + </control> + <control> + <description>image</description> + <type>image</type> + <id>0</id> + <posX>30</posX> + <posY>680</posY> + <width>1860</width> + <height>390</height> + <texture>menubg.png</texture> + <animation effect="fade" start="0" end="100" time="1000" reversible="true">visiblechange</animation> + <visible>control.hasfocus(2)</visible> + </control> + <control> + <description>info</description> + <type>textboxscrollup</type> + <id>5</id> + <posX>50</posX> + <posY>700</posY> + <width>1820</width> + <height>350</height> + <font>font11</font> + <textcolor>ffffffff</textcolor> + <scrollStartDelaySec>10</scrollStartDelaySec> + <animation effect="fade" start="0" end="100" time="1000" reversible="true">visiblechange</animation> + <visible>control.hasfocus(2)</visible> + </control> + <control> + <description>Show Text</description> + <type>button</type> + <id>2</id> + <posX>20</posX> + <posY>70</posY> + <width>240</width> + <label>Show Text</label> + </control> + </controls> +</window> Modified: trunk/plugins/APODPlugin/APODPlugin/bin/Debug/Titan/APODPlugin.xml =================================================================== --- trunk/plugins/APODPlugin/APODPlugin/bin/Debug/Titan/APODPlugin.xml 2013-07-16 18:39:31 UTC (rev 4608) +++ trunk/plugins/APODPlugin/APODPlugin/bin/Debug/Titan/APODPlugin.xml 2013-07-17 09:08:00 UTC (rev 4609) @@ -4,52 +4,74 @@ <defaultcontrol>4</defaultcontrol> <allowoverlay>yes</allowoverlay> <controls> - <control> <description>image</description> <type>image</type> + <id>0</id> + <posX>0</posX> + <posY>0</posY> + <width>1920</width> + <height>1080</height> + <texture>black.jpg</texture> + </control> + <control> + <description>image</description> + <type>image</type> <id>4</id> - <posX>32</posX> - <posY>128</posY> - <width>1520</width> - <height>884</height> + <posX>0</posX> + <posY>0</posY> + <onup>2</onup> + <ondown>2</ondown> </control> <control> <description>title</description> <type>textbox</type> <id>6</id> - <posX>32</posX> + <posX>0</posX> <posY>32</posY> - <width>1900</width> + <width>1920</width> <height>96</height> <font>fontB16</font> <textcolor>ffffffff</textcolor> + <textalign>center</textalign> <colordiffuse>ffffffff</colordiffuse> </control> <control> + <description>image</description> + <type>image</type> + <id>0</id> + <posX>30</posX> + <posY>680</posY> + <width>1860</width> + <height>390</height> + <texture>panel_now_playing_info.png</texture> + <animation effect="fade" start="0" end="100" time="1000" reversible="true">visiblechange</animation> + <visible>control.hasfocus(2)</visible> + </control> + <control> <description>info</description> <type>textboxscrollup</type> <id>5</id> - <posX>1584</posX> - <posY>128</posY> - <width>324</width> - <height>920</height> + <posX>90</posX> + <posY>730</posY> + <width>1740</width> + <height>275</height> <font>font14</font> <textcolor>ffffffff</textcolor> <colordiffuse>ffffffff</colordiffuse> <seperator>--------------------------------</seperator> - <scrollStartDelaySec>3</scrollStartDelaySec> - <spaceBetweenItems>4</spaceBetweenItems> + <scrollStartDelaySec>10</scrollStartDelaySec> + <animation effect="fade" start="0" end="100" time="1000" reversible="true">visiblechange</animation> + <visible>control.hasfocus(2)</visible> </control> <control> - <description>verticalbar</description> - <type>image</type> - <id>4</id> - <posX>1558</posX> - <posY>128</posY> - <width>1</width> - <height>920</height> - <texture>bar_vert.png</texture> + <description>Show Text</description> + <type>button</type> + <id>2</id> + <posX>1660</posX> + <posY>32</posY> + <width>240</width> + <label>Show Text</label> </control> </controls> </window> \ No newline at end of file Modified: trunk/plugins/APODPlugin/APODPlugin/obj/Debug/APODPlugin.csproj.FileListAbsolute.txt =================================================================== --- trunk/plugins/APODPlugin/APODPlugin/obj/Debug/APODPlugin.csproj.FileListAbsolute.txt 2013-07-16 18:39:31 UTC (rev 4608) +++ trunk/plugins/APODPlugin/APODPlugin/obj/Debug/APODPlugin.csproj.FileListAbsolute.txt 2013-07-17 09:08:00 UTC (rev 4609) @@ -42,3 +42,4 @@ C:\Users\jamesb\documents\visual studio 2012\Projects\APODPlugin\APODPlugin\bin\Debug\DefaultWide\APODPlugin.xml C:\Users\jamesb\documents\visual studio 2012\Projects\APODPlugin\APODPlugin\bin\Debug\Default\APODPlugin.xml C:\Users\jamesb\documents\visual studio 2012\Projects\APODPlugin\APODPlugin\bin\Debug\Titan\APODPlugin.xml +C:\Users\jamesb\documents\visual studio 2012\Projects\APODPlugin\APODPlugin\bin\Debug\PureVisionHD 1080\APODPlugin.xml Modified: trunk/plugins/APODPlugin/APODPlugin/obj/Debug/APODPlugin.dll =================================================================== (Binary files differ) Modified: trunk/plugins/APODPlugin/APODPlugin/obj/Debug/APODPlugin.pdb =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jmb...@us...> - 2013-07-24 08:12:34
|
Revision: 4614 http://sourceforge.net/p/mp-plugins/code/4614 Author: jmbillings Date: 2013-07-24 08:12:30 +0000 (Wed, 24 Jul 2013) Log Message: ----------- Fix bugs on re-entering plugin (hopefully). Still not sure how to get it to go black. Modified Paths: -------------- trunk/plugins/APODPlugin/APODPlugin/APODDownloader.cs trunk/plugins/APODPlugin/APODPlugin/APODPlugin.cs trunk/plugins/APODPlugin/APODPlugin/APODPlugin.csproj trunk/plugins/APODPlugin/APODPlugin/Default/APODPlugin.xml trunk/plugins/APODPlugin/APODPlugin/DefaultWide/APODPlugin.xml trunk/plugins/APODPlugin/APODPlugin/PureVisionHD 1080/APODPlugin.xml trunk/plugins/APODPlugin/APODPlugin/Titan/APODPlugin.xml trunk/plugins/APODPlugin/APODPlugin/bin/Debug/APODPlugin.dll trunk/plugins/APODPlugin/APODPlugin/bin/Debug/APODPlugin.pdb trunk/plugins/APODPlugin/APODPlugin/bin/Debug/Default/APODPlugin.xml trunk/plugins/APODPlugin/APODPlugin/bin/Debug/DefaultWide/APODPlugin.xml trunk/plugins/APODPlugin/APODPlugin/bin/Debug/PureVisionHD 1080/APODPlugin.xml trunk/plugins/APODPlugin/APODPlugin/bin/Debug/Titan/APODPlugin.xml trunk/plugins/APODPlugin/APODPlugin/obj/Debug/APODPlugin.csproj.FileListAbsolute.txt trunk/plugins/APODPlugin/APODPlugin/obj/Debug/APODPlugin.dll trunk/plugins/APODPlugin/APODPlugin/obj/Debug/APODPlugin.pdb Modified: trunk/plugins/APODPlugin/APODPlugin/APODDownloader.cs =================================================================== --- trunk/plugins/APODPlugin/APODPlugin/APODDownloader.cs 2013-07-23 08:45:13 UTC (rev 4613) +++ trunk/plugins/APODPlugin/APODPlugin/APODDownloader.cs 2013-07-24 08:12:30 UTC (rev 4614) @@ -33,6 +33,13 @@ apodURLs.Add(APODURL); } + internal void Dispose() + { + client.OpenReadCompleted -= new OpenReadCompletedEventHandler(readComplete); + imageClient.OpenReadCompleted -= new OpenReadCompletedEventHandler(imageReadComplete); + client.Dispose(); + } + internal bool GetImage(int step, directions d) { try Modified: trunk/plugins/APODPlugin/APODPlugin/APODPlugin.cs =================================================================== --- trunk/plugins/APODPlugin/APODPlugin/APODPlugin.cs 2013-07-23 08:45:13 UTC (rev 4613) +++ trunk/plugins/APODPlugin/APODPlugin/APODPlugin.cs 2013-07-24 08:12:30 UTC (rev 4614) @@ -25,6 +25,7 @@ int imageStep = 0; APODDownloader downloader; bool downloading = true; + System.Timers.Timer oneShotTimer; public APODPlugin() { @@ -119,8 +120,6 @@ public override bool Init() { bool ls = Load(GUIGraphicsContext.Skin + @"\APODPlugin.xml"); - base.InitControls(); - base.NeedRefresh(); return ls; } @@ -129,17 +128,37 @@ base.DeInit(); } + protected override void OnPageDestroy(int newWindowId) + { + downloader.onDownloadError -= downloader_onDownloadError; + downloader.onDownloadComplete -= downloader_onDownloadComplete; + downloader.onDownloadNoImageFound -= downloader_onDownloadNoImageFound; + downloader.Dispose(); + oneShotTimer.Elapsed -= oneShotTimer_Elapsed; + imageStep = 0; + GUIWaitCursor.Hide(); + base.OnPageDestroy(newWindowId); + } + protected override void OnPageLoad() - { - image.Refresh(); + { GUIWaitCursor.Show(); - downloader = new APODDownloader(); + downloader = new APODDownloader(); downloader.onDownloadError += downloader_onDownloadError; downloader.onDownloadComplete += downloader_onDownloadComplete; downloader.onDownloadNoImageFound += downloader_onDownloadNoImageFound; - downloader.GetImage(imageStep, directions.LEFT); + oneShotTimer = new System.Timers.Timer(128); + oneShotTimer.Elapsed += oneShotTimer_Elapsed; + oneShotTimer.Start(); } + void oneShotTimer_Elapsed(object sender, System.Timers.ElapsedEventArgs e) + { + oneShotTimer.Stop(); + //System.Threading.Thread.Sleep(5000); + //downloader.GetImage(imageStep, directions.LEFT); + } + public override void OnAction(MediaPortal.GUI.Library.Action action) { base.OnAction(action); Modified: trunk/plugins/APODPlugin/APODPlugin/APODPlugin.csproj =================================================================== --- trunk/plugins/APODPlugin/APODPlugin/APODPlugin.csproj 2013-07-23 08:45:13 UTC (rev 4613) +++ trunk/plugins/APODPlugin/APODPlugin/APODPlugin.csproj 2013-07-24 08:12:30 UTC (rev 4614) @@ -77,6 +77,7 @@ </Content> <Content Include="PureVisionHD 1080\APODPlugin.xml"> <CopyToOutputDirectory>Always</CopyToOutputDirectory> + <SubType>Designer</SubType> </Content> <Content Include="PureVisionHD 1080\hover_APOD.png"> <CopyToOutputDirectory>Always</CopyToOutputDirectory> Modified: trunk/plugins/APODPlugin/APODPlugin/Default/APODPlugin.xml =================================================================== --- trunk/plugins/APODPlugin/APODPlugin/Default/APODPlugin.xml 2013-07-23 08:45:13 UTC (rev 4613) +++ trunk/plugins/APODPlugin/APODPlugin/Default/APODPlugin.xml 2013-07-24 08:12:30 UTC (rev 4614) @@ -7,7 +7,7 @@ <control> <description>image</description> <type>image</type> - <id>0</id> + <id>3</id> <posX>0</posX> <posY>0</posY> <width>960</width> Modified: trunk/plugins/APODPlugin/APODPlugin/DefaultWide/APODPlugin.xml =================================================================== --- trunk/plugins/APODPlugin/APODPlugin/DefaultWide/APODPlugin.xml 2013-07-23 08:45:13 UTC (rev 4613) +++ trunk/plugins/APODPlugin/APODPlugin/DefaultWide/APODPlugin.xml 2013-07-24 08:12:30 UTC (rev 4614) @@ -7,7 +7,7 @@ <control> <description>image</description> <type>image</type> - <id>0</id> + <id>3</id> <posX>0</posX> <posY>0</posY> <width>1280</width> Modified: trunk/plugins/APODPlugin/APODPlugin/PureVisionHD 1080/APODPlugin.xml =================================================================== --- trunk/plugins/APODPlugin/APODPlugin/PureVisionHD 1080/APODPlugin.xml 2013-07-23 08:45:13 UTC (rev 4613) +++ trunk/plugins/APODPlugin/APODPlugin/PureVisionHD 1080/APODPlugin.xml 2013-07-24 08:12:30 UTC (rev 4614) @@ -8,7 +8,7 @@ <control> <description>image</description> <type>image</type> - <id>0</id> + <id>3</id> <posX>0</posX> <posY>0</posY> <width>1920</width> Modified: trunk/plugins/APODPlugin/APODPlugin/Titan/APODPlugin.xml =================================================================== --- trunk/plugins/APODPlugin/APODPlugin/Titan/APODPlugin.xml 2013-07-23 08:45:13 UTC (rev 4613) +++ trunk/plugins/APODPlugin/APODPlugin/Titan/APODPlugin.xml 2013-07-24 08:12:30 UTC (rev 4614) @@ -13,6 +13,7 @@ <width>1920</width> <height>1080</height> <texture>black.jpg</texture> + <visible>true</visible> </control> <control> <description>image</description> Modified: trunk/plugins/APODPlugin/APODPlugin/bin/Debug/APODPlugin.dll =================================================================== (Binary files differ) Modified: trunk/plugins/APODPlugin/APODPlugin/bin/Debug/APODPlugin.pdb =================================================================== (Binary files differ) Modified: trunk/plugins/APODPlugin/APODPlugin/bin/Debug/Default/APODPlugin.xml =================================================================== --- trunk/plugins/APODPlugin/APODPlugin/bin/Debug/Default/APODPlugin.xml 2013-07-23 08:45:13 UTC (rev 4613) +++ trunk/plugins/APODPlugin/APODPlugin/bin/Debug/Default/APODPlugin.xml 2013-07-24 08:12:30 UTC (rev 4614) @@ -7,7 +7,7 @@ <control> <description>image</description> <type>image</type> - <id>0</id> + <id>3</id> <posX>0</posX> <posY>0</posY> <width>960</width> Modified: trunk/plugins/APODPlugin/APODPlugin/bin/Debug/DefaultWide/APODPlugin.xml =================================================================== --- trunk/plugins/APODPlugin/APODPlugin/bin/Debug/DefaultWide/APODPlugin.xml 2013-07-23 08:45:13 UTC (rev 4613) +++ trunk/plugins/APODPlugin/APODPlugin/bin/Debug/DefaultWide/APODPlugin.xml 2013-07-24 08:12:30 UTC (rev 4614) @@ -7,7 +7,7 @@ <control> <description>image</description> <type>image</type> - <id>0</id> + <id>3</id> <posX>0</posX> <posY>0</posY> <width>1280</width> Modified: trunk/plugins/APODPlugin/APODPlugin/bin/Debug/PureVisionHD 1080/APODPlugin.xml =================================================================== --- trunk/plugins/APODPlugin/APODPlugin/bin/Debug/PureVisionHD 1080/APODPlugin.xml 2013-07-23 08:45:13 UTC (rev 4613) +++ trunk/plugins/APODPlugin/APODPlugin/bin/Debug/PureVisionHD 1080/APODPlugin.xml 2013-07-24 08:12:30 UTC (rev 4614) @@ -8,7 +8,7 @@ <control> <description>image</description> <type>image</type> - <id>0</id> + <id>3</id> <posX>0</posX> <posY>0</posY> <width>1920</width> Modified: trunk/plugins/APODPlugin/APODPlugin/bin/Debug/Titan/APODPlugin.xml =================================================================== --- trunk/plugins/APODPlugin/APODPlugin/bin/Debug/Titan/APODPlugin.xml 2013-07-23 08:45:13 UTC (rev 4613) +++ trunk/plugins/APODPlugin/APODPlugin/bin/Debug/Titan/APODPlugin.xml 2013-07-24 08:12:30 UTC (rev 4614) @@ -13,6 +13,7 @@ <width>1920</width> <height>1080</height> <texture>black.jpg</texture> + <visible>true</visible> </control> <control> <description>image</description> Modified: trunk/plugins/APODPlugin/APODPlugin/obj/Debug/APODPlugin.csproj.FileListAbsolute.txt =================================================================== --- trunk/plugins/APODPlugin/APODPlugin/obj/Debug/APODPlugin.csproj.FileListAbsolute.txt 2013-07-23 08:45:13 UTC (rev 4613) +++ trunk/plugins/APODPlugin/APODPlugin/obj/Debug/APODPlugin.csproj.FileListAbsolute.txt 2013-07-24 08:12:30 UTC (rev 4614) @@ -46,3 +46,4 @@ C:\Users\jamesb\documents\visual studio 2012\Projects\APODPlugin\APODPlugin\bin\Debug\DefaultWide\hover_APOD.png C:\Users\jamesb\documents\visual studio 2012\Projects\APODPlugin\APODPlugin\bin\Debug\Default\hover_APOD.png C:\Users\jamesb\documents\visual studio 2012\Projects\APODPlugin\APODPlugin\bin\Debug\PureVisionHD 1080\hover_APOD.png +C:\Users\jamesb\documents\visual studio 2012\Projects\APODPlugin\APODPlugin\obj\Debug\APODPlugin.csprojResolveAssemblyReference.cache Modified: trunk/plugins/APODPlugin/APODPlugin/obj/Debug/APODPlugin.dll =================================================================== (Binary files differ) Modified: trunk/plugins/APODPlugin/APODPlugin/obj/Debug/APODPlugin.pdb =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |