C# Класс SIL.FieldWorks.Common.UIAdapters.TMAdapter

The main class from which DotNetBar MenuAdapter and ToolBarAdapter classes are derived.
Наследование: ITMAdapter
Показать файл Открыть проект

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

Свойство Тип Описание
m_allowPopupToBeCanceled bool
m_allowUndocking bool
m_allowuUpdates bool
m_appsRegKeyPath Microsoft.Win32.RegistryKey
m_appsRegKeyPath string
m_barLocations Point>.Dictionary
m_barReadFromSettingFile bool
m_bars ToolStrip>.Dictionary
m_commandInfo CommandInfo>.Dictionary
m_contextMenus ContextMenuStrip>.Dictionary
m_customizeMenuShowing bool
m_displayedBars bool>.Dictionary
m_hiddenSeparators ToolStripSeparator>.Dictionary
m_htBarLocations System.Collections.Hashtable
m_htCommandInfo System.Collections.Hashtable
m_htControls System.Collections.Hashtable
m_htFormTypeCommands System.Collections.Hashtable
m_htImages System.Collections.Hashtable
m_htItemTags System.Collections.Hashtable
m_htSettingsFileLoaded System.Collections.Hashtable
m_htSystemStringIds System.Collections.Hashtable
m_htWndListIndices System.Collections.Hashtable
m_images Image>.Dictionary
m_itemUpdateTime System.DateTime
m_menuBar System.Windows.Forms.MenuStrip
m_menuCurrentlyPoppedUp DevComponents.DotNetBar.ButtonItem
m_menuCurrentlyPoppedUp System.Windows.Forms.ContextMenuStrip
m_menusWithShortcuts System.Collections.ArrayList
m_menusWithShortcuts System.Windows.Forms.ToolStripItemCollection
m_moreWindowItem DevComponents.DotNetBar.ButtonItem
m_moreWindowItem System.Windows.Forms.ToolStripMenuItem
m_msgMediator XCore.Mediator
m_parentForm System.Windows.Forms.Form
m_readingContextMenuDef bool
m_rmlocalMngmntStrings System.Resources.ResourceManager
m_rmlocalStrings System.Collections.ArrayList
m_rmlocalStrings List
m_separators ToolStripSeparator>.Dictionary
m_settingFiles string[]
m_settingsFilePrefix string
m_tmItems ToolStripItem>.Dictionary
m_toolBarMenuMap ToolStrip>.Dictionary
m_toolbarCustomizeItem DevComponents.DotNetBar.ButtonItem
m_toolbarListItem DevComponents.DotNetBar.ButtonItem
m_toolbarListItem System.Windows.Forms.ToolStripMenuItem
m_tsContainer System.Windows.Forms.ToolStripContainer
m_tsPanel System.Windows.Forms.ToolStripPanel
m_windowListItem DevComponents.DotNetBar.ButtonItem
m_windowListItem System.Windows.Forms.ToolStripMenuItem
m_windowListItemClicked System.Windows.Forms.ToolStripMenuItem
m_xmlReader System.Xml.XmlTextReader

Private Properties

Свойство Тип Описание
AddMenuItem void
AddMenuItem void
AddToCustomizationCollection void
AllowAppsToIntializeComboItems void
BarFromSettingFile Bar
BuildToolbarList void
BuildWindowList void
CancelMenuOpen bool
CancelMenuPopup bool
CheckAssemblyVersion void
CheckDefinitionDates void
ClearWindowListFromWindowMenu void
CompareBarProps int
CreateDropDownToolBarItem System.Windows.Forms.ToolStripItem
CreateNormalToolBarItem System.Windows.Forms.ToolStripItem
DeleteSettingsFiles void
DisposeCollection void
FindSubMenu DevComponents.DotNetBar.ButtonItem
FormatDateTime string
GetCommandInfo CommandInfo
GetCommandInfo CommandInfo
GetCustomControlHost System.Windows.Forms.ToolStripControlHost
GetFileDateTime System.DateTime
GetImageListFromResourceAssembly System.Windows.Forms.ImageList
GetItemProps SIL.FieldWorks.Common.UIAdapters.TMItemProperties
GetItemProps SIL.FieldWorks.Common.UIAdapters.TMItemProperties
GetSettingFilesPrefix void
GetToolBarItemDisplayStyle ToolStripItemDisplayStyle
HandleControlContainerLoadRequests void
HandleCustomizeMenuPopup void
HandleGettingLocalizedString void
HandleItemClicks void
HandleItemUpdates void
HandleItemsPopup void
HandleMenuClosed void
HandleMenuOpened void
HandleMenuOpening void
HandleMenuPopupClose void
HandleMenuPopups void
HandleToolBarItemDropDownOpened void
HandleToolBarItemUpdates void
HandleToolBarListMenuClosing void
HandleUserCustomize void
HandleWindowMenuClosing void
HideInitialSeparators void
InitDNBManager void
InitItem void
InitItem void
InitToolStripContainer void
InitialBarPropsComparer int
InitializeCustomizeItemPopupHandlers void
InsertMenuItem void
InsertMenuItem void
LoadBarSettings bool
LoadCustomBarsFromSettings void
LoadDefaultToolbarLayout void
MakeNewBar Bar
MakeNewBar System.Windows.Forms.ToolStrip
ParseDateTime System.DateTime
ParseShortcutKeyString Keys
PositionToolbars void
ReadContextMenus void
ReadImagesResources void
ReadMenuDefinitions void
ReadMenuItems void
ReadResourcesAndCommands void
ReadSingleToolbarDef void
ReadSystemStringIds void
ReadToolbarDefinitions void
ReadToolbarItems void
RemoveContextMenuItems void
SetBarProperties void
SetBarProperties void
SetButtonItemSpecificProperties void
SetComboItemSpecificProperties void
SetComboItemSpecificProperties void
SetItemProps void
SetItemProps void
SetupDocSite DevComponents.DotNetBar.DockSite

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

Метод Описание
AddContextMenuItem ( SIL.FieldWorks.Common.UIAdapters.TMItemProperties itemProps, string contextMenuName, string insertBeforeItem ) : void

Adds a new menu item to a context menu specified by contextMenuName and inserts it before the item specified by insertBeforeItem. If insertBeforeItem is null, then the new menu item is added to the end of parentItemName's menu collection.

AddContextMenuItem ( SIL.FieldWorks.Common.UIAdapters.TMItemProperties itemProps, string contextMenuName, string parentMenuName, string insertBeforeItem ) : void

Adds a new menu item to a context menu specified by contextMenuName and inserts it before the item specified by insertBeforeItem. If insertBeforeItem is null, then the new menu item is added to the end of parentItemName's menu collection. This overload allows new menu items to be added as submenus to menus at the top level of the context menu. The parentMenuName can be the name of a menu item at any level within the hierarchy of the menus on the context menu.

AddMenuItem ( SIL.FieldWorks.Common.UIAdapters.TMItemProperties itemProps, string parentItemName, string insertBeforeItem ) : void

Adds a new submenu item to the menu specified by parentItemName and inserts it before the item specified by insertBeforeItem. If insertBeforeItem is null, then the new submenu item is added to the end of parentItemName's menu collection.

Dispose ( ) : void

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

GetBarItemControl ( string name ) : Control

Gets the control contained within a control container toolbar item.

GetBarProperties ( string name ) : SIL.FieldWorks.Common.UIAdapters.TMBarProperties

Gets the properties of a toolbar.

GetItemProperties ( string name ) : SIL.FieldWorks.Common.UIAdapters.TMItemProperties

Loads a TMItemProperties object with several properties from a toolbar item.

HideBarItemsPopup ( string name ) : void

Allows an application to force the hiding of a toolbar item's popup control.

HideToolBar ( string name ) : void

Allows an application to hide a toolbar.

Initialize ( Form parentForm, Control contentControl, XCore.Mediator msgMediator, string definitions ) : void

Initialize ( Form parentForm, Control contentControl, XCore.Mediator msgMediator, string appsRegKeyPath, string definitions ) : void

Initialize ( Form parentForm, XCore.Mediator msgMediator, string definitions ) : void

Initialize ( Form parentForm, XCore.Mediator msgMediator, string appsRegKeyPath, string definitions ) : void

IsShortcutKey ( Keys key, bool &isItemEnabled ) : bool

Determines whether the specified Keys is a shortcut for a toolbar or menu item.

PopupMenu ( string name, int x, int y ) : void

Pops-up a menu so it shows like a context menu. If the item doesn't have any sub items, then this command is ignored.

PopupMenu ( string name, int x, int y, List subItemsToRemoveOnClose ) : void

Pops-up a menu so it shows like a context menu. If the item doesn't have any sub items, then this command is ignored.

RemoveMenuItem ( string parentItemName, string name ) : void

Removes the specified item from the specified parent menu.

Removing submenu items on a menu, while leaving the parent menu intact has not been tested (and is not currently needed).

RemoveMenuSubItems ( string parentItemName ) : void

Removes all the subitems of the specified menu.

SaveBarSettings ( ) : void

Causes the adapter to save toolbar settings (e.g. user placement of toolbars).

SetBarProperties ( SIL.FieldWorks.Common.UIAdapters.TMBarProperties barProps ) : void

Sets the properties of the main menu bar. object.

SetBarProperties ( string name, SIL.FieldWorks.Common.UIAdapters.TMBarProperties barProps ) : void

Sets properties for a menu bar or toolbar.

SetContextMenuForControl ( Control ctrl, string name ) : void

Sets the context menu for a specified control.

SetItemProperties ( string name, SIL.FieldWorks.Common.UIAdapters.TMItemProperties itemProps ) : void

Sets some of a toolbar item's properties. Note: if the Update property in the TMItemProperties object hasn't been set to true, no updating will occur.

SetParentForm ( Form newForm ) : Form

Sets the adapter's parent form. This will not cause docking sites to be added to the form and DotNetBar manager. This solves TE-6793

ShowCustomizeDialog ( ) : void

Causes the adapter to show it's dialog for customizing toolbars.

ShowToolBar ( string name ) : void

Allows an application to show a toolbar.

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

Метод Описание
CallItemUpdateHandler ( DevComponents.DotNetBar.BaseItem item ) : void

This is a helper method for the HandleMenuPopups and HandleItemUpdates methods. It accepts a single DNB item and calls it's update handler, if there is one.

CallItemUpdateHandler ( ToolStripItem item ) : void

This is a helper method for the HandleMenuOpening and HandleItemUpdates methods. It calls the update handler for the specified ToolStripItem item.

CallUpdateHandlersForCollection ( ToolStripItemCollection collection ) : void

Calls the update handlers for collection.

Dispose ( bool fDisposing ) : void
GetAssembly ( string assemblyName ) : Assembly

Loads a named assembly.

GetAttributeValue ( XmlNode node, string attribute ) : string

Gets an attribute's value from the specified node.

GetBoolFromAttribute ( XmlNode node, string attribute ) : bool

GetBoolFromAttribute ( XmlNode node, string attribute, bool defaultValue ) : bool

GetIntFromAttribute ( XmlNode node, string attribute, int defaultValue ) : int

GetItemsCommandMessage ( DevComponents.DotNetBar.BaseItem item ) : string

Gets an item's command handling message from the appropriate hash table entry.

GetItemsCommandMessage ( ToolStripItem item ) : string

Gets an item's command handling message from the appropriate hash table entry.

GetResourceMngr ( XmlNode node ) : ResourceManager

GetStringFromResource ( string kstid ) : string

GetToolbarItem ( XmlNode node, string name ) : DevComponents.DotNetBar.BaseItem

Gets a toolbar item with the specified name. If the item exists, then return the one found in the DNB manager. Otherwise, create a new one.

GetToolbarItem ( XmlNode node, string name ) : ToolStripItem

Gets a toolbar item with the specified name. If the item exists, return it. Otherwise, create a new one.

GetWindowIndex ( DevComponents.DotNetBar.ButtonItem item, SIL.FieldWorks.Common.UIAdapters.TMItemProperties itemProps ) : void

GetWindowIndex ( ToolStripItem item, SIL.FieldWorks.Common.UIAdapters.TMItemProperties itemProps ) : void

HandleBuildingWindowList ( object sender, CancelEventArgs e ) : void

Handles the building window list.

HandleMessageMediatorDisposed ( object sender, EventArgs e ) : void

Handles the Disposed event of the m_msgMediator control.

HandleToolBarItemDropDownClosed ( object sender, EventArgs e ) : void

Send a message to anyone who cares that the drop down is closing.

ReadCommands ( XmlNode node ) : void

Reads the commands section of a definition file.

ReadOverJunk ( XmlNode node ) : XmlNode

Skips over white space and any other junk that's not considered an element or end element.

ReadSingleItem ( XmlNode node, bool isMenuItem ) : DevComponents.DotNetBar.BaseItem

Read the information for a single menu item from the specified node.

ReadSingleItem ( XmlNode node, bool isMenuItem ) : ToolStripItem

Read the information for a single menu item from the specified node.

m_parentForm_Shown ( object sender, EventArgs e ) : void

Locate the toolbars when their parent form is shown.

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

Метод Описание
AddMenuItem ( DevComponents.DotNetBar.ButtonItem item, string refItemName ) : void

Finds the item specified by refItemName and Adds the specified item to the ref. item's collection of sub items.

AddMenuItem ( ToolStripMenuItem item, string refItemName ) : void

Finds the item specified by refItemName and Adds the specified item to the ref. item's collection of sub items.

AddToCustomizationCollection ( XmlNode node, DevComponents.DotNetBar.BaseItem item, bool isMenuItem ) : void

At this point, the item passed to this method has not been added to any toolbar or menu. Before doing so, we need to add it to the DNB Manager because that internally (to the DNB manager) assigns the item to its category and makes it available for customization purposes through DNB's customize dialog. But, only add an item if there is a category for the item and if the item is not a ControlContainerItem. We don't allow ControlContainerItems because it appears DotNetBar's customize dialog doesn't allow dragging new copies of ControlContainerItems to user-defined toolbars. And if they don't allow that, I don't want them in the list appearing like they should be able to be dragged to new toolbars. This means a DotNetBar manager may only have one (visible - See comments in HandleControlContainerLoadRequests) instance of application-defined toolbar items.

AllowAppsToIntializeComboItems ( ) : void

This method gets the combobox items and fires the InitializeComboItem event in case the application wants to initialize the combo box.

BarFromSettingFile ( string barName ) : Bar

If the toolbar has a settings file (i.e. a file that was saved when the application was last closed) then restore the toolbar from it.

BuildToolbarList ( ) : void

Initialize list of available toolbars.

BuildWindowList ( ) : void

CancelMenuOpen ( ) : bool

Determines whether or not a menu should be allowed to be popped-up (See TE-6553).

CancelMenuPopup ( ) : bool

Determines whether or not a menu should be allowed to be popped-up (See TE-6553).

CheckAssemblyVersion ( ) : void

Checks if the current adapter assembly version has changed since the last time the application was run.

CheckDefinitionDates ( string definitions ) : void

This method checks the date and time of the TM definition files to see if they are newer than they were the last time the application was run. If one or more of them are newer, then all the toolbar settings files written by DotNetBar are deleted so the toolbars will be completely reconstructed from the TM definition files.

ClearWindowListFromWindowMenu ( ToolStripMenuItem windowMenu ) : void

Clear out the window list after it's parent closes.

CompareBarProps ( SIL.FieldWorks.Common.UIAdapters.TMBarProperties x, SIL.FieldWorks.Common.UIAdapters.TMBarProperties y ) : int

CreateDropDownToolBarItem ( XmlNode node, int type ) : ToolStripItem

Creates one of three different types of drop-down toolbar items.

CreateNormalToolBarItem ( XmlNode node ) : ToolStripItem

Creates a normal (in the sense that it's not a combo box, custom control, drop-down item, etc.) toolbar item.

DeleteSettingsFiles ( ) : void

Deletes the toolbar settings files created by DotNetBar in the SaveSettings method.

DisposeCollection ( IEnumerable enumerable ) : void
FindSubMenu ( DevComponents.DotNetBar.ButtonItem parentMenu, string menuToFind ) : DevComponents.DotNetBar.ButtonItem

Search recursively through the a menu and any submenus for the specified menu name.

FormatDateTime ( System.DateTime dt ) : string

Format a date/time in our custom format

GetCommandInfo ( DevComponents.DotNetBar.BaseItem item ) : CommandInfo

GetCommandInfo ( ToolStripItem item ) : CommandInfo

GetCustomControlHost ( string name, string commandId ) : ToolStripControlHost

Gets a custom control and return it in a returned ToolStripControlHost.

GetFileDateTime ( string fileName ) : System.DateTime

Get the date/time for a file in UTC. We do this to get the date/time in a consistent format without milliseconds.

GetImageListFromResourceAssembly ( string assemblyName, string className, string field ) : ImageList

GetItemProps ( DevComponents.DotNetBar.BaseItem item ) : SIL.FieldWorks.Common.UIAdapters.TMItemProperties

Loads a TMItemProperties object with several properties from a toolbar item.

GetItemProps ( ToolStripItem item ) : SIL.FieldWorks.Common.UIAdapters.TMItemProperties

Loads a TMItemProperties object with several properties from a toolbar item.

GetSettingFilesPrefix ( string definitions ) : void

Examines the XML definition files to find which one (if any) have the prefix used for storing toolbar settings.

GetToolBarItemDisplayStyle ( XmlNode node ) : ToolStripItemDisplayStyle

Returns a display style read from a toolbar item node.

HandleControlContainerLoadRequests ( object sender, EventArgs e ) : void

This method gets called by the DotNetBar manager when it needs a control to load into a ControlContainerItem. The adapter then, fires the LoadControlContainerItem event to allow applications to give the adapter an application-defined control.

HandleCustomizeMenuPopup ( object sender, EventArgs e ) : void

This method gets called whenever a customize menu (i.e. the menu that pops-up when clicking or hovering over the "Add or Remove Buttons" item) opens or closes. When the menu opens, a flag is set so item updates are not performed (in the HandleItemUpdates method). I found that when the menu popped-up and HandleItemUpdates iterated through the items, sometimes the iterating through the items seemed to grab some of the items on the customize menu. Iterating through the items the way I did in HandleItemUpdates should never have returned items that show up on the customize menu, but it happened and I think there's a DNB bug. This works around it.

HandleGettingLocalizedString ( object sender, DevComponents.DotNetBar.LocalizeEventArgs e ) : void

This gets called when the DotNetBar requests a localized version of a string for displaying in places like the dialog that lets the user configure toolbars (e.g. show/hide toolbars, add new ones, etc.).

HandleItemClicks ( object sender, EventArgs e ) : void

This method handles clicks on toolbar/menu items.

HandleItemUpdates ( object sender, EventArgs e ) : void

While the system is idle (or about to become so), this method will go through all the toolbar items and make sure they are enabled properly for the current view. Then it will go through the menu items with shortcuts to make sure they're enabled properly. (This is only done every 0.75 seconds.)

HandleItemsPopup ( object sender, EventArgs e ) : void

Handles clicks on the drop-down portion of a popup button (i.e. a click on the arrow portion of a two-segmented toolbar button).

HandleMenuClosed ( object sender, System.Windows.Forms.ToolStripDropDownClosedEventArgs e ) : void

Handles the restoring visibility of ToolStripSeparators hidden in HideInitialSeparators.

HandleMenuOpened ( object sender, EventArgs e ) : void

When a menu item is popped-up, then cycle through the subitems and call update handlers.

HandleMenuOpening ( object sender, CancelEventArgs e ) : void

Determines whether or not a menu should be allowed to be popped-up (See TE-6553).

HandleMenuPopupClose ( object sender, EventArgs e ) : void

When a popup menu is closed, begin showing tooltips again. Also, if there were items to remove from the menu, remove them from the menu.

HandleMenuPopups ( object sender, DevComponents.DotNetBar.PopupOpenEventArgs e ) : void

When a menu item is popped-up, then cycle through the subitems and call update handlers.

HandleToolBarItemDropDownOpened ( object sender, EventArgs e ) : void

Handles clicks on the drop-down portion of a popup button (i.e. a click on the arrow portion of a two-segmented toolbar button).

HandleToolBarItemUpdates ( object sender, EventArgs e ) : void

While the system is idle (or about to become so), this method will go through all the toolbar items and make sure they are enabled properly for the current view. Then it will go through the menu items with shortcuts to make sure they're enabled properly. (This is only done every 0.75 seconds.)

HandleToolBarListMenuClosing ( object sender, EventArgs e ) : void

Trap this event so we can clear the toolbar list item when it closes.

HandleUserCustomize ( object sender, EventArgs e ) : void

This catches all item customize events and only cares about the ones where the user is adding custom toolbars. By default, when adding custom toolbars, the DotNetBar manager makes them floating and puts them in the upper left corner of the screen. I thought that was not very user friendly so I trap the addition of new toolbars and dock them to the top of the application window.

HandleWindowMenuClosing ( object sender, EventArgs e ) : void

Clear out the window list after it's parent closes.

HideInitialSeparators ( ToolStripDropDown dropDown ) : void

Goes through the collection of ToolStripItems in the specified drop-down and hides the first visible item if it's a ToolStripSeparator. If the second (or beyond) item is also visible and a ToolStripSeparator, then it/they won't be hidden. We have our limits. If that becomes a problem, then ENHANCE: to cover that problem.

InitDNBManager ( Form parentForm ) : void

Creates a DotNetBar manager.

InitItem ( XmlNode node, DevComponents.DotNetBar.BaseItem item, string name, bool isMenuItem ) : void

This method initializes a toolbar or menu item's properties.

InitItem ( XmlNode node, ToolStripItem item, string name, bool isMenuItem ) : void

This method initializes a toolbar or menu item's properties.

InitToolStripContainer ( Form parentForm, Control contentControl ) : void

Creates a ToolStripContainer control.

InitialBarPropsComparer ( InitialBarProps x, InitialBarProps y ) : int

Compares the locations and visibility of two toolstrip objects.

InitializeCustomizeItemPopupHandlers ( ) : void

This method gets the customize items for all the toolbars and subscribes to the ExpandChange event so we know when customize menus open and close.

InsertMenuItem ( DevComponents.DotNetBar.ButtonItem item, string refItemName, bool cancelBeginGroup ) : void

Finds the item specified by refItemName and inserts the specified item before it in the collection to which refItemName belongs.

InsertMenuItem ( ToolStripItem item, string refItemName ) : void

Finds the item specified by refItemName and inserts the specified item before it in the collection to which refItemName belongs.

LoadBarSettings ( ) : bool

Load tool bar settings from the registry, if available.

LoadCustomBarsFromSettings ( ) : void

LoadDefaultToolbarLayout ( ) : void

Positions the toolbars to the positions specified in the xml deffinition file. This method only gets called when tool bar locations and visibilities cannot be found in the registry.

MakeNewBar ( XmlNode node, string barName ) : Bar

Make a new toolbar and initialize it based on what's in the XML definition.

MakeNewBar ( XmlNode node, string barName ) : ToolStrip

Make a new toolbar and initialize it based on what's in the XML definition.

ParseDateTime ( string dateString ) : System.DateTime

Parse our custom date/time string. If the string is not valid, then return an empty date/time

ParseShortcutKeyString ( string shortcut ) : Keys

Parses the specified shortcut key string.

PositionToolbars ( ) : void

Positions the toolbars to the positions specified in the xml deffinition file.

ReadContextMenus ( XmlNode node ) : void

Builds all context menus, adding them to the DNB manager's list of context menus.

ReadImagesResources ( XmlNode node ) : void

Get the images from the resource specified in the XML definition.

ReadMenuDefinitions ( string definitions ) : void

ReadMenuItems ( XmlNode node, object parentItem, bool readingContextMenus ) : void

Recursively builds menus.

ReadResourcesAndCommands ( string definitions ) : void

ReadSingleToolbarDef ( XmlNode node ) : void

ReadSystemStringIds ( ) : void

Reads the strings to localize what DotNetBar uses internally (e.g. on their customize toolbar dialog).

ReadToolbarDefinitions ( string definitions ) : void

Iterates through the toolbar definitions to read the XML.

ReadToolbarItems ( XmlNode node, object parentItem ) : void

RemoveContextMenuItems ( ContextMenuStrip cmnu ) : void

Remove a list of context menu sub items found in the tag property of the specified context menu.

SetBarProperties ( Bar bar, SIL.FieldWorks.Common.UIAdapters.TMBarProperties barProps ) : void

Sets properties for a menu bar or toolbar.

SetBarProperties ( ToolStrip bar, SIL.FieldWorks.Common.UIAdapters.TMBarProperties barProps ) : void

Sets properties for a menu bar or toolbar.

SetButtonItemSpecificProperties ( DevComponents.DotNetBar.ButtonItem item, SIL.FieldWorks.Common.UIAdapters.TMItemProperties itemProps ) : void

Sets the properties for a ButtonItem type toolbar button.

SetComboItemSpecificProperties ( DevComponents.DotNetBar.ComboBoxItem item, SIL.FieldWorks.Common.UIAdapters.TMItemProperties itemProps ) : void

Sets the items in the Items collection for a ComboBoxItem type toolbar item.

SetComboItemSpecificProperties ( ToolStripComboBox cbo, SIL.FieldWorks.Common.UIAdapters.TMItemProperties itemProps ) : void

Sets the items in the Items collection for a ComboBoxItem type toolbar item.

SetItemProps ( DevComponents.DotNetBar.BaseItem item, SIL.FieldWorks.Common.UIAdapters.TMItemProperties itemProps ) : void

Sets some of a menu/toolbar item's properties. Note: if the Update property in the TMItemProperties object hasn't been set to true, no updating will occur. Items that can be set are: Text, Category, Tooltip, Enabled, Visible, BeginGroup, Checked, Image, List, Tag, and CommandId;

SetItemProps ( ToolStripItem item, SIL.FieldWorks.Common.UIAdapters.TMItemProperties itemProps ) : void

Sets some of a menu/toolbar item's properties. Note: if the Update property in the TMItemProperties object hasn't been set to true, no updating will occur. Items that can be set are: Text, Category, Tooltip, Enabled, Visible, BeginGroup, Checked, Image, List, Tag, and CommandId;

SetupDocSite ( DockStyle dockStyle ) : DevComponents.DotNetBar.DockSite

Creates a DotNetBar docking site for a DotNetBar toolbar.

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

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

Adds a new menu item to a context menu specified by contextMenuName and inserts it before the item specified by insertBeforeItem. If insertBeforeItem is null, then the new menu item is added to the end of parentItemName's menu collection.
public AddContextMenuItem ( SIL.FieldWorks.Common.UIAdapters.TMItemProperties itemProps, string contextMenuName, string insertBeforeItem ) : void
itemProps SIL.FieldWorks.Common.UIAdapters.TMItemProperties Properties of the new menu item.
contextMenuName string Name of the context menu to which the item is added. ///
insertBeforeItem string Name of the context menu item before which the new /// menu item will be added.
Результат void

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

Adds a new menu item to a context menu specified by contextMenuName and inserts it before the item specified by insertBeforeItem. If insertBeforeItem is null, then the new menu item is added to the end of parentItemName's menu collection. This overload allows new menu items to be added as submenus to menus at the top level of the context menu. The parentMenuName can be the name of a menu item at any level within the hierarchy of the menus on the context menu.
public AddContextMenuItem ( SIL.FieldWorks.Common.UIAdapters.TMItemProperties itemProps, string contextMenuName, string parentMenuName, string insertBeforeItem ) : void
itemProps SIL.FieldWorks.Common.UIAdapters.TMItemProperties Properties of the new menu item.
contextMenuName string Name of the context menu to which the item is added. ///
parentMenuName string Name of the menu item in the context menu under which /// the new item is added.
insertBeforeItem string Name of the context menu item before which the new /// menu item will be added.
Результат void

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

Adds a new submenu item to the menu specified by parentItemName and inserts it before the item specified by insertBeforeItem. If insertBeforeItem is null, then the new submenu item is added to the end of parentItemName's menu collection.
public AddMenuItem ( SIL.FieldWorks.Common.UIAdapters.TMItemProperties itemProps, string parentItemName, string insertBeforeItem ) : void
itemProps SIL.FieldWorks.Common.UIAdapters.TMItemProperties Properties of the new menu item.
parentItemName string Name of the menu item that will be added to.
insertBeforeItem string Name of the submenu item before which the new /// menu item will be added.
Результат void

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

This is a helper method for the HandleMenuPopups and HandleItemUpdates methods. It accepts a single DNB item and calls it's update handler, if there is one.
protected CallItemUpdateHandler ( DevComponents.DotNetBar.BaseItem item ) : void
item DevComponents.DotNetBar.BaseItem
Результат void

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

This is a helper method for the HandleMenuOpening and HandleItemUpdates methods. It calls the update handler for the specified ToolStripItem item.
protected CallItemUpdateHandler ( ToolStripItem item ) : void
item System.Windows.Forms.ToolStripItem
Результат void

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

Calls the update handlers for collection.
protected CallUpdateHandlersForCollection ( ToolStripItemCollection collection ) : void
collection System.Windows.Forms.ToolStripItemCollection The collection.
Результат void

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

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public Dispose ( ) : void
Результат void

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

protected Dispose ( bool fDisposing ) : void
fDisposing bool
Результат void

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

Loads a named assembly.
protected GetAssembly ( string assemblyName ) : Assembly
assemblyName string
Результат System.Reflection.Assembly

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

Gets an attribute's value from the specified node.
protected GetAttributeValue ( XmlNode node, string attribute ) : string
node System.Xml.XmlNode
attribute string
Результат string

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

Gets the control contained within a control container toolbar item.
public GetBarItemControl ( string name ) : Control
name string Name of the control container item.
Результат System.Windows.Forms.Control

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

Gets the properties of a toolbar.
public GetBarProperties ( string name ) : SIL.FieldWorks.Common.UIAdapters.TMBarProperties
name string Name of the toolbar whose properties are being requested. ///
Результат SIL.FieldWorks.Common.UIAdapters.TMBarProperties

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

protected GetBoolFromAttribute ( XmlNode node, string attribute ) : bool
node System.Xml.XmlNode
attribute string
Результат bool

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

protected GetBoolFromAttribute ( XmlNode node, string attribute, bool defaultValue ) : bool
node System.Xml.XmlNode
attribute string
defaultValue bool
Результат bool

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

protected GetIntFromAttribute ( XmlNode node, string attribute, int defaultValue ) : int
node System.Xml.XmlNode
attribute string
defaultValue int
Результат int

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

Loads a TMItemProperties object with several properties from a toolbar item.
public GetItemProperties ( string name ) : SIL.FieldWorks.Common.UIAdapters.TMItemProperties
name string The Name of the item whose properties are being stored.
Результат SIL.FieldWorks.Common.UIAdapters.TMItemProperties

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

Gets an item's command handling message from the appropriate hash table entry.
protected GetItemsCommandMessage ( DevComponents.DotNetBar.BaseItem item ) : string
item DevComponents.DotNetBar.BaseItem
Результат string

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

Gets an item's command handling message from the appropriate hash table entry.
protected GetItemsCommandMessage ( ToolStripItem item ) : string
item System.Windows.Forms.ToolStripItem
Результат string

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

protected GetResourceMngr ( XmlNode node ) : ResourceManager
node System.Xml.XmlNode
Результат System.Resources.ResourceManager

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

protected GetStringFromResource ( string kstid ) : string
kstid string
Результат string

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

Gets a toolbar item with the specified name. If the item exists, then return the one found in the DNB manager. Otherwise, create a new one.
protected GetToolbarItem ( XmlNode node, string name ) : DevComponents.DotNetBar.BaseItem
node System.Xml.XmlNode
name string
Результат DevComponents.DotNetBar.BaseItem

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

Gets a toolbar item with the specified name. If the item exists, return it. Otherwise, create a new one.
protected GetToolbarItem ( XmlNode node, string name ) : ToolStripItem
node System.Xml.XmlNode
name string
Результат System.Windows.Forms.ToolStripItem

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

protected GetWindowIndex ( DevComponents.DotNetBar.ButtonItem item, SIL.FieldWorks.Common.UIAdapters.TMItemProperties itemProps ) : void
item DevComponents.DotNetBar.ButtonItem
itemProps SIL.FieldWorks.Common.UIAdapters.TMItemProperties
Результат void

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

protected GetWindowIndex ( ToolStripItem item, SIL.FieldWorks.Common.UIAdapters.TMItemProperties itemProps ) : void
item System.Windows.Forms.ToolStripItem
itemProps SIL.FieldWorks.Common.UIAdapters.TMItemProperties
Результат void

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

Handles the building window list.
protected HandleBuildingWindowList ( object sender, CancelEventArgs e ) : void
sender object
e CancelEventArgs
Результат void

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

Handles the Disposed event of the m_msgMediator control.
protected HandleMessageMediatorDisposed ( object sender, EventArgs e ) : void
sender object
e System.EventArgs
Результат void

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

Send a message to anyone who cares that the drop down is closing.
protected HandleToolBarItemDropDownClosed ( object sender, EventArgs e ) : void
sender object
e System.EventArgs
Результат void

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

Allows an application to force the hiding of a toolbar item's popup control.
public HideBarItemsPopup ( string name ) : void
name string Name of item whose popup should be hidden.
Результат void

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

Allows an application to hide a toolbar.
public HideToolBar ( string name ) : void
name string Name of toolbar to hide.
Результат void

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

public Initialize ( Form parentForm, Control contentControl, XCore.Mediator msgMediator, string definitions ) : void
parentForm System.Windows.Forms.Form
contentControl System.Windows.Forms.Control
msgMediator XCore.Mediator
definitions string
Результат void

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

public Initialize ( Form parentForm, Control contentControl, XCore.Mediator msgMediator, string appsRegKeyPath, string definitions ) : void
parentForm System.Windows.Forms.Form
contentControl System.Windows.Forms.Control
msgMediator XCore.Mediator
appsRegKeyPath string Registry key path (under HKCU) where application's /// settings are stored (default is "Software\SIL\FieldWorks").
definitions string
Результат void

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

public Initialize ( Form parentForm, XCore.Mediator msgMediator, string definitions ) : void
parentForm System.Windows.Forms.Form
msgMediator XCore.Mediator
definitions string
Результат void

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

public Initialize ( Form parentForm, XCore.Mediator msgMediator, string appsRegKeyPath, string definitions ) : void
parentForm System.Windows.Forms.Form
msgMediator XCore.Mediator
appsRegKeyPath string Registry key path (under HKCU) where application's /// settings are stored (default is "Software\SIL\FieldWorks").
definitions string
Результат void

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

Determines whether the specified Keys is a shortcut for a toolbar or menu item.
public IsShortcutKey ( Keys key, bool &isItemEnabled ) : bool
key Keys The key.
isItemEnabled bool true when the specified key is a shortcut key /// and its associated toolbar or menu item is enabled.
Результат bool

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

Pops-up a menu so it shows like a context menu. If the item doesn't have any sub items, then this command is ignored.
public PopupMenu ( string name, int x, int y ) : void
name string The name of the item to popup. The name could be the name of /// a menu off the application's menu bar, or one of the context menu's added to the /// menu adapter.
x int The X location (on the screen) where the menu is popped-up.
y int The Y location (on the screen) where the menu is popped-up.
Результат void

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

Pops-up a menu so it shows like a context menu. If the item doesn't have any sub items, then this command is ignored.
public PopupMenu ( string name, int x, int y, List subItemsToRemoveOnClose ) : void
name string The name of the item to popup. The name could be the name of /// a menu off the application's menu bar, or one of the context menu's added to the /// menu adapter.
x int The X location (on the screen) where the menu is popped-up.
y int The Y location (on the screen) where the menu is popped-up.
subItemsToRemoveOnClose List
Результат void

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

Reads the commands section of a definition file.
protected ReadCommands ( XmlNode node ) : void
node System.Xml.XmlNode
Результат void

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

Skips over white space and any other junk that's not considered an element or end element.
protected ReadOverJunk ( XmlNode node ) : XmlNode
node System.Xml.XmlNode
Результат System.Xml.XmlNode

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

Read the information for a single menu item from the specified node.
protected ReadSingleItem ( XmlNode node, bool isMenuItem ) : DevComponents.DotNetBar.BaseItem
node System.Xml.XmlNode
isMenuItem bool
Результат DevComponents.DotNetBar.BaseItem

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

Read the information for a single menu item from the specified node.
protected ReadSingleItem ( XmlNode node, bool isMenuItem ) : ToolStripItem
node System.Xml.XmlNode
isMenuItem bool
Результат System.Windows.Forms.ToolStripItem

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

Removes the specified item from the specified parent menu.
Removing submenu items on a menu, while leaving the parent menu intact has not been tested (and is not currently needed).
public RemoveMenuItem ( string parentItemName, string name ) : void
parentItemName string The name of the item whose subitem will be removed. ///
name string subitem to remove from parent menu.
Результат void

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

Removes all the subitems of the specified menu.
public RemoveMenuSubItems ( string parentItemName ) : void
parentItemName string The name of the item whose subitems will be removed. ///
Результат void

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

Causes the adapter to save toolbar settings (e.g. user placement of toolbars).
public SaveBarSettings ( ) : void
Результат void

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

Sets the properties of the main menu bar. object.
public SetBarProperties ( SIL.FieldWorks.Common.UIAdapters.TMBarProperties barProps ) : void
barProps SIL.FieldWorks.Common.UIAdapters.TMBarProperties Properties used to modfy the toolbar item.
Результат void

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

Sets properties for a menu bar or toolbar.
public SetBarProperties ( string name, SIL.FieldWorks.Common.UIAdapters.TMBarProperties barProps ) : void
name string Name of bar to update.
barProps SIL.FieldWorks.Common.UIAdapters.TMBarProperties New properties of bar.
Результат void

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

Sets the context menu for a specified control.
public SetContextMenuForControl ( Control ctrl, string name ) : void
ctrl System.Windows.Forms.Control Control which is being assigned a context menu.
name string The name of the context menu to assign to the control.
Результат void

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

Sets some of a toolbar item's properties. Note: if the Update property in the TMItemProperties object hasn't been set to true, no updating will occur.
public SetItemProperties ( string name, SIL.FieldWorks.Common.UIAdapters.TMItemProperties itemProps ) : void
name string Name of item whose properties are being updated.
itemProps SIL.FieldWorks.Common.UIAdapters.TMItemProperties The TMItemProperties containing the new property /// values for the toolbar item.
Результат void

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

Sets the adapter's parent form. This will not cause docking sites to be added to the form and DotNetBar manager. This solves TE-6793
public SetParentForm ( Form newForm ) : Form
newForm System.Windows.Forms.Form The new parent form.
Результат System.Windows.Forms.Form

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

Causes the adapter to show it's dialog for customizing toolbars.
public ShowCustomizeDialog ( ) : void
Результат void

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

Allows an application to show a toolbar.
public ShowToolBar ( string name ) : void
name string Name of toolbar to show.
Результат void

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

Locate the toolbars when their parent form is shown.
protected m_parentForm_Shown ( object sender, EventArgs e ) : void
sender object
e System.EventArgs
Результат void

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

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

protected bool m_allowPopupToBeCanceled
Результат bool

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

protected bool m_allowUndocking
Результат bool

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

protected bool m_allowuUpdates
Результат bool

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

protected RegistryKey,Microsoft.Win32 m_appsRegKeyPath
Результат Microsoft.Win32.RegistryKey

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

protected string m_appsRegKeyPath
Результат string

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

protected Dictionary m_barLocations
Результат Point>.Dictionary

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

protected bool m_barReadFromSettingFile
Результат bool

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

protected Dictionary m_bars
Результат ToolStrip>.Dictionary

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

protected Dictionary m_commandInfo
Результат CommandInfo>.Dictionary

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

protected Dictionary m_contextMenus
Результат ContextMenuStrip>.Dictionary

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

protected bool m_customizeMenuShowing
Результат bool

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

protected Dictionary m_displayedBars
Результат bool>.Dictionary

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

protected Dictionary m_hiddenSeparators
Результат ToolStripSeparator>.Dictionary

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

protected Hashtable,System.Collections m_htBarLocations
Результат System.Collections.Hashtable

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

protected Hashtable,System.Collections m_htCommandInfo
Результат System.Collections.Hashtable

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

protected Hashtable,System.Collections m_htControls
Результат System.Collections.Hashtable

m_htFormTypeCommands защищенное статическое свойство

protected static Hashtable,System.Collections m_htFormTypeCommands
Результат System.Collections.Hashtable

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

protected Hashtable,System.Collections m_htImages
Результат System.Collections.Hashtable

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

protected Hashtable,System.Collections m_htItemTags
Результат System.Collections.Hashtable

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

protected Hashtable,System.Collections m_htSettingsFileLoaded
Результат System.Collections.Hashtable

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

protected Hashtable,System.Collections m_htSystemStringIds
Результат System.Collections.Hashtable

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

protected Hashtable,System.Collections m_htWndListIndices
Результат System.Collections.Hashtable

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

protected Dictionary m_images
Результат Image>.Dictionary

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

protected DateTime,System m_itemUpdateTime
Результат System.DateTime

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

protected MenuStrip,System.Windows.Forms m_menuBar
Результат System.Windows.Forms.MenuStrip

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

protected ButtonItem,DevComponents.DotNetBar m_menuCurrentlyPoppedUp
Результат DevComponents.DotNetBar.ButtonItem

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

protected ContextMenuStrip,System.Windows.Forms m_menuCurrentlyPoppedUp
Результат System.Windows.Forms.ContextMenuStrip

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

protected ArrayList,System.Collections m_menusWithShortcuts
Результат System.Collections.ArrayList

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

protected ToolStripItemCollection,System.Windows.Forms m_menusWithShortcuts
Результат System.Windows.Forms.ToolStripItemCollection

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

protected ButtonItem,DevComponents.DotNetBar m_moreWindowItem
Результат DevComponents.DotNetBar.ButtonItem

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

protected ToolStripMenuItem,System.Windows.Forms m_moreWindowItem
Результат System.Windows.Forms.ToolStripMenuItem

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

protected Mediator,XCore m_msgMediator
Результат XCore.Mediator

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

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

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

protected bool m_readingContextMenuDef
Результат bool

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

protected ResourceManager,System.Resources m_rmlocalMngmntStrings
Результат System.Resources.ResourceManager

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

protected ArrayList,System.Collections m_rmlocalStrings
Результат System.Collections.ArrayList

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

protected List m_rmlocalStrings
Результат List

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

protected Dictionary m_separators
Результат ToolStripSeparator>.Dictionary

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

protected string[] m_settingFiles
Результат string[]

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

protected string m_settingsFilePrefix
Результат string

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

protected Dictionary m_tmItems
Результат ToolStripItem>.Dictionary

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

protected Dictionary m_toolBarMenuMap
Результат ToolStrip>.Dictionary

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

protected ButtonItem,DevComponents.DotNetBar m_toolbarCustomizeItem
Результат DevComponents.DotNetBar.ButtonItem

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

protected ButtonItem,DevComponents.DotNetBar m_toolbarListItem
Результат DevComponents.DotNetBar.ButtonItem

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

protected ToolStripMenuItem,System.Windows.Forms m_toolbarListItem
Результат System.Windows.Forms.ToolStripMenuItem

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

protected ToolStripContainer,System.Windows.Forms m_tsContainer
Результат System.Windows.Forms.ToolStripContainer

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

protected ToolStripPanel,System.Windows.Forms m_tsPanel
Результат System.Windows.Forms.ToolStripPanel

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

protected ButtonItem,DevComponents.DotNetBar m_windowListItem
Результат DevComponents.DotNetBar.ButtonItem

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

protected ToolStripMenuItem,System.Windows.Forms m_windowListItem
Результат System.Windows.Forms.ToolStripMenuItem

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

protected ToolStripMenuItem,System.Windows.Forms m_windowListItemClicked
Результат System.Windows.Forms.ToolStripMenuItem

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

protected XmlTextReader,System.Xml m_xmlReader
Результат System.Xml.XmlTextReader