OSDN Git Service

エラーの修復
authorjiro <yamat0jp@yahoo.co.jp>
Wed, 11 Mar 2015 11:08:40 +0000 (20:08 +0900)
committerjiro <yamat0jp@yahoo.co.jp>
Wed, 11 Mar 2015 11:08:40 +0000 (20:08 +0900)
Unit1.fmx
Unit1.pas

index fa04665..36fe960 100644 (file)
--- a/Unit1.fmx
+++ b/Unit1.fmx
@@ -13,6 +13,7 @@ object Form1: TForm1
     MultiResBitmap = <
       item
       end>
+    Anchors = [akTop, akRight]
     Position.X = 280.000000000000000000
     Position.Y = 40.000000000000000000
     Size.Width = 481.000000000000000000
@@ -25,9 +26,10 @@ object Form1: TForm1
     ItemEditAppearanceClassName = 'TImageListItemRightButtonDeleteAppearance'
     HeaderAppearanceClassName = 'TListHeaderObjects'
     FooterAppearanceClassName = 'TListHeaderObjects'
-    Position.X = 24.000000000000000000
+    Align = Scale
+    Position.X = 28.000000000000000000
     Position.Y = 40.000000000000000000
-    Size.Width = 209.000000000000000000
+    Size.Width = 200.000000000000000000
     Size.Height = 345.000000000000000000
     Size.PlatformDefault = False
     TabOrder = 5
@@ -36,11 +38,15 @@ object Form1: TForm1
   object Button1: TButton
     Position.X = 88.000000000000000000
     Position.Y = 432.000000000000000000
+    Size.Width = 80.000000000000000000
+    Size.Height = 22.000000000000000000
+    Size.PlatformDefault = False
     TabOrder = 6
     Text = #38283#12367
     OnClick = Button1Click
   end
   object Button2: TButton
+    Anchors = [akTop, akRight]
     Position.X = 496.000000000000000000
     Position.Y = 432.000000000000000000
     TabOrder = 9
@@ -180,6 +186,7 @@ object Form1: TForm1
     StopValue = 100.000000000000000000
   end
   object ComboBox1: TComboBox
+    Anchors = [akTop, akRight]
     Position.X = 464.000000000000000000
     Position.Y = 480.000000000000000000
     Size.Width = 148.000000000000000000
index ba1158e..2fb3b94 100644 (file)
--- a/Unit1.pas
+++ b/Unit1.pas
@@ -59,6 +59,7 @@ type
     procedure MenuItem5Click(Sender: TObject);
     procedure MenuItem8Click(Sender: TObject);
   private
+    progress: Boolean;
     { private \90é\8c¾ }
   public
     { public \90é\8c¾ }
@@ -89,7 +90,10 @@ begin
       s.Bitmap.LoadFromFile(OpenDialog1.Files[i]);
     end;
     if ListView1.ItemCount > 0 then
+    begin
       ListView1.ItemIndex:=0;
+      Image1.Bitmap.Assign(ListView1.Items[0].Bitmap);
+    end;
   end;
 end;
 
@@ -100,21 +104,28 @@ var
 begin
   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
+      begin
         s := OpenDialog1.Children[i];
-    s.Parent := Image1;
-    FloatAnimation1.Parent := s;
-    SetObjectProp(s, 'target', ListView1.Items[ListView1.ItemIndex+1].Bitmap);
-    FloatAnimation1.Start;
+        s.Parent := Image1;
+        FloatAnimation1.Parent := s;
+        SetObjectProp(s, 'target', ListView1.Items[ListView1.ItemIndex+1].Bitmap);
+        FloatAnimation1.Start;
+        break;
+      end;
   end;
 end;
 
 procedure TForm1.FloatAnimation1Finish(Sender: TObject);
 begin
   FloatAnimation1.Parent.Parent := OpenDialog1;
-  ListView1.ItemIndex:=ListView1.ItemIndex+1;
+  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);
 end;
 
@@ -129,6 +140,7 @@ end;
 
 procedure TForm1.ListView1Change(Sender: TObject);
 begin
+  progress:=true;
   FloatAnimation1.Stop;
   Image1.Bitmap.Assign(ListView1.Items[ListView1.ItemIndex].Bitmap);
 end;