From: <fc...@us...> - 2007-10-02 22:59:18
|
Revision: 971 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=971&view=rev Author: fcsobel Date: 2007-10-02 15:59:15 -0700 (Tue, 02 Oct 2007) Log Message: ----------- Added Paths: ----------- trunk/plugins/RSS Plugins/My Ebay/ trunk/plugins/RSS Plugins/My Ebay/GUIEbay/ trunk/plugins/RSS Plugins/My Ebay/GUIEbay/GUIEbay.cs trunk/plugins/RSS Plugins/My Ebay/GUIEbay/MyEbay.xml trunk/plugins/RSS Plugins/My Flickr/ trunk/plugins/RSS Plugins/My Flickr/GUIFlickr/ trunk/plugins/RSS Plugins/My Flickr/GUIFlickr/GUIFlickr.cs trunk/plugins/RSS Plugins/My Flickr/GUIFlickr/MyFlickr.xml Added: trunk/plugins/RSS Plugins/My Ebay/GUIEbay/GUIEbay.cs =================================================================== --- trunk/plugins/RSS Plugins/My Ebay/GUIEbay/GUIEbay.cs (rev 0) +++ trunk/plugins/RSS Plugins/My Ebay/GUIEbay/GUIEbay.cs 2007-10-02 22:59:15 UTC (rev 971) @@ -0,0 +1,324 @@ +using System; +using System.Windows.Forms; +using MediaPortal.GUI.Library; +using MediaPortal.GUI.Video; +//using MediaPortal.Video.Database; +using MediaPortal.Util; +using MediaPortal.Dialogs; +using MediaPortal.Player; +using System.Data; +using System.ComponentModel; +using c3o.Framework.Web; +using System.Collections.Specialized; +using System.Xml; +using System.Xml.Serialization; +using System.IO; +using c3o.Ebay; + + +namespace MediaPortal.GUI.Rss +{ + public class GUIEbay : GUIDataTable, ISetupForm + { + [SkinControlAttribute(200)] + protected GUIButtonControl bttnRefresh = null; + + + + public override int GetID + { + get + { + return 61909; + } + set + { + } + } + + protected override void OnPageLoad() + { + GUIPropertyManager.SetProperty("#header.label", "My Ebay"); + + this.ShowData(); + + base.OnPageLoad(); + } + + + protected override void OnClicked(int controlId, GUIControl control, Action.ActionType actionType) + { + base.OnClicked(controlId, control, actionType); + + if (control == this.bttnRefresh) this.ShowData(); + } + + public void ShowData() + { + XmlDocument xdoc = EbayHelper.GetItem(250034619743); + + XmlNode root = xdoc["GetItemResponse"]["Item"]; + + string ItemId = root["ItemID"].InnerText; + string Category = root["PrimaryCategory"]["CategoryName"].InnerText; + string Title = root["Title"].InnerText; + string Quantity = root["Quantity"].InnerText; + string Location = root["Location"].InnerText; + string Started = root["ListingDetails"]["StartTime"].InnerText + " GMT"; + string Ends = root["ListingDetails"]["EndTime"].InnerText + " GMT"; + string URL = root["ListingDetails"]["ViewItemURL"].InnerText; + string CurrentPrice = root["SellingStatus"]["CurrentPrice"].InnerText;// +root["SellingStatus"]["CurrentPrice"].GetAttribute("currencyID"); + + CurrentPrice = string.Format("{0:c}", System.Convert.ToDouble(CurrentPrice)); + + string StartPrice = root["StartPrice"].InnerText + root["StartPrice"].GetAttribute("currencyID"); + string BuyItNowPrice = root["BuyItNowPrice"].InnerText + root["BuyItNowPrice"].GetAttribute("currencyID"); + string MinimumBid = root["SellingStatus"]["MinimumToBid"].InnerText + root["SellingStatus"]["MinimumToBid"].GetAttribute("currencyID"); + string BidIncrement = root["SellingStatus"]["BidIncrement"].InnerText + root["SellingStatus"]["BidIncrement"].GetAttribute("currencyID"); + string BidCount = root["SellingStatus"]["BidCount"].InnerText; + + DataTable dt = new DataTable(); + dt.Columns.Add("label"); + dt.Columns.Add("label2"); + dt.Columns.Add("IconImage"); + dt.Columns.Add("DVDLabel"); + + dt.Rows.Add(Title, CurrentPrice, @"http://i10.ebayimg.com/01/i/08/85/14/3a_2.JPG", "Bid Count: " + BidCount + "\n\rBid Amount: " + CurrentPrice); + + this.facadeView.Clear(); + + this.Datasource = dt; + this.Databind(); + } + + public void ShowData2() + { + this.facadeView.Clear(); + this.facadeView.View = GUIFacadeControl.ViewMode.List; + this.facadeView.Clear(); + + RssReader r = new RssReader(@"http://rss.api.ebay.com/ws/rssapi?FeedName=SearchResults&siteId=0&language=en-US&output=RSS20&fsop=1&fsoo=1&rd=0&sass=greyhound_fancier&frpp=50"); + + string ebayPrice = r.Detail.Rows[0]["rx:CurrentPrice"].ToString(); + + ebayPrice = string.Format("{0:c}", System.Convert.ToDouble(ebayPrice) / 100.00); + + string ebayCount = r.Detail.Rows[0]["rx:BiDCount"].ToString(); + string ebayTitle = r.Detail.Rows[0]["title"].ToString(); + string ebayDescription = r.Detail.Rows[0]["Description"].ToString(); + + int startPos = ebayDescription.IndexOf("src="); + int endPos = ebayDescription.IndexOf(".jpg"); + + string ebayImage = ebayDescription.Substring(startPos + 5, endPos - (startPos + 1)); + + DataTable dt = new DataTable(); + dt.Columns.Add("label"); + dt.Columns.Add("label2"); + dt.Columns.Add("IconImage"); + dt.Columns.Add("DVDLabel"); + + dt.Rows.Add(ebayTitle, ebayPrice, ebayImage, "Bid Count: " + ebayCount + "\n\rBid Amount: " + ebayPrice); + + this.Datasource = dt; + this.Databind(); + + + } + + + public override bool Init() + { + return Load(GUIGraphicsContext.Skin + @"\MyEbay.xml"); + } + + + + #region ISetupForm Members + + // Returns the name of the plugin which is shown in the plugin menu + public string PluginName() + { + return "My Ebay"; + } + + + + // Returns the description of the plugin is shown in the plugin menu + public string Description() + { + return "My Ebay"; + } + + + + // Returns the author of the plugin which is shown in the plugin menu + public string Author() + { + return "fcsobel"; + } + + + + // show the setup dialog + public void ShowPlugin() + { + Form setup = new MyPodCastSetupForm(); + setup.ShowDialog(); + } + + + + // Indicates whether plugin can be enabled/disabled + public bool CanEnable() + { + return true; + } + + // get ID of windowplugin belonging to this setup + public int GetWindowId() + { + return this.GetID; + } + + // Indicates if plugin is enabled by default; + public bool DefaultEnabled() + { + return true; + } + + // indicates if a plugin has its own setup screen + public bool HasSetup() + { + return true; + } + + + /// <summary> + /// If the plugin should have its own button on the main menu of Media Portal then it + /// should return true to this method, otherwise if it should not be on home + /// it should return false + /// </summary> + /// <param name="strButtonText">text the button should have</param> + /// <param name="strButtonImage">image for the button, or empty for default</param> + /// <param name="strButtonImageFocus">image for the button, or empty for default</param> + /// <param name="strPictureImage">subpicture for the button or empty for none</param> + /// <returns>true : plugin needs its own button on home + /// false : plugin does not need its own button on home</returns> + //public bool GetHome(out string strButtonText, out string strButtonImage, out string strButtonImageFocus, out string strPictureImage) + //{ + + // strButtonText = "UKNova"; + // strButtonImage = String.Empty; + // strButtonImageFocus = String.Empty; + // strPictureImage = String.Empty; + // return false; + //} + + public bool GetHome(out string strButtonText, out string strButtonImage, out string strButtonImageFocus, out string strPictureImage) + { + strButtonText = PluginName(); + strButtonImage = String.Empty; + strButtonImageFocus = String.Empty; + strPictureImage = String.Empty; + return true; + } + #endregion + + + //protected override void OnClicked(int controlId, GUIControl control, Action.ActionType actionType) + //{ + // //base.OnClicked(controlId, control, actionType); + // //if (control == this.bttnAddSite) this.ShowOpmlSites(); + // //if (control == this.facadeView) this.OnListView(); + // //if (control == this.bttnAddSearchTag) this.AddSearchTag(); + // //if (control == this.bttnDelete) this.OnDelete(); + + // base.OnClicked(controlId, control, actionType); + //} + + + + public override void OnAction(Action action) + { + base.OnAction(action); + } + + + //protected override void OnListViewList() + //{ + // base.OnListViewList(); + + // GUIListItem item = this.facadeView.SelectedListItem; + + // if (item != null) + // { + // if (item.IsFolder) + // { + // if (item.Label == "..") + // { + // if (this.selectedOutline == null) + // { + // this.ShowSites(); + // } + // else + // { + // this.SelectOutline(this.opmlList, this.selectedOutline.parent, GUIFacadeControl.ViewMode.List); + // } + // } + // } + // else + // { + // // Select Item + // item.IconImage = "check-box.png"; + // item.IsDownloading = true; + + // // Refresh list so you see change + // GUIControl.RefreshControl(this.GetID, this.facadeView.GetID); + + // // Download File + // string url = this.facadeView.SelectedListItem.Path; + + // if (url != null && url.Length > 0) + // { + // if (url.ToLower().Contains(".avi") || + // url.ToLower().Contains(".mpeg") || + // url.ToLower().Contains(".mov") || + // url.ToLower().Contains(".wmv") || + // url.ToLower().Contains(".divx") || + // url.ToLower().Contains(".mpg")) + // { + // g_Player.FullScreen = true; + // if (g_Player.Play(url)) + // { + // GUIGraphicsContext.IsFullScreenVideo = true; + // GUIWindowManager.ActivateWindow((int)GUIWindow.Window.WINDOW_FULLSCREEN_VIDEO); + // } + // } + // else + // { + // if (url.ToLower().Contains(".mp3")) + // { + // //this.PlayPodCast(url); + // g_Player.Play(url); + // //g_Player.PlayAudioStream(url); + // } + // else + // { + // if (url.ToLower().Contains(".m4v") || + // url.ToLower().Contains(".mp4")) + // { + // System.Diagnostics.Process.Start(@"QuickTimePlayer.exe", url); + // } + // else + // { + // System.Diagnostics.Process.Start(url); + // } + // } + // } + // } + // } + // } + //} + } +} \ No newline at end of file Added: trunk/plugins/RSS Plugins/My Ebay/GUIEbay/MyEbay.xml =================================================================== --- trunk/plugins/RSS Plugins/My Ebay/GUIEbay/MyEbay.xml (rev 0) +++ trunk/plugins/RSS Plugins/My Ebay/GUIEbay/MyEbay.xml 2007-10-02 22:59:15 UTC (rev 971) @@ -0,0 +1,59 @@ +<window> + <id>61902</id> + <defaultcontrol>2</defaultcontrol> + <allowoverlay>yes</allowoverlay> + + <controls> + <import>common.window.xml</import> + + <control> + <type>group</type> + <description>group element</description> + <animation>FlyInFromLeft</animation> + <layout>StackLayout</layout> + <posX>60</posX> + <posY>97</posY> + + <control> + <description>View-As button</description> + <type>button</type> + <id>2</id> + <label>100</label> + <onup>17</onup> + <onright>50</onright> + </control> + + <control> + <animation>FlyInFromLeft</animation> + <description>Refresh</description> + <type>button</type> + <id>200</id> + <label>Refresh</label> + <onleft>50</onleft> + <onright>50</onright> + </control> + + <control> + <type>textboxscrollup</type> + <description>Details</description> + <id>80</id> + <width>180</width> + <height>100</height> + <colordiffuse>ffffffff</colordiffuse> + <font>font13</font> + <textcolor>FFFFFFFF</textcolor> + </control> + + <control> + <type>image</type> + <description>Ebay Image</description> + <id>24</id> + <width>101</width> + <height>150</height> + <texture>background.png</texture> + </control> + + </control> + <import>common.facade.xml</import> + </controls> +</window> \ No newline at end of file Added: trunk/plugins/RSS Plugins/My Flickr/GUIFlickr/GUIFlickr.cs =================================================================== --- trunk/plugins/RSS Plugins/My Flickr/GUIFlickr/GUIFlickr.cs (rev 0) +++ trunk/plugins/RSS Plugins/My Flickr/GUIFlickr/GUIFlickr.cs 2007-10-02 22:59:15 UTC (rev 971) @@ -0,0 +1,544 @@ +using System; +using System.Windows.Forms; +using MediaPortal.GUI.Library; +using MediaPortal.GUI.Video; +using MediaPortal.Dialogs; +using MediaPortal.Player; +using MediaPortal.Util; +using MediaPortal.GUI; +using MediaPortal.GUI.Pictures; +using System.Data; +using System.ComponentModel; +using c3o.Framework.Web; +using System.Collections.Specialized; + + +namespace MediaPortal.MyFlickr +{ + public class GUIFlickr : GUIVideoBaseWindow, ISetupForm + { + [SkinControlAttribute(10)] protected GUIButtonControl bttnAddSearchTag = null; + [SkinControlAttribute(14)] protected GUIButtonControl bttnDeleteSearchTag = null; + [SkinControlAttribute(50)] protected GUIFacadeControl listview = null; + + + VirtualDirectory virtualDirectory = new VirtualDirectory(); + + protected RssReader dtRss; + protected string Url = null; + protected string CurrentLocation = "."; + protected string ParentPath + { + get + { + if (CurrentLocation.Contains(":")) + { + return CurrentLocation.Substring(0, CurrentLocation.LastIndexOf(":")); + } + else + { + return null; + } + } + } + protected string sort = null; + protected string filter = null; + + public override int GetID + { + get + { + return 5699; + } + set + { + } + } + + + protected override void OnPageLoad() + { +// MediaPortal.Profile.Settings xmlreader = new MediaPortal.Profile.Settings("MediaPortal.xml"); + + base.OnPageLoad(); + + // Load Site List + this.ShowFolder("."); + + this.listview.View = GUIFacadeControl.ViewMode.SmallIcons; + + //facadeView.View = GUIFacadeControl.ViewMode.LargeIcons; + + } + + + // if (Utils.IsPicture(item.Path)) + //{ + // string thumbnailImage = GetThumbnail(item.Path); + // if (!System.IO.File.Exists(thumbnailImage)) + // { + // int iRotate = dbs.GetRotation(item.Path); + // Util.Picture.CreateThumbnail(item.Path, thumbnailImage, 128, 128, iRotate); + // System.Threading.Thread.Sleep(100); + // } + + // thumbnailImage = GetLargeThumbnail(item.Path); + // if (!System.IO.File.Exists(thumbnailImage)) + // { + // int iRotate = dbs.GetRotation(item.Path); + // Util.Picture.CreateThumbnail(item.Path, thumbnailImage, 512, 512, iRotate); + // // System.Threading.Thread.Sleep(100); + // } + //} + //} + + + protected void AddSearchTag() + { + string NewSearchTag = String.Empty; + + if (GetKeyboard(ref NewSearchTag)) + { + MediaPortal.Profile.Settings xmlwriter = new MediaPortal.Profile.Settings("MediaPortal.xml"); + string SearchTags = xmlwriter.GetValue("MyFlickr", "SearchTags") as string; + + if (SearchTags != null && SearchTags.Length > 0) + { + SearchTags += "," + NewSearchTag; + } + else + { + SearchTags = NewSearchTag; + } + + xmlwriter.SetValue("MyFlickr", "SearchTags", SearchTags); + + this.Url = @"http://www.flickr.com/services/feeds/photos_public.gne?format=rss2&" + "tags=" + NewSearchTag; + this.ShowRSSAsc(); + } + } + + + + //protected bool GetKeyboard(ref string strLine) + //{ + // VirtualKeyboard keyboard = (VirtualKeyboard)GUIWindowManager.GetWindow((int)GUIWindow.Window.WINDOW_VIRTUAL_KEYBOARD); + // if (null == keyboard) return false; + // keyboard.Reset(); + // keyboard.DoModal(this.GetID); + // if (keyboard.IsConfirmed) + // { + // strLine = keyboard.Text; + // return true; + // } + // return false; + //} + + + + + public override bool Init() + { + return Load(GUIGraphicsContext.Skin + @"\MyFlickr.xml"); + + // GUIWindowManager.Receivers += new SendMessageHandler(this.OnMessage); + } + + + + #region ISetupForm Members + + // Returns the name of the plugin which is shown in the plugin menu + public string PluginName() + { + return "My Flickr"; + } + + + + // Returns the description of the plugin is shown in the plugin menu + public string Description() + { + return "My Flickr"; + } + + + + // Returns the author of the plugin which is shown in the plugin menu + public string Author() + { + return "fcsobel"; + } + + + + // show the setup dialog + public void ShowPlugin() + { + //Form setup = new SetupForm(); + //setup.ShowDialog(); + } + + + + // Indicates whether plugin can be enabled/disabled + public bool CanEnable() + { + return true; + } + + // get ID of windowplugin belonging to this setup + public int GetWindowId() + { + return this.GetID; + } + + + + + // Indicates if plugin is enabled by default; + public bool DefaultEnabled() + { + return true; + } + + // indicates if a plugin has its own setup screen + public bool HasSetup() + { + return true; + } + + + /// <summary> + /// If the plugin should have its own button on the main menu of Media Portal then it + /// should return true to this method, otherwise if it should not be on home + /// it should return false + /// </summary> + /// <param name="strButtonText">text the button should have</param> + /// <param name="strButtonImage">image for the button, or empty for default</param> + /// <param name="strButtonImageFocus">image for the button, or empty for default</param> + /// <param name="strPictureImage">subpicture for the button or empty for none</param> + /// <returns>true : plugin needs its own button on home + /// false : plugin does not need its own button on home</returns> + //public bool GetHome(out string strButtonText, out string strButtonImage, out string strButtonImageFocus, out string strPictureImage) + //{ + + // strButtonText = "UKNova"; + // strButtonImage = String.Empty; + // strButtonImageFocus = String.Empty; + // strPictureImage = String.Empty; + // return false; + //} + + public bool GetHome(out string strButtonText, out string strButtonImage, out string strButtonImageFocus, out string strPictureImage) + { + strButtonText = PluginName(); + strButtonImage = String.Empty; + strButtonImageFocus = String.Empty; + strPictureImage = String.Empty; + return true; + } + #endregion + + + protected override void OnClicked(int controlId, GUIControl control, Action.ActionType actionType) + { + if (control == this.bttnAddSearchTag) this.AddSearchTag(); + if (control == this.listview) this.OnListView(); + + base.OnClicked(controlId, control, actionType); + } + + + public override void OnAction(Action action) + { + base.OnAction(action); + + if (action.IsUserAction()) + { + GUIListItem item = this.listview.SelectedListItem; + + if (item != null) + { + // Set Display + GUIPropertyManager.SetProperty("#title", item.Label); + + if (item.IsFolder) + { + + } + else + { + // Show Details for picture + // GUIControl.SelectItemControl(GetID, this.listview.GetID, this.listview.SelectedListItemIndex); + } + } + } + } + + //protected void SwitchView() + //{ + // switch (CurrentView) + // { + // case View.List: + // facadeView.View = GUIFacadeControl.ViewMode.List; + // break; + // case View.Icons: + // facadeView.View = GUIFacadeControl.ViewMode.SmallIcons; + // break; + // case View.LargeIcons: + // facadeView.View = GUIFacadeControl.ViewMode.LargeIcons; + // break; + // case View.Albums: + // facadeView.View = GUIFacadeControl.ViewMode.AlbumView; + // break; + // case View.FilmStrip: + // facadeView.View = GUIFacadeControl.ViewMode.Filmstrip; + // break; + // } + //} + + + + void OnClick(int itemIndex) + { + GUIListItem item = this.listview.SelectedListItem; + if (item == null) return; + if (item.IsFolder) + { + } + else + { + if (virtualDirectory.IsRemote(item.Path)) + { + if (!virtualDirectory.IsRemoteFileDownloaded(item.Path, item.FileInfo.Length)) + { + if (!virtualDirectory.ShouldWeDownloadFile(item.Path)) return; + if (!virtualDirectory.DownloadRemoteFile(item.Path, item.FileInfo.Length)) + { + //show message that we are unable to download the file + GUIMessage msg = new GUIMessage(GUIMessage.MessageType.GUI_MSG_SHOW_WARNING, 0, 0, 0, 0, 0, 0); + msg.Param1 = 916; + msg.Param2 = 920; + msg.Param3 = 0; + msg.Param4 = 0; + GUIWindowManager.SendMessage(msg); + + return; + } + } + return; + } + + //selectedItemIndex = GetSelectedItemNo(); +// OnShowPicture(item.Path); + } + } + + + //void OnShowPicture(string strFile) + //{ + // GUISlideShow SlideShow = (GUISlideShow)GUIWindowManager.GetWindow((int)GUIWindow.Window.WINDOW_SLIDESHOW); + // if (SlideShow == null) return; + + + // SlideShow.Reset(); + // for (int i = 0; i < this.listview.Count; ++i) + // { + // GUIListItem item = this.listview[itemIndex]; + // if (!item.IsFolder) + // { + // if (item.IsRemote) continue; + // SlideShow.Add(item.Path); + // } + // } + // GUIWindowManager.ActivateWindow((int)GUIWindow.Window.WINDOW_SLIDESHOW); + // SlideShow.Select(strFile); + //} + + + + //public void ShowItem(int index) + //{ + // if (dtRss != null && dtRss.Rows.Count > 0) + // { + // int i = this.listview.SelectedListItemIndex; + + // if (i < dtRss.Rows.Count) + // { + // DataRow row = dtRss.Rows[i]; + + // string pubDate = row["pubDate"].ToString(); + // string description = row["description"].ToString(); + + // if (pubDate != null && pubDate.Length > 0) + // { + // this.pubDateValue.Label = pubDate; + // } + + // this.detailbox.Label = description; + // } + // } + //} + + + + + private void OnListView() + { + GUIListItem item = this.listview.SelectedListItem; + + if (item != null) + { + if (item.IsFolder) + { + if (item.IsRemote) + { + this.Url = item.Path; + this.ShowRSSAsc(); + } + else + { + this.ShowFolder(item.Path); + } + } + else // Must be a picture + { + GUIControl.SelectItemControl(GetID, this.listview.GetID, this.listview.SelectedListItemIndex); + + ///item.IsDownloading = true; + + // Download File + //this.dtRss.Download(item.Path, item.Label); + + // show the image + } + } + } + + + /// <summary> + /// Show Folder Contents + /// </summary> + /// <param name="path"></param> + protected void ShowFolder(string path) + { + if (path == ".") + { + this.listview.Clear(); + + // Show Top level + GUIListItem item = new GUIListItem(); + item = new GUIListItem(); + item.Label = "Latest Flickr Photos"; + item.IsFolder = true; + item.IsRemote = true; + item.IconImage = "defaultVideo.png"; + item.Path = @"http://www.flickr.com/services/feeds/photos_public.gne?format=rss2"; + listview.Add(item); + + + // Add Search Tags + MediaPortal.Profile.Settings xmlreader = new MediaPortal.Profile.Settings("MediaPortal.xml"); + + string SearchTags = xmlreader.GetValue("MyFlickr", "SearchTags") as string; + + if (SearchTags != null && SearchTags.Length > 0) + { + string[] TagList = SearchTags.Split(','); + + foreach (string Tag in TagList) + { + item = new GUIListItem(); + item.Label = Tag; + item.IsFolder = true; + item.IsRemote = true; + item.IconImage = "defaultVideo.png"; + item.Path = @"http://www.flickr.com/services/feeds/photos_public.gne?format=rss2&" + "tags=" + Tag; + listview.Add(item); + } + } + + // Set Focus on List + GUIControl.FocusControl(this.GetID, this.listview.GetID); + } + } + + + + + + // Background Version + public void ShowRSSAsc() + { + // Load Page in background + BackgroundWorker worker = new BackgroundWorker(); + worker.DoWork += new DoWorkEventHandler(this.ShowRSS); + worker.RunWorkerAsync(); + } + public void ShowRSS(object sender, DoWorkEventArgs e) { this.ShowRSS(); } + public void ShowRSS() + { + GUIPropertyManager.SetProperty("#title", "Loading..."); + GUIWindowManager.Process(); + + listview.Clear(); + + GUIListItem item = new GUIListItem(); + item = new GUIListItem(); + item.Label = ".."; + item.IsFolder = true; + item.IconImage = "defaultVideo.png"; + item.Path = "."; + listview.Add(item); + + GUIPropertyManager.SetProperty("#title", "Loading..." + this.Url); + GUIWindowManager.Process(); + + // Read rss feed + dtRss = new RssReader(this.Url); + + DataTable dt = dtRss.Detail; + + if (this.filter != null || this.sort != null) + { + // Convert to view for sort and filter + DataView dv = new DataView(dt); + + if (this.filter != null) dv.RowFilter = this.filter; + if (this.sort != null) dv.Sort = this.sort; + + /// Load back into table + dt = dv.ToTable(); + } + +// GUIPropertyManager.SetProperty("#title", "Loading..." + dt.Rows.Count.ToString()); + // GUIWindowManager.Process(); + + + foreach (DataRow row in dt.Rows) + { + GUIPropertyManager.SetProperty("#title", "Row"); + GUIWindowManager.Process(); + + item = new GUIListItem(); + item.IsFolder = false; + item.IsRemote = true; + item.IconImage = "defaultVideo.png"; + if (dt.Columns.Contains("media:content_url")) + { + item.Path = row["media:content_url"].ToString(); + + } + if (dt.Columns.Contains("media:thumbnail_url")) item.ThumbnailImage = row["media:thumbnail_url"].ToString(); + if (dt.Columns.Contains("title")) item.Label = row["title"].ToString(); + + + + listview.Add(item); + } + } + //this.RefreshTitle(); + + } +} Added: trunk/plugins/RSS Plugins/My Flickr/GUIFlickr/MyFlickr.xml =================================================================== --- trunk/plugins/RSS Plugins/My Flickr/GUIFlickr/MyFlickr.xml (rev 0) +++ trunk/plugins/RSS Plugins/My Flickr/GUIFlickr/MyFlickr.xml 2007-10-02 22:59:15 UTC (rev 971) @@ -0,0 +1,134 @@ +<window> + <id>2</id> + <defaultcontrol>2</defaultcontrol> + <allowoverlay>yes</allowoverlay> + <controls> + <control> + <description>BG</description> + <type>image</type> + <id>1</id> + <posX>0</posX> + <posY>0</posY> + <width>720</width> + <height>576</height> + <texture>background.png</texture> + </control> + <control> + <type>image</type> + <id>1</id> + <posX>60</posX> + <posY>20</posY> + <texture>pictures_logo.png</texture> + </control> + <control> + <description>My Pictures text label</description> + <type>label</type> + <id>1</id> + <posX>250</posX> + <posY>70</posY> + <label>My Flickr</label> + <font>font16</font> + <align>right</align> + <textcolor>ffffffff</textcolor> + </control> + <control> + <description>Number of Files Label</description> + <type>label</type> + <id>1</id> + <posX>260</posX> + <posY>530</posY> + <label>#itemcount</label> + <align>left</align> + <textcolor>ffffffff</textcolor> + </control> + <control> + <description>Selected item Label</description> + <type>fadelabel</type> + <id>1</id> + <posX>660</posX> + <posY>70</posY> + <width>400</width> + <label>#selecteditem</label> + <font>font13</font> + <align>right</align> + <textcolor>ffffffff</textcolor> + </control> + <control> + <type>group</type> + <description>group element</description> + <animation>FlyInFromLeft</animation> + <control> + <description>View-As button</description> + <type>button</type> + <id>2</id> + <posX>60</posX> + <posY>97</posY> + <label>100</label> + <onleft>2</onleft> + <onright>50</onright> + <onup>9</onup> + <ondown>3</ondown> + </control> + <control> + <type>sortbutton</type> + <id>3</id> + <posX>60</posX> + <posY>131</posY> + <label>103</label> + <onleft>3</onleft> + <onright>50</onright> + <onup>2</onup> + <ondown>6</ondown> + </control> + <control> + <description>SlideShow button</description> + <type>button</type> + <id>6</id> + <posX>60</posX> + <posY>165</posY> + <label>108</label> + <onleft>6</onleft> + <onright>50</onright> + <onup>3</onup> + <ondown>7</ondown> + </control> + <control> + <description>Recursive Slideshow</description> + <type>button</type> + <id>7</id> + <posX>60</posX> + <posY>199</posY> + <label>361</label> + <onleft>7</onleft> + <onright>50</onright> + <onup>6</onup> + <ondown>8</ondown> + </control> + <control> + <description>Create Thumbnails</description> + <type>button</type> + <id>8</id> + <posX>60</posX> + <posY>233</posY> + <label>109</label> + <onleft>8</onleft> + <onright>50</onright> + <onup>7</onup> + <ondown>9</ondown> + </control> + <control> + <description>Rotate</description> + <type>button</type> + <id>9</id> + <posX>60</posX> + <posY>267</posY> + <label>735</label> + <onleft>8</onleft> + <onright>50</onright> + <onup>8</onup> + <ondown>2</ondown> + </control> + </control> + <import>common.facade.xml</import> + </controls> +</window> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |