Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Steve Lhomme
VLC-WinRT
Commits
3f16bb66
Commit
3f16bb66
authored
May 23, 2016
by
Thomas Nigro
Browse files
Slideshow: only use a single image
parent
baf748e3
Changes
1
Hide whitespace changes
Inline
Side-by-side
app/VLC_WinRT.Slideshow/Images/ImgSlideshow.cs
View file @
3f16bb66
...
...
@@ -45,7 +45,6 @@ namespace Slide2D.Images
private
int
ImgIndex
=
0
;
private
Img
currentImg
;
private
List
<
Img
>
images
=
new
List
<
Img
>();
public
ImgSlideshow
()
{
...
...
@@ -74,7 +73,7 @@ namespace Slide2D.Images
{
if
(
album
.
IsPictureLoaded
)
{
images
.
Add
(
new
Img
(
album
.
AlbumCoverFullUri
)
)
;
currentImg
=
new
Img
(
album
.
AlbumCoverFullUri
);
newPic
=
true
;
}
}
...
...
@@ -248,23 +247,8 @@ namespace Slide2D.Images
sender
.
Paused
=
true
;
}
// Choosing a new img to display in the next loop
getNextImg
();
frame
=
0
;
blurAmount
=
MaximumBlur
;
}
void
getNextImg
()
{
Debug
.
WriteLine
(
$"Choosing a picture out of
{
images
.
Count
}
pictures."
);
if
(
images
.
Count
==
0
)
return
;
int
nextImgIndex
=
0
;
if
(
images
.
Count
>
2
)
nextImgIndex
=
random
.
Next
(
0
,
images
.
Count
-
1
);
else
if
(
images
.
Count
>
1
)
nextImgIndex
=
random
.
NextDouble
()
<
0.5
?
0
:
1
;
currentImg
=
images
[
nextImgIndex
];
Debug
.
WriteLine
(
$"Choose picture uri =
{
currentImg
.
Src
}
"
);
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment