⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 itemlistform.cs

📁 how to use RSS services on windows mobile
💻 CS
字号:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace LiveQnA3
{
    public partial class ItemListForm : Form
    {
        private DataRow channelRow;

        public ItemListForm(DataRow channelRow)
        {
            InitializeComponent();
            this.channelRow = channelRow;
        }

        private void ItemListForm_Load(object sender, EventArgs e)
        {
            DataRow[] itemRows = channelRow.GetChildRows("channel_item");

            if (itemRows.Length == 0)
                return;

            foreach (DataRow itemRow in itemRows)
            {
                //only title, link and description are required elements
                string title = itemRow["title"].ToString();
                string[] displayInfo = new string[2];
                displayInfo[0] = title;
                if (itemRow.Table.Columns.Contains("pubDate"))
                {
                    displayInfo[1] = itemRow["pubDate"].ToString();
                }
                else
                {
                    displayInfo[1] = string.Empty;
                }
 
                ListViewItem item = new ListViewItem(displayInfo);
                item.Tag = itemRow;
                listView1.Items.Add(item);
            }
            if (listView1.Items.Count > 0)
                listView1.Items[0].Selected = true;

        }


    }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -