Example #1
0
        /// <summary>
        /// Share current overview photo to Sina Weibo
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void WeiboBtn_Click(object sender, RoutedEventArgs e)
        {
            WeiboShare weiboShare = new WeiboShare();
            switch (weiboShare.Login())
            {
                case LoginType.Success:
                    this.WeiboTips.Content = "Share Image Success.";
                    weiboShare.Share2Weibo(overviewFilename);
                    this.repeatTimer.Start();
                    break;
                case LoginType.AuthFailed:
                    this.WeiboTips.Content = "Error! Network Disconnect!";
                    this.repeatTimer.Start();
                    break;
                case LoginType.LoginFailed:
                    this.WeiboTips.Content = "UserId and Password don't match!";
                    this.repeatTimer.Start();
                    break;
            }

            this.CountDownLable.Content = COUNT_DOWN.ToString();
            this.OverviewImage.Source = null;
            this.WeiboBtn.Visibility = Visibility.Hidden;
        }
Example #2
0
 /// <summary>
 /// Share current overview photo to Sina Weibo
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void WeiBoBtn_Click(object sender, RoutedEventArgs e)
 {
     WeiboShare weiboShare = new WeiboShare();
     switch (weiboShare.Login())
     {
         case LoginType.Success:
             this.WeiboTips.Content = "Share Image Success.";
             weiboShare.Share2Weibo(_images[StartIndex]);
             this.repeatTimer.Start();
             break;
         case LoginType.AuthFailed:
             this.WeiboTips.Content = "Error! Network Disconnect!";
             this.repeatTimer.Start();
             break;
         case LoginType.LoginFailed:
             this.WeiboTips.Content = "UserId and Password don't match!";
             this.repeatTimer.Start();
             break;
     }
 }