C# Class SIL.FieldWorks.TE.NotesMainWnd

NotesMainWnd is a main window for displaying annotations.
Inheritance: SIL.FieldWorks.Common.Framework.FwMainWnd
显示文件 Open project: sillsdev/FieldWorks Class Usage Examples

Private Properties

Property Type Description
InitializeComponent void
NoteFilterChanged void
SetupSideBarInfoBar void
ShowStylesHelp void

Public Methods

Method Description
InitAndShowClient ( ) : void

Create the client windows and add corresponding stuff to the sidebar, View menu, etc.

NotesMainWnd ( FwApp app, FwStyleSheet stylesheet, float zoomPercent ) : System

Initializes a new instance of the NotesMainWnd class.

OnEditDeleteNote ( object args ) : bool

Delete the current annotation.

OnFileExportOXESA ( object args ) : bool

Export an Open XML for Exchanging Scripture Annotations (OXESA) file.

OnFileImportOXESA ( object args ) : bool

Import an Open XML for Exchanging Scripture Annotations (OXESA) file.

OnFinishedInit ( ) : bool

When finished initializing, show the default view.

OnInsertResponse ( object args ) : bool

Adds a reponse to the current annotation. This really appends a response, it doesn't insert.

OnPasteHyperlink ( object args ) : bool

Paste what is in the clipboard as a URL

OnUpdateFileExportOXESA ( object args ) : bool

Determines whether it is valid to export an OXESA file.

OnUpdateInsertResponse ( object args ) : bool

OnUpdatePasteHyperlink ( object args ) : bool

Determines whether the Paste Hyperlink command is enabled

OnViewCollapseAllNotes ( object args ) : bool

Collapses all annotations.

PopulateParaStyleListOverride ( ) : bool

For the Notes view, we override the default behavior to make the para style combo only display the current paragraph style in the list.

PreSynchronize ( SyncMsg sync ) : void

Called just before a window synchronizes it's views with DB changes (e.g. when an undo or redo command is issued).

ScrollToReference ( object sender, SILUBS.SharedScrUtils.ScrReference scrRef, ITsString quotedText ) : void

Scroll any note(s) with the given reference into view

ScrollToScrEditingLocation ( object sender, SIL.FieldWorks.TE.TeEditingHelper editingHelper ) : void

Scrolls to SCR editing location.

SelectFilterButton ( IFilter filter ) : void

Select the button on the filter sidebar corresponding to the given filter (will not generate the events)

Synchronize ( SyncMsg sync ) : bool

Handle import sync messages.

Protected Methods

Method Description
AddFilters ( ) : void

Add filters to the side bar

AddNotesView ( string viewName, int wsUser ) : void

Adds the Notes Data Entry View

Dispose ( bool disposing ) : void

Clean up any resources being used.

GetAppSpecificMenuToolBarDefinition ( ) : string

Add Notes specific toolbars to the ones added by the framework's main window.

GetCurrentStyleNames ( string &paraStyleName, string &charStyleName ) : void

Gets the current style names from the selected text

GetDefaultItemForTab ( string tabName ) : string

Get the name of the default sidebar item for the given tab

OnHelpApplication ( object args ) : bool

Shows the help file for the application

OnLoad ( EventArgs e ) : void

OnUpdateSideBarConfigure ( object args ) : bool

This updates the given configure menu item. This configure menu item is on the sidebar tab's context menu or on one of the view menu item's sub-menus or one of the context menus that pops-up when the user clicks on an info. bar button.

OnUpdateStyleComboBox ( object args ) : bool

Enables/disables the styles combobox

OnUpdateWritingSystem ( object args ) : bool

Makes the Writing System Selector combobox enabled or disabled

SetPropsToFactorySettings ( SIL.FieldWorks.FwCoreDlgControls.StyleInfo styleInfo ) : void

Set the properties of a StyleInfo to the factory default settings

ShowApplyStyleDialog ( string paraStyleName, string charStyleName ) : void

Shows the Format Apply Style dialog

Private Methods

Method Description
InitializeComponent ( ) : void

Initialize stuff

NoteFilterChanged ( object sender, ICmFilter filter ) : void

Update the filter panel in the status bar.

SetupSideBarInfoBar ( ) : void

Setup the sidebar/info. bar adapter.

ShowStylesHelp ( SIL.FieldWorks.FwCoreDlgControls.StyleListItem item ) : void

Show help topic for currently selected style. (This method is also in TeMainWnd. I tried to move it out but the reference chain would have made it ugly).

Method Details

AddFilters() protected method

Add filters to the side bar
protected AddFilters ( ) : void
return void

AddNotesView() protected method

Adds the Notes Data Entry View
protected AddNotesView ( string viewName, int wsUser ) : void
viewName string
wsUser int
return void

Dispose() protected method

Clean up any resources being used.
protected Dispose ( bool disposing ) : void
disposing bool
return void

GetAppSpecificMenuToolBarDefinition() protected method

Add Notes specific toolbars to the ones added by the framework's main window.
protected GetAppSpecificMenuToolBarDefinition ( ) : string
return string

GetCurrentStyleNames() protected method

Gets the current style names from the selected text
protected GetCurrentStyleNames ( string &paraStyleName, string &charStyleName ) : void
paraStyleName string Name of the para style.
charStyleName string Name of the char style.
return void

GetDefaultItemForTab() protected method

Get the name of the default sidebar item for the given tab
protected GetDefaultItemForTab ( string tabName ) : string
tabName string Name of the sidebar tab
return string

InitAndShowClient() public method

Create the client windows and add corresponding stuff to the sidebar, View menu, etc.
Invalid user view type in database
public InitAndShowClient ( ) : void
return void

NotesMainWnd() public method

Initializes a new instance of the NotesMainWnd class.
public NotesMainWnd ( FwApp app, FwStyleSheet stylesheet, float zoomPercent ) : System
app SIL.FieldWorks.Common.Framework.FwApp The app
stylesheet FwStyleSheet The stylesheet
zoomPercent float The zoom percentage
return System

OnEditDeleteNote() public method

Delete the current annotation.
public OnEditDeleteNote ( object args ) : bool
args object
return bool

OnFileExportOXESA() public method

Export an Open XML for Exchanging Scripture Annotations (OXESA) file.
public OnFileExportOXESA ( object args ) : bool
args object
return bool

OnFileImportOXESA() public method

Import an Open XML for Exchanging Scripture Annotations (OXESA) file.
public OnFileImportOXESA ( object args ) : bool
args object
return bool

OnFinishedInit() public method

When finished initializing, show the default view.
public OnFinishedInit ( ) : bool
return bool

OnHelpApplication() protected method

Shows the help file for the application
protected OnHelpApplication ( object args ) : bool
args object
return bool

OnInsertResponse() public method

Adds a reponse to the current annotation. This really appends a response, it doesn't insert.
public OnInsertResponse ( object args ) : bool
args object
return bool

OnLoad() protected method

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

OnPasteHyperlink() public method

Paste what is in the clipboard as a URL
public OnPasteHyperlink ( object args ) : bool
args object
return bool

OnUpdateFileExportOXESA() public method

Determines whether it is valid to export an OXESA file.
public OnUpdateFileExportOXESA ( object args ) : bool
args object The toolbar/menu-item properties (we hope)
return bool

OnUpdateInsertResponse() public method

public OnUpdateInsertResponse ( object args ) : bool
args object
return bool

OnUpdatePasteHyperlink() public method

Determines whether the Paste Hyperlink command is enabled
public OnUpdatePasteHyperlink ( object args ) : bool
args object The toolbar/menu-item properties (we hope)
return bool

OnUpdateSideBarConfigure() protected method

This updates the given configure menu item. This configure menu item is on the sidebar tab's context menu or on one of the view menu item's sub-menus or one of the context menus that pops-up when the user clicks on an info. bar button.
protected OnUpdateSideBarConfigure ( object args ) : bool
args object
return bool

OnUpdateStyleComboBox() protected method

Enables/disables the styles combobox
protected OnUpdateStyleComboBox ( object args ) : bool
args object
return bool

OnUpdateWritingSystem() protected method

Makes the Writing System Selector combobox enabled or disabled
protected OnUpdateWritingSystem ( object args ) : bool
args object
return bool

OnViewCollapseAllNotes() public method

Collapses all annotations.
public OnViewCollapseAllNotes ( object args ) : bool
args object
return bool

PopulateParaStyleListOverride() public method

For the Notes view, we override the default behavior to make the para style combo only display the current paragraph style in the list.
public PopulateParaStyleListOverride ( ) : bool
return bool

PreSynchronize() public method

Called just before a window synchronizes it's views with DB changes (e.g. when an undo or redo command is issued).
public PreSynchronize ( SyncMsg sync ) : void
sync SyncMsg syncronization message
return void

ScrollToReference() public method

Scroll any note(s) with the given reference into view
public ScrollToReference ( object sender, SILUBS.SharedScrUtils.ScrReference scrRef, ITsString quotedText ) : void
sender object The sender (can be null).
scrRef SILUBS.SharedScrUtils.ScrReference The Scripture reference.
quotedText ITsString The selected text (can be null).
return void

ScrollToScrEditingLocation() public method

Scrolls to SCR editing location.
public ScrollToScrEditingLocation ( object sender, SIL.FieldWorks.TE.TeEditingHelper editingHelper ) : void
sender object The sender.
editingHelper SIL.FieldWorks.TE.TeEditingHelper The editing helper.
return void

SelectFilterButton() public method

Select the button on the filter sidebar corresponding to the given filter (will not generate the events)
public SelectFilterButton ( IFilter filter ) : void
filter IFilter The filter whose corresponding button should be selected
return void

SetPropsToFactorySettings() protected method

Set the properties of a StyleInfo to the factory default settings
protected SetPropsToFactorySettings ( SIL.FieldWorks.FwCoreDlgControls.StyleInfo styleInfo ) : void
styleInfo SIL.FieldWorks.FwCoreDlgControls.StyleInfo
return void

ShowApplyStyleDialog() protected method

Shows the Format Apply Style dialog
protected ShowApplyStyleDialog ( string paraStyleName, string charStyleName ) : void
paraStyleName string The currently-selected Paragraph style name
charStyleName string The currently-selected Character style name
return void

Synchronize() public method

Handle import sync messages.
public Synchronize ( SyncMsg sync ) : bool
sync SyncMsg
return bool