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. |