Changeset 17930
- Timestamp:
- 08/20/08 17:17:46 (5 years ago)
- Files:
-
- 1 modified
-
lang/vb2005/Tween/Tween/Tween.vb (modified) (13 diffs)
Legend:
- Unmodified
- Added
- Removed
-
lang/vb2005/Tween/Tween/Tween.vb
r17903 r17930 53 53 Private UrlDialog As New OpenURL 54 54 Private Const _replyHtml As String = "@<a target=""_self"" href=""https://twitter.com/" 55 Private _reply_to As Integer ' リプライ先のステータスID 0の場合はリプライではない 注:複数あてのものはリプライではない 55 Private _reply_to_id As Integer ' リプライ先のステータスID 0の場合はリプライではない 注:複数あてのものはリプライではない 56 Private _reply_to_name As String ' リプライ先ステータスの書き込み者の名前 56 57 57 58 Friend Class Win32Api … … 176 177 _history.Add("") 177 178 _hisIdx = 0 178 _reply_to = 0 179 _reply_to_id = 0 180 _reply_to_name = Nothing 179 181 180 182 '<<<<<<<<<設定関連>>>>>>>>> … … 1414 1416 Dim args As GetWorkerArg = CType(e.Argument, GetWorkerArg) 1415 1417 Try 1418 If args.type = WORKERTYPE.PostMessage Then CheckReplyTo(args.status) 1416 1419 For i As Integer = 0 To 1 1417 1420 Select Case args.type … … 1425 1428 ret = clsTw.GetDirectMessage(tlList, args.page, args.endPage, Twitter.GetTypes.GET_DMSNT, TIconList.Images.Keys, imgs) 1426 1429 Case WORKERTYPE.PostMessage 1427 ret = clsTw.PostStatus(args.status, _reply_to )1430 ret = clsTw.PostStatus(args.status, _reply_to_id) 1428 1431 Case WORKERTYPE.FavAdd 1429 1432 ret = clsTw.PostFavAdd(args.ids(args.page)) … … 1431 1434 ret = clsTw.PostFavRemove(args.ids(args.page)) 1432 1435 End Select 1436 If args.type = WORKERTYPE.PostMessage Then 1437 _reply_to_id = 0 1438 _reply_to_name = Nothing 1439 End If 1433 1440 If ret = "" Or (ret <> "" And (args.type = WORKERTYPE.PostMessage Or args.type = WORKERTYPE.FavAdd Or args.type = WORKERTYPE.FavRemove)) Then Exit For 1434 1441 Threading.Thread.Sleep(500) … … 5061 5068 StatusText.SelectionStart = StatusText.Text.Length 5062 5069 StatusText.Focus() 5063 _reply_to = 0 5070 _reply_to_id = 0 5071 _reply_to_name = Nothing 5064 5072 Exit Sub 5065 5073 End If … … 5067 5075 ' ステータステキストが入力されていない場合先頭に@ユーザー名を追加する 5068 5076 StatusText.Text = "@" + MyList.SelectedItems(0).SubItems(4).Text + " " 5069 _reply_to = MyList.SelectedItems(0).SubItems(5).Text 5077 _reply_to_id = MyList.SelectedItems(0).SubItems(5).Text 5078 _reply_to_name = MyList.SelectedItems(0).SubItems(4).Text 5070 5079 Else 5071 5080 If isAuto Then … … 5075 5084 ' 複数リプライ 5076 5085 StatusText.Text = StatusText.Text.Insert(2, "@" + MyList.SelectedItems(0).SubItems(4).Text + " ") 5077 _reply_to = 0 5086 _reply_to_id = 0 5087 _reply_to_name = Nothing 5078 5088 Else 5079 5089 ' 単独リプライ 5080 5090 StatusText.Text = "@" + MyList.SelectedItems(0).SubItems(4).Text + " " + StatusText.Text 5081 _reply_to = MyList.SelectedItems(0).SubItems(5).Text 5091 _reply_to_id = MyList.SelectedItems(0).SubItems(5).Text 5092 _reply_to_name = MyList.SelectedItems(0).SubItems(4).Text 5082 5093 End If 5083 5094 Else 5084 5095 ' 複数リプライ 5085 5096 StatusText.Text = ". @" + MyList.SelectedItems(0).SubItems(4).Text + " " + StatusText.Text 5086 _reply_to = 0 5097 _reply_to_id = 0 5098 _reply_to_name = Nothing 5087 5099 End If 5088 5100 Else … … 5101 5113 StatusText.SelectionStart = sidx 5102 5114 StatusText.Focus() 5103 _reply_to = 0 5115 _reply_to_id = 0 5116 _reply_to_name = Nothing 5104 5117 Exit Sub 5105 5118 End If 5106 5119 End If 5107 5120 Else 5121 ' 複数リプライ 5108 5122 If isAuto = False And isReply = False Then Exit Sub 5109 5123 … … 5374 5388 Try 5375 5389 ' For i As Integer = 0 To 2 5376 Select Case args.type 5377 Case WORKERTYPE.PostMessage 5378 ret = clsTwPost.PostStatus(args.status, _reply_to) 5379 End Select 5380 ' If ret.StartsWith("Err:") = False Then Exit For 5381 ' Threading.Thread.Sleep(500) 5382 ' Next 5383 5390 CheckReplyTo(args.status) 5391 5392 ret = clsTwPost.PostStatus(args.status, _reply_to_id) 5393 5394 _reply_to_id = 0 5395 _reply_to_name = Nothing 5384 5396 rslt.retMsg = ret 5385 5397 rslt.TLine = Nothing … … 5779 5791 End Sub 5780 5792 Friend Sub SetMainWindowTitle() 5793 'メインウインドウタイトルの書き換え 5794 5781 5795 If SettingDialog.DispUsername = True Then 5782 5796 'ユーザー名表示あり … … 5798 5812 End Sub 5799 5813 Friend Sub SetNotifyIconText() 5814 ' タスクトレイアイコンのツールチップテキスト書き換え 5815 5800 5816 If SettingDialog.DispUsername = True Then 5801 5817 NotifyIcon1.Text = _username + " - Tween" … … 5803 5819 NotifyIcon1.Text = "Tween" 5804 5820 End If 5821 End Sub 5822 Friend Sub CheckReplyTo(ByVal StatusText As String) 5823 ' 本当にリプライ先指定すべきかどうかの判定 5824 Dim id As New Regex("@[a-zA-Z0-9_]+") 5825 Dim m As MatchCollection 5826 5827 If _reply_to_id = 0 Then Exit Sub 5828 5829 If _reply_to_name = Nothing Then 5830 _reply_to_id = 0 5831 Exit Sub 5832 End If 5833 5834 m = id.Matches(StatusText) 5835 5836 If m.Count = 1 And m.Item(0).Value = "@" + _reply_to_name Then 5837 Exit Sub 5838 End If 5839 5840 _reply_to_id = 0 5841 _reply_to_name = Nothing 5842 5805 5843 End Sub 5806 5844 End Class
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)