Size.Height = 345.000000000000000000
Size.PlatformDefault = False
WrapMode = Stretch
+ object BandedSwirlTransitionEffect1: TBandedSwirlTransitionEffect
+ Enabled = False
+ Progress = 0.000000000000000000
+ Strength = 1.000000000000000000
+ Frequency = 20.000000000000000000
+ end
+ object BlindTransitionEffect1: TBlindTransitionEffect
+ Enabled = False
+ Progress = 0.000000000000000000
+ NumberOfBlinds = 5.000000000000000000
+ end
+ object BlurTransitionEffect1: TBlurTransitionEffect
+ Enabled = False
+ Progress = 0.000000000000000000
+ end
+ object BrightTransitionEffect1: TBrightTransitionEffect
+ Enabled = False
+ Progress = 0.000000000000000000
+ end
+ object CircleTransitionEffect1: TCircleTransitionEffect
+ Enabled = False
+ Progress = 0.000000000000000000
+ FuzzyAmount = 0.100000001490116100
+ CircleSize = 1.000000000000000000
+ end
+ object CrumpleTransitionEffect1: TCrumpleTransitionEffect
+ Enabled = False
+ Progress = 0.000000000000000000
+ RandomSeed = 0.300000011920929000
+ end
+ object DissolveTransitionEffect1: TDissolveTransitionEffect
+ Enabled = False
+ Progress = 0.000000000000000000
+ RandomSeed = 0.300000011920929000
+ end
+ object DropTransitionEffect1: TDropTransitionEffect
+ Enabled = False
+ Progress = 0.000000000000000000
+ RandomSeed = 0.300000011920929000
+ end
+ object FadeTransitionEffect1: TFadeTransitionEffect
+ Enabled = False
+ Progress = 0.000000000000000000
+ end
+ object LineTransitionEffect1: TLineTransitionEffect
+ Enabled = False
+ Progress = 0.000000000000000000
+ FuzzyAmount = 0.100000001490116100
+ end
+ object MagnifyTransitionEffect1: TMagnifyTransitionEffect
+ Enabled = False
+ Progress = 0.000000000000000000
+ end
+ object PixelateTransitionEffect1: TPixelateTransitionEffect
+ Enabled = False
+ Progress = 0.000000000000000000
+ end
+ object RippleTransitionEffect1: TRippleTransitionEffect
+ Enabled = False
+ Progress = 0.000000000000000000
+ end
+ object RotateCrumpleTransitionEffect1: TRotateCrumpleTransitionEffect
+ Enabled = False
+ Progress = 0.000000000000000000
+ RandomSeed = 0.300000011920929000
+ end
+ object SaturateTransitionEffect1: TSaturateTransitionEffect
+ Enabled = False
+ Progress = 0.000000000000000000
+ end
+ object ShapeTransitionEffect1: TShapeTransitionEffect
+ Enabled = False
+ Progress = 0.000000000000000000
+ RandomSeed = 0.300000011920929000
+ end
+ object SlideTransitionEffect1: TSlideTransitionEffect
+ Enabled = False
+ Progress = 0.000000000000000000
+ end
+ object SwirlTransitionEffect1: TSwirlTransitionEffect
+ Enabled = False
+ Progress = 0.000000000000000000
+ Strength = 1.000000000000000000
+ end
+ object WaterTransitionEffect1: TWaterTransitionEffect
+ Enabled = False
+ Progress = 0.000000000000000000
+ RandomSeed = 0.300000011920929000
+ end
+ object WaveTransitionEffect1: TWaveTransitionEffect
+ Enabled = False
+ Progress = 0.000000000000000000
+ end
+ object WiggleTransitionEffect1: TWiggleTransitionEffect
+ Enabled = False
+ Progress = 0.000000000000000000
+ RandomSeed = 0.300000011920929000
+ end
end
object ListView1: TListView
ItemAppearanceClassName = 'TImageListItemRightButtonAppearance'
Options = [ofHideReadOnly, ofAllowMultiSelect, ofEnableSizing]
Left = 176
Top = 264
- object BandedSwirlTransitionEffect1: TBandedSwirlTransitionEffect
- Progress = 0.000000000000000000
- Strength = 1.000000000000000000
- Frequency = 20.000000000000000000
- end
- object BlindTransitionEffect1: TBlindTransitionEffect
- Progress = 0.000000000000000000
- NumberOfBlinds = 5.000000000000000000
- end
- object BlurTransitionEffect1: TBlurTransitionEffect
- Progress = 0.000000000000000000
- end
- object BrightTransitionEffect1: TBrightTransitionEffect
- Progress = 0.000000000000000000
- end
- object CircleTransitionEffect1: TCircleTransitionEffect
- Progress = 0.000000000000000000
- FuzzyAmount = 0.100000001490116100
- CircleSize = 1.000000000000000000
- end
- object CrumpleTransitionEffect1: TCrumpleTransitionEffect
- Progress = 0.000000000000000000
- RandomSeed = 0.300000011920929000
- end
- object DissolveTransitionEffect1: TDissolveTransitionEffect
- Progress = 0.000000000000000000
- RandomSeed = 0.300000011920929000
- end
- object DropTransitionEffect1: TDropTransitionEffect
- Progress = 0.000000000000000000
- RandomSeed = 0.300000011920929000
- end
- object FadeTransitionEffect1: TFadeTransitionEffect
- Progress = 0.000000000000000000
- end
- object LineTransitionEffect1: TLineTransitionEffect
- Progress = 0.000000000000000000
- FuzzyAmount = 0.100000001490116100
- end
- object MagnifyTransitionEffect1: TMagnifyTransitionEffect
- Progress = 0.000000000000000000
- end
- object PixelateTransitionEffect1: TPixelateTransitionEffect
- Progress = 0.000000000000000000
- end
- object RippleTransitionEffect1: TRippleTransitionEffect
- Progress = 0.000000000000000000
- end
- object RotateCrumpleTransitionEffect1: TRotateCrumpleTransitionEffect
- Progress = 0.000000000000000000
- RandomSeed = 0.300000011920929000
- end
- object SaturateTransitionEffect1: TSaturateTransitionEffect
- Progress = 0.000000000000000000
- end
- object ShapeTransitionEffect1: TShapeTransitionEffect
- Progress = 0.000000000000000000
- RandomSeed = 0.300000011920929000
- end
- object SlideTransitionEffect1: TSlideTransitionEffect
- Progress = 0.000000000000000000
- end
- object SwirlTransitionEffect1: TSwirlTransitionEffect
- Progress = 0.000000000000000000
- Strength = 1.000000000000000000
- end
- object WaterTransitionEffect1: TWaterTransitionEffect
- Progress = 0.000000000000000000
- RandomSeed = 0.300000011920929000
- end
- object WaveTransitionEffect1: TWaveTransitionEffect
- Progress = 0.000000000000000000
- end
- object WiggleTransitionEffect1: TWiggleTransitionEffect
- Progress = 0.000000000000000000
- RandomSeed = 0.300000011920929000
- end
end
object FloatAnimation1: TFloatAnimation
- Duration = 5.000000000000000000
+ Duration = 2.500000000000000000
Interpolation = Exponential
OnFinish = FloatAnimation1Finish
PropertyName = 'Progress'
ListView1.Items.Clear;
for i := 0 to OpenDialog1.Files.Count - 1 do
begin
- s:=ListView1.Items.Add;
- s.Text:=ExtractFileName(OpenDialog1.Files[i]);
+ s := ListView1.Items.Add;
+ s.Text := ExtractFileName(OpenDialog1.Files[i]);
s.Detail := OpenDialog1.Files[i];
s.Bitmap.LoadFromFile(OpenDialog1.Files[i]);
end;
if ListView1.ItemCount > 0 then
begin
- ListView1.ItemIndex:=0;
+ ListView1.ItemIndex := 0;
Image1.Bitmap.Assign(ListView1.Items[0].Bitmap);
end;
end;
s: TFmxObject;
i: Integer;
begin
- if (ListView1.ItemIndex > -1)and(ListView1.ItemIndex < ListView1.ItemCount-1) then
+ if (ListView1.ItemIndex > -1) and
+ (ListView1.ItemIndex < ListView1.ItemCount - 1) then
begin
- progress:=true;
- FloatAnimation1.Stop;
- for i := 0 to OpenDialog1.ChildrenCount - 1 do
- if OpenDialog1.Children[i].ClassName = ComboBox1.Items[ComboBox1.ItemIndex] then
+ if FloatAnimation1.Running = true then
+ begin
+ progress := true;
+ FloatAnimation1.Stop;
+ end;
+ for i := 0 to Image1.ChildrenCount - 1 do
+ if Image1.Children[i].ClassName = ComboBox1.Items[ComboBox1.ItemIndex]
+ then
begin
- s := OpenDialog1.Children[i];
- s.Parent := Image1;
+ s := Image1.Children[i];
FloatAnimation1.Parent := s;
- SetObjectProp(s, 'target', ListView1.Items[ListView1.ItemIndex+1].Bitmap);
+ (s as TEffect).Enabled:=true;
+ SetObjectProp(s, 'target',
+ ListView1.Items[ListView1.ItemIndex + 1].Bitmap);
FloatAnimation1.Start;
break;
end;
procedure TForm1.FloatAnimation1Finish(Sender: TObject);
begin
- FloatAnimation1.Parent.Parent := OpenDialog1;
- if (ListView1.ItemIndex < ListView1.ItemCount-1)and(progress = false) then
- ListView1.ItemIndex:=ListView1.ItemIndex+1
- else
- progress:=false;
- Image1.Bitmap.Assign(ListView1.Items[ListView1.ItemIndex].Bitmap);
+ (FloatAnimation1.Parent as TEffect).Enabled := false;
+ if (ListView1.ItemIndex < ListView1.ItemCount - 1) and (progress = false) then
+ begin
+ ListView1.ItemIndex := ListView1.ItemIndex + 1;
+ Image1.Bitmap.Assign(ListView1.Items[ListView1.ItemIndex].Bitmap);
+ if ListView1.ItemIndex < ListView1.ItemCount - 1 then
+ begin
+ ComboBox1.ItemIndex := Random(ComboBox1.Items.Count);
+ Button2Click(Sender);
+ end;
+ end
+ else
+ progress := false;
end;
procedure TForm1.FormCreate(Sender: TObject);
var
i: Integer;
begin
- for i := 0 to OpenDialog1.ChildrenCount - 1 do
- ComboBox1.Items.Add(OpenDialog1.Children[i].ClassName);
+ for i := 0 to Image1.ChildrenCount - 1 do
+ ComboBox1.Items.Add(Image1.Children[i].ClassName);
ComboBox1.ItemIndex := 0;
end;
procedure TForm1.ListView1Change(Sender: TObject);
begin
- progress:=true;
- FloatAnimation1.Stop;
+ if FloatAnimation1.Running = true then
+ begin
+ progress := true;
+ FloatAnimation1.Stop;
+ end;
Image1.Bitmap.Assign(ListView1.Items[ListView1.ItemIndex].Bitmap);
end;