예제 #1
0
        InitializeTwitterAuthorizationManager
        (
            TwitterAuthorizationControl oTwitterAuthorizationControl
        )
        {
            Debug.Assert(oTwitterAuthorizationControl != null);
            AssertValid();

            m_oTwitterAuthorizationManager = new TwitterAuthorizationManager(
                oTwitterAuthorizationControl);
        }
예제 #2
0
        //*************************************************************************
        //  Constructor: TwitterAuthorizationManager()
        //
        /// <summary>
        /// Initializes a new instance of the <see
        /// cref="TwitterAuthorizationManager" /> class.
        /// </summary>
        ///
        /// <param name="twitterAuthorizationControl">
        /// The TwitterAuthorizationControl owned by the parent dialog.  This class
        /// manages the control's <see cref="TwitterAuthorizationControl.Status" />
        /// property.
        /// </param>
        //*************************************************************************

        public TwitterAuthorizationManager
        (
            TwitterAuthorizationControl twitterAuthorizationControl
        )
        {
            m_oTwitterAuthorizationControl = twitterAuthorizationControl;

            // If the user has already authorized, he doesn't need to do so again.
            // Otherwise, assume he doesn't have a Twitter account.

            m_oTwitterAuthorizationControl.Status =
                TwitterAccessToken.Exists() ?
                TwitterAuthorizationStatus.HasTwitterAccountAuthorized :
                TwitterAuthorizationStatus.NoTwitterAccount;

            AssertValid();
        }
        //*************************************************************************
        //  Method: InitializeTwitterAuthorizationManager()
        //
        /// <summary>
        /// Initializes the TwitterAuthorizationManager object.
        /// </summary>
        ///
        /// <param name="oTwitterAuthorizationControl">
        /// The TwitterAuthorizationControl owned by the parent dialog.
        /// </param>
        //*************************************************************************
        protected void InitializeTwitterAuthorizationManager(
            TwitterAuthorizationControl oTwitterAuthorizationControl
            )
        {
            Debug.Assert(oTwitterAuthorizationControl != null);
            AssertValid();

            m_oTwitterAuthorizationManager = new TwitterAuthorizationManager(
            oTwitterAuthorizationControl);
        }