C# Class SIL.FieldWorks.IText.FocusBoxController

Inheritance: System.Windows.Forms.UserControl
Mostrar archivo Open project: sillsdev/FieldWorks Class Usage Examples

Protected Properties

Property Type Description
m_lineChoices SIL.FieldWorks.IText.InterlinLineChoices
m_mediator XCore.Mediator

Private Properties

Property Type Description
AdjustControlsForRightToLeftWritingSystem void
AdjustSizeAndLocationForControls void
AppendShortcutToToolTip string
AppendShortcutToToolTip string
ChangeOrCreateSandbox void
CreateNewSandbox IAnalysisControlInternal
FocusSandbox void
HandleFocusWrongButton void
HaveValidOccurrence bool
InitializeComponent void
MakeDefaultSelection bool
SetSandboxSize void
SetToolTips void
ShortcutText string
UpdateButtonState void
UpdateButtonState_Undo void
btnBreakPhrase_Click void
btnConfirmChangesForWholeText_Click void
btnConfirmChanges_Click void
btnLinkNextWord_Click void
btnMenu_Click void
btnUndoChanges_Click void
m_sandbox_SandboxChangedEvent void
toolTip_Popup void

Public Methods

Method Description
FocusBoxController ( ) : System
FocusBoxController ( XCore.Mediator mediator, IVwStylesheet stylesheet, SIL.FieldWorks.IText.InterlinLineChoices lineChoices ) : System
OnBreakPhrase ( object arg ) : void

split the current occurrence into occurrences for each word in the phrase-wordform. (if it IsPhrase)

OnJoinWords ( object arg ) : bool

Note: Assume we are in the OnDisplayShowLinkWords is true context.

SelectOccurrence ( AnalysisOccurrence selected ) : void
UpdateLineChoices ( SIL.FieldWorks.IText.InterlinLineChoices choices ) : void

Protected Methods

Method Description
Dispose ( bool disposing ) : void

Clean up any resources being used.

OnGotFocus ( EventArgs e ) : void

turn focus over to sandbox

OnLayout ( System.Windows.Forms.LayoutEventArgs e ) : void
OnParentChanged ( EventArgs e ) : void
OnVisibleChanged ( EventArgs e ) : void

Private Methods

Method Description
AdjustControlsForRightToLeftWritingSystem ( Sandbox sandbox ) : void

NOTE: currently needs to get called after sandbox.MakeRoot, since that's when RightToLeftWritingSystem is valid.

AdjustSizeAndLocationForControls ( bool fAdjustOverallSize ) : void
AppendShortcutToToolTip ( Command command ) : string
AppendShortcutToToolTip ( string toolTip, string shortcut ) : string
ChangeOrCreateSandbox ( AnalysisOccurrence selected ) : void

Change root of Sandbox or create it; Lay it out and figure its size; tell m_vc the size.

CreateNewSandbox ( AnalysisOccurrence selected ) : IAnalysisControlInternal
FocusSandbox ( ) : void

Call this rather than "FocusBox.Focus()" because we don't want focus passing through this to the sandbox if we can help it. One problem can be that as the main view loses focus it resets the default keyboard.

HandleFocusWrongButton ( object sender, EventArgs e ) : void
HaveValidOccurrence ( ) : bool
InitializeComponent ( ) : void

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

MakeDefaultSelection ( object parameter ) : bool
SetSandboxSize ( ) : void
SetToolTips ( ) : void
ShortcutText ( Keys shortcut ) : string
UpdateButtonState ( ) : void
UpdateButtonState_Undo ( ) : void
btnBreakPhrase_Click ( object sender, EventArgs e ) : void
btnConfirmChangesForWholeText_Click ( object sender, EventArgs e ) : void
btnConfirmChanges_Click ( object sender, EventArgs e ) : void
btnLinkNextWord_Click ( object sender, EventArgs e ) : void
btnMenu_Click ( object sender, EventArgs e ) : void
btnUndoChanges_Click ( object sender, EventArgs e ) : void
m_sandbox_SandboxChangedEvent ( object sender, SandboxChangedEventArgs e ) : void
toolTip_Popup ( object sender, System.Windows.Forms.PopupEventArgs e ) : void

Method Details

Dispose() protected method

Clean up any resources being used.
protected Dispose ( bool disposing ) : void
disposing bool true if managed resources should be disposed; otherwise, false.
return void

FocusBoxController() public method

public FocusBoxController ( ) : System
return System

FocusBoxController() public method

public FocusBoxController ( XCore.Mediator mediator, IVwStylesheet stylesheet, SIL.FieldWorks.IText.InterlinLineChoices lineChoices ) : System
mediator XCore.Mediator
stylesheet IVwStylesheet
lineChoices SIL.FieldWorks.IText.InterlinLineChoices
return System

OnBreakPhrase() public method

split the current occurrence into occurrences for each word in the phrase-wordform. (if it IsPhrase)
public OnBreakPhrase ( object arg ) : void
arg object
return void

OnGotFocus() protected method

turn focus over to sandbox
protected OnGotFocus ( EventArgs e ) : void
e System.EventArgs
return void

OnJoinWords() public method

Note: Assume we are in the OnDisplayShowLinkWords is true context.
public OnJoinWords ( object arg ) : bool
arg object
return bool

OnLayout() protected method

protected OnLayout ( System.Windows.Forms.LayoutEventArgs e ) : void
e System.Windows.Forms.LayoutEventArgs
return void

OnParentChanged() protected method

protected OnParentChanged ( EventArgs e ) : void
e System.EventArgs
return void

OnVisibleChanged() protected method

protected OnVisibleChanged ( EventArgs e ) : void
e System.EventArgs
return void

SelectOccurrence() public method

public SelectOccurrence ( AnalysisOccurrence selected ) : void
selected AnalysisOccurrence
return void

UpdateLineChoices() public method

public UpdateLineChoices ( SIL.FieldWorks.IText.InterlinLineChoices choices ) : void
choices SIL.FieldWorks.IText.InterlinLineChoices
return void

Property Details

m_lineChoices protected_oe property

protected InterlinLineChoices,SIL.FieldWorks.IText m_lineChoices
return SIL.FieldWorks.IText.InterlinLineChoices

m_mediator protected_oe property

protected Mediator,XCore m_mediator
return XCore.Mediator