Click here to Skip to main content
15,892,005 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 79.4K   834   69  
A WPF hybrid smart client that synchronises your goals with the Toodledo online To-do service.
//===============================================================================
// Goal Book.
// Copyright © 2009 Mark Brownsword. 
//===============================================================================

#region Using Statements
using GoalBook.Infrastructure;
using GoalBook.Shell.Commands;
using Microsoft.Practices.Composite.Presentation.Commands;
#endregion

namespace GoalBook.Shell.Windows
{
    public class MainPresentationModel
    {
        #region Constants and Enums
        #endregion

        #region Inner Classes and Structures
        #endregion

        #region Delegates and Events
        #endregion

        #region Instance and Shared Fields
        ApplicationCommands _applicationCommands;
        #endregion

        #region Constructors
        /// <summary>
        /// Constructor.
        /// </summary>
        public MainPresentationModel(ApplicationCommands applicationCommands)
        {
            _applicationCommands = applicationCommands;
        }
        #endregion

        #region Properties

        #region Application Commands

        /// <summary>
        /// Reference to SaveCommand.
        /// </summary>
        public DelegateCommand<CommandInfo> SaveCommand
        {
            get { return _applicationCommands.SaveCommand; }
            set { _applicationCommands.SaveCommand = value; }
        }
        /// <summary>
        /// Reference to CommandInfo for SaveCommand.
        /// </summary>
        public CommandInfo SaveCommandInfo
        {
            get { return ApplicationCommandsInfo.SaveCommandInfo; }
        }

        /// <summary>
        /// Reference to ExitCommand.
        /// </summary>
        public DelegateCommand<CommandInfo> ExitCommand
        {
            get { return _applicationCommands.ExitCommand; }
            set { _applicationCommands.ExitCommand = value; }
        }
        /// <summary>
        /// Reference to CommandInfo for ExitCommand.
        /// </summary>
        public CommandInfo ExitCommandInfo
        {
            get { return ApplicationCommandsInfo.ExitCommandInfo; }
        }

        /// <summary>
        /// Reference to SyncCommand.
        /// </summary>
        public DelegateCommand<CommandInfo> SyncCommand
        {
            get { return _applicationCommands.SyncCommand; }
            set { _applicationCommands.SyncCommand = value; }
        }

        /// <summary>
        /// Reference to CommandInfo for SyncCommand.
        /// </summary>
        public CommandInfo SyncCommandInfo
        {
            get { return ApplicationCommandsInfo.SyncCommandInfo; }
        }

        /// <summary>
        /// Reference to ConfigureAccountCommand.
        /// </summary>
        public DelegateCommand<CommandInfo> ConfigureAccountCommand
        {
            get { return _applicationCommands.ConfigureAccountCommand; }
            set { _applicationCommands.ConfigureAccountCommand = value; }
        }

        /// <summary>
        /// Reference to CommandInfo for ConfigureAccountCommand.
        /// </summary>
        public CommandInfo ConfigureAccountCommandInfo
        {
            get { return ApplicationCommandsInfo.ConfigureAccountCommandInfo; }
        }

        /// <summary>
        /// Reference to ChangeAccountCommand.
        /// </summary>
        public DelegateCommand<CommandInfo> ChangeAccountCommand
        {
            get { return _applicationCommands.ChangeAccountCommand; }
            set { _applicationCommands.ChangeAccountCommand = value; }
        }

        /// <summary>
        /// Reference to CommandInfo for ChangeAccountCommand.
        /// </summary>
        public CommandInfo ChangeAccountCommandInfo
        {
            get { return ApplicationCommandsInfo.ChangeAccountCommandInfo; }
        }

        /// <summary>
        /// Reference to ClearDataCommand.
        /// </summary>
        public DelegateCommand<CommandInfo> ClearDataCommand
        {
            get { return _applicationCommands.ClearDataCommand; }
            set { _applicationCommands.ClearDataCommand = value; }
        }

        /// <summary>
        /// Reference to CommandInfo for ClearDataCommand.
        /// </summary>
        public CommandInfo ClearDataCommandInfo
        {
            get { return ApplicationCommandsInfo.ClearDataCommandInfo; }
        }

        /// <summary>
        /// Reference to InternetCommand.
        /// </summary>
        public DelegateCommand<CommandInfo> InternetCommand
        {
            get { return _applicationCommands.InternetCommand; }
            set { _applicationCommands.InternetCommand = value; }
        }

        /// <summary>
        /// Reference to CommandInfo for InternetCommand.
        /// </summary>
        public CommandInfo InternetCommandInfo
        {
            get { return ApplicationCommandsInfo.InternetCommandInfo; }
        }

        /// <summary>
        /// Reference to FeedbackCommand.
        /// </summary>
        public DelegateCommand<CommandInfo> FeedbackCommand
        {
            get { return _applicationCommands.FeedbackCommand; }
            set { _applicationCommands.FeedbackCommand = value; }
        }

        /// <summary>
        /// Reference to CommandInfo for FeedbackCommand.
        /// </summary>
        public CommandInfo FeedbackCommandInfo
        {
            get { return ApplicationCommandsInfo.FeedbackCommandInfo; }
        }

        /// <summary>
        /// Reference to AboutCommand.
        /// </summary>
        public DelegateCommand<CommandInfo> AboutCommand
        {
            get { return _applicationCommands.AboutCommand; }
            set { _applicationCommands.AboutCommand = value; }
        }

        /// <summary>
        /// Reference to CommandInfo for AboutCommand.
        /// </summary>
        public CommandInfo AboutCommandInfo
        {
            get { return ApplicationCommandsInfo.AboutCommandInfo; }
        }

        #endregion

        #region Global Commands

        /// <summary>
        /// Reference to PrintCommand.
        /// </summary>
        public CompositeCommand PrintCommand
        {
            get { return GlobalCommands.PrintCommand; }            
        }
        /// <summary>
        /// Reference to CommandInfo for PrintCommand.
        /// </summary>
        public CommandInfo PrintCommandInfo
        {
            get { return GlobalCommandsInfo.PrintCommandInfo; }
        }

        /// <summary>
        /// Reference to Composite UndoCommand.
        /// </summary>
        public CompositeCommand UndoCommand
        {
            get { return GlobalCommands.UndoCommand; }
        }
        /// <summary>
        /// Reference to CommandInfo for UndoCommand.
        /// </summary>
        public CommandInfo UndoCommandInfo
        {
            get { return GlobalCommandsInfo.UndoCommandInfo; }
        }

        /// <summary>
        /// Reference to Composite DeleteCommand.
        /// </summary>
        public CompositeCommand DeleteCommand
        {
            get { return GlobalCommands.DeleteCommand; }
        }
        /// <summary>
        /// Reference to CommandInfo for DeleteCommand.
        /// </summary>
        public CommandInfo DeleteCommandInfo
        {
            get { return GlobalCommandsInfo.DeleteCommandInfo; }
        }
        #endregion

        #endregion

        #region Private and Protected Methods
        #endregion

        #region Public and internal Methods
        #endregion

        #region Event Handlers
        #endregion

        #region Base Class Overrides
        #endregion
    }
}

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