Beispiel #1
0
        /// <summary>
        /// Open the item indicated by lstItems.SelectedIndex
        /// </summary>
        private void OpenItem()
        {
            if (lstItems.SelectedIndex < 0)
            {
                return;
            }

            if (this.lstItems.Items[0].GetType().ToString() == "System.String")
            {
                // We have the "No news items!" message. Get out.
                return;
            }

            RSSItemClass rssItem = (RSSItemClass)this.lstItems.Items[lstItems.SelectedIndex];
            // We could display the contents from the RSS feed, but lots of sites don't have good contents.
            // So leave it at linking for now, like the previous version.
            //if (rssItem.contents.Length > 0)
            //{
            //    frmContent content = new frmContent();
            //    content.ParseContent(rssItem.contents);
            //    content.ShowDialog(this);
            //}
            //else
            //{
            string url = rssItem.Url;

            if (url == "")
            {
                lblStatus.Text = _I18N.GetText("Failed to open story!");
            }
            else
            {
                System.Diagnostics.Process          proc      = new System.Diagnostics.Process();
                System.Diagnostics.ProcessStartInfo startInfo = proc.StartInfo;
                startInfo.UseShellExecute = true;
                startInfo.FileName        = url;
                proc.Start();
            }
            //}
        }
Beispiel #2
0
        /// <summary>
        /// Open the item indicated by lstItems.SelectedIndex
        /// </summary>
        private void OpenItem()
        {
            if (lstItems.SelectedIndex < 0)
            {
                return;
            }

            if (this.lstItems.Items[0].GetType().ToString() == "System.String")
            {
                // We have the "No news items!" message. Get out.
                return;
            }

            RSSItemClass rssItem = (RSSItemClass)this.lstItems.Items[lstItems.SelectedIndex];
            // We could display the contents from the RSS feed, but lots of sites don't have good contents.
            // So leave it at linking for now, like the previous version.
            //if (rssItem.contents.Length > 0)
            //{
            //    frmContent content = new frmContent();
            //    content.ParseContent(rssItem.contents);
            //    content.ShowDialog(this);
            //}
            //else
            //{
            string url = rssItem.EnclosureUrl;

            if (url == "")
            {
                //TODO Add "Nothing to Play!" to I18N.
                lblStatus.Text = _I18N.GetText("Nothing to play!");
            }
            else
            {
                this.wmp.URL = url;
                this.wmp.Ctlcontrols.play();
            }
        }
Beispiel #3
0
        /// <summary>
        /// Set the item indicated by index (to the list of items) to "read"
        /// </summary>
        /// <param name="index"></param>
        private void MarkItemAsRead(int index)
        {
            RSSItemClass rssItem = (RSSItemClass)lstItems.Items[index];

            this._Library.currentFeed.MarkAsRead(rssItem);
        }