C# Class SIL.FieldWorks.IText.WsListManager

This class manages various information about lists of writing systems. Review JohnT: would these be more naturally methods of LangProject? If not, where should this class go? Note that much of the functionality ought to be used by MultiStringSlice, and probably by other classes that are nothing to do with IText. I'm thinking it might belong in the same DLL as LangProject.
Inheritance: IFWDisposable
Mostrar archivo Open project: sillsdev/FieldWorks Class Usage Examples

Private Properties

Property Type Description
BGR int
WssFromHvos IWritingSystem[]
equalArrays bool

Public Methods

Method Description
AddWsLabel ( IVwEnv vwenv, int iws ) : void

Add to the current display (a paragraph should be open) a label followed by colon, in the standard style, that identifies a particular writing system from the current list.

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.

IndexOf ( int ws ) : int

Returns the index of ws in AnalysisWsIds

LanguageCodeTextProps ( int wsUser ) : ITsTextProps

Return an ITsTextProps typically used for WS labels in views.

WsLabel ( SIL.FieldWorks.FDO.FdoCache cache, int ws ) : ITsString
WsListManager ( SIL.FieldWorks.FDO.FdoCache cache ) : System

Create one starting from an FdoCache.

WsListManager ( ILangProject lp ) : System

Create one starting from a language project.

Protected Methods

Method 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.

Private Methods

Method Description
BGR ( int red, int green, int blue ) : int
WssFromHvos ( int hvos ) : IWritingSystem[]

Return an array of writing systems given an array of their HVOs.

equalArrays ( int v1, int v2 ) : bool

Method Details

AddWsLabel() public method

Add to the current display (a paragraph should be open) a label followed by colon, in the standard style, that identifies a particular writing system from the current list.
public AddWsLabel ( IVwEnv vwenv, int iws ) : void
vwenv IVwEnv
iws int
return void

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() public method

Must not be virtual.
public Dispose ( ) : void
return void

Dispose() protected method

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

IndexOf() public method

Returns the index of ws in AnalysisWsIds
public IndexOf ( int ws ) : int
ws int
return int

LanguageCodeTextProps() public static method

Return an ITsTextProps typically used for WS labels in views.
public static LanguageCodeTextProps ( int wsUser ) : ITsTextProps
wsUser int
return ITsTextProps

WsLabel() public static method

public static WsLabel ( SIL.FieldWorks.FDO.FdoCache cache, int ws ) : ITsString
cache SIL.FieldWorks.FDO.FdoCache
ws int
return ITsString

WsListManager() public method

Create one starting from an FdoCache.
public WsListManager ( SIL.FieldWorks.FDO.FdoCache cache ) : System
cache SIL.FieldWorks.FDO.FdoCache
return System

WsListManager() public method

Create one starting from a language project.
public WsListManager ( ILangProject lp ) : System
lp ILangProject
return System