C# 클래스 SIL.FieldWorks.XWorks.DTMenuHandler

DTMenuHandler provides context menus to the data tree. When the user (or test code) selects issues commands, this class also invokes the corresponding methods on the data tree. You may create subclasses to do smart things with menus.
Although XWorks doesn't sound Flex-specific, most of the menu commands handled in this file are specific to Flex.
상속: IxCoreColleague
파일 보기 프로젝트 열기: sillsdev/FieldWorks 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
m_configuration System.Xml.XmlNode
m_dataEntryForm SIL.FieldWorks.Common.Framework.DetailControls.DataTree
m_mediator XCore.Mediator

공개 메소드들

메소드 설명
Create ( DataTree dataEntryForm, XmlNode configuration ) : DTMenuHandler

factory method which creates the correct subclass based on the XML parameters

Init ( XCore.Mediator mediator, XmlNode configurationParameters ) : void
OnConvertEntryIntoComplexForm ( object argument ) : bool

OnConvertEntryIntoVariant ( object argument ) : bool

OnDataTreeCopy ( object cmd ) : bool

This method is called when a user selects a Copy operation in on a slice.

OnDataTreeDelete ( object cmd ) : bool

This method is called when a user selects a Delete operation for a slice. The menu item is defined in DataTreeInclude.xml with message="DataTreeDelete"

OnDataTreeHelp ( object cmd ) : bool
OnDataTreeInsert ( object cmd ) : bool

This method is called when a user selects an Insert operation in on a slice.

OnDeleteMediaFile ( object cmd ) : bool
OnDisplayConvertEntryIntoComplexForm ( object commandObject, XCore.UIItemDisplayProperties &display ) : bool

Allow only one complex form type LexEntryRef object per LexEntry.

OnDisplayConvertEntryIntoVariant ( object commandObject, XCore.UIItemDisplayProperties &display ) : bool

Allow any number of variant type LexEntryRef objects per LexEntry.

OnDisplayDataTreeCopy ( object commandObject, XCore.UIItemDisplayProperties &display ) : bool

decide whether to display this tree copy Menu Item

OnDisplayDataTreeHelp ( object cmd, XCore.UIItemDisplayProperties display ) : bool
OnDisplayDataTreeInsert ( object commandObject, XCore.UIItemDisplayProperties &display ) : bool

decide whether to display this tree insert Menu Item

OnDisplayDeleteMediaFile ( object commandObject, XCore.UIItemDisplayProperties &display ) : bool

Check whether or not to display the "Delete This Media Link" command.

OnDisplayInsertMediaFile ( object commandObject, XCore.UIItemDisplayProperties &display ) : bool

Check whether or not to display the "Insert Sound or Movie" command.

OnDisplayInsertPicture ( object commandObject, XCore.UIItemDisplayProperties &display ) : bool

Determine whether we can insert a picture here.

OnInsertMediaFile ( object cmd ) : bool

Called by reflection based on menu item InsertSoundFile.

OnInsertPicture ( object cmd ) : bool

Called by reflection based on menu item InsertPicture.

OnLaunchGuiControl ( object commandObject ) : bool

Launch a control dynamically from the control pointed to by the 'guicontrol' id in the command object.

보호된 메소드들

메소드 설명
CanInsert ( Command command, Slice currentSlice, int &index ) : bool

Check to see if the insertion command makes sense for the current slice and its ContainingDataTree.

CanInsertFieldIntoObj ( SIL.FieldWorks.FDO.FdoCache fdoCache, string fieldName, ICmObject parentObj, int &index ) : bool

Check if the field can be inserted into the given object.

DTMenuHandler ( ) : System
ExtractInsertCommandInfo ( Command command, string &fieldName, string &className ) : void

Get the class name and field for the given insertion command.

MakeSliceContextMenu ( Slice slice, bool fHotLinkOnly ) : ContextMenu

비공개 메소드들

메소드 설명
AddNewLexEntryRef ( object argument, int flidTypes ) : bool
CanInsertPictureOrMediaFile ( object cmd, int &flid ) : bool
ComponentShowsComplexForm ( ICmObject component, ILexEntry cplxForm, ILexEntryRef &cfRef ) : bool

Does this component show this complex form in the dictionary? The component can be a ILexEntry or a ILexSense. The reference to the complex form from the component is outted.

DeleteObject ( Command command ) : bool
DisplayConvertLexEntry ( object commandObject ) : bool
ExtractInsertCommandParameters ( Command command ) : XmlNode
GetFlidIfPossible ( int clid, string fieldName, IFwMetaDataCacheManaged mdc ) : int

This seems a bit clumsy, but the metadata cache now throws an exception if the class id/field name pair isn't valid for GetFieldId2(). So we check first in cases where we want a zero if not found.

GetMessageTargets ( ) : IxCoreColleague[]
GetSelectedComplexFormHvo ( Slice complexFormsSlice ) : int

Intended to get a selected complex form, but it can probably get other selections from entries or senses.

GetSelectedComponentHvo ( ) : int
GetSelectionHvoFromControls ( Slice slice ) : int

Gets the selection HVO from a slice control.

InsertMediaFile ( object cmd, string filter, string keyCaption, string defaultCaption ) : bool
OnAddComponentToPrimary ( object argument ) : bool
OnDataTreeAddReference ( object cmd ) : bool
OnDataTreeDeleteReference ( object cmd ) : bool
OnDataTreeEdit ( object cmd ) : bool
OnDataTreeMerge ( object cmd ) : bool
OnDataTreeSplit ( object cmd ) : bool
OnDisplayAddComponentToPrimary ( object commandObject, XCore.UIItemDisplayProperties &display ) : bool
OnDisplayDataTreeDelete ( object commandObject, XCore.UIItemDisplayProperties &display ) : bool
OnDisplayDataTreeDeleteReference ( object commandObject, XCore.UIItemDisplayProperties &display ) : bool
OnDisplayDataTreeEdit ( object commandObject, XCore.UIItemDisplayProperties &display ) : bool
OnDisplayDataTreeMerge ( object commandObject, XCore.UIItemDisplayProperties &display ) : bool
OnDisplayDataTreeSplit ( object commandObject, XCore.UIItemDisplayProperties &display ) : bool
OnDisplayMoveDownObjectInSequence ( object commandObject, XCore.UIItemDisplayProperties &display ) : bool
OnDisplayMoveUpObjectInSequence ( object commandObject, XCore.UIItemDisplayProperties &display ) : bool
OnDisplayVisibleComplexForm ( object commandObject, XCore.UIItemDisplayProperties &display ) : bool
OnMoveDownObjectInSequence ( object cmd ) : bool
OnMoveUpObjectInSequence ( object cmd ) : bool
OnVisibleComplexForm ( object argument ) : bool
ShowContextMenu2Id ( XmlNode caller, bool fHotLinkOnly ) : string
ShowSliceContextMenu ( object sender, SliceMenuRequestArgs e ) : ContextMenu
SliceConfiguredForField ( XmlNode node, string field ) : bool

메소드 상세

CanInsert() 보호된 메소드

Check to see if the insertion command makes sense for the current slice and its ContainingDataTree.
protected CanInsert ( Command command, Slice currentSlice, int &index ) : bool
command Command insertion command
currentSlice Slice current selected slice on the ContainingDataTree
index int 0-based position for insert, if known, or -1
리턴 bool

CanInsertFieldIntoObj() 보호된 메소드

Check if the field can be inserted into the given object.
protected CanInsertFieldIntoObj ( SIL.FieldWorks.FDO.FdoCache fdoCache, string fieldName, ICmObject parentObj, int &index ) : bool
fdoCache SIL.FieldWorks.FDO.FdoCache
fieldName string name of the field to be inserted
parentObj ICmObject The object where the item would be inserted, if possible.
index int index (0-based) where it will be inserted. -1 if atomic or returns false
리턴 bool

Create() 공개 정적인 메소드

factory method which creates the correct subclass based on the XML parameters
public static Create ( DataTree dataEntryForm, XmlNode configuration ) : DTMenuHandler
dataEntryForm SIL.FieldWorks.Common.Framework.DetailControls.DataTree
configuration System.Xml.XmlNode
리턴 DTMenuHandler

DTMenuHandler() 보호된 메소드

protected DTMenuHandler ( ) : System
리턴 System

ExtractInsertCommandInfo() 정적인 보호된 메소드

Get the class name and field for the given insertion command.
static protected ExtractInsertCommandInfo ( Command command, string &fieldName, string &className ) : void
command Command insertion command
fieldName string
className string
리턴 void

Init() 공개 메소드

public Init ( XCore.Mediator mediator, XmlNode configurationParameters ) : void
mediator XCore.Mediator
configurationParameters System.Xml.XmlNode
리턴 void

MakeSliceContextMenu() 보호된 메소드

protected MakeSliceContextMenu ( Slice slice, bool fHotLinkOnly ) : ContextMenu
slice Slice
fHotLinkOnly bool
리턴 System.Windows.Forms.ContextMenu

OnConvertEntryIntoComplexForm() 공개 메소드

public OnConvertEntryIntoComplexForm ( object argument ) : bool
argument object
리턴 bool

OnConvertEntryIntoVariant() 공개 메소드

public OnConvertEntryIntoVariant ( object argument ) : bool
argument object
리턴 bool

OnDataTreeCopy() 공개 메소드

This method is called when a user selects a Copy operation in on a slice.
public OnDataTreeCopy ( object cmd ) : bool
cmd object
리턴 bool

OnDataTreeDelete() 공개 메소드

This method is called when a user selects a Delete operation for a slice. The menu item is defined in DataTreeInclude.xml with message="DataTreeDelete"
public OnDataTreeDelete ( object cmd ) : bool
cmd object
리턴 bool

OnDataTreeHelp() 공개 메소드

public OnDataTreeHelp ( object cmd ) : bool
cmd object
리턴 bool

OnDataTreeInsert() 공개 메소드

This method is called when a user selects an Insert operation in on a slice.
public OnDataTreeInsert ( object cmd ) : bool
cmd object
리턴 bool

OnDeleteMediaFile() 공개 메소드

public OnDeleteMediaFile ( object cmd ) : bool
cmd object
리턴 bool

OnDisplayConvertEntryIntoComplexForm() 공개 메소드

Allow only one complex form type LexEntryRef object per LexEntry.
public OnDisplayConvertEntryIntoComplexForm ( object commandObject, XCore.UIItemDisplayProperties &display ) : bool
commandObject object
display XCore.UIItemDisplayProperties
리턴 bool

OnDisplayConvertEntryIntoVariant() 공개 메소드

Allow any number of variant type LexEntryRef objects per LexEntry.
public OnDisplayConvertEntryIntoVariant ( object commandObject, XCore.UIItemDisplayProperties &display ) : bool
commandObject object
display XCore.UIItemDisplayProperties
리턴 bool

OnDisplayDataTreeCopy() 공개 메소드

decide whether to display this tree copy Menu Item
public OnDisplayDataTreeCopy ( object commandObject, XCore.UIItemDisplayProperties &display ) : bool
commandObject object
display XCore.UIItemDisplayProperties
리턴 bool

OnDisplayDataTreeHelp() 공개 메소드

public OnDisplayDataTreeHelp ( object cmd, XCore.UIItemDisplayProperties display ) : bool
cmd object
display XCore.UIItemDisplayProperties
리턴 bool

OnDisplayDataTreeInsert() 공개 메소드

decide whether to display this tree insert Menu Item
public OnDisplayDataTreeInsert ( object commandObject, XCore.UIItemDisplayProperties &display ) : bool
commandObject object
display XCore.UIItemDisplayProperties
리턴 bool

OnDisplayDeleteMediaFile() 공개 메소드

Check whether or not to display the "Delete This Media Link" command.
public OnDisplayDeleteMediaFile ( object commandObject, XCore.UIItemDisplayProperties &display ) : bool
commandObject object
display XCore.UIItemDisplayProperties
리턴 bool

OnDisplayInsertMediaFile() 공개 메소드

Check whether or not to display the "Insert Sound or Movie" command.
public OnDisplayInsertMediaFile ( object commandObject, XCore.UIItemDisplayProperties &display ) : bool
commandObject object
display XCore.UIItemDisplayProperties
리턴 bool

OnDisplayInsertPicture() 공개 메소드

Determine whether we can insert a picture here.
public OnDisplayInsertPicture ( object commandObject, XCore.UIItemDisplayProperties &display ) : bool
commandObject object
display XCore.UIItemDisplayProperties
리턴 bool

OnInsertMediaFile() 공개 메소드

Called by reflection based on menu item InsertSoundFile.
public OnInsertMediaFile ( object cmd ) : bool
cmd object
리턴 bool

OnInsertPicture() 공개 메소드

Called by reflection based on menu item InsertPicture.
public OnInsertPicture ( object cmd ) : bool
cmd object
리턴 bool

OnLaunchGuiControl() 공개 메소드

Launch a control dynamically from the control pointed to by the 'guicontrol' id in the command object.
public OnLaunchGuiControl ( object commandObject ) : bool
commandObject object
리턴 bool

프로퍼티 상세

m_configuration 보호되어 있는 프로퍼티

COnfiguration information.
protected XmlNode,System.Xml m_configuration
리턴 System.Xml.XmlNode

m_dataEntryForm 보호되어 있는 프로퍼티

Tree form.
protected DataTree,SIL.FieldWorks.Common.Framework.DetailControls m_dataEntryForm
리턴 SIL.FieldWorks.Common.Framework.DetailControls.DataTree

m_mediator 보호되어 있는 프로퍼티

Mediator that passes off messages.
protected Mediator,XCore m_mediator
리턴 XCore.Mediator