C# Class SIL.FieldWorks.Common.Framework.DetailControls.GhostStringSlice.GhostStringSliceView

Inheritance: SIL.FieldWorks.Common.RootSites.RootSiteControl
Afficher le fichier Open project: sillsdev/FieldWorks

Méthodes publiques

Méthode Description
GhostStringSliceView ( int hvo, int flid, XmlNode nodeObjProp, SIL.FieldWorks.FDO.FdoCache cache ) : System
MakeRoot ( ) : void
RefreshDisplay ( ) : bool

Do nothing if the ghost somehow gets refreshed directly. It will get called when the main window is refreshing, and we reuse the ghost. Just ignore the call, since the base call will cause a crash on the cache with a zero HVO for some reason.

Méthodes protégées

Méthode Description
Dispose ( bool disposing ) : void

Executes in two distinct scenarios. 1. If disposing is true, the method has been called directly or indirectly by a user's code via the Dispose method. Both managed and unmanaged resources can be disposed. 2. If disposing is false, the method has been called by the runtime from inside the finalizer and you should not reference (access) other managed objects, as they already have been garbage collected. Only unmanaged resources can be disposed.

If any exceptions are thrown, that is fine. If the method is being done in a finalizer, it will be ignored. If it is thrown by client code calling Dispose, it needs to be handled by fixing the bug. If subclasses override this method, they should call the base implementation.

HandleSelectionChange ( IVwRootBox prootb, IVwSelection vwselNew ) : void
OnKeyPress ( KeyPressEventArgs e ) : void

If the view's root object is valid, then call the base method. Otherwise do nothing. (See LT-8656 and LT-9119.)

Private Methods

Méthode Description
GetSliceReadyToFocus ( Slice slice ) : void
MakeRealObject ( ITsString tssTyped ) : int
RestoreSelection ( int ich, DataTree datatree, object key, int hvoNewObj, int flidObjProp, int flidStringProp, int ws ) : void

This needs to be a static method because typically the ghost slice has been disposed by the time it is called. Note that DataTree.AddAtomicNode either displays a layout of the object, or displays the ghost slice. If it displays a layout of the object, it adds to its input path first itself (the "obj" element), then the HVO of the object, then creates slices for the object. For ghost slice, it simply adds itself. Therefore, a slice created as part of a layout replacing a ghost slice will have a key matching the ghost slice's key, and followed by the ID of the new object. Next, anything in this layout will have the template used to display the object, and the particular part ref that invoked the part, then (for an interesting target) a slice node with editor 'string' or 'multistring' as appropriate. AddSeqNode is similar, except that it may display layouts of multiple objects.

SwitchToReal ( ) : void
SwitchToRealOnIdle ( object parameter ) : bool

We arrange to be called once when this slice should turn into a real object.

Method Details

Dispose() protected méthode

Executes in two distinct scenarios. 1. If disposing is true, the method has been called directly or indirectly by a user's code via the Dispose method. Both managed and unmanaged resources can be disposed. 2. If disposing is false, the method has been called by the runtime from inside the finalizer and you should not reference (access) other managed objects, as they already have been garbage collected. Only unmanaged resources can be disposed.
If any exceptions are thrown, that is fine. If the method is being done in a finalizer, it will be ignored. If it is thrown by client code calling Dispose, it needs to be handled by fixing the bug. If subclasses override this method, they should call the base implementation.
protected Dispose ( bool disposing ) : void
disposing bool
Résultat void

GhostStringSliceView() public méthode

public GhostStringSliceView ( int hvo, int flid, XmlNode nodeObjProp, SIL.FieldWorks.FDO.FdoCache cache ) : System
hvo int
flid int
nodeObjProp System.Xml.XmlNode
cache SIL.FieldWorks.FDO.FdoCache
Résultat System

HandleSelectionChange() protected méthode

protected HandleSelectionChange ( IVwRootBox prootb, IVwSelection vwselNew ) : void
prootb IVwRootBox
vwselNew IVwSelection
Résultat void

MakeRoot() public méthode

public MakeRoot ( ) : void
Résultat void

OnKeyPress() protected méthode

If the view's root object is valid, then call the base method. Otherwise do nothing. (See LT-8656 and LT-9119.)
protected OnKeyPress ( KeyPressEventArgs e ) : void
e System.Windows.Forms.KeyPressEventArgs
Résultat void

RefreshDisplay() public méthode

Do nothing if the ghost somehow gets refreshed directly. It will get called when the main window is refreshing, and we reuse the ghost. Just ignore the call, since the base call will cause a crash on the cache with a zero HVO for some reason.
public RefreshDisplay ( ) : bool
Résultat bool