svnno****@sourc*****
svnno****@sourc*****
2010年 11月 9日 (火) 00:38:58 JST
Revision: 1046 http://sourceforge.jp/projects/tween/svn/view?view=rev&revision=1046 Author: syo68k Date: 2010-11-09 00:38:58 +0900 (Tue, 09 Nov 2010) Log Message: ----------- プロフィール更新時のデータチェック見直しとエラーチェック Modified Paths: -------------- trunk/Tween/Connection/HttpConnection.vb trunk/Tween/ShowUserInfo.vb -------------- next part -------------- Modified: trunk/Tween/Connection/HttpConnection.vb =================================================================== --- trunk/Tween/Connection/HttpConnection.vb 2010-11-07 07:41:35 UTC (rev 1045) +++ trunk/Tween/Connection/HttpConnection.vb 2010-11-08 15:38:58 UTC (rev 1046) @@ -463,11 +463,7 @@ Dim query As New StringBuilder For Each key As String In param.Keys - If String.IsNullOrEmpty(param(key)) Then - query.AppendFormat("{0}&", UrlEncode(key)) - Else - query.AppendFormat("{0}={1}&", UrlEncode(key), UrlEncode(param(key))) - End If + query.AppendFormat("{0}={1}&", UrlEncode(key), UrlEncode(param(key))) Next Return query.ToString(0, query.Length - 1) End Function Modified: trunk/Tween/ShowUserInfo.vb =================================================================== --- trunk/Tween/ShowUserInfo.vb 2010-11-07 07:41:35 UTC (rev 1045) +++ trunk/Tween/ShowUserInfo.vb 2010-11-08 15:38:58 UTC (rev 1046) @@ -450,6 +450,13 @@ arg.description) End Sub + Private Sub UpddateProfile_RunWorkerCompleted(ByVal sender As Object, ByVal e As RunWorkerCompletedEventArgs) + Dim res As String = DirectCast(e.Result, String) + If res.StartsWith("err:", StringComparison.CurrentCultureIgnoreCase) Then + MessageBox.Show(res) + End If + End Sub + Private Sub ButtonEdit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonEdit.Click Static IsEditing As Boolean = False Static ButtonEditText As String = "" @@ -517,14 +524,14 @@ TextBoxDescription.Modified Then arg.tw = MyOwner.TwitterInstance - arg.name = TextBoxName.Text - arg.url = TextBoxWeb.Text - arg.location = TextBoxLocation.Text - arg.description = TextBoxDescription.Text + arg.name = TextBoxName.Text.Trim() + arg.url = TextBoxWeb.Text.Trim() + arg.location = TextBoxLocation.Text.Trim() + arg.description = TextBoxDescription.Text.Trim() Using dlg As New FormInfo(Me, My.Resources.UserInfoButtonEdit_ClickText2, _ AddressOf UpdateProfile_Dowork, _ - Nothing, _ + AddressOf UpddateProfile_RunWorkerCompleted, _ arg) dlg.ShowDialog() If Not String.IsNullOrEmpty(dlg.Result.ToString) Then @@ -711,4 +718,8 @@ doChangeIcon(filename) End If End Sub + + Private Sub TextBoxWeb_Validating(ByVal sender As System.Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles TextBoxWeb.Validating + + End Sub End Class \ No newline at end of file