svnno****@sourc*****
svnno****@sourc*****
2011年 1月 27日 (木) 11:58:06 JST
Revision: 1415 http://sourceforge.jp/projects/tween/svn/view?view=rev&revision=1415 Author: syo68k Date: 2011-01-27 11:58:06 +0900 (Thu, 27 Jan 2011) Log Message: ----------- イベントビューアをイベント種別ごとにタブ化 Modified Paths: -------------- trunk/Tween/EventViewerDialog.Designer.vb trunk/Tween/EventViewerDialog.vb trunk/Tween/MyCommon.vb -------------- next part -------------- Modified: trunk/Tween/EventViewerDialog.Designer.vb =================================================================== --- trunk/Tween/EventViewerDialog.Designer.vb 2011-01-26 17:49:03 UTC (rev 1414) +++ trunk/Tween/EventViewerDialog.Designer.vb 2011-01-27 02:58:06 UTC (rev 1415) @@ -23,13 +23,25 @@ <System.Diagnostics.DebuggerStepThrough()> _ Private Sub InitializeComponent() Me.OK_Button = New System.Windows.Forms.Button() + Me.CheckExcludeMyEvent = New System.Windows.Forms.CheckBox() + Me.ButtonRefresh = New System.Windows.Forms.Button() + Me.TabEventType = New System.Windows.Forms.TabControl() + Me.TabPageAll = New System.Windows.Forms.TabPage() + Me.TabPageFav = New System.Windows.Forms.TabPage() Me.EventList = New System.Windows.Forms.ListView() Me.ColumnHeader1 = CType(New System.Windows.Forms.ColumnHeader(), System.Windows.Forms.ColumnHeader) Me.ColumnHeader2 = CType(New System.Windows.Forms.ColumnHeader(), System.Windows.Forms.ColumnHeader) Me.ColumnHeader3 = CType(New System.Windows.Forms.ColumnHeader(), System.Windows.Forms.ColumnHeader) Me.ColumnHeader4 = CType(New System.Windows.Forms.ColumnHeader(), System.Windows.Forms.ColumnHeader) - Me.CheckExcludeMyEvent = New System.Windows.Forms.CheckBox() - Me.ButtonRefresh = New System.Windows.Forms.Button() + Me.TabPageUnfav = New System.Windows.Forms.TabPage() + Me.TabPageFollow = New System.Windows.Forms.TabPage() + Me.TabPageAddLists = New System.Windows.Forms.TabPage() + Me.TabPageRemoveLists = New System.Windows.Forms.TabPage() + Me.TabPageListsCreated = New System.Windows.Forms.TabPage() + Me.TabPageBlock = New System.Windows.Forms.TabPage() + Me.TabPageUserUpdate = New System.Windows.Forms.TabPage() + Me.TabEventType.SuspendLayout() + Me.TabPageAll.SuspendLayout() Me.SuspendLayout() ' 'OK_Button @@ -42,17 +54,75 @@ Me.OK_Button.TabIndex = 0 Me.OK_Button.Text = "OK" ' + 'CheckExcludeMyEvent + ' + Me.CheckExcludeMyEvent.AutoSize = True + Me.CheckExcludeMyEvent.Location = New System.Drawing.Point(12, 261) + Me.CheckExcludeMyEvent.Name = "CheckExcludeMyEvent" + Me.CheckExcludeMyEvent.Size = New System.Drawing.Size(178, 16) + Me.CheckExcludeMyEvent.TabIndex = 2 + Me.CheckExcludeMyEvent.Text = "自分で発生させたイベントを除外" + Me.CheckExcludeMyEvent.UseVisualStyleBackColor = True + ' + 'ButtonRefresh + ' + Me.ButtonRefresh.Location = New System.Drawing.Point(472, 258) + Me.ButtonRefresh.Name = "ButtonRefresh" + Me.ButtonRefresh.Size = New System.Drawing.Size(134, 21) + Me.ButtonRefresh.TabIndex = 3 + Me.ButtonRefresh.Text = "最新の情報に更新" + Me.ButtonRefresh.UseVisualStyleBackColor = True + ' + 'TabEventType + ' + Me.TabEventType.Alignment = System.Windows.Forms.TabAlignment.Bottom + Me.TabEventType.Controls.Add(Me.TabPageAll) + Me.TabEventType.Controls.Add(Me.TabPageFav) + Me.TabEventType.Controls.Add(Me.TabPageUnfav) + Me.TabEventType.Controls.Add(Me.TabPageFollow) + Me.TabEventType.Controls.Add(Me.TabPageAddLists) + Me.TabEventType.Controls.Add(Me.TabPageRemoveLists) + Me.TabEventType.Controls.Add(Me.TabPageListsCreated) + Me.TabEventType.Controls.Add(Me.TabPageBlock) + Me.TabEventType.Controls.Add(Me.TabPageUserUpdate) + Me.TabEventType.Location = New System.Drawing.Point(12, 12) + Me.TabEventType.Name = "TabEventType" + Me.TabEventType.SelectedIndex = 0 + Me.TabEventType.Size = New System.Drawing.Size(667, 240) + Me.TabEventType.TabIndex = 4 + ' + 'TabPageAll + ' + Me.TabPageAll.Controls.Add(Me.EventList) + Me.TabPageAll.Location = New System.Drawing.Point(4, 4) + Me.TabPageAll.Name = "TabPageAll" + Me.TabPageAll.Padding = New System.Windows.Forms.Padding(3) + Me.TabPageAll.Size = New System.Drawing.Size(659, 214) + Me.TabPageAll.TabIndex = 0 + Me.TabPageAll.Tag = "All" + Me.TabPageAll.Text = "全て" + Me.TabPageAll.UseVisualStyleBackColor = True + ' + 'TabPageFav + ' + Me.TabPageFav.Location = New System.Drawing.Point(4, 4) + Me.TabPageFav.Name = "TabPageFav" + Me.TabPageFav.Padding = New System.Windows.Forms.Padding(3) + Me.TabPageFav.Size = New System.Drawing.Size(659, 214) + Me.TabPageFav.TabIndex = 1 + Me.TabPageFav.Tag = "Favorite" + Me.TabPageFav.Text = "Favorite" + Me.TabPageFav.UseVisualStyleBackColor = True + ' 'EventList ' - Me.EventList.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _ - Or System.Windows.Forms.AnchorStyles.Left) _ - Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) Me.EventList.Columns.AddRange(New System.Windows.Forms.ColumnHeader() {Me.ColumnHeader1, Me.ColumnHeader2, Me.ColumnHeader3, Me.ColumnHeader4}) + Me.EventList.Dock = System.Windows.Forms.DockStyle.Fill Me.EventList.FullRowSelect = True - Me.EventList.Location = New System.Drawing.Point(12, 12) + Me.EventList.Location = New System.Drawing.Point(3, 3) Me.EventList.Name = "EventList" - Me.EventList.Size = New System.Drawing.Size(667, 235) - Me.EventList.TabIndex = 1 + Me.EventList.Size = New System.Drawing.Size(653, 208) + Me.EventList.TabIndex = 3 Me.EventList.UseCompatibleStateImageBehavior = False Me.EventList.View = System.Windows.Forms.View.Details ' @@ -76,35 +146,93 @@ Me.ColumnHeader4.Text = "Target" Me.ColumnHeader4.Width = 360 ' - 'CheckExcludeMyEvent + 'TabPageUnfav ' - Me.CheckExcludeMyEvent.AutoSize = True - Me.CheckExcludeMyEvent.Location = New System.Drawing.Point(12, 261) - Me.CheckExcludeMyEvent.Name = "CheckExcludeMyEvent" - Me.CheckExcludeMyEvent.Size = New System.Drawing.Size(178, 16) - Me.CheckExcludeMyEvent.TabIndex = 2 - Me.CheckExcludeMyEvent.Text = "自分で発生させたイベントを除外" - Me.CheckExcludeMyEvent.UseVisualStyleBackColor = True + Me.TabPageUnfav.Location = New System.Drawing.Point(4, 4) + Me.TabPageUnfav.Name = "TabPageUnfav" + Me.TabPageUnfav.Padding = New System.Windows.Forms.Padding(3) + Me.TabPageUnfav.Size = New System.Drawing.Size(659, 214) + Me.TabPageUnfav.TabIndex = 2 + Me.TabPageUnfav.Tag = "Unfavorite" + Me.TabPageUnfav.Text = "Unfavorite" + Me.TabPageUnfav.UseVisualStyleBackColor = True ' - 'ButtonRefresh + 'TabPageFollow ' - Me.ButtonRefresh.Location = New System.Drawing.Point(472, 258) - Me.ButtonRefresh.Name = "ButtonRefresh" - Me.ButtonRefresh.Size = New System.Drawing.Size(134, 21) - Me.ButtonRefresh.TabIndex = 3 - Me.ButtonRefresh.Text = "最新の情報に更新" - Me.ButtonRefresh.UseVisualStyleBackColor = True + Me.TabPageFollow.Location = New System.Drawing.Point(4, 4) + Me.TabPageFollow.Name = "TabPageFollow" + Me.TabPageFollow.Padding = New System.Windows.Forms.Padding(3) + Me.TabPageFollow.Size = New System.Drawing.Size(659, 214) + Me.TabPageFollow.TabIndex = 3 + Me.TabPageFollow.Tag = "Follow" + Me.TabPageFollow.Text = "Follow" + Me.TabPageFollow.UseVisualStyleBackColor = True ' + 'TabPageAddLists + ' + Me.TabPageAddLists.Location = New System.Drawing.Point(4, 4) + Me.TabPageAddLists.Name = "TabPageAddLists" + Me.TabPageAddLists.Padding = New System.Windows.Forms.Padding(3) + Me.TabPageAddLists.Size = New System.Drawing.Size(659, 214) + Me.TabPageAddLists.TabIndex = 4 + Me.TabPageAddLists.Tag = "ListMemberAdded" + Me.TabPageAddLists.Text = "ListsMemberAdded" + Me.TabPageAddLists.UseVisualStyleBackColor = True + ' + 'TabPageRemoveLists + ' + Me.TabPageRemoveLists.Location = New System.Drawing.Point(4, 4) + Me.TabPageRemoveLists.Name = "TabPageRemoveLists" + Me.TabPageRemoveLists.Padding = New System.Windows.Forms.Padding(3) + Me.TabPageRemoveLists.Size = New System.Drawing.Size(659, 214) + Me.TabPageRemoveLists.TabIndex = 5 + Me.TabPageRemoveLists.Tag = "ListMemberRemoved" + Me.TabPageRemoveLists.Text = "ListsMemberRemoved" + Me.TabPageRemoveLists.UseVisualStyleBackColor = True + ' + 'TabPageListsCreated + ' + Me.TabPageListsCreated.Location = New System.Drawing.Point(4, 4) + Me.TabPageListsCreated.Name = "TabPageListsCreated" + Me.TabPageListsCreated.Padding = New System.Windows.Forms.Padding(3) + Me.TabPageListsCreated.Size = New System.Drawing.Size(659, 214) + Me.TabPageListsCreated.TabIndex = 6 + Me.TabPageListsCreated.Tag = "ListCreated" + Me.TabPageListsCreated.Text = "ListsCreated" + Me.TabPageListsCreated.UseVisualStyleBackColor = True + ' + 'TabPageBlock + ' + Me.TabPageBlock.Location = New System.Drawing.Point(4, 4) + Me.TabPageBlock.Name = "TabPageBlock" + Me.TabPageBlock.Padding = New System.Windows.Forms.Padding(3) + Me.TabPageBlock.Size = New System.Drawing.Size(659, 214) + Me.TabPageBlock.TabIndex = 7 + Me.TabPageBlock.Tag = "Block" + Me.TabPageBlock.Text = "Block" + Me.TabPageBlock.UseVisualStyleBackColor = True + ' + 'TabPageUserUpdate + ' + Me.TabPageUserUpdate.Location = New System.Drawing.Point(4, 4) + Me.TabPageUserUpdate.Name = "TabPageUserUpdate" + Me.TabPageUserUpdate.Padding = New System.Windows.Forms.Padding(3) + Me.TabPageUserUpdate.Size = New System.Drawing.Size(659, 214) + Me.TabPageUserUpdate.TabIndex = 8 + Me.TabPageUserUpdate.Tag = "UserUpdate" + Me.TabPageUserUpdate.Text = "UserUpdate" + Me.TabPageUserUpdate.UseVisualStyleBackColor = True + ' 'EventViewerDialog ' Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 12.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font Me.CancelButton = Me.OK_Button Me.ClientSize = New System.Drawing.Size(691, 291) + Me.Controls.Add(Me.TabEventType) Me.Controls.Add(Me.ButtonRefresh) Me.Controls.Add(Me.CheckExcludeMyEvent) Me.Controls.Add(Me.OK_Button) - Me.Controls.Add(Me.EventList) Me.DoubleBuffered = True Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.SizableToolWindow Me.MaximizeBox = False @@ -113,17 +241,29 @@ Me.ShowInTaskbar = False Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent Me.Text = "Events" + Me.TabEventType.ResumeLayout(False) + Me.TabPageAll.ResumeLayout(False) Me.ResumeLayout(False) Me.PerformLayout() End Sub Friend WithEvents OK_Button As System.Windows.Forms.Button + Friend WithEvents CheckExcludeMyEvent As System.Windows.Forms.CheckBox + Friend WithEvents ButtonRefresh As System.Windows.Forms.Button + Friend WithEvents TabEventType As System.Windows.Forms.TabControl + Friend WithEvents TabPageAll As System.Windows.Forms.TabPage Friend WithEvents EventList As System.Windows.Forms.ListView Friend WithEvents ColumnHeader1 As System.Windows.Forms.ColumnHeader Friend WithEvents ColumnHeader2 As System.Windows.Forms.ColumnHeader Friend WithEvents ColumnHeader3 As System.Windows.Forms.ColumnHeader Friend WithEvents ColumnHeader4 As System.Windows.Forms.ColumnHeader - Friend WithEvents CheckExcludeMyEvent As System.Windows.Forms.CheckBox - Friend WithEvents ButtonRefresh As System.Windows.Forms.Button + Friend WithEvents TabPageFav As System.Windows.Forms.TabPage + Friend WithEvents TabPageUnfav As System.Windows.Forms.TabPage + Friend WithEvents TabPageFollow As System.Windows.Forms.TabPage + Friend WithEvents TabPageAddLists As System.Windows.Forms.TabPage + Friend WithEvents TabPageRemoveLists As System.Windows.Forms.TabPage + Friend WithEvents TabPageListsCreated As System.Windows.Forms.TabPage + Friend WithEvents TabPageBlock As System.Windows.Forms.TabPage + Friend WithEvents TabPageUserUpdate As System.Windows.Forms.TabPage End Class Modified: trunk/Tween/EventViewerDialog.vb =================================================================== --- trunk/Tween/EventViewerDialog.vb 2011-01-26 17:49:03 UTC (rev 1414) +++ trunk/Tween/EventViewerDialog.vb 2011-01-27 02:58:06 UTC (rev 1415) @@ -57,7 +57,7 @@ End If End Sub - Private Sub EventList_DoubleClick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles EventList.DoubleClick + Private Sub EventList_DoubleClick(ByVal sender As System.Object, ByVal e As System.EventArgs) If EventSource IsNot Nothing AndAlso EventSource.Count > 0 Then If EventSource(EventList.SelectedIndices(0)) IsNot Nothing Then If Me.Owner IsNot Nothing Then @@ -67,17 +67,23 @@ End If End Sub - Private Sub CheckExcludeMyEvent_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckExcludeMyEvent.CheckedChanged + Private Sub EventListUpdate() If EventSource IsNot Nothing AndAlso EventSource.Count > 0 Then EventList.BeginUpdate() EventList.Items.Clear() EventList.Items.AddRange( CreateListViewItemArray((From x As Twitter.FormattedEvent In EventSource - Where If(CheckExcludeMyEvent.Checked, Not x.IsMe, True) Select x).ToList())) + Where If(CheckExcludeMyEvent.Checked, Not x.IsMe, True) AndAlso CBool((x.Eventtype And DirectCast([Enum].Parse(GetType(EVENTTYPE), _curTab.Tag.ToString()), EVENTTYPE))) + Select x).ToList())) EventList.EndUpdate() End If End Sub + + Private Sub CheckExcludeMyEvent_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckExcludeMyEvent.CheckedChanged + EventListUpdate() + End Sub + Private Sub ButtonRefresh_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonRefresh.Click If EventSource IsNot Nothing AndAlso EventSource.Count > 0 Then EventList.BeginUpdate() @@ -86,4 +92,17 @@ EventList.EndUpdate() End If End Sub + + Private _curTab As TabPage = Nothing + + Private Sub TabEventType_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TabEventType.SelectedIndexChanged + EventListUpdate() + End Sub + + Private Sub TabEventType_Selecting(ByVal sender As System.Object, ByVal e As System.Windows.Forms.TabControlCancelEventArgs) Handles TabEventType.Selecting + _curTab = e.TabPage + If Not e.TabPage.Controls.Contains(EventList) Then + e.TabPage.Controls.Add(EventList) + End If + End Sub End Class Modified: trunk/Tween/MyCommon.vb =================================================================== --- trunk/Tween/MyCommon.vb 2011-01-26 17:49:03 UTC (rev 1414) +++ trunk/Tween/MyCommon.vb 2011-01-27 02:58:06 UTC (rev 1415) @@ -178,7 +178,7 @@ Deleted = 256 ListCreated = 512 - ALL = (None Or Favorite Or Unfavorite Or Follow Or ListMemberAdded Or ListMemberRemoved Or _ + All = (None Or Favorite Or Unfavorite Or Follow Or ListMemberAdded Or ListMemberRemoved Or _ Block Or Unblock Or UserUpdate Or Deleted Or ListCreated) End Enum