📄 selectitemform.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 + -