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

📄 searchresultsform.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 LiveExpoApp
{
    public partial class SearchResultsForm : Form
    {
        private int id;
        private string name;
        private int selectedIndex;

        public SearchResultsForm(int selectedIndex)
        {
            InitializeComponent();
            LiveExpoCategories categories = LiveExpoCategories.Instance();
            LiveExpoCategory selectedCategory = categories[selectedIndex];
            this.id = selectedCategory.ID;
            this.name = selectedCategory.Name;
            this.selectedIndex = selectedIndex;
        }

        private void SearchResultsForm_Load(object sender, EventArgs e)
        {
            label1.Text = name;
            btnDetails.Enabled = false;
        }

        private void btnGo_Click(object sender, EventArgs e)
        {
            Cursor.Current = Cursors.WaitCursor;
            listBox1.Items.Clear();
            LiveExpoResults liveExpoResults = LiveExpoResults.Instance();
            List<LiveExpoResult> searchResults = liveExpoResults.SearchResults(id, textBox1.Text);
            foreach (LiveExpoResult r in searchResults)
            {
                listBox1.Items.Add(r.Title);
            }
            btnDetails.Enabled = true;
            Cursor.Current = Cursors.Default;
        }

        private void btnDetails_Click(object sender, EventArgs e)
        {
            SearchResultsDetailsForm details = new SearchResultsDetailsForm(listBox1.SelectedIndex);
            details.ShowDialog();
        }
    }
}

⌨️ 快捷键说明

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