C# 클래스 BrightIdeasSoftware.DataSourceAdapter

A helper class that translates DataSource events for an ObjectListView
상속: IDisposable
파일 보기 프로젝트 열기: soywiz/cspspemu 1 사용 예제들

공개 메소드들

메소드 설명
DataSourceAdapter ( ObjectListView olv ) : System

Make a DataSourceAdapter

Dispose ( ) : void

Release all the resources used by this instance

Dispose ( bool fromUser ) : void

Release all the resources used by this instance

보호된 메소드들

메소드 설명
BindDataSource ( ) : void
BindListView ( ObjectListView olv ) : void
ChangePosition ( int index ) : void

Change the control's position (which is it's currently selected row) to the n'th row in the dataset

ConfigureColumn ( OLVColumn column, PropertyDescriptor property ) : void

Configure the given column to show the given property. The title and aspect name of the column are already filled in.

CreateColumnsFromSource ( ) : void

Create columns for the listview based on what properties are available in the data source

This method will create columns if there is not already a column displaying that property.

CreateMissingAspectGettersAndPutters ( ) : void

Generate aspect getters and putters for any columns that are missing them (and for which we have enough information to actually generate a getter)

CurrencyManagerListChanged ( object sender, ListChangedEventArgs e ) : void

CurrencyManager ListChanged event handler. Deals with fine-grained changes to list items.

It's actually difficult to deal with these changes in a fine-grained manner. If our listview is grouped, then any change may make a new group appear or an old group disappear. It is rarely enough to simply update the affected row.

HandleCurrencyManagerMetaDataChanged ( object sender, EventArgs e ) : void

The CurrencyManager calls this if the data source looks different. We just reload everything.

CHECK: Do we need this if we are handle ListChanged metadata events?

HandleCurrencyManagerPositionChanged ( object sender, EventArgs e ) : void

Called by the CurrencyManager when the currently selected item changes. We update the ListView selection so that we stay in sync with any other controls bound to the same source.

HandleListChangedItemAdded ( ListChangedEventArgs e ) : void

Handle an ItemAdded event.

HandleListChangedItemChanged ( ListChangedEventArgs e ) : void

Handle ItemChanged event. This is triggered when a single item has changed, so just refresh that one item.

Even in this simple case, we should probably rebuild the list. For example, the change could put the item into its own new group.

HandleListChangedItemDeleted ( ListChangedEventArgs e ) : void

Handle the ItemDeleted event

HandleListChangedItemMoved ( ListChangedEventArgs e ) : void

Handle ItemMoved event

HandleListChangedMetadataChanged ( ListChangedEventArgs e ) : void

Handle PropertyDescriptor* events

HandleListChangedReset ( ListChangedEventArgs e ) : void

Handle the Reset event

HandleListViewBindingContextChanged ( object sender, EventArgs e ) : void

Handle a change to the BindingContext of our ListView.

HandleListViewFreezing ( object sender, BrightIdeasSoftware.FreezeEventArgs e ) : void

Handle the frozenness of our ListView changing.

HandleListViewSelectedIndexChanged ( object sender, EventArgs e ) : void

Handle the selection changing in our ListView. We need to tell our currency manager about the new position.

InitializeDataSource ( ) : void

The data source for this control has changed. Reconfigure the control for the new source

RebindDataSource ( ) : void

Our data source has changed. Figure out how to handle the new source

RebindDataSource ( bool forceDataInitialization ) : void

Our data source has changed. Figure out how to handle the new source

SetListContents ( ) : void

Take the contents of the currently bound list and put them into the control

ShouldCreateColumn ( PropertyDescriptor property ) : bool

Decide if a new column should be added to the control to display the given property

UnbindDataSource ( ) : void
UnbindListView ( ObjectListView olv ) : void

메소드 상세

BindDataSource() 보호된 메소드

protected BindDataSource ( ) : void
리턴 void

BindListView() 보호된 메소드

protected BindListView ( ObjectListView olv ) : void
olv ObjectListView
리턴 void

ChangePosition() 보호된 메소드

Change the control's position (which is it's currently selected row) to the n'th row in the dataset
protected ChangePosition ( int index ) : void
index int The index of the row to be selected
리턴 void

ConfigureColumn() 보호된 메소드

Configure the given column to show the given property. The title and aspect name of the column are already filled in.
protected ConfigureColumn ( OLVColumn column, PropertyDescriptor property ) : void
column OLVColumn
property System.ComponentModel.PropertyDescriptor
리턴 void

CreateColumnsFromSource() 보호된 메소드

Create columns for the listview based on what properties are available in the data source

This method will create columns if there is not already a column displaying that property.

protected CreateColumnsFromSource ( ) : void
리턴 void

CreateMissingAspectGettersAndPutters() 보호된 메소드

Generate aspect getters and putters for any columns that are missing them (and for which we have enough information to actually generate a getter)
protected CreateMissingAspectGettersAndPutters ( ) : void
리턴 void

CurrencyManagerListChanged() 보호된 메소드

CurrencyManager ListChanged event handler. Deals with fine-grained changes to list items.
It's actually difficult to deal with these changes in a fine-grained manner. If our listview is grouped, then any change may make a new group appear or an old group disappear. It is rarely enough to simply update the affected row.
protected CurrencyManagerListChanged ( object sender, ListChangedEventArgs e ) : void
sender object
e System.ComponentModel.ListChangedEventArgs
리턴 void

DataSourceAdapter() 공개 메소드

Make a DataSourceAdapter
public DataSourceAdapter ( ObjectListView olv ) : System
olv ObjectListView
리턴 System

Dispose() 공개 메소드

Release all the resources used by this instance
public Dispose ( ) : void
리턴 void

Dispose() 공개 메소드

Release all the resources used by this instance
public Dispose ( bool fromUser ) : void
fromUser bool
리턴 void

HandleCurrencyManagerMetaDataChanged() 보호된 메소드

The CurrencyManager calls this if the data source looks different. We just reload everything.
CHECK: Do we need this if we are handle ListChanged metadata events?
protected HandleCurrencyManagerMetaDataChanged ( object sender, EventArgs e ) : void
sender object
e System.EventArgs
리턴 void

HandleCurrencyManagerPositionChanged() 보호된 메소드

Called by the CurrencyManager when the currently selected item changes. We update the ListView selection so that we stay in sync with any other controls bound to the same source.
protected HandleCurrencyManagerPositionChanged ( object sender, EventArgs e ) : void
sender object
e System.EventArgs
리턴 void

HandleListChangedItemAdded() 보호된 메소드

Handle an ItemAdded event.
protected HandleListChangedItemAdded ( ListChangedEventArgs e ) : void
e System.ComponentModel.ListChangedEventArgs
리턴 void

HandleListChangedItemChanged() 보호된 메소드

Handle ItemChanged event. This is triggered when a single item has changed, so just refresh that one item.
Even in this simple case, we should probably rebuild the list. For example, the change could put the item into its own new group.
protected HandleListChangedItemChanged ( ListChangedEventArgs e ) : void
e System.ComponentModel.ListChangedEventArgs
리턴 void

HandleListChangedItemDeleted() 보호된 메소드

Handle the ItemDeleted event
protected HandleListChangedItemDeleted ( ListChangedEventArgs e ) : void
e System.ComponentModel.ListChangedEventArgs
리턴 void

HandleListChangedItemMoved() 보호된 메소드

Handle ItemMoved event
protected HandleListChangedItemMoved ( ListChangedEventArgs e ) : void
e System.ComponentModel.ListChangedEventArgs
리턴 void

HandleListChangedMetadataChanged() 보호된 메소드

Handle PropertyDescriptor* events
protected HandleListChangedMetadataChanged ( ListChangedEventArgs e ) : void
e System.ComponentModel.ListChangedEventArgs
리턴 void

HandleListChangedReset() 보호된 메소드

Handle the Reset event
protected HandleListChangedReset ( ListChangedEventArgs e ) : void
e System.ComponentModel.ListChangedEventArgs
리턴 void

HandleListViewBindingContextChanged() 보호된 메소드

Handle a change to the BindingContext of our ListView.
protected HandleListViewBindingContextChanged ( object sender, EventArgs e ) : void
sender object
e System.EventArgs
리턴 void

HandleListViewFreezing() 보호된 메소드

Handle the frozenness of our ListView changing.
protected HandleListViewFreezing ( object sender, BrightIdeasSoftware.FreezeEventArgs e ) : void
sender object
e BrightIdeasSoftware.FreezeEventArgs
리턴 void

HandleListViewSelectedIndexChanged() 보호된 메소드

Handle the selection changing in our ListView. We need to tell our currency manager about the new position.
protected HandleListViewSelectedIndexChanged ( object sender, EventArgs e ) : void
sender object
e System.EventArgs
리턴 void

InitializeDataSource() 보호된 메소드

The data source for this control has changed. Reconfigure the control for the new source
protected InitializeDataSource ( ) : void
리턴 void

RebindDataSource() 보호된 메소드

Our data source has changed. Figure out how to handle the new source
protected RebindDataSource ( ) : void
리턴 void

RebindDataSource() 보호된 메소드

Our data source has changed. Figure out how to handle the new source
protected RebindDataSource ( bool forceDataInitialization ) : void
forceDataInitialization bool
리턴 void

SetListContents() 보호된 메소드

Take the contents of the currently bound list and put them into the control
protected SetListContents ( ) : void
리턴 void

ShouldCreateColumn() 보호된 메소드

Decide if a new column should be added to the control to display the given property
protected ShouldCreateColumn ( PropertyDescriptor property ) : bool
property System.ComponentModel.PropertyDescriptor
리턴 bool

UnbindDataSource() 보호된 메소드

protected UnbindDataSource ( ) : void
리턴 void

UnbindListView() 보호된 메소드

protected UnbindListView ( ObjectListView olv ) : void
olv ObjectListView
리턴 void