OSDN Git Service

EventViewerDialogの初期処理で表示アイテムがなければカラム幅調整しないように
authorkiri_feather <kiri_feather@users.sourceforge.jp>
Thu, 9 Dec 2010 14:22:14 +0000 (14:22 +0000)
committerKimura Youichi <kim.upsilon@bucyou.net>
Sat, 18 Feb 2012 14:17:04 +0000 (23:17 +0900)
旧形式の設定ファイル読み込み処理を削除

git-svn-id: http://svn.sourceforge.jp/svnroot/tween/trunk@1191 e39ad16e-3079-482e-bb30-4b4d378143b6

Tween/EventViewerDialog.vb
Tween/Tween.vb
Tween/Tween.vbproj

index ad9d4b7..784fcef 100644 (file)
@@ -14,10 +14,12 @@ Public Class EventViewerDialog
     End Sub
 
     Private Sub EventViewerDialog_Shown(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Shown
-        For Each x As Twitter.FormattedEvent In EventSource
-            Dim s() As String = {x.CreatedAt.ToString, x.Event.ToUpper, x.Username, x.Target}
-            Me.EventList.Items.Add(New ListViewItem(s))
-        Next
-        Me.EventList.AutoResizeColumns(ColumnHeaderAutoResizeStyle.ColumnContent)
+        If EventSource IsNot Nothing AndAlso EventSource.Count > 0 Then
+            For Each x As Twitter.FormattedEvent In EventSource
+                Dim s() As String = {x.CreatedAt.ToString, x.Event.ToUpper, x.Username, x.Target}
+                Me.EventList.Items.Add(New ListViewItem(s))
+            Next
+            Me.EventList.AutoResizeColumns(ColumnHeaderAutoResizeStyle.ColumnContent)
+        End If
     End Sub
 End Class
index d6fe4ed..9dc9754 100644 (file)
@@ -1121,44 +1121,44 @@ Public Class TweenMain
         e.Graphics.DrawString(txt, e.Font, fore, e.Bounds, sfTab)
     End Sub
 
-    Private Function LoadOldConfig() As Boolean
-        Dim needToSave As Boolean = False
-        _cfgCommon = SettingCommon.Load()
-        _cfgLocal = SettingLocal.Load()
-        If _cfgCommon.TabList.Count > 0 Then
-            For Each tabName As String In _cfgCommon.TabList
-                _statuses.Tabs.Add(tabName, SettingTab.Load(tabName).Tab)
-                If tabName <> ReplaceInvalidFilename(tabName) Then
-                    Dim tb As TabClass = _statuses.Tabs(tabName)
-                    _statuses.RemoveTab(tabName)
-                    tb.TabName = ReplaceInvalidFilename(tabName)
-                    _statuses.Tabs.Add(ReplaceInvalidFilename(tabName), tb)
-                    Dim tabSetting As New SettingTab
-                    tabSetting.Tab = tb
-                    tabSetting.Save()
-                    needToSave = True
-                End If
-            Next
-        Else
-            _statuses.AddTab(DEFAULTTAB.RECENT, TabUsageType.Home, Nothing)
-            _statuses.AddTab(DEFAULTTAB.REPLY, TabUsageType.Mentions, Nothing)
-            _statuses.AddTab(DEFAULTTAB.DM, TabUsageType.DirectMessage, Nothing)
-            _statuses.AddTab(DEFAULTTAB.FAV, TabUsageType.Favorites, Nothing)
-        End If
-        If needToSave Then
-            _cfgCommon.TabList.Clear()
-            For Each tabName As String In _statuses.Tabs.Keys
-                _cfgCommon.TabList.Add(tabName)
-            Next
-            _cfgCommon.Save()
-        End If
-
-        If System.IO.File.Exists(SettingCommon.GetSettingFilePath("")) Then
-            Return True
-        Else
-            Return False
-        End If
-    End Function
+    'Private Function LoadOldConfig() As Boolean
+    '    Dim needToSave As Boolean = False
+    '    _cfgCommon = SettingCommon.Load()
+    '    _cfgLocal = SettingLocal.Load()
+    '    If _cfgCommon.TabList.Count > 0 Then
+    '        For Each tabName As String In _cfgCommon.TabList
+    '            _statuses.Tabs.Add(tabName, SettingTab.Load(tabName).Tab)
+    '            If tabName <> ReplaceInvalidFilename(tabName) Then
+    '                Dim tb As TabClass = _statuses.Tabs(tabName)
+    '                _statuses.RemoveTab(tabName)
+    '                tb.TabName = ReplaceInvalidFilename(tabName)
+    '                _statuses.Tabs.Add(ReplaceInvalidFilename(tabName), tb)
+    '                Dim tabSetting As New SettingTab
+    '                tabSetting.Tab = tb
+    '                tabSetting.Save()
+    '                needToSave = True
+    '            End If
+    '        Next
+    '    Else
+    '        _statuses.AddTab(DEFAULTTAB.RECENT, TabUsageType.Home, Nothing)
+    '        _statuses.AddTab(DEFAULTTAB.REPLY, TabUsageType.Mentions, Nothing)
+    '        _statuses.AddTab(DEFAULTTAB.DM, TabUsageType.DirectMessage, Nothing)
+    '        _statuses.AddTab(DEFAULTTAB.FAV, TabUsageType.Favorites, Nothing)
+    '    End If
+    '    If needToSave Then
+    '        _cfgCommon.TabList.Clear()
+    '        For Each tabName As String In _statuses.Tabs.Keys
+    '            _cfgCommon.TabList.Add(tabName)
+    '        Next
+    '        _cfgCommon.Save()
+    '    End If
+
+    '    If System.IO.File.Exists(SettingCommon.GetSettingFilePath("")) Then
+    '        Return True
+    '    Else
+    '        Return False
+    '    End If
+    'End Function
 
     Private Sub LoadConfig()
         Dim needToSave As Boolean = False
@@ -1182,7 +1182,7 @@ Public Class TweenMain
             LoadConfig()
             Exit Sub
         End If
-        LoadOldConfig()
+        'LoadOldConfig()
     End Sub
 
     Private Sub TimerTimeline_Elapsed(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TimerTimeline.Elapsed
index 95e6849..403f580 100644 (file)
     <Compile Include="Setting\SettingBase.vb" />
     <Compile Include="Setting\SettingCommon.vb" />
     <Compile Include="Setting\SettingLocal.vb" />
-    <Compile Include="Setting\SettingTab.vb" />
     <Compile Include="Setting\SettingFollower.vb" />
     <Compile Include="Setting\SettingTabs.vb" />
     <Compile Include="ShieldIcon.vb" />