C# Class SIL.FieldWorks.Common.Widgets.LabeledMultiStringControl

LabeledMultiStringControl (used in InsertEntryDlg) has an FdoCache, but it is used only to figure out the writing systems to use; the control works with a dummy cache, object, and flid, and the resulting text must be read back.
Inheritance: System.Windows.Forms.UserControl, IVwNotifyChange, IFWDisposable
Datei anzeigen Open project: sillsdev/FieldWorks Class Usage Examples

Private Properties

Property Type Description
InternalInit void
SetPadding void
m_innerControl_GotFocus void
m_innerControl_LostFocus void
m_innerControl_MouseEnter void
m_innerControl_MouseLeave void

Public Methods

Method Description
CheckDisposed ( ) : void

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

LabeledMultiStringControl ( SIL.FieldWorks.FDO.FdoCache cache, List wsList, IVwStylesheet vss ) : System

Initializes a new instance of the LabeledMultiStringControl class. For use with a non-standard list of wss (like available UI languages). (See CustomListDlg)

LabeledMultiStringControl ( SIL.FieldWorks.FDO.FdoCache cache, int wsMagic, IVwStylesheet vss ) : System

Initializes a new instance of the LabeledMultiStringControl class.

PropChanged ( int hvo, int tag, int ivMin, int cvIns, int cvDel ) : void

Select ( int ws, int start, int length ) : void

Selects a range of text based on the specified writing system.

If you want to set the start position to the first character in the control's text, set the start parameter to 0. You can use this method to select a substring of text, such as when searching through the text of the control and replacing information. Note: You can programmatically move the caret within the text box by setting the start parameter to the position within the text box where you want the caret to move to and set the length parameter to a value of zero (0). The text box must have focus in order for the caret to be moved.

SetValue ( int ws, ITsString tss ) : void

Set one of the strings.

SetValue ( int ws, string txt ) : void

Set one of the strings.

Value ( int ws ) : ITsString

Get one of the resulting strings.

ValueAndWs ( int index, int &ws ) : ITsString

Get the nth string and writing system.

Ws ( int index ) : int

Get the nth writing system.

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.

OnPaint ( PaintEventArgs e ) : void

Raises the E:System.Windows.Forms.Control.Paint event.

Select ( bool directed, bool forward ) : void

Activates a child control.

Private Methods

Method Description
InternalInit ( SIL.FieldWorks.FDO.FdoCache cache, IVwStylesheet vss ) : void
SetPadding ( ) : void
m_innerControl_GotFocus ( object sender, EventArgs e ) : void
m_innerControl_LostFocus ( object sender, EventArgs e ) : void
m_innerControl_MouseEnter ( object sender, EventArgs e ) : void
m_innerControl_MouseLeave ( object sender, EventArgs e ) : void

Method Details

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

LabeledMultiStringControl() public method

Initializes a new instance of the LabeledMultiStringControl class. For use with a non-standard list of wss (like available UI languages). (See CustomListDlg)
public LabeledMultiStringControl ( SIL.FieldWorks.FDO.FdoCache cache, List wsList, IVwStylesheet vss ) : System
cache SIL.FieldWorks.FDO.FdoCache The FdoCache.
wsList List The non-standard list of IWritingSystems.
vss IVwStylesheet The stylesheet.
return System

LabeledMultiStringControl() public method

Initializes a new instance of the LabeledMultiStringControl class.
public LabeledMultiStringControl ( SIL.FieldWorks.FDO.FdoCache cache, int wsMagic, IVwStylesheet vss ) : System
cache SIL.FieldWorks.FDO.FdoCache
wsMagic int
vss IVwStylesheet
return System

OnPaint() protected method

Raises the E:System.Windows.Forms.Control.Paint event.
protected OnPaint ( PaintEventArgs e ) : void
e PaintEventArgs A that contains the event data.
return void

PropChanged() public method

public PropChanged ( int hvo, int tag, int ivMin, int cvIns, int cvDel ) : void
hvo int
tag int
ivMin int
cvIns int
cvDel int
return void

Select() protected method

Activates a child control.
protected Select ( bool directed, bool forward ) : void
directed bool true to specify the direction of the control to select; otherwise, false.
forward bool true to move forward in the tab order; false to move backward in the tab order.
return void

Select() public method

Selects a range of text based on the specified writing system.
If you want to set the start position to the first character in the control's text, set the start parameter to 0. You can use this method to select a substring of text, such as when searching through the text of the control and replacing information. Note: You can programmatically move the caret within the text box by setting the start parameter to the position within the text box where you want the caret to move to and set the length parameter to a value of zero (0). The text box must have focus in order for the caret to be moved.
/// The value assigned to either the start parameter or the length parameter is less than zero. ///
public Select ( int ws, int start, int length ) : void
ws int The writing system.
start int The position of the first character in the current text selection within the text box.
length int The number of characters to select.
return void

SetValue() public method

Set one of the strings.
public SetValue ( int ws, ITsString tss ) : void
ws int
tss ITsString
return void

SetValue() public method

Set one of the strings.
public SetValue ( int ws, string txt ) : void
ws int
txt string
return void

Value() public method

Get one of the resulting strings.
public Value ( int ws ) : ITsString
ws int
return ITsString

ValueAndWs() public method

Get the nth string and writing system.
public ValueAndWs ( int index, int &ws ) : ITsString
index int
ws int
return ITsString

Ws() public method

Get the nth writing system.
public Ws ( int index ) : int
index int The index.
return int