C# Class SIL.FieldWorks.Common.Framework.DetailControls.SliceTreeNode

Inheritance: System.Windows.Forms.UserControl, IFWDisposable
显示文件 Open project: sillsdev/FieldWorks Class Usage Examples

Protected Properties

Property Type Description
m_inMenuButton bool

Private Properties

Property Type Description
HandlePaint void
InitializeComponent void
OkToMove bool
SliceTreeNode_KeyDown void
SliceTreeNode_KeyPress void
TestDropEffects ObjectDragInfo

Public Methods

Method Description
CheckDisposed ( ) : void

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

HandleSizeChanged ( object sender, EventArgs ea ) : void

SliceTreeNode ( Slice slice ) : System

ToggleExpansion ( int iSlice ) : void

Toggle the expansion state of the slice at iSlice. May presume it is already in existence. (If it is in the collapsedEmpty or fixed states, do nothing.)

ToggleExpansionAndScroll ( int iSlice ) : void

Toggle the expansion state of the slice at iSlice. May presume it is already in existence. Todo: attempt to scroll so new children are visible

Protected Methods

Method Description
Dispose ( bool disposing ) : void

Clean up any resources being used.

OnDoubleClick ( EventArgs e ) : void

Double-click causes expand/contract wherever it is.

OnDragDrop ( DragEventArgs drgevent ) : void
OnDragEnter ( DragEventArgs drgevent ) : void
OnMouseDown ( MouseEventArgs meArgs ) : void

Preliminary version of mouse down handles expansion and contraction. Todo: - Scroll appropriately to show as much as possible of what was expanded. - drag and drop effects. - double-click on label also toggles expansion.

ProcessDialogChar ( char charCode ) : bool

Activate menu only if Alt key is being pressed. See FWNX-1353.

TODO: Getting here without the Alt key may be considered a Mono bug.

Private Methods

Method Description
HandlePaint ( object sender, PaintEventArgs pea ) : void
InitializeComponent ( ) : void

Required method for Designer support - do not modify the contents of this method with the code editor.

OkToMove ( int hvoDstOwner, int flidDst, int ihvoDstStart, ObjectDragInfo odi ) : bool
SliceTreeNode_KeyDown ( object sender, System e ) : void
SliceTreeNode_KeyPress ( object sender, System e ) : void
TestDropEffects ( DragEventArgs drgevent, int &hvoDstOwner, int &flidDst, int &ihvoDstStart ) : ObjectDragInfo

Test whether we can drop the information indicated by the drgevent onto this. Currently this is possible if 1. The drag event's data is an ObjectDragInfo 2. It is valid for those objects to be moved to a position just after the object of which the destination slice is a part, in the lowest level sequence of which it is a part. drgevent.Effect is set to Move or None to indicate the result. If successful, returns an ObjectDragInfo and the place to put the new objects. (Note: the ihvoDstStart returned is meaningless if the property is a collection.) Move is valid under the following conditions: 1. Must not violate signature. Signature is checked if destination property is different from source. 2. Must not create circularity of ownership. This is checked if destination object is different from source. 3. Must result in actual movement. This is checked if destination and source object and flid are the same. This case always fails if the property is a collection, also if it is a sequence and nothing would change.

Method Details

CheckDisposed() public method

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

Dispose() protected method

Clean up any resources being used.
protected Dispose ( bool disposing ) : void
disposing bool
return void

HandleSizeChanged() public method

public HandleSizeChanged ( object sender, EventArgs ea ) : void
sender object
ea System.EventArgs
return void

OnDoubleClick() protected method

Double-click causes expand/contract wherever it is.
protected OnDoubleClick ( EventArgs e ) : void
e System.EventArgs
return void

OnDragDrop() protected method

protected OnDragDrop ( DragEventArgs drgevent ) : void
drgevent System.Windows.Forms.DragEventArgs
return void

OnDragEnter() protected method

protected OnDragEnter ( DragEventArgs drgevent ) : void
drgevent System.Windows.Forms.DragEventArgs
return void

OnMouseDown() protected method

Preliminary version of mouse down handles expansion and contraction. Todo: - Scroll appropriately to show as much as possible of what was expanded. - drag and drop effects. - double-click on label also toggles expansion.
protected OnMouseDown ( MouseEventArgs meArgs ) : void
meArgs MouseEventArgs
return void

ProcessDialogChar() protected method

Activate menu only if Alt key is being pressed. See FWNX-1353.
TODO: Getting here without the Alt key may be considered a Mono bug.
protected ProcessDialogChar ( char charCode ) : bool
charCode char
return bool

SliceTreeNode() public method

public SliceTreeNode ( Slice slice ) : System
slice Slice
return System

ToggleExpansion() public method

Toggle the expansion state of the slice at iSlice. May presume it is already in existence. (If it is in the collapsedEmpty or fixed states, do nothing.)
public ToggleExpansion ( int iSlice ) : void
iSlice int
return void

ToggleExpansionAndScroll() public method

Toggle the expansion state of the slice at iSlice. May presume it is already in existence. Todo: attempt to scroll so new children are visible
public ToggleExpansionAndScroll ( int iSlice ) : void
iSlice int
return void

Property Details

m_inMenuButton protected_oe property

protected bool m_inMenuButton
return bool