Click here to Skip to main content
15,881,281 members
Articles / Desktop Programming / WPF

GoalBook - A Hybrid Smart Client

Rate me:
Please Sign up or sign in to vote.
4.86/5 (24 votes)
25 Sep 2009CPOL10 min read 79K   834   69  
A WPF hybrid smart client that synchronises your goals with the Toodledo online To-do service.
// <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.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer (Senior)
Australia Australia
I've been working as a software developer since 2000 and hold a Bachelor of Business degree from The Open Polytechnic of New Zealand. Computers are for people and I aim to build applications for people that they would want to use.

Comments and Discussions