C# Класс SILUBS.SharedScrControls.ScrPassageControl

Summary description for ScrPassageControl.
Наследование: System.Windows.Forms.UserControl, IMessageFilter
Показать файл Открыть проект Примеры использования класса

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

Свойство Тип Описание
btnScrPsgDropDown System.Windows.Forms.Panel
m_dropdownForm System.Windows.Forms.Form
m_mulScrBooks SILUBS.SharedScrUtils.MultilingScrBooks
m_scrProj IScrProjMetaDataProvider
txtScrRef System.Windows.Forms.TextBox

Private Properties

Свойство Тип Описание
DisplayDropDown void
DisplayErrorMessage void
DropDownChapterSelected void
DropDownClosed void
DropDownShouldGoUp bool
HandleDropDown void
HandleSizeChanged void
InitializeBookLabels void
InitializeComponent void
OnParentChanged void
PaintNonThemeButton void
PaintOnToolbar void
PositionDropDown void
btnScrPsgDropDown_MouseEnter void
btnScrPsgDropDown_MouseLeave void
btnScrPsgDropDown_MouseUp void
btnScrPsgDropDown_Paint void
btnScrPsgDropDown_PaintOnToolstrip void
txtScrRef_GotFocus void
txtScrRef_LostFocus void
txtScrRef_MouseEnter void
txtScrRef_MouseLeave void

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

Метод Описание
Initialize ( SILUBS.SharedScrUtils.ScrReference reference ) : void

Initialization, either from constructor or elsewhere following the default constructor.

Initialize ( SILUBS.SharedScrUtils.ScrReference reference, int availableBooks ) : void

Initialization, either from constructor or elsewhere following the default constructor.

IsReferenceValid ( SILUBS.SharedScrUtils.ScrReference scrRef ) : bool

Determines whether the specified ScrReference is in the list of available books.

ParseRefString ( string sTextToBeParsed ) : SILUBS.SharedScrUtils.ScrReference

Parses the user typed in string. Creates and returns a ScrReference object.

PreFilterMessage ( Message &m ) : bool

Because Del and Ctrl+A are menu item shortcuts, if our ref. text box has focus, then we need to trap them before the menu system gets a crack at them.

ResolveReference ( ) : void

Resolve the reference specified in the text box

ScrPassageControl ( ) : System

Default constructor

ScrPassageControl ( SILUBS.SharedScrUtils.ScrReference reference, IScrProjMetaDataProvider scrProj, ScrVers versification ) : System

Non-default constructor

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

Метод Описание
CreateMultilingScrBooks ( IScrProjMetaDataProvider scrProj, ScrVers versification ) : void

Creates the object that can provide multi-lingual names and abbreviations for Scripture books.

CreateScrPassageDropDown ( ScrPassageControl owner ) : SILUBS.SharedScrControls.ScrPassageDropDown

Create a new ScrPassageDropDown object

Dispose ( bool disposing ) : void

Clean up any resources being used.

DropDownBookSelected ( int book ) : void

If the book has changed, parse the new reference and display it in the text box.

InvokePassageChanged ( SILUBS.SharedScrUtils.ScrReference reference ) : void

Invoke the PassageChanged event

OnEnabledChanged ( EventArgs e ) : void

Make sure the panel control behind the text box takes on the same back color as the text box.

OnHandleDestroyed ( EventArgs e ) : void

Make sure the dropdown control isn't left hanging around after this control goes away.

OnPaint ( PaintEventArgs e ) : void

OnResize ( EventArgs e ) : void

This will center the text box vertically within the control.

btnScrPsgDropDown_MouseDown ( object sender, System e ) : void

txtScrRef_KeyDown ( object sender, KeyEventArgs e ) : void

txtScrRef_KeyPress ( object sender, KeyPressEventArgs e ) : void

Handle the key press to look for Enter keys.

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

Метод Описание
DisplayDropDown ( ) : void
DisplayErrorMessage ( ) : void
DropDownChapterSelected ( int book, int chapter ) : void

DropDownClosed ( object sender, EventArgs e ) : void

This is the method that the dropdown will call to notify me that it is closed.

DropDownShouldGoUp ( Point screenPoint, SILUBS.SharedScrControls.ScrPassageDropDown dropDown ) : bool

Determine if the drop down should go above the ScrPassageControl or below it.

HandleDropDown ( ) : void

Display the drop down if it doesn't show, or close it if it does show.

HandleSizeChanged ( object sender, EventArgs e ) : void
InitializeBookLabels ( ) : void

InitializeComponent ( ) : void

Required method for Designer support - do not modify the contents of this method with the code editor.

OnParentChanged ( EventArgs e ) : void
PaintNonThemeButton ( Graphics graphics, ButtonState state ) : void

PaintOnToolbar ( PaintEventArgs e ) : void

PositionDropDown ( SILUBS.SharedScrControls.ScrPassageDropDown dropDown ) : void

Position the drop down control.

btnScrPsgDropDown_MouseEnter ( object sender, System e ) : void

btnScrPsgDropDown_MouseLeave ( object sender, System e ) : void

btnScrPsgDropDown_MouseUp ( object sender, System e ) : void

btnScrPsgDropDown_Paint ( object sender, PaintEventArgs e ) : void

btnScrPsgDropDown_PaintOnToolstrip ( PaintEventArgs e ) : void
txtScrRef_GotFocus ( object sender, System e ) : void

When gaining the focus, highlight the entire text.

txtScrRef_LostFocus ( object sender, System e ) : void

Handle the text box losing focus. Resolve the reference that has been typed in.

txtScrRef_MouseEnter ( object sender, EventArgs e ) : void

txtScrRef_MouseLeave ( object sender, EventArgs e ) : void

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

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

Creates the object that can provide multi-lingual names and abbreviations for Scripture books.
protected CreateMultilingScrBooks ( IScrProjMetaDataProvider scrProj, ScrVers versification ) : void
scrProj IScrProjMetaDataProvider The Scripture project meta-data provided (can be null).
versification ScrVers The default versification to use for references if /// scrProj is not set.
Результат void

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

Create a new ScrPassageDropDown object
protected CreateScrPassageDropDown ( ScrPassageControl owner ) : SILUBS.SharedScrControls.ScrPassageDropDown
owner ScrPassageControl The ScrPassageControl that will own the drop-down control
Результат SILUBS.SharedScrControls.ScrPassageDropDown

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

Clean up any resources being used.
protected Dispose ( bool disposing ) : void
disposing bool
Результат void

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

If the book has changed, parse the new reference and display it in the text box.
protected DropDownBookSelected ( int book ) : void
book int
Результат void

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

Initialization, either from constructor or elsewhere following the default constructor.
public Initialize ( SILUBS.SharedScrUtils.ScrReference reference ) : void
reference SILUBS.SharedScrUtils.ScrReference Initial reference
Результат void

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

Initialization, either from constructor or elsewhere following the default constructor.
public Initialize ( SILUBS.SharedScrUtils.ScrReference reference, int availableBooks ) : void
reference SILUBS.SharedScrUtils.ScrReference Initial reference
availableBooks int Array of canonical book IDs to include
Результат void

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

Invoke the PassageChanged event
protected InvokePassageChanged ( SILUBS.SharedScrUtils.ScrReference reference ) : void
reference SILUBS.SharedScrUtils.ScrReference The reference.
Результат void

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

Determines whether the specified ScrReference is in the list of available books.
public IsReferenceValid ( SILUBS.SharedScrUtils.ScrReference scrRef ) : bool
scrRef SILUBS.SharedScrUtils.ScrReference The given ScrReference
Результат bool

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

Make sure the panel control behind the text box takes on the same back color as the text box.
protected OnEnabledChanged ( EventArgs e ) : void
e System.EventArgs
Результат void

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

Make sure the dropdown control isn't left hanging around after this control goes away.
protected OnHandleDestroyed ( EventArgs e ) : void
e System.EventArgs
Результат void

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

protected OnPaint ( PaintEventArgs e ) : void
e PaintEventArgs
Результат void

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

This will center the text box vertically within the control.
protected OnResize ( EventArgs e ) : void
e System.EventArgs
Результат void

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

Parses the user typed in string. Creates and returns a ScrReference object.
public ParseRefString ( string sTextToBeParsed ) : SILUBS.SharedScrUtils.ScrReference
sTextToBeParsed string Reference string the user types in.
Результат SILUBS.SharedScrUtils.ScrReference

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

Because Del and Ctrl+A are menu item shortcuts, if our ref. text box has focus, then we need to trap them before the menu system gets a crack at them.
public PreFilterMessage ( Message &m ) : bool
m System.Windows.Forms.Message
Результат bool

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

Resolve the reference specified in the text box
public ResolveReference ( ) : void
Результат void

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

Default constructor
public ScrPassageControl ( ) : System
Результат System

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

Non-default constructor
public ScrPassageControl ( SILUBS.SharedScrUtils.ScrReference reference, IScrProjMetaDataProvider scrProj, ScrVers versification ) : System
reference SILUBS.SharedScrUtils.ScrReference Initial reference
scrProj IScrProjMetaDataProvider Object that can provide meta-dat information about a Scripture /// project.
versification ScrVers The versification to use if scrProj is not set.
Результат System

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

protected btnScrPsgDropDown_MouseDown ( object sender, System e ) : void
sender object
e System
Результат void

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

protected txtScrRef_KeyDown ( object sender, KeyEventArgs e ) : void
sender object
e System.Windows.Forms.KeyEventArgs
Результат void

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

Handle the key press to look for Enter keys.
protected txtScrRef_KeyPress ( object sender, KeyPressEventArgs e ) : void
sender object
e System.Windows.Forms.KeyPressEventArgs
Результат void

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

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

protected Panel,System.Windows.Forms btnScrPsgDropDown
Результат System.Windows.Forms.Panel

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

protected Form,System.Windows.Forms m_dropdownForm
Результат System.Windows.Forms.Form

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

The object that provides all the information about book names and abbreviations
protected MultilingScrBooks,SILUBS.SharedScrUtils m_mulScrBooks
Результат SILUBS.SharedScrUtils.MultilingScrBooks

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

Scripture project meta-data provider
protected IScrProjMetaDataProvider m_scrProj
Результат IScrProjMetaDataProvider

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

protected TextBox,System.Windows.Forms txtScrRef
Результат System.Windows.Forms.TextBox