trans.cs

来自「c#实现的APRIORI算法」· CS 代码 · 共 61 行

CS
61
字号
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Collections;

namespace Apriori
{
    public partial class Trans : Form
    {
        public Trans()
        {
            InitializeComponent();
        }

        private void Trans_Load(object sender, EventArgs e)
        {

        }

        public string GetTID()
        {
            return this.TID.Text;
        }

        public ArrayList GetItemList()
        {
            ArrayList items = new ArrayList();
            for (int i = 0; i < this.SelectItemList.Items.Count; i++)
            {
                string itemID = this.SelectItemList.Items[i].ToString();
                items.Add(itemID);
            }
            items.Sort();
            return items;
        }

        private void Add_Click(object sender, EventArgs e)
        {
            if (this.ItemList.SelectedIndex < 0)
                return;
            for (int i = 0; i < this.SelectItemList.Items.Count; i++)
            {
                if (this.SelectItemList.Items[i] == this.ItemList.SelectedItem)
                    return;
            }
            this.SelectItemList.Items.Add(this.ItemList.SelectedItem);
        }

        private void Delete_Click(object sender, EventArgs e)
        {
            if (this.SelectItemList.SelectedIndex < 0)
                return;
            this.SelectItemList.Items.RemoveAt(this.SelectItemList.SelectedIndex);
        }

    }
}

⌨️ 快捷键说明

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