// <copyright file="GlobalCommands.cs" company="GoalBook"> // Copyright © 2009 Mark Brownsword. All rights reserved. // This source code and supporting files are licensed under The Code Project // Open License (CPOL) as detailed at http://www.codeproject.com/info/cpol10.aspx. // </copyright> namespace GoalBook.Shell.Commands { #region Using Statements using Microsoft.Practices.Composite.Presentation.Commands; #endregion /// <summary> /// GlobalCommands. Note that commands intialised as ActiveAware will only be routed to the currently /// active view. For this to occur, the view must set the commands IsActive property when it becomes /// active e.g. _newCommand.IsActive = true. This should be done in the IActiveAware.IsActive implementation. /// </summary> public static class GlobalCommands { /// <summary> /// Declaration for PrintCommand. /// </summary> private static CompositeCommand printCommand = new CompositeCommand(true); /// <summary> /// Declaration for UndoCommand. /// </summary> private static CompositeCommand undoCommand = new CompositeCommand(true); /// <summary> /// Declaration for DeleteCommand. /// </summary> private static CompositeCommand deleteCommand = new CompositeCommand(true); /// <summary> /// Declaration for SearchCommand. /// </summary> private static CompositeCommand searchCommand = new CompositeCommand(true); /// <summary> /// Declaration for ClearCommand. /// </summary> private static CompositeCommand clearCommand = new CompositeCommand(true); /// <summary> /// Gets reference to GlobalCommands.printCommand. /// </summary> public static CompositeCommand PrintCommand { get { return GlobalCommands.printCommand; } } /// <summary> /// Gets reference to GlobalCommands.undoCommand. /// </summary> public static CompositeCommand UndoCommand { get { return GlobalCommands.undoCommand; } } /// <summary> /// Gets reference to GlobalCommands.deleteCommand. /// </summary> public static CompositeCommand DeleteCommand { get { return GlobalCommands.deleteCommand; } } /// <summary> /// Gets reference to GlobalCommands.searchCommand. /// </summary> public static CompositeCommand SearchCommand { get { return GlobalCommands.searchCommand; } } /// <summary> /// Gets reference to GlobalCommands.clearCommand. /// </summary> public static CompositeCommand ClearCommand { get { return GlobalCommands.clearCommand; } } } }
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.
This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)