C# Class XCore.MenuAdapter

Creates the menu bar and menus for an XCore application.
Inheritance: XCore.BarAdapterBase, IUIMenuAdapter, ITestableUIAdapter
Afficher le fichier Open project: sillsdev/FieldWorks

Méthodes publiques

Méthode Description
ClickOnEverything ( ) : void
HandleAltKey ( System e, bool wasDown ) : bool
Init ( System window, IImageCollection smallImages, IImageCollection largeImages, XCore.Mediator mediator ) : Control
MenuAdapter ( ) : System

Initializes a new instance of the MenuAdapter class.

OnClick ( object something, System args ) : void
OnIdle ( ) : void

we use the idle call here to update the enabled/disabled state of the buttons

PersistLayout ( ) : void

store the location/settings of various widgets so that we can restore them next time

ShowContextMenu ( XCore.ChoiceGroup group, Point location, XCore.TemporaryColleagueParameter temporaryColleagueParam, XCore.MessageSequencer sequencer ) : void
ShowContextMenu ( XCore.ChoiceGroup @group, Point location, XCore.TemporaryColleagueParameter temporaryColleagueParam, XCore.MessageSequencer sequencer, Action adjustMenu ) : void

Méthodes protégées

Méthode Description
ClickOnAllItems ( System.Windows.Forms.CommandBarMenu menu ) : void
Dispose ( bool fDisposing ) : void
GetMenu ( string groupId ) : System.Windows.Forms.CommandBarMenu
GetMenuItem ( System.Windows.Forms.CommandBarMenu menu, string id ) : CommandBarItem
MakeMenu ( CommandBar parent, XCore.ChoiceGroup group ) : CommandBarItem

Private Methods

Méthode Description
ClickItem ( string groupId, string itemId ) : void
CreateContextMenuUIForChoiceGroup ( XCore.ChoiceGroup group ) : void
CreateMenuItem ( XCore.ChoiceBase choice ) : CommandBarItem
CreateUIForChoiceGroup ( XCore.ChoiceGroup group ) : void
CreateUIForChoiceGroupCollection ( XCore.ChoiceGroupCollection groupCollection ) : void
GetItemCountOfGroup ( string groupId ) : int
HasItem ( string groupId, string itemId ) : bool
IsItemEnabled ( string groupId, string itemId ) : bool

Method Details

ClickOnAllItems() protected méthode

protected ClickOnAllItems ( System.Windows.Forms.CommandBarMenu menu ) : void
menu System.Windows.Forms.CommandBarMenu
Résultat void

ClickOnEverything() public méthode

public ClickOnEverything ( ) : void
Résultat void

Dispose() protected méthode

protected Dispose ( bool fDisposing ) : void
fDisposing bool
Résultat void

GetMenu() protected méthode

protected GetMenu ( string groupId ) : System.Windows.Forms.CommandBarMenu
groupId string
Résultat System.Windows.Forms.CommandBarMenu

GetMenuItem() protected méthode

protected GetMenuItem ( System.Windows.Forms.CommandBarMenu menu, string id ) : CommandBarItem
menu System.Windows.Forms.CommandBarMenu
id string
Résultat System.Windows.Forms.CommandBarItem

HandleAltKey() public méthode

public HandleAltKey ( System e, bool wasDown ) : bool
e System
wasDown bool
Résultat bool

Init() public méthode

public Init ( System window, IImageCollection smallImages, IImageCollection largeImages, XCore.Mediator mediator ) : Control
window System
smallImages IImageCollection
largeImages IImageCollection
mediator XCore.Mediator
Résultat System.Windows.Forms.Control

MakeMenu() protected méthode

protected MakeMenu ( CommandBar parent, XCore.ChoiceGroup group ) : CommandBarItem
parent System.Windows.Forms.CommandBar
group XCore.ChoiceGroup
Résultat System.Windows.Forms.CommandBarItem

MenuAdapter() public méthode

Initializes a new instance of the MenuAdapter class.
public MenuAdapter ( ) : System
Résultat System

OnClick() public méthode

public OnClick ( object something, System args ) : void
something object
args System
Résultat void

OnIdle() public méthode

we use the idle call here to update the enabled/disabled state of the buttons
public OnIdle ( ) : void
Résultat void

PersistLayout() public méthode

store the location/settings of various widgets so that we can restore them next time
public PersistLayout ( ) : void
Résultat void

ShowContextMenu() public méthode

public ShowContextMenu ( XCore.ChoiceGroup group, Point location, XCore.TemporaryColleagueParameter temporaryColleagueParam, XCore.MessageSequencer sequencer ) : void
group XCore.ChoiceGroup
location Point
temporaryColleagueParam XCore.TemporaryColleagueParameter
sequencer XCore.MessageSequencer
Résultat void

ShowContextMenu() public méthode

public ShowContextMenu ( XCore.ChoiceGroup @group, Point location, XCore.TemporaryColleagueParameter temporaryColleagueParam, XCore.MessageSequencer sequencer, Action adjustMenu ) : void
@group XCore.ChoiceGroup
location Point
temporaryColleagueParam XCore.TemporaryColleagueParameter
sequencer XCore.MessageSequencer
adjustMenu Action
Résultat void