OSDN Git Service

デバッグの為、Image.FromFileに失敗したときの一時ファイルをTweenのディレクトリに保存するコードを追加。
authoranis774 <anis774@users.sourceforge.jp>
Fri, 10 Sep 2010 04:23:44 +0000 (04:23 +0000)
committerKimura Youichi <kim.upsilon@bucyou.net>
Sat, 18 Feb 2012 14:15:21 +0000 (23:15 +0900)
git-svn-id: http://svn.sourceforge.jp/svnroot/tween/trunk@843 e39ad16e-3079-482e-bb30-4b4d378143b6

Tween/ImageCacheDictionary.vb
Tween/Tween.vb

index 6188122..34bd38a 100644 (file)
@@ -181,7 +181,8 @@ Public Class ImageCacheDictionary
                     Try
                         Me.img = Image.FromFile(Me.tmpFilePath)
                     Catch ex As OutOfMemoryException
-                        File.Copy(Me.tmpFilePath, Path.Combine(Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.DesktopDirectory), "TweenCache"), Path.GetFileName(Me.tmpFilePath)))
+                        Dim filePath As String = Path.Combine(Application.StartupPath, Path.GetFileName(Me.tmpFilePath))
+                        File.Copy(Me.tmpFilePath, filePath)
                         Throw ex
                     End Try
                 End If
index 7fab3e8..9e19ada 100644 (file)
@@ -981,7 +981,7 @@ Public Class TweenMain
         End If
 
         'アイコンリスト作成
-        TIconDic = New ImageCacheDictionary(50)
+        TIconDic = New ImageCacheDictionary(3000)
 
         tw.DetailIcon = TIconDic