C# Класс 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.
Наследование: IFWDisposable
Показать файл Открыть проект Примеры использования класса

Private Properties

Свойство Тип Описание
BGR int
WssFromHvos IWritingSystem[]
equalArrays bool

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

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

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

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

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

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

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

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

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

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

Returns the index of ws in AnalysisWsIds
public IndexOf ( int ws ) : int
ws int
Результат int

LanguageCodeTextProps() публичный статический Метод

Return an ITsTextProps typically used for WS labels in views.
public static LanguageCodeTextProps ( int wsUser ) : ITsTextProps
wsUser int
Результат ITsTextProps

WsLabel() публичный статический Метод

public static WsLabel ( SIL.FieldWorks.FDO.FdoCache cache, int ws ) : ITsString
cache SIL.FieldWorks.FDO.FdoCache
ws int
Результат ITsString

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

Create one starting from an FdoCache.
public WsListManager ( SIL.FieldWorks.FDO.FdoCache cache ) : System
cache SIL.FieldWorks.FDO.FdoCache
Результат System

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

Create one starting from a language project.
public WsListManager ( ILangProject lp ) : System
lp ILangProject
Результат System