svnno****@sourc*****
svnno****@sourc*****
2010年 12月 9日 (木) 09:48:38 JST
Revision: 1181 http://sourceforge.jp/projects/tween/svn/view?view=rev&revision=1181 Author: kiri_feather Date: 2010-12-09 09:48:38 +0900 (Thu, 09 Dec 2010) Log Message: ----------- USのPause関連処理を削除 Modified Paths: -------------- trunk/Tween/Tween.Designer.vb trunk/Tween/Tween.resx trunk/Tween/Tween.vb trunk/Tween/Twitter.vb -------------- next part -------------- Modified: trunk/Tween/Tween.Designer.vb =================================================================== --- trunk/Tween/Tween.Designer.vb 2010-12-09 00:14:50 UTC (rev 1180) +++ trunk/Tween/Tween.Designer.vb 2010-12-09 00:48:38 UTC (rev 1181) @@ -220,7 +220,6 @@ Me.RtCountMenuItem = New System.Windows.Forms.ToolStripMenuItem() Me.ListManageToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() Me.MenuItemUserStream = New System.Windows.Forms.ToolStripMenuItem() - Me.PauseToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() Me.StopToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() Me.ToolStripSeparator40 = New System.Windows.Forms.ToolStripSeparator() Me.TrackToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() @@ -907,6 +906,7 @@ Me.SourceLinkLabel.AutoEllipsis = True Me.SourceLinkLabel.MaximumSize = New System.Drawing.Size(130, 0) Me.SourceLinkLabel.Name = "SourceLinkLabel" + Me.SourceLinkLabel.TabStop = True ' 'StatusText ' @@ -1453,15 +1453,10 @@ ' 'MenuItemUserStream ' - Me.MenuItemUserStream.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.PauseToolStripMenuItem, Me.StopToolStripMenuItem, Me.ToolStripSeparator40, Me.TrackToolStripMenuItem, Me.AllrepliesToolStripMenuItem}) + Me.MenuItemUserStream.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.StopToolStripMenuItem, Me.ToolStripSeparator40, Me.TrackToolStripMenuItem, Me.AllrepliesToolStripMenuItem}) resources.ApplyResources(Me.MenuItemUserStream, "MenuItemUserStream") Me.MenuItemUserStream.Name = "MenuItemUserStream" ' - 'PauseToolStripMenuItem - ' - resources.ApplyResources(Me.PauseToolStripMenuItem, "PauseToolStripMenuItem") - Me.PauseToolStripMenuItem.Name = "PauseToolStripMenuItem" - ' 'StopToolStripMenuItem ' Me.StopToolStripMenuItem.Name = "StopToolStripMenuItem" @@ -2118,7 +2113,6 @@ Friend WithEvents ShowRelatedStatusesMenuItem2 As System.Windows.Forms.ToolStripMenuItem Friend WithEvents ShowRelatedStatusesMenuItem As System.Windows.Forms.ToolStripMenuItem Friend WithEvents MenuItemUserStream As System.Windows.Forms.ToolStripMenuItem - Friend WithEvents PauseToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem Friend WithEvents StopToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem Friend WithEvents ToolStripSeparator40 As System.Windows.Forms.ToolStripSeparator Friend WithEvents TrackToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem Modified: trunk/Tween/Tween.resx =================================================================== --- trunk/Tween/Tween.resx 2010-12-09 00:14:50 UTC (rev 1180) +++ trunk/Tween/Tween.resx 2010-12-09 00:48:38 UTC (rev 1181) @@ -382,7 +382,7 @@ <value>0, 0, 0, 0</value> </data> <data name="ListTab.Size" type="System.Drawing.Size, System.Drawing"> - <value>570, 240</value> + <value>570, 242</value> </data> <data name="ListTab.TabIndex" type="System.Int32, mscorlib"> <value>0</value> @@ -406,7 +406,7 @@ <value>0, 0</value> </data> <data name="TimelinePanel.Size" type="System.Drawing.Size, System.Drawing"> - <value>570, 240</value> + <value>570, 242</value> </data> <data name="TimelinePanel.TabIndex" type="System.Int32, mscorlib"> <value>0</value> @@ -436,7 +436,7 @@ <value>0, 0</value> </data> <data name="ImageSelectedPicture.Size" type="System.Drawing.Size, System.Drawing"> - <value>570, 212</value> + <value>570, 214</value> </data> <data name="ImageSelectedPicture.SizeMode" type="System.Windows.Forms.PictureBoxSizeMode, System.Windows.Forms"> <value>Zoom</value> @@ -640,7 +640,7 @@ <value>Bottom</value> </data> <data name="ImagePathPanel.Location" type="System.Drawing.Point, System.Drawing"> - <value>0, 212</value> + <value>0, 214</value> </data> <data name="ImagePathPanel.Padding" type="System.Windows.Forms.Padding, System.Windows.Forms"> <value>3, 3, 3, 3</value> @@ -670,7 +670,7 @@ <value>0, 0</value> </data> <data name="ImageSelectionPanel.Size" type="System.Drawing.Size, System.Drawing"> - <value>570, 240</value> + <value>570, 242</value> </data> <data name="ImageSelectionPanel.TabIndex" type="System.Int32, mscorlib"> <value>1</value> @@ -697,7 +697,7 @@ <value>0, 0</value> </data> <data name="ProfilePanel.Size" type="System.Drawing.Size, System.Drawing"> - <value>570, 240</value> + <value>570, 242</value> </data> <data name="ProfilePanel.TabIndex" type="System.Int32, mscorlib"> <value>2</value> @@ -1039,7 +1039,7 @@ <value>59, 20</value> </data> <data name="PostBrowser.Size" type="System.Drawing.Size, System.Drawing"> - <value>508, 48</value> + <value>508, 46</value> </data> <data name="PostBrowser.TabIndex" type="System.Int32, mscorlib"> <value>6</value> @@ -1144,7 +1144,7 @@ <value>2</value> </data> <data name="TableLayoutPanel1.Size" type="System.Drawing.Size, System.Drawing"> - <value>570, 71</value> + <value>570, 69</value> </data> <data name="TableLayoutPanel1.TabIndex" type="System.Int32, mscorlib"> <value>1</value> @@ -1282,10 +1282,10 @@ <value>19</value> </data> <data name="SplitContainer2.Size" type="System.Drawing.Size, System.Drawing"> - <value>570, 98</value> + <value>570, 96</value> </data> <data name="SplitContainer2.SplitterDistance" type="System.Int32, mscorlib"> - <value>71</value> + <value>69</value> </data> <data name="SplitContainer2.SplitterWidth" type="System.Int32, mscorlib"> <value>2</value> @@ -1327,7 +1327,7 @@ <value>0, 0</value> </data> <data name="PreviewPicture.Size" type="System.Drawing.Size, System.Drawing"> - <value>194, 100</value> + <value>194, 98</value> </data> <data name="PreviewPicture.SizeMode" type="System.Windows.Forms.PictureBoxSizeMode, System.Windows.Forms"> <value>Zoom</value> @@ -1357,7 +1357,7 @@ <value>194, 0</value> </data> <data name="PreviewScrollBar.Size" type="System.Drawing.Size, System.Drawing"> - <value>17, 100</value> + <value>17, 98</value> </data> <data name="PreviewScrollBar.TabIndex" type="System.Int32, mscorlib"> <value>0</value> @@ -1387,7 +1387,7 @@ <value>1</value> </data> <data name="SplitContainer3.Size" type="System.Drawing.Size, System.Drawing"> - <value>570, 98</value> + <value>570, 96</value> </data> <data name="SplitContainer3.SplitterDistance" type="System.Int32, mscorlib"> <value>355</value> @@ -1426,7 +1426,7 @@ <value>574, 348</value> </data> <data name="SplitContainer1.SplitterDistance" type="System.Int32, mscorlib"> - <value>244</value> + <value>246</value> </data> <data name="SplitContainer1.SplitterWidth" type="System.Int32, mscorlib"> <value>2</value> @@ -2139,15 +2139,6 @@ <data name="MenuItemCommand.Text" xml:space="preserve"> <value>その他機能(&C)</value> </data> - <data name="PauseToolStripMenuItem.Enabled" type="System.Boolean, mscorlib"> - <value>False</value> - </data> - <data name="PauseToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing"> - <value>144, 22</value> - </data> - <data name="PauseToolStripMenuItem.Text" xml:space="preserve"> - <value>Pause</value> - </data> <data name="StopToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing"> <value>144, 22</value> </data> @@ -3588,12 +3579,6 @@ <data name=">>MenuItemUserStream.Type" xml:space="preserve"> <value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> </data> - <data name=">>PauseToolStripMenuItem.Name" xml:space="preserve"> - <value>PauseToolStripMenuItem</value> - </data> - <data name=">>PauseToolStripMenuItem.Type" xml:space="preserve"> - <value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> - </data> <data name=">>StopToolStripMenuItem.Name" xml:space="preserve"> <value>StopToolStripMenuItem</value> </data> Modified: trunk/Tween/Tween.vb =================================================================== --- trunk/Tween/Tween.vb 2010-12-09 00:14:50 UTC (rev 1180) +++ trunk/Tween/Tween.vb 2010-12-09 00:48:38 UTC (rev 1181) @@ -8332,13 +8332,10 @@ AddHandler tw.NewPostFromStream, AddressOf tw_NewPostFromStream AddHandler tw.UserStreamStarted, AddressOf tw_UserStreamStarted AddHandler tw.UserStreamStopped, AddressOf tw_UserStreamStopped - AddHandler tw.UserStreamPaused, AddressOf tw_UserStreamPaused AddHandler tw.PostDeleted, AddressOf tw_PostDeleted MenuItemUserStream.Text = "&UserStream ■" MenuItemUserStream.Enabled = True - PauseToolStripMenuItem.Text = "&Pause" - PauseToolStripMenuItem.Enabled = False StopToolStripMenuItem.Text = "&Start" StopToolStripMenuItem.Enabled = True If SettingDialog.UserstreamStartup Then tw.StartUserStream() @@ -9872,8 +9869,6 @@ MenuItemUserStream.Text = "&UserStream ▶" MenuItemUserStream.Enabled = True - PauseToolStripMenuItem.Text = "&Pause" - PauseToolStripMenuItem.Enabled = True StopToolStripMenuItem.Text = "&Stop" StopToolStripMenuItem.Enabled = True @@ -9888,44 +9883,12 @@ MenuItemUserStream.Text = "&UserStream ■" MenuItemUserStream.Enabled = True - PauseToolStripMenuItem.Text = "&Pause" - PauseToolStripMenuItem.Enabled = False StopToolStripMenuItem.Text = "&Start" StopToolStripMenuItem.Enabled = True StatusLabel.Text = "UserStream Stopped." End Sub - Private Sub tw_UserStreamPaused() - If InvokeRequired Then - Invoke(New MethodInvoker(AddressOf tw_UserStreamPaused)) - Exit Sub - End If - - MenuItemUserStream.Text = "&UserStream ||" - MenuItemUserStream.Enabled = True - PauseToolStripMenuItem.Text = "&Resume" - PauseToolStripMenuItem.Enabled = True - StopToolStripMenuItem.Text = "&Stop" - StopToolStripMenuItem.Enabled = True - - StatusLabel.Text = "UserStream Paused." - End Sub - - 'Private ReadOnly Property IsReceivedUserStream As Boolean - ' Get - ' Static lastTime As DateTime - ' Dim changed As Boolean = (lastTime.CompareTo(tw.LastReceivedUserStream) < 0) - ' lastTime = tw.LastReceivedUserStream - ' Return changed - ' End Get - 'End Property - - Private Sub PauseToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PauseToolStripMenuItem.Click - MenuItemUserStream.Enabled = False - tw.PauseUserStream() - End Sub - Private Sub StopToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles StopToolStripMenuItem.Click MenuItemUserStream.Enabled = False tw.StartUserStream() Modified: trunk/Tween/Twitter.vb =================================================================== --- trunk/Tween/Twitter.vb 2010-12-09 00:14:50 UTC (rev 1180) +++ trunk/Tween/Twitter.vb 2010-12-09 00:48:38 UTC (rev 1181) @@ -2804,18 +2804,17 @@ Private Sub Twitter_ApiInformationChanged(ByVal sender As Object, ByVal e As ApiInformationChangedEventArgs) Handles Me.ApiInformationChanged End Sub +#Region "UserStream" Public Property TrackWord As String = "" Public Property AllAtReply As Boolean = False Public Event NewPostFromStream() Public Event UserStreamStarted() Public Event UserStreamStopped() - Public Event UserStreamPaused() Public Event UserStreamGetFriendsList() Public Event PostDeleted(ByVal id As Long) Private WithEvents userStream As TwitterUserstream - Private _streamBypass As Boolean Private EventNameTable() As String = { "favorite", "unfavorite", @@ -2825,18 +2824,8 @@ "block" } - 'Public ReadOnly Property LastReceivedUserStream As DateTime - ' Get - ' If userStream IsNot Nothing Then - ' Return userStream.LastTime - ' Else - ' Return Now - ' End If - ' End Get - 'End Property - Private Sub userStream_StatusArrived(ByVal line As String) Handles userStream.StatusArrived - If _streamBypass OrElse String.IsNullOrEmpty(line) Then Exit Sub + If String.IsNullOrEmpty(line) Then Exit Sub Dim isDm As Boolean = False @@ -2912,14 +2901,12 @@ If userStream IsNot Nothing Then StopUserStream() Else - Me._streamBypass = False userStream = New TwitterUserstream(twCon) userStream.Start(Me.AllAtReply, Me.TrackWord) End If End Sub Public Sub StopUserStream() - Me._streamBypass = True If userStream IsNot Nothing Then userStream.Dispose() userStream = Nothing If Not _endingFlag Then RaiseEvent UserStreamStopped() @@ -2932,16 +2919,6 @@ End If End Sub - Public Sub PauseUserStream() - If _streamBypass Then - _streamBypass = False - RaiseEvent UserStreamStarted() - Else - _streamBypass = True - RaiseEvent UserStreamPaused() - End If - End Sub - Private Class TwitterUserstream Implements IDisposable @@ -2995,8 +2972,6 @@ End Set End Property - 'Public Property LastTime As DateTime = Now - Private Sub UserStreamLoop() Dim st As Stream = Nothing Dim sr As StreamReader = Nothing @@ -3099,6 +3074,7 @@ #End Region End Class +#End Region #Region "IDisposable Support" Private disposedValue As Boolean ' 重複する呼び出しを検出するには