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

📄 form1.cs

📁 Accessing microsoft live web services from 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;
using LiveExpoService;


namespace LiveExpoCategoriesDS
{
    public partial class Form1 : Form
    {
        DataView dv;
        DataSet ds;
        int tableIndex = 0;

        public Form1()
        {
            InitializeComponent();
        }

        private void Form1_Load(object sender, EventArgs e)
        {
            ds = LiveExpoCategories.Instance().GetCategoriesDS();
            if (ds != null)
            {
                dv = new DataView(ds.Tables[tableIndex]);
                dataGrid1.DataSource = dv;
            }
            statusBar1.Text = "TableID = " + tableIndex.ToString();
        }

        private void menuItemNext_Click(object sender, EventArgs e)
        {
            tableIndex = (tableIndex + 1) % ds.Tables.Count;
            if (ds != null)
            {
                dv.Dispose();
                dv = new DataView(ds.Tables[tableIndex]);
                dataGrid1.DataSource = dv;
            }
            statusBar1.Text = "TableID = " + tableIndex.ToString();
        }

        private void menuItemExit_Click(object sender, EventArgs e)
        {
            this.Close();
        }

        private void Form1_Closing(object sender, CancelEventArgs e)
        {
            ds.Dispose();
            dv.Dispose();
        }
    }
}

⌨️ 快捷键说明

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