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

📄 selectitemform.cs

📁 I built the Superlist control whilst developing an RSS reader called FeedGhost. Although there are p
💻 CS
字号:
/////////////////////////////////////////////////////////////////////////////
//
// (c) 2007 BinaryComponents Ltd.  All Rights Reserved.
//
// http://www.binarycomponents.com/
//
/////////////////////////////////////////////////////////////////////////////

/////////////////////////////////////////////////////////////////////////////
//
// (c) 2006 BinaryComponents Ltd.  All Rights Reserved.
//
// http://www.binarycomponents.com/
//
/////////////////////////////////////////////////////////////////////////////

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using BinaryComponents.SuperList;

namespace SuperListTest
{
	public partial class SelectItemForm : Form
	{
		public SelectItemForm( BinaryComponents.SuperList.ListControl listControl  )
		{
			InitializeComponent();
			_listControl.Columns.AddRange( listControl.Columns.ToArray() );
			_listControl.Items.AddRange( listControl.Items.ToArray() );
		}

		public object []SelectedItems;

		private void _selectButton_Click( object sender, EventArgs e )
		{
			if( _listControl.SelectedItems.Count > 0 )
			{
				List<object> items = new List<object>();
				this.SelectedItems = new object[_listControl.SelectedItems.Count];
				foreach( RowIdentifier ri in _listControl.SelectedItems )
				{
					items.AddRange( ri.Items );
				}
				this.SelectedItems = items.ToArray();
				this.DialogResult = DialogResult.OK;
			}
			else
			{
				this.DialogResult = DialogResult.Cancel;
			}
			this.Close();
		}
	}
}

⌨️ 快捷键说明

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