本文整理汇总了C#中BrightIdeasSoftware.ObjectListView类的典型用法代码示例。如果您正苦于以下问题:C# ObjectListView类的具体用法?C# ObjectListView怎么用?C# ObjectListView使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ObjectListView类属于BrightIdeasSoftware命名空间,在下文中一共展示了ObjectListView类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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();
}
开发者ID:Warpten,项目名称:ADBC2,代码行数:13,代码来源:OLVDataObject.cs
示例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);
}
开发者ID:woanware,项目名称:snorbert,代码行数:12,代码来源:Helper.cs
示例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);
}
开发者ID:Warpten,项目名称:ADBC2,代码行数:12,代码来源:OLVExporter.cs
示例4: DataSourceAdapter
/// <summary>
/// Make a DataSourceAdapter
/// </summary>
public DataSourceAdapter(ObjectListView olv)
{
Debug.Assert(olv != null);
ListView = olv;
BindListView(ListView);
}
开发者ID:rxantos,项目名称:tesv-snip,代码行数:10,代码来源:DataSourceAdapter.cs
示例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);
}
}
开发者ID:windwp,项目名称:mytool,代码行数:29,代码来源:ObjectListViewHelper.cs
示例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;
}
开发者ID:qq5013,项目名称:StockControl_KPS,代码行数:32,代码来源:DataBackRevFrm.cs
示例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);
}
开发者ID:FOSBOS,项目名称:diNo,代码行数:10,代码来源:DataSourceAdapter.cs
示例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);
}
开发者ID:ToughBill,项目名称:NanCrm,代码行数:10,代码来源:DataSourceAdapter.cs
示例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);
}
开发者ID:mahitosh,项目名称:HRA4,代码行数:7,代码来源:HighRiskFollowupView.cs
示例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);
}
}
}
开发者ID:qq5013,项目名称:StockControl_KPS,代码行数:14,代码来源:InitListViewColumnManager.cs
示例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);
}
开发者ID:fremag,项目名称:MemoScope.Net,代码行数:11,代码来源:ListViewHelpers.cs
示例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;
}
开发者ID:Cubio,项目名称:Hauli,代码行数:11,代码来源:ContestantWrongInfo.cs
示例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>());
}
开发者ID:justdanpo,项目名称:DriverStoreExplorer,代码行数:19,代码来源:Generator.cs
示例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);
}
开发者ID:corefan,项目名称:ig-memtrace,代码行数:12,代码来源:OptionsDialog.cs
示例15: SetBusy
public void SetBusy(ObjectListView lv,bool busy)
{
if (busy)
{
lv.OverlayText = GenerateOverlay();
}
else
{
lv.OverlayText = null;
}
}
开发者ID:maxpiva,项目名称:AnimeOfflineDownloader,代码行数:12,代码来源:MainForm.cs
示例16: GroupingParameters
/// <summary>
/// Create a GroupingParameters
/// </summary>
/// <param name="olv"></param>
/// <param name="groupByColumn"></param>
/// <param name="groupByOrder"></param>
/// <param name="column"></param>
/// <param name="order"></param>
/// <param name="secondaryColumn"></param>
/// <param name="secondaryOrder"></param>
/// <param name="titleFormat"></param>
/// <param name="titleSingularFormat"></param>
/// <param name="sortItemsByPrimaryColumn"></param>
public GroupingParameters(ObjectListView olv, OLVColumn groupByColumn, SortOrder groupByOrder,
OLVColumn column, SortOrder order, OLVColumn secondaryColumn, SortOrder secondaryOrder,
string titleFormat, string titleSingularFormat, bool sortItemsByPrimaryColumn) {
this.ListView = olv;
this.GroupByColumn = groupByColumn;
this.GroupByOrder = groupByOrder;
this.PrimarySort = column;
this.PrimarySortOrder = order;
this.SecondarySort = secondaryColumn;
this.SecondarySortOrder = secondaryOrder;
this.SortItemsByPrimaryColumn = sortItemsByPrimaryColumn;
this.TitleFormat = titleFormat;
this.TitleSingularFormat = titleSingularFormat;
}
开发者ID:Warpten,项目名称:ADBC2,代码行数:27,代码来源:GroupingParameters.cs
示例17: Init
/// <summary>
/// 开始初始化
/// </summary>
/// <param name="_Listview"></param>
/// <param name="_listcolumns"></param>
/// <param name="_formater">字段格式化类</param>
public void Init(ObjectListView _Listview, List<ListColumnInfo> _listcolumns,IListViewColumnFormater _formater)
{
if (_Listview.Columns != null && _Listview.Columns.Count > 0)
{
_Listview.Columns.Clear();
}
List<OLVColumn> _Columns = new List<OLVColumn>();
foreach (ListColumnInfo _Column in _listcolumns)
{
_Columns.Add(InitializationOLVCOlumn(_Column.ColumnTitle, _Column.ColumnName, _Column.ColumnName, _Column.HAlign, true, _Column.ColumnLength, _Column.ColumnName, true,_Listview,_formater));
}
AddColumnsToListVIew(_Listview, _Columns);//向ListView 中填充栏位
}
开发者ID:qq5013,项目名称:StockControl_KPS,代码行数:21,代码来源:InitListViewColumnManager.cs
示例18: InitializationOLVCOlumn
/// <summary>
/// 1.2.初始化一个栏位
/// </summary>
/// <param name="Title">显示的名称</param>
/// <param name="aspect">名称代码</param>
/// <param name="Name">栏位名称</param>
/// <param name="alig">对齐方式</param>
/// <param name="bolleter">超出界限部分是否显示省略号</param>
/// <param name="with">栏位宽度</param>
/// <param name="columnobj">栏位对象</param>
/// <param name="isSHow">是否显示</param>
private OLVColumn InitializationOLVCOlumn(string Title, string aspect, string Name, HorizontalAlignment alig, bool bolleter, int with, object columnobj, bool isSHow,ObjectListView listview,IListViewColumnFormater _formater)
{
OLVColumn newcolumn = new OLVColumn();
newcolumn.HeaderTextAlign = alig;
newcolumn.UseInitialLetterForGroup = bolleter;
newcolumn.Text = Title;
newcolumn.Name = Name;
newcolumn.Width = with;
newcolumn.Tag = columnobj;
newcolumn.IsVisible = isSHow;//是否显示
_formater.Formater(listview,newcolumn, isSHow);
return newcolumn;
}
开发者ID:qq5013,项目名称:StockControl_KPS,代码行数:26,代码来源:InitListViewColumnManager.cs
示例19: RowToString
private static string RowToString(ObjectListView listView, int rowIndex, string[] values)
{
var columns = listView.ColumnsInDisplayOrder;
int nbCol = columns.Count;
var modelObject = listView.GetModelObject(rowIndex);
for (int i = 0; i < nbCol; i++)
{
var col = columns[i];
string val = col.GetStringValue(modelObject);
string escapeVal = StringHelpers.Escape(val);
values[i] = escapeVal;
}
return string.Join("\t", values);
}
开发者ID:fremag,项目名称:MemoScope.Net,代码行数:15,代码来源:ListViewHelpers.cs
示例20: TimedFilter
public static void TimedFilter(ObjectListView olv, string txt, TextMatchFilter.MatchKind matchKind = TextMatchFilter.MatchKind.Text)
{
TextMatchFilter filter = null;
if (!String.IsNullOrEmpty(txt))
filter = new TextMatchFilter(olv, txt, matchKind);
// Setup a default renderer to draw the filter matches
olv.DefaultRenderer = filter == null ? null : new HighlightTextRenderer(filter);
// Some lists have renderers already installed
var highlightingRenderer = olv.GetColumn(0).Renderer as HighlightTextRenderer;
if (highlightingRenderer != null)
highlightingRenderer.Filter = filter;
olv.ModelFilter = filter;
}
开发者ID:kaloutsa,项目名称:maksudproject,代码行数:16,代码来源:ComponentUtility.cs
注:本文中的BrightIdeasSoftware.ObjectListView类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论