consider that files can have changed when going next file and last file.
This commit is contained in:
@@ -73,6 +73,14 @@ namespace WPicView
|
|||||||
if (e.Key == System.Windows.Input.Key.Right) {
|
if (e.Key == System.Windows.Input.Key.Right) {
|
||||||
if (fPos < allFiles.Length -1 ) {
|
if (fPos < allFiles.Length -1 ) {
|
||||||
fPos += 1;
|
fPos += 1;
|
||||||
|
} else
|
||||||
|
{
|
||||||
|
// look if more files popped up in the meantime...
|
||||||
|
allFiles = System.IO.Directory.GetFiles(allDirs[dPos], searchPattern);
|
||||||
|
if (fPos < allFiles.Length - 1)
|
||||||
|
{
|
||||||
|
fPos += 1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
} else if (e.Key == System.Windows.Input.Key.Left) {
|
} else if (e.Key == System.Windows.Input.Key.Left) {
|
||||||
@@ -83,6 +91,7 @@ namespace WPicView
|
|||||||
|
|
||||||
if (e.Key == Key.End)
|
if (e.Key == Key.End)
|
||||||
{
|
{
|
||||||
|
allFiles = System.IO.Directory.GetFiles(allDirs[dPos], searchPattern);
|
||||||
fPos = allFiles.Length - 1;
|
fPos = allFiles.Length - 1;
|
||||||
}
|
}
|
||||||
if (e.Key == Key.Home )
|
if (e.Key == Key.Home )
|
||||||
|
|||||||
Reference in New Issue
Block a user