C# Класс SIL.FieldWorks.Common.Controls.XmlBrowseViewBase

Наследование: SIL.FieldWorks.Common.RootSites.RootSite, IVwNotifyChange
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
m_bv BrowseViewer
m_dyTopOfScreenOffset int
m_fHandlingMouseUp bool
m_fMouseUpEnabled bool
m_fSelectedRowHighlighting SelectionHighlighting
m_fakeFlid int
m_hvoOldSel int
m_hvoRoot int
m_iSelIndex int
m_iTopOfScreenObjectForScrollPosition int
m_id string
m_nodeSpec System.Xml.XmlNode
m_rootObjectHasBeenSet bool
m_sda ISilDataAccessManaged
m_selectedIndex int
m_sortItemProvider ISortItemProvider
m_stringTable SIL.Utils.StringTable
m_tagMe int
m_wantScrollIntoView bool
m_xbvvc SIL.FieldWorks.Common.Controls.XmlBrowseViewBaseVc
m_ydSelBottom int
m_ydSelScrollPos int
m_ydSelTop int

Private Properties

Свойство Тип Описание
DoMouseWheelVScroll bool
DoSelectionSideEffects void
FireSelectionChanged bool
GetCurrentTableCellInfo void
GetNewSelectionObject int
GetRowIndexFromSelection int
GetStringList string[]
InitializeComponent void
LocationOfSelectedRow System.Drawing.Rectangle
MakeSelectionAt IVwSelection
RemoveRootBoxSelectionOnIdle bool
RestoreScrollPosition bool
SetDefaultInsertionPointInRow bool
SetSelectedIndex void
ShouldConvertDummiesInView bool
UpdateSelectedRow bool

Открытые методы

Метод Описание
ClearValues ( ) : void

Clear dangerous data values out of any of your decorated SDAs that require it.

ColumnSortedFromEnd ( int icol ) : bool

a look up table for getting the correct version of strings that the user will see.

GetColWidthInfo ( ) : VwLength[]

Get the widths of the columns as VwLengths (for the view tables).

GetCorrespondingPropertyName ( string property ) : string

Gets the name of the corresponding property.

HvoAt ( int index ) : int

Get the HVO of the object at the specified index.

Init ( XCore mediator, System configurationParameters ) : void

Allows xCore-specific initialization. We don't need any.

Init ( XmlNode nodeSpec, int hvoRoot, int fakeFlid, SIL.FieldWorks.FDO.FdoCache cache, XCore.Mediator mediator, BrowseViewer bv ) : void

Inits the specified node spec.

MakeRoot ( ) : void

Make the root box.

OnDeleteRecord ( object commandObject ) : bool

Called when [delete record].

OnDisplayDeleteRecord ( object commandObject, XCore.UIItemDisplayProperties &display ) : bool

see if it makes sense to provide the "delete record" command now

OnExportText ( object args ) : bool

Export the contents of the browse view to the debug window. Answer false so other browse views can export theirs also.

OnPasteFixTssEvent ( EditingHelper sender, FwPasteFixTssEventArgs e ) : void

If the text for pasting is too long, truncate it and warn the user.

OnPrepareToRefresh ( object args ) : bool

Called when [prepare to refresh].

OnPrint ( object args ) : bool

Tries to be smart about whether our RootSite should print or not.

OnRequestDebugInfo ( object commandObj ) : bool

Called when [request debug info].

OnRestoreScrollPosition ( object args ) : bool

Called through mediator by reflection. (Maybe?) This routine attempts to restore the scroll position previously saved by OnSaveScrollPosition. Specifically, it attempts to scroll to a position such that the top of the object at index m_iTopOfScreenObjectForScrollPosition is m_dyTopOfScreenOffset pixels below the top of the client area (or above, if m_dyTopOfScreenOffset is negative).

OnSaveScrollPosition ( object args ) : bool

Called through mediator by reflection. Save the current scroll position for later restoration, in a form that will survive having the view contents replaced by a lazy box (that is, it's not good enough to just save AutoScrollPosition.y, we need enough information to create a selection at the top of the screen and get a corresponding selection back there. This class implements this by figuring out the index of the record at the top of the screen and saving that.

PostLayoutInit ( ) : void

After we have our true size, make sure the interesting row is visible.

PropChanged ( int hvo, int tag, int ivMin, int cvIns, int cvDel ) : void

RefreshDisplay ( ) : bool

SetScrollBarParameters ( ScrollBar scrollBar ) : void

Set a controlling scrollbar's parameters using information this object owns.

SetSelectedRowHighlighting ( ) : void

Cause the behavior to switch to the current setting of ReadOnlyBrowse. Override if the behaivor should be different than this.

XmlBrowseViewBase ( ) : System

Initializes a new instance of the T:XmlBrowseViewBase class.

Защищенные методы

Метод Описание
AdjustScrollRange1 ( int dxdSize, int dxdPosition, int dydSize, int dydPosition ) : bool

Handle the special aspects of adjusting the scroll position for a table of cells like we have in the browse view. See LT-3607 for details of what can go wrong without this override.

CreateSelectionRestorer ( ) : SIL.FieldWorks.Common.RootSites.SelectionRestorer

Creates a new selection restorer.

Dispose ( bool disposing ) : void

Clean up any resources being used.

DoSelectAndScroll ( int hvo, int index ) : void

Does the select and scroll.

DoSelectionSideEffects ( IVwSelection sel ) : void

Common code to HandleSelectionChange and MouseDown.

EnsureDefaultSelection ( ) : void

A browse view does not HAVE to have a selection; forcing one (e.g., after clicking on a check box) and scrolling to the one we made at the start of the view is very disconcerting.

GetRowSelection ( int index ) : IVwSelection

Gets the row selection.

HandleSelectionChange ( IVwRootBox prootb, IVwSelection vwselNew ) : void

Notifies us that the selection changed. When next idle, we want to delete any unhelpful selection.

OnGotFocus ( EventArgs e ) : void

Because this is a simple root site, which is derived from UserControl, we can't prevent MouseDown from giving it focus. But we can give other linked windows a chance to take it back.

OnKeyDown ( KeyEventArgs e ) : void

Handle the OnKeyDown event

OnLayout ( System.Windows.Forms.LayoutEventArgs levent ) : void

Overridden to fix TE-4146

OnMouseDown ( MouseEventArgs e ) : void

MouseUp actions on XmlBrowseView should only be enabled if a preceeding MouseDown occured in the view.

OnMouseUp ( MouseEventArgs e ) : void

Process left or right mouse button down

OnMouseWheel ( MouseEventArgs e ) : void

When we get a mouse wheel event for windows other than the scrolling controller then pass on the message to the scrolling controller.

OnPaint ( PaintEventArgs e ) : void

Call Draw() which does all the real painting

SaveSelectionInfo ( Rectangle rcIdeal, int ydTop ) : void

Save the location information for the current selection being made visible.

SelectContentsOfCell ( IVwSelection vwsel ) : void

Приватные методы

Метод Описание
DoMouseWheelVScroll ( MouseEventArgs e ) : bool
DoSelectionSideEffects ( MouseEventArgs e ) : void
FireSelectionChanged ( object parameter ) : bool
GetCurrentTableCellInfo ( IVwSelection vwsel, int &iLevel, int &iBox, int &iTableBox, int &cTableBoxes, int &iTableLevel, int &iCellBox, int &cCellBoxes, int &iCellLevel ) : void

Gets the row/cell information of the current selection.

GetNewSelectionObject ( int index ) : int

Convert the new selection into a real object before making any selection. Otherwise the views code might convert it during the selection, making the selection invalid.

GetRowIndexFromSelection ( IVwSelection sel, bool fEndPoint ) : int

Given a selection in the view, return the row index. Rarely may return -1 if unable to identify a row.

GetStringList ( XmlNode spec ) : string[]

Get from the specified node a list of strings, as used in filter bar and bulk edit bar, where the node is expected to have a [stringList] first child element which is interpreted in the context of our string table.

InitializeComponent ( ) : void

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

LocationOfSelectedRow ( ) : Rectangle
MakeSelectionAt ( MouseEventArgs e ) : IVwSelection

Make the selection that would be made by clicking at the specified mouse event, but don't install it.

RemoveRootBoxSelectionOnIdle ( object parameter ) : bool
RestoreScrollPosition ( int irow ) : bool

Called by BulkEditBar if Preview makes the highlighted row scroll off the screen. It attempts to scroll to a position such that the top of the object at index irow is m_dyTopOfScreenOffset pixels below the top of the client area (or above, if m_dyTopOfScreenOffset is negative).

SetDefaultInsertionPointInRow ( int index ) : bool

Set an insertion point somewhere in the given row, and install the selection if it exists.

SetSelectedIndex ( int ihvo ) : void
ShouldConvertDummiesInView ( ) : bool

read configuration for the browse view to determine whether to try to convert dummy objects to real objects when as they become painted on the screen. (Default is false)

UpdateSelectedRow ( object args ) : bool

Описание методов

AdjustScrollRange1() защищенный Метод

Handle the special aspects of adjusting the scroll position for a table of cells like we have in the browse view. See LT-3607 for details of what can go wrong without this override.
protected AdjustScrollRange1 ( int dxdSize, int dxdPosition, int dydSize, int dydPosition ) : bool
dxdSize int change in the horizontal size
dxdPosition int horizontal position where change occurred
dydSize int change in the vertical size
dydPosition int vertical position where change occurred
Результат bool

ClearValues() публичный Метод

Clear dangerous data values out of any of your decorated SDAs that require it.
public ClearValues ( ) : void
Результат void

ColumnSortedFromEnd() публичный Метод

a look up table for getting the correct version of strings that the user will see.
public ColumnSortedFromEnd ( int icol ) : bool
icol int
Результат bool

CreateSelectionRestorer() защищенный Метод

Creates a new selection restorer.
protected CreateSelectionRestorer ( ) : SIL.FieldWorks.Common.RootSites.SelectionRestorer
Результат SIL.FieldWorks.Common.RootSites.SelectionRestorer

Dispose() защищенный Метод

Clean up any resources being used.
protected Dispose ( bool disposing ) : void
disposing bool
Результат void

DoSelectAndScroll() защищенный Метод

Does the select and scroll.
protected DoSelectAndScroll ( int hvo, int index ) : void
hvo int The hvo.
index int The index.
Результат void

DoSelectionSideEffects() защищенный Метод

Common code to HandleSelectionChange and MouseDown.
protected DoSelectionSideEffects ( IVwSelection sel ) : void
sel IVwSelection
Результат void

EnsureDefaultSelection() защищенный Метод

A browse view does not HAVE to have a selection; forcing one (e.g., after clicking on a check box) and scrolling to the one we made at the start of the view is very disconcerting.
protected EnsureDefaultSelection ( ) : void
Результат void

GetColWidthInfo() публичный Метод

Get the widths of the columns as VwLengths (for the view tables).
public GetColWidthInfo ( ) : VwLength[]
Результат VwLength[]

GetCorrespondingPropertyName() публичный Метод

Gets the name of the corresponding property.
public GetCorrespondingPropertyName ( string property ) : string
property string The property.
Результат string

GetRowSelection() защищенный Метод

Gets the row selection.
protected GetRowSelection ( int index ) : IVwSelection
index int The index.
Результат IVwSelection

HandleSelectionChange() защищенный Метод

Notifies us that the selection changed. When next idle, we want to delete any unhelpful selection.
protected HandleSelectionChange ( IVwRootBox prootb, IVwSelection vwselNew ) : void
prootb IVwRootBox
vwselNew IVwSelection
Результат void

HvoAt() публичный Метод

Get the HVO of the object at the specified index.
public HvoAt ( int index ) : int
index int
Результат int

Init() публичный Метод

Allows xCore-specific initialization. We don't need any.
public Init ( XCore mediator, System configurationParameters ) : void
mediator XCore
configurationParameters System
Результат void

Init() публичный Метод

Inits the specified node spec.
public Init ( XmlNode nodeSpec, int hvoRoot, int fakeFlid, SIL.FieldWorks.FDO.FdoCache cache, XCore.Mediator mediator, BrowseViewer bv ) : void
nodeSpec System.Xml.XmlNode The node spec.
hvoRoot int The hvo root.
fakeFlid int The fake flid.
cache SIL.FieldWorks.FDO.FdoCache The cache.
mediator XCore.Mediator The mediator.
bv BrowseViewer The bv. Also used to set SortItemProvider
Результат void

MakeRoot() публичный Метод

Make the root box.
public MakeRoot ( ) : void
Результат void

OnDeleteRecord() публичный Метод

Called when [delete record].
public OnDeleteRecord ( object commandObject ) : bool
commandObject object The command object.
Результат bool

OnDisplayDeleteRecord() публичный Метод

see if it makes sense to provide the "delete record" command now
public OnDisplayDeleteRecord ( object commandObject, XCore.UIItemDisplayProperties &display ) : bool
commandObject object
display XCore.UIItemDisplayProperties
Результат bool

OnExportText() публичный Метод

Export the contents of the browse view to the debug window. Answer false so other browse views can export theirs also.
public OnExportText ( object args ) : bool
args object
Результат bool

OnGotFocus() защищенный Метод

Because this is a simple root site, which is derived from UserControl, we can't prevent MouseDown from giving it focus. But we can give other linked windows a chance to take it back.
protected OnGotFocus ( EventArgs e ) : void
e System.EventArgs
Результат void

OnKeyDown() защищенный Метод

Handle the OnKeyDown event
protected OnKeyDown ( KeyEventArgs e ) : void
e System.Windows.Forms.KeyEventArgs
Результат void

OnLayout() защищенный Метод

Overridden to fix TE-4146
protected OnLayout ( System.Windows.Forms.LayoutEventArgs levent ) : void
levent System.Windows.Forms.LayoutEventArgs
Результат void

OnMouseDown() защищенный Метод

MouseUp actions on XmlBrowseView should only be enabled if a preceeding MouseDown occured in the view.
protected OnMouseDown ( MouseEventArgs e ) : void
e MouseEventArgs
Результат void

OnMouseUp() защищенный Метод

Process left or right mouse button down
protected OnMouseUp ( MouseEventArgs e ) : void
e MouseEventArgs
Результат void

OnMouseWheel() защищенный Метод

When we get a mouse wheel event for windows other than the scrolling controller then pass on the message to the scrolling controller.
protected OnMouseWheel ( MouseEventArgs e ) : void
e MouseEventArgs
Результат void

OnPaint() защищенный Метод

Call Draw() which does all the real painting
protected OnPaint ( PaintEventArgs e ) : void
e PaintEventArgs
Результат void

OnPasteFixTssEvent() публичный Метод

If the text for pasting is too long, truncate it and warn the user.
public OnPasteFixTssEvent ( EditingHelper sender, FwPasteFixTssEventArgs e ) : void
sender EditingHelper
e FwPasteFixTssEventArgs
Результат void

OnPrepareToRefresh() публичный Метод

Called when [prepare to refresh].
public OnPrepareToRefresh ( object args ) : bool
args object The args.
Результат bool

OnPrint() публичный Метод

Tries to be smart about whether our RootSite should print or not.
public OnPrint ( object args ) : bool
args object
Результат bool

OnRequestDebugInfo() публичный Метод

Called when [request debug info].
public OnRequestDebugInfo ( object commandObj ) : bool
commandObj object The command obj.
Результат bool

OnRestoreScrollPosition() публичный Метод

Called through mediator by reflection. (Maybe?) This routine attempts to restore the scroll position previously saved by OnSaveScrollPosition. Specifically, it attempts to scroll to a position such that the top of the object at index m_iTopOfScreenObjectForScrollPosition is m_dyTopOfScreenOffset pixels below the top of the client area (or above, if m_dyTopOfScreenOffset is negative).
public OnRestoreScrollPosition ( object args ) : bool
args object
Результат bool

OnSaveScrollPosition() публичный Метод

Called through mediator by reflection. Save the current scroll position for later restoration, in a form that will survive having the view contents replaced by a lazy box (that is, it's not good enough to just save AutoScrollPosition.y, we need enough information to create a selection at the top of the screen and get a corresponding selection back there. This class implements this by figuring out the index of the record at the top of the screen and saving that.
public OnSaveScrollPosition ( object args ) : bool
args object
Результат bool

PostLayoutInit() публичный Метод

After we have our true size, make sure the interesting row is visible.
public PostLayoutInit ( ) : void
Результат void

PropChanged() публичный Метод

public PropChanged ( int hvo, int tag, int ivMin, int cvIns, int cvDel ) : void
hvo int
tag int
ivMin int
cvIns int
cvDel int
Результат void

RefreshDisplay() публичный Метод

public RefreshDisplay ( ) : bool
Результат bool

SaveSelectionInfo() защищенный Метод

Save the location information for the current selection being made visible.
protected SaveSelectionInfo ( Rectangle rcIdeal, int ydTop ) : void
rcIdeal System.Drawing.Rectangle rectangle of selection
ydTop int current scroll position
Результат void

SelectContentsOfCell() защищенный Метод

protected SelectContentsOfCell ( IVwSelection vwsel ) : void
vwsel IVwSelection
Результат void

SetScrollBarParameters() публичный Метод

Set a controlling scrollbar's parameters using information this object owns.
public SetScrollBarParameters ( ScrollBar scrollBar ) : void
scrollBar System.Windows.Forms.ScrollBar
Результат void

SetSelectedRowHighlighting() публичный Метод

Cause the behavior to switch to the current setting of ReadOnlyBrowse. Override if the behaivor should be different than this.
public SetSelectedRowHighlighting ( ) : void
Результат void

XmlBrowseViewBase() публичный Метод

Initializes a new instance of the T:XmlBrowseViewBase class.
public XmlBrowseViewBase ( ) : System
Результат System

Описание свойств

m_bv защищенное свойство

protected BrowseViewer m_bv
Результат BrowseViewer

m_dyTopOfScreenOffset защищенное свойство

protected int m_dyTopOfScreenOffset
Результат int

m_fHandlingMouseUp защищенное свойство

protected bool m_fHandlingMouseUp
Результат bool

m_fMouseUpEnabled защищенное свойство

We only want to do something on mouse up events if the XmlBrowseView has gotten a mouseDown event.
protected bool m_fMouseUpEnabled
Результат bool

m_fSelectedRowHighlighting защищенное свойство

protected SelectionHighlighting m_fSelectedRowHighlighting
Результат SelectionHighlighting

m_fakeFlid защищенное свойство

protected int m_fakeFlid
Результат int

m_hvoOldSel защищенное свойство

protected int m_hvoOldSel
Результат int

m_hvoRoot защищенное свойство

protected int m_hvoRoot
Результат int

m_iSelIndex защищенное свойство

protected int m_iSelIndex
Результат int

m_iTopOfScreenObjectForScrollPosition защищенное свойство

protected int m_iTopOfScreenObjectForScrollPosition
Результат int

m_id защищенное свойство

protected string m_id
Результат string

m_nodeSpec защищенное свойство

protected XmlNode,System.Xml m_nodeSpec
Результат System.Xml.XmlNode

m_rootObjectHasBeenSet защищенное свойство

protected bool m_rootObjectHasBeenSet
Результат bool

m_sda защищенное свойство

the sda in which looking up m_fakeFlid as a property of m_hvoRoot works.
protected ISilDataAccessManaged m_sda
Результат ISilDataAccessManaged

m_selectedIndex защищенное свойство

protected int m_selectedIndex
Результат int

m_sortItemProvider защищенное свойство

record list supplying browse view content
protected ISortItemProvider m_sortItemProvider
Результат ISortItemProvider

m_stringTable защищенное свойство

protected StringTable,SIL.Utils m_stringTable
Результат SIL.Utils.StringTable

m_tagMe защищенное свойство

protected int m_tagMe
Результат int

m_wantScrollIntoView защищенное свойство

protected bool m_wantScrollIntoView
Результат bool

m_xbvvc защищенное свойство

protected XmlBrowseViewBaseVc,SIL.FieldWorks.Common.Controls m_xbvvc
Результат SIL.FieldWorks.Common.Controls.XmlBrowseViewBaseVc

m_ydSelBottom защищенное свойство

protected int m_ydSelBottom
Результат int

m_ydSelScrollPos защищенное свойство

protected int m_ydSelScrollPos
Результат int

m_ydSelTop защищенное свойство

protected int m_ydSelTop
Результат int