svnno****@sourc*****
svnno****@sourc*****
2011年 1月 10日 (月) 07:11:46 JST
Revision: 1331 http://sourceforge.jp/projects/tween/svn/view?view=rev&revision=1331 Author: anis774 Date: 2011-01-10 07:11:46 +0900 (Mon, 10 Jan 2011) Log Message: ----------- 新規でリストタブを作成しようとすると発生する例外に対処 Modified Paths: -------------- trunk/Tween/FilterDialog.vb trunk/Tween/Tween.vb -------------- next part -------------- Modified: trunk/Tween/FilterDialog.vb =================================================================== --- trunk/Tween/FilterDialog.vb 2011-01-09 14:48:36 UTC (rev 1330) +++ trunk/Tween/FilterDialog.vb 2011-01-09 22:11:46 UTC (rev 1331) @@ -793,7 +793,7 @@ list = listAvail.SelectedList End Using End If - If Not DirectCast(Me.Owner, TweenMain).AddNewTab(tabName, False, tabType) Then + If Not DirectCast(Me.Owner, TweenMain).AddNewTab(tabName, False, tabType, list) Then Dim tmp As String = String.Format(My.Resources.AddTabMenuItem_ClickText1, tabName) MessageBox.Show(tmp, My.Resources.AddTabMenuItem_ClickText2, MessageBoxButtons.OK, MessageBoxIcon.Exclamation) Exit Sub Modified: trunk/Tween/Tween.vb =================================================================== --- trunk/Tween/Tween.vb 2011-01-09 14:48:36 UTC (rev 1330) +++ trunk/Tween/Tween.vb 2011-01-09 22:11:46 UTC (rev 1331) @@ -3334,7 +3334,7 @@ GetTimeline(WORKERTYPE.UserTimeline, 1, 0, tabName) End Sub - Public Function AddNewTab(ByVal tabName As String, ByVal startup As Boolean, ByVal tabType As TabUsageType) As Boolean + Public Function AddNewTab(ByVal tabName As String, ByVal startup As Boolean, ByVal tabType As TabUsageType, Optional ByVal listInfo As ListElement = Nothing) As Boolean '重複チェック For Each tb As TabPage In ListTab.TabPages If tb.Text = tabName Then Return False @@ -3384,7 +3384,7 @@ label.Dock = DockStyle.Top label.Name = "labelUser" If tabType = TabUsageType.Lists Then - label.Text = _statuses.Tabs(tabName).ListInfo.ToString() + label.Text = listInfo.ToString() Else label.Text = _statuses.Tabs(tabName).User + "'s Timeline" End If @@ -6798,7 +6798,7 @@ list = listAvail.SelectedList End Using End If - If Not AddNewTab(tabName, False, tabUsage) Then + If Not AddNewTab(tabName, False, tabUsage, list) Then Dim tmp As String = String.Format(My.Resources.AddTabMenuItem_ClickText1, tabName) MessageBox.Show(tmp, My.Resources.AddTabMenuItem_ClickText2, MessageBoxButtons.OK, MessageBoxIcon.Exclamation) Else @@ -8910,7 +8910,7 @@ Next tb.TabName = renamed _statuses.Tabs.Add(renamed, tb) - AddNewTab(renamed, False, tb.TabType) + AddNewTab(renamed, False, tb.TabType, tb.ListInfo) ListTab.SelectedIndex = ListTab.TabPages.Count - 1 SaveConfigsTabs() End If