コード例 #1
0
        public static void TwitterMsg(string url)
        {
            OAuthInfo acc = TwitterGetActiveAccount();

            if (!string.IsNullOrEmpty(acc.UserToken))
            {
                TwitterMsg msg = new TwitterMsg(TwitterGetActiveAccount(), string.Format("{0} - Update Twitter Status...", acc.Description));
                msg.ActiveAccountName = acc.Description;
                msg.Icon          = Resources.zss_main;
                msg.Config        = Engine.ConfigUI.TwitterClientConfig;
                msg.FormClosed   += new FormClosedEventHandler(twitterClient_FormClosed);
                msg.txtTweet.Text = url;
                msg.Show();
            }
        }
コード例 #2
0
        public static void TwitterMsg(string url)
        {
            TwitterAuthInfo acc = TwitterGetActiveAcct();

            if (!string.IsNullOrEmpty(acc.TokenSecret))
            {
                List <oAuthTwitter> oAccList = new List <oAuthTwitter>();
                foreach (TwitterAuthInfo oAuth in Engine.conf.TwitterAccountsList)
                {
                    oAccList.Add(new oAuthTwitter(Engine.TWITTER_CONSUMER_KEY, Engine.TWITTER_CONSUMER_SECRET, oAuth)
                    {
                        Enabled = acc.AccountName == oAuth.AccountName
                    });
                }
                TwitterMsg msg = new TwitterMsg(oAccList, string.Format("{0} - Update Twitter Status...", acc.AccountName));
                msg.ActiveAccountName = acc.AccountName;
                msg.Icon          = Resources.zss_main;
                msg.Config        = Engine.conf.TwitterClientConfig;
                msg.FormClosed   += new FormClosedEventHandler(twitterClient_FormClosed);
                msg.txtTweet.Text = url;
                msg.Show();
            }
        }