本文整理汇总了C#中BrightIdeasSoftware.ObjectListView类的典型用法代码示例。如果您正苦于以下问题:C# ObjectListView类的具体用法?C# ObjectListView怎么用?C# ObjectListView使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ObjectListView类属于BrightIdeasSoftware命名空间,在下文中一共展示了ObjectListView类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: OLVDataObject
/// <summary>
/// Create a data object which operates on the given model objects
/// in the given ObjectListView
/// </summary>
/// <param name="olv">The source of the data object</param>
/// <param name="modelObjects">The model objects to be put into the data object</param>
public OLVDataObject(ObjectListView olv, IList modelObjects) {
this.objectListView = olv;
this.modelObjects = modelObjects;
this.includeHiddenColumns = olv.IncludeHiddenColumnsInDataTransfer;
this.includeColumnHeaders = olv.IncludeColumnHeadersInCopy;
this.CreateTextFormats();
}
示例2: AddListColumn
/// <summary>
/// Helper method for GenerateListColumns()
/// </summary>
/// <param name="objectListView"></param>
/// <param name="data"></param>
public static void AddListColumn(ObjectListView objectListView, string name, string aspect)
{
OLVColumn columnHeader = new OLVColumn();
columnHeader.Text = name;
columnHeader.AspectName = aspect;
objectListView.Columns.Add(columnHeader);
}
示例3: OLVExporter
/// <summary>
/// Create an exporter that will export all the given rows from the given ObjectListView
/// </summary>
/// <param name="olv"></param>
/// <param name="objectsToExport"></param>
public OLVExporter(ObjectListView olv, IEnumerable objectsToExport) {
if (olv == null) throw new ArgumentNullException("olv");
if (objectsToExport == null) throw new ArgumentNullException("objectsToExport");
this.ListView = olv;
this.ModelObjects = ObjectListView.EnumerableToArray(objectsToExport, true);
}
示例4: DataSourceAdapter
/// <summary>
/// Make a DataSourceAdapter
/// </summary>
public DataSourceAdapter(ObjectListView olv)
{
Debug.Assert(olv != null);
ListView = olv;
BindListView(ListView);
}
示例5: AddColumnForOlv
public static void AddColumnForOlv(Type type, ObjectListView olv)
{
olv.Columns.Clear();
olv.AllColumns.Clear();
var lColumn = ReflectionUtils.PropertysFromType(type);
var i = 0;
foreach (var colN in lColumn)
{
var col = new OLVColumn();
col.AspectName = colN.Name;
col.DisplayIndex = i++;
col.Text = colN.Name;
col.IsEditable = true;
if (colN.PropertyType.FullName == "System.Boolean")
{
col.CheckBoxes = true;
}
if (colN.PropertyType.FullName == "System.Single")
{
var colName = colN.Name;
col.AspectPutter = delegate(Object row, Object newvalue)
{
ReflectionUtils.SetPropertyInternal(row, colName, float.Parse(newvalue.ToString()));
};
}
olv.AllColumns.Add(col);
olv.Columns.Add(col);
}
}
示例6: InitList
/// <summary>
/// 2.4.初始化List显示
/// </summary>
private void InitList()
{
this._RecordListView = new FastObjectListView();
this._RecordListView.VirtualMode = true;
this._RecordListView.Cursor = System.Windows.Forms.Cursors.Default;
this._RecordListView.Dock = System.Windows.Forms.DockStyle.Fill;
this._RecordListView.GridLines = true;
this._RecordListView.FullRowSelect = true;
this._RecordListView.HeaderUsesThemes = false;
this._RecordListView.HeaderWordWrap = true;
this._RecordListView.HideSelection = false;
this._RecordListView.Location = new System.Drawing.Point(0, 110);
this._RecordListView.Name = "PInfoListView";
this._RecordListView.ShowGroups = false;
this._RecordListView.UseCompatibleStateImageBehavior = false;
this._RecordListView.UseHotItem = true;
this._RecordListView.View = System.Windows.Forms.View.Details;
this._RecordListView.OwnerDraw = true;
this._RecordListView.MultiSelect = false;
List<ListColumnInfo> ColumnArray = new List<ListColumnInfo>();
ColumnArray.Add(new ListColumnInfo("NO", "OrderNumber", 80, HorizontalAlignment.Left, true));
ColumnArray.Add(new ListColumnInfo("文件名称", "BackDataFileName",200, HorizontalAlignment.Left, true));
ColumnArray.Add(new ListColumnInfo("备份时间", "DataBackTime", 120, HorizontalAlignment.Left, true));
this.InitializedListColumn(ColumnArray);//初始化栏位信息
groupBox2.Controls.Add(this._RecordListView);
this._RecordListView.ContextMenuStrip = this.contextMenuStrip1;
}
示例7: DataSourceAdapter
/// <summary>
/// Make a DataSourceAdapter
/// </summary>
public DataSourceAdapter(ObjectListView olv)
{
if (olv == null) throw new ArgumentNullException("olv");
this.ListView = olv;
this.BindListView(this.ListView);
}
示例8: DataSourceAdapter
/// <summary>
/// Make a DataSourceAdapter
/// </summary>
public DataSourceAdapter(ObjectListView olv) {
if (olv == null) throw new ArgumentNullException("olv");
this.ListView = olv;
// ReSharper disable once DoNotCallOverridableMethodsInConstructor
this.BindListView(this.ListView);
}
示例9: updateStatusLine
public void updateStatusLine(ObjectListView olv)
{
IList objects = olv.Objects as IList;
int rows = theQueue.dt.Rows.Count;
this.label1.Text = String.Format("{0} patients", olv.Items.Count);
}
示例10: AddColumnsToListVIew
/// <summary>
/// 1.3. 向ListView 中添加栏位
/// </summary>
/// <param name="_ColumnList"></param>
private void AddColumnsToListVIew(ObjectListView _Listview, List<OLVColumn> _ColumnList)
{
if (_ColumnList != null && _ColumnList.Count > 0)
{
foreach (OLVColumn _Column in _ColumnList)
{
_Listview.Columns.Add(_Column);
}
}
}
示例11: GetHeaders
private static string GetHeaders(ObjectListView listView, string[] values)
{
var columns = listView.ColumnsInDisplayOrder;
int nbCol = columns.Count;
for (int i = 0; i < nbCol; i++)
{
var col = columns[i];
values[i] = col.Text;
}
return string.Join("\t", values);
}
示例12: ChangeEditable
private void ChangeEditable(ObjectListView objectListView, ComboBox comboBox)
{
if (comboBox.Text == "No")
objectListView.CellEditActivation = ObjectListView.CellEditActivateMode.None;
else if (comboBox.Text == "Single Click")
objectListView.CellEditActivation = ObjectListView.CellEditActivateMode.SingleClick;
else if (comboBox.Text == "Double Click")
objectListView.CellEditActivation = ObjectListView.CellEditActivateMode.DoubleClick;
else
objectListView.CellEditActivation = ObjectListView.CellEditActivateMode.F2Only;
}
示例13: GenerateColumns
/// <summary>
/// Replace all columns of the given ObjectListView with columns generated
/// from the first member of the given enumerable. If the enumerable is
/// empty or null, the ObjectListView will be cleared.
/// </summary>
/// <param name="olv">The ObjectListView to modify</param>
/// <param name="enumerable">The collection whose first element will be used to generate columns.</param>
static public void GenerateColumns(ObjectListView olv, IEnumerable enumerable) {
// Generate columns based on the type of the first model in the collection and then quit
if (enumerable != null) {
foreach (object model in enumerable) {
Generator.GenerateColumns(olv, model.GetType());
return;
}
}
// If we reach here, the collection was empty, so we clear the list
Generator.ReplaceColumns(olv, new List<OLVColumn>());
}
示例14: StringListPutHelper
private void StringListPutHelper(ObjectListView list_view, List<string> l, object row_object, object value)
{
for (int i = 0, count = l.Count; i < count; ++i)
{
if (Object.ReferenceEquals(row_object, l[i]))
{
l[i] = (string)value;
break;
}
}
list_view.SetObjects(l, true);
}
示例15: SetBusy
public void SetBusy(ObjectListView lv,bool busy)
{
if (busy)
{
lv.OverlayText = GenerateOverlay();
}
else
{
lv.OverlayText = null;
}
}