📄 itemlistform.cs
字号:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlServerCe;
namespace MobileReader
{
public partial class ItemListForm : Form
{
private MobileReaderResultSets.FeedResultSet feedRs;
private SqlCeResultSet itemRs;
public ItemListForm(MobileReaderResultSets.FeedResultSet feedRs)
{
InitializeComponent();
this.feedRs = feedRs;
this.Text = feedRs.Title;
}
private void ReturnMenuItem_Click(object sender, EventArgs e)
{
this.Close();
}
private void ItemListForm_Load(object sender, EventArgs e)
{
SqlCeCommand command = feedRs.Connection.CreateCommand();
command.CommandText = "SELECT * FROM Item WHERE FeedID = @feedID";
command.CommandType = CommandType.Text;
command.Parameters.Add("@feedID", feedRs.FeedID);
itemRs = command.ExecuteResultSet(ResultSetOptions.Scrollable);
ItemListBox.DataSource = itemRs;
ItemListBox.DisplayMember = "Title";
}
private void ViewMenuItem_Click(object sender, EventArgs e)
{
itemRs.ReadAbsolute(ItemListBox.SelectedIndex);
ItemReadForm itemReadForm = new ItemReadForm(itemRs);
itemReadForm.Show();
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -