Miner.Windows Assembly > Miner.Windows.Commands Namespace : CommandManager Class |
'Declaration Public Class CommandManager
'Usage Dim instance As CommandManager
public class CommandManager
The main menu and dockable toolbars are composed of Command objects. There are a number of different types of built-in Command objects. These objects are derived from the abstract Command class. This CommandManager class keeps a list (collection) of all of the currently defined Command objects for the application (known as root tools). This list provides a means for the user to select/edit which commands he desires to be part of which toolbar or the main menu. It also provides a means of storing and restoring the command configuration.
Thus, there are only two public properties which this class provides:
Find and execute a Miner.Windows.Commands.Command that is loaded in a Miner.Windows based application like ArcFM Viewer for ArcGIS Engine or Designer Staker. The command used in this sample implements ICommand and is wrapped in a Miner.Windows.ArcGIS.MapCommand when it is loaded into the application.
Command cmdSaveSession = MainApp.MainWin.CommandManager.Commands["SaveSessionCommand"]; if (cmdSaveSession != null) { cmdSaveSession.Execute(); }
Find and execute a Miner.Windows.Commands.StateButtonCommand that is loaded in a Miner.Windows based application (e.g., ArcFM Viewer for ArcGIS Engine or Designer Staker). The command used in this sample implements ITool and is wrapped in a Miner.Windows.ArcGIS.MapCommand when it is loaded into the application.
Command cmdSelectFeature = MainApp.MainWin.CommandManager.Commands["SelectFeaturesTool"]; if (cmdSelectFeature != null) { StateButtonCommand stateCommand = cmdSelectFeature as StateButtonCommand; stateCommand.Checked = true; }
System.Object
Miner.Windows.Commands.CommandManager
Target Platforms: Windows XP SP3 (32-bit and 64-bit), Windows 7 (32-bit and 64-bit)
Not all Operating Systems are supported on all products. Visit the ArcFM Solution Supported Versions page for full details.