C# Класс SIL.FieldWorks.FdoUi.InflectionFeatureEditor

InflectionFeatureEditor is the spec/display component of the Bulk Edit bar used to set the Inflection features of a LexSense (which must already have an MoStemMsa with POS set). It is used for BulkEditBar, which is part of XmlViews, but it needs to use the PopupTreeManager class, and since FdoUi references XmlViews, XmlViews can't reference FdoUi. Also, it sort of makes sense to put it here as a class that is quite specific to a particular part of the model.
Наследование: IBulkEditSpecControl, IFWDisposable
Показать файл Открыть проект

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

Свойство Тип Описание
m_sda SIL.FieldWorks.Common.Controls.XMLViewsDataCache

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

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

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

Dispose ( ) : void

Must not be virtual.

DoIt ( IEnumerable itemsToChange, SIL.FieldWorks.Common.Controls.ProgressState state ) : void

Execute the change requested by the current selection in the combo. Basically we want a copy of the FsFeatStruc indicated by m_selectedHvo, (even if 0?? not yet possible), to become the MsFeatures of each record that is appropriate to change. We do nothing to records where the check box is turned off, and nothing to ones that currently have an MSA other than an MoStemMsa, and nothing to ones that currently have an MSA with the wrong POS. (a) If the owning entry has an MoStemMsa with a matching MsFeatures (and presumably POS), set the sense to use it. (b) If all senses using the current MoStemMsa are to be changed, just update the MsFeatures of that MoStemMsa. We could add this...but very probably unused MSAs would have been taken over when setting the POS. --(c) If the entry has an MoStemMsa which is not being used at all, change it to --the required POS and inflection class and use it. (d) Make a new MoStemMsa in the LexEntry with the required POS and features and point the sense at it.

FakeDoit ( IEnumerable itemsToChange, int tagFakeFlid, int tagEnable, SIL.FieldWorks.Common.Controls.ProgressState state ) : void

Fake doing the change by setting the specified property to the appropriate value for each item in the set. Disable items that can't be set.

InflectionFeatureEditor ( ) : System
InflectionFeatureEditor ( XmlNode configurationNode ) : System
MakeSuggestions ( IEnumerable itemsToChange, int tagFakeFlid, int tagEnabled, SIL.FieldWorks.Common.Controls.ProgressState state ) : void

Used by SemanticDomainChooserBEditControl to make suggestions and then call FakeDoIt

SetClearField ( ) : void

Not needed since we said we can't do it.

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

Метод Описание
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.

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

Метод Описание
AddChildPos ( ISilDataAccess sda, int hvoPos, Set possiblePOS ) : void

Add to possiblePOS all the children (recursively) of hvoPos

GetPOS ( ) : IPartOfSpeech
GetPossiblePartsOfSpeech ( ) : Set
InitMsa ( IMoStemMsa msmTarget, int hvoPos ) : void
IsItemEligible ( ISilDataAccess sda, int hvo, Set possiblePOS ) : bool
MsaMatchesTarget ( IMoStemMsa msm, IFsFeatStruc fsTarget ) : bool

Answer true if the selected MSA has an MsFeatures that is the same as the argument.

m_pOSPopupTreeManager_AfterSelect ( object sender, System e ) : void
m_tree_TreeLoad ( 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

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

Must not be virtual.
public Dispose ( ) : void
Результат void

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

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
Результат void

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

Execute the change requested by the current selection in the combo. Basically we want a copy of the FsFeatStruc indicated by m_selectedHvo, (even if 0?? not yet possible), to become the MsFeatures of each record that is appropriate to change. We do nothing to records where the check box is turned off, and nothing to ones that currently have an MSA other than an MoStemMsa, and nothing to ones that currently have an MSA with the wrong POS. (a) If the owning entry has an MoStemMsa with a matching MsFeatures (and presumably POS), set the sense to use it. (b) If all senses using the current MoStemMsa are to be changed, just update the MsFeatures of that MoStemMsa. We could add this...but very probably unused MSAs would have been taken over when setting the POS. --(c) If the entry has an MoStemMsa which is not being used at all, change it to --the required POS and inflection class and use it. (d) Make a new MoStemMsa in the LexEntry with the required POS and features and point the sense at it.
public DoIt ( IEnumerable itemsToChange, SIL.FieldWorks.Common.Controls.ProgressState state ) : void
itemsToChange IEnumerable
state SIL.FieldWorks.Common.Controls.ProgressState
Результат void

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

Fake doing the change by setting the specified property to the appropriate value for each item in the set. Disable items that can't be set.
public FakeDoit ( IEnumerable itemsToChange, int tagFakeFlid, int tagEnable, SIL.FieldWorks.Common.Controls.ProgressState state ) : void
itemsToChange IEnumerable
tagFakeFlid int
tagEnable int
state SIL.FieldWorks.Common.Controls.ProgressState
Результат void

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

public InflectionFeatureEditor ( ) : System
Результат System

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

public InflectionFeatureEditor ( XmlNode configurationNode ) : System
configurationNode System.Xml.XmlNode
Результат System

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

Used by SemanticDomainChooserBEditControl to make suggestions and then call FakeDoIt
public MakeSuggestions ( IEnumerable itemsToChange, int tagFakeFlid, int tagEnabled, SIL.FieldWorks.Common.Controls.ProgressState state ) : void
itemsToChange IEnumerable
tagFakeFlid int
tagEnabled int
state SIL.FieldWorks.Common.Controls.ProgressState
Результат void

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

Not needed since we said we can't do it.
public SetClearField ( ) : void
Результат void

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

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

protected XMLViewsDataCache,SIL.FieldWorks.Common.Controls m_sda
Результат SIL.FieldWorks.Common.Controls.XMLViewsDataCache