C# 클래스 SIL.FieldWorks.Common.Controls.DhListView

Derived from ListView, this class supports notifying the browse view when resizing the columns. This class holds the headers that show above columns of data that BrowseViewer knows about.
상속: System.Windows.Forms.ListView, IFWDisposable
파일 보기 프로젝트 열기: sillsdev/FieldWorks 1 사용 예제들

Private Properties

프로퍼티 타입 설명
DhListView_DrawColumnHeader void
GetArrowBitmap System.Drawing.Bitmap
GetColumnIndexFromMousePosition int
HandleColumnClick void
HandleColumnReordered void
IsThisColumnChangeAllowable bool
ListView_ColumnWidthChanged void
ListView_ColumnWidthChanging void
m_timer_Tick void

공개 메소드들

메소드 설명
CheckDisposed ( ) : void

Check to see if the object has been disposed. All public Properties and Methods should call this before doing anything else.

DhListView ( BrowseViewer bv ) : System

Create one and set the browse view it belongs to.

ShowHeaderIcon ( int columnIndex, SortOrder sortOrder, ArrowSize size ) : void

Set the header icon. (Thanks to a post by Eddie Velasquez.)

보호된 메소드들

메소드 설명
Dispose ( bool disposing ) : void

Releases the unmanaged resources used by the T:System.Windows.Forms.ListView and optionally releases the managed resources.

OnColumnRightClick ( int iItem, Point ptLoc ) : void

Handle a right click event in a column header.

OnHandleCreated ( EventArgs e ) : void

OnParentVisibleChanged ( EventArgs e ) : void
WndProc ( Message &m ) : void

Override of WndProc to handle the context menu or column resize on column headers. Necessary because ListView eats almost all mouse events, and does not provide any that can be used to handling right clicks in the header. Also couldn't use class wizard to handle WM_NOTIFY because it won't add HDN_ITEMCLICKA and HDN_DIVIDERDBLCLICKW

비공개 메소드들

메소드 설명
DhListView_DrawColumnHeader ( object sender, DrawListViewColumnHeaderEventArgs e ) : void
GetArrowBitmap ( ArrowType type, ArrowSize size ) : Bitmap

Create up/down icon (Adapted from a post by Eddie Velasquez.)

GetColumnIndexFromMousePosition ( Point pt ) : int
HandleColumnClick ( object sender, System.Windows.Forms.ColumnClickEventArgs e ) : void
HandleColumnReordered ( object sender, System.Windows.Forms.ColumnReorderedEventArgs e ) : void
IsThisColumnChangeAllowable ( int columnIndex, int currentWidth, int newWidth ) : bool

Determine if a column width change is acceptable.

ListView_ColumnWidthChanged ( Object sender, System.Windows.Forms.ColumnWidthChangedEventArgs e ) : void
ListView_ColumnWidthChanging ( Object sender, System.Windows.Forms.ColumnWidthChangingEventArgs e ) : void

Reject inappropriate column width changes. Helps to fix FWNX-1018. No column should be so small that compensating for ascending/descending icon size (m_imgList.ImageSize.Width) in DhListView_DrawColumnHeader would result in a negative width.

m_timer_Tick ( object sender, EventArgs e ) : void

메소드 상세

CheckDisposed() 공개 메소드

Check to see if the object has been disposed. All public Properties and Methods should call this before doing anything else.
public CheckDisposed ( ) : void
리턴 void

DhListView() 공개 메소드

Create one and set the browse view it belongs to.
public DhListView ( BrowseViewer bv ) : System
bv BrowseViewer
리턴 System

Dispose() 보호된 메소드

Releases the unmanaged resources used by the T:System.Windows.Forms.ListView and optionally releases the managed resources.
protected Dispose ( bool disposing ) : void
disposing bool true to release both managed and unmanaged resources; false to release only unmanaged resources.
리턴 void

OnColumnRightClick() 보호된 메소드

Handle a right click event in a column header.
protected OnColumnRightClick ( int iItem, Point ptLoc ) : void
iItem int The i item.
ptLoc Point The pt loc.
리턴 void

OnHandleCreated() 보호된 메소드

protected OnHandleCreated ( EventArgs e ) : void
e System.EventArgs An that contains the event data.
리턴 void

OnParentVisibleChanged() 보호된 메소드

protected OnParentVisibleChanged ( EventArgs e ) : void
e System.EventArgs
리턴 void

ShowHeaderIcon() 공개 메소드

Set the header icon. (Thanks to a post by Eddie Velasquez.)
public ShowHeaderIcon ( int columnIndex, SortOrder sortOrder, ArrowSize size ) : void
columnIndex int Index of the column.
sortOrder SortOrder The sort order.
size ArrowSize The size.
리턴 void

WndProc() 보호된 메소드

Override of WndProc to handle the context menu or column resize on column headers. Necessary because ListView eats almost all mouse events, and does not provide any that can be used to handling right clicks in the header. Also couldn't use class wizard to handle WM_NOTIFY because it won't add HDN_ITEMCLICKA and HDN_DIVIDERDBLCLICKW
protected WndProc ( Message &m ) : void
m System.Windows.Forms.Message The Windows Message to process
리턴 void