The Context is passed to all the widgets. You can use it to share properties, save and load persistent settings or to subscribe to some basic events. Here's how the interface looks (minus the properties):

   /// <summary>
    /// Provides context information to the widgets
    /// </summary>
    public class Context
    {
        /// <summary>
        /// The event is raised when a VS Speaker session is starting
        /// </summary>
        public event EventHandler SessionStarting;
        
        /// <summary>
        /// The event is raised when a VS Speaker was Started
        /// </summary>
        public event EventHandler SessionStarted;

        /// <summary>
        /// The event is raised when a VS Speaker session is ending
        /// </summary>
        public event EventHandler SessionEnding;

        /// <summary>
        /// The event is raised when a VS Speaker session was ended
        /// </summary>
        public event EventHandler SessionEnded;

        /// <summary>
        /// Gets the VS Speaker settings. The settings are serialized between VS Speaker sessions.
        /// </summary>
        public Settings Settings { get; private set; }

        /// <summary>
        /// Gets the VS Speaker shared settings. Every setting is loaded/saved every time so these settings are useful for consumption from different instances of VS Speaker.
        /// </summary>
        public Settings SharedSettings { get; private set; }

        /// <summary>
        /// Returns true if the VS Speaker session is already started
        /// </summary>
        public bool IsSessionStarted { get; private set; }
    }

Last edited Dec 2, 2009 at 2:53 PM by joj, version 1

Comments

No comments yet.