C# Class SIL.FieldWorks.Common.Controls.FlatListChooserBEditControl

This class implements setting an atomic reference property to a value chosen from a flat list, by means of a combo box showing the items in the list.
Inheritance: IBulkEditSpecControl, IGhostable, IDisposable
Mostrar archivo Open project: sillsdev/FieldWorks Class Usage Examples

Protected Properties

Property Type Description
m_cache SIL.FieldWorks.FDO.FdoCache
m_combo SIL.FieldWorks.Common.Widgets.FwComboBox
m_flidAtomicProp int
m_hvoList int
m_mediator XCore.Mediator
m_sda XMLViewsDataCache
m_useAbbr bool
m_ws int

Public Methods

Method Description
Dispose ( ) : void
DoIt ( IEnumerable itemsToChange, SIL.FieldWorks.Common.Controls.ProgressState state ) : void
FakeDoit ( IEnumerable itemsToChange, int tagFakeFlid, int tagEnabled, SIL.FieldWorks.Common.Controls.ProgressState state ) : void

This is called when the preview button is clicked. The control is passed the list of currently active (filtered and checked) items. It should cache tagEnabled to zero for any objects that can't be modified. For ones that can, it should set the string property tagFakeFlid to the value to show in the 'modified' fields.

FlatListChooserBEditControl ( int flidAtomicProp, int hvoList, int ws, bool useAbbr ) : System
InitForGhostItems ( SIL.FieldWorks.FDO.FdoCache cache, XmlNode colSpec ) : void
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

And does it by choosing the final, 'Not sure' item.

Protected Methods

Method Description
Dispose ( bool fDisposing ) : void
FillComboBox ( ) : void
UpdateListItemToNewValue ( ISilDataAccess sda, int hvoItem, int hvoSel, int hvoOld ) : void

m_combo_SelectedIndexChanged ( object sender, EventArgs e ) : void

Handles the SelectedIndexChanged event of the m_combo control.

Private Methods

Method Description
GetItemLabel ( int hvoChild, int tagName ) : ITsString

Gets the item label.

GetLabeledList ( ) : List
GetOriginalListValue ( ISilDataAccess sda, int hvoItem ) : int

It's possible that hvoItem will be an owner of a ghost (ie. an absent source object for m_flidAtomicProp). In that case, the cache should return 0.

Method Details

Dispose() public method

public Dispose ( ) : void
return void

Dispose() protected method

protected Dispose ( bool fDisposing ) : void
fDisposing bool
return void

DoIt() public method

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

FakeDoit() public method

This is called when the preview button is clicked. The control is passed the list of currently active (filtered and checked) items. It should cache tagEnabled to zero for any objects that can't be modified. For ones that can, it should set the string property tagFakeFlid to the value to show in the 'modified' fields.
public FakeDoit ( IEnumerable itemsToChange, int tagFakeFlid, int tagEnabled, SIL.FieldWorks.Common.Controls.ProgressState state ) : void
itemsToChange IEnumerable The items to change.
tagFakeFlid int The tag fake flid.
tagEnabled int The tag enabled.
state SIL.FieldWorks.Common.Controls.ProgressState The state.
return void

FillComboBox() protected method

protected FillComboBox ( ) : void
return void

FlatListChooserBEditControl() public method

public FlatListChooserBEditControl ( int flidAtomicProp, int hvoList, int ws, bool useAbbr ) : System
flidAtomicProp int
hvoList int
ws int
useAbbr bool
return System

InitForGhostItems() public method

public InitForGhostItems ( SIL.FieldWorks.FDO.FdoCache cache, XmlNode colSpec ) : void
cache SIL.FieldWorks.FDO.FdoCache
colSpec System.Xml.XmlNode
return void

MakeSuggestions() public method

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
return void

SetClearField() public method

And does it by choosing the final, 'Not sure' item.
public SetClearField ( ) : void
return void

UpdateListItemToNewValue() protected method

protected UpdateListItemToNewValue ( ISilDataAccess sda, int hvoItem, int hvoSel, int hvoOld ) : void
sda ISilDataAccess
hvoItem int
hvoSel int
hvoOld int
return void

m_combo_SelectedIndexChanged() protected method

Handles the SelectedIndexChanged event of the m_combo control.
protected m_combo_SelectedIndexChanged ( object sender, EventArgs e ) : void
sender object The source of the event.
e System.EventArgs The instance containing the event data.
return void

Property Details

m_cache protected_oe property

protected FdoCache,SIL.FieldWorks.FDO m_cache
return SIL.FieldWorks.FDO.FdoCache

m_combo protected_oe property

protected FwComboBox,SIL.FieldWorks.Common.Widgets m_combo
return SIL.FieldWorks.Common.Widgets.FwComboBox

m_flidAtomicProp protected_oe property

protected int m_flidAtomicProp
return int

m_hvoList protected_oe property

protected int m_hvoList
return int

m_mediator protected_oe property

protected Mediator,XCore m_mediator
return XCore.Mediator

m_sda protected_oe property

protected XMLViewsDataCache,SIL.FieldWorks.Common.Controls m_sda
return XMLViewsDataCache

m_useAbbr protected_oe property

protected bool m_useAbbr
return bool

m_ws protected_oe property

protected int m_ws
return int