OSDN Git Service

soundのトラック表示を変更
[vobslideshow/vob.git] / Unit2.pas
1 unit Unit2;
2
3 interface
4
5 uses
6   System.SysUtils, System.Types, System.UITypes, System.Classes,
7   System.Variants,
8   FMX.Types, FMX.Controls, FMX.Forms, FMX.Graphics, FMX.Dialogs, FMX.StdCtrls,
9   FMX.Layouts, FMX.ListBox;
10
11 type
12   TForm2 = class(TForm)
13     ListBox1: TListBox;
14     ListBox2: TListBox;
15     Button1: TButton;
16     Button2: TButton;
17     Button3: TButton;
18     Button4: TButton;
19     Button5: TButton;
20     Button6: TButton;
21     Panel1: TPanel;
22     procedure Button1Click(Sender: TObject);
23     procedure Button2Click(Sender: TObject);
24     procedure Button3Click(Sender: TObject);
25     procedure Button4Click(Sender: TObject);
26     procedure FormShow(Sender: TObject);
27   private
28     { private \90é\8c¾ }
29   public
30     { public \90é\8c¾ }
31   end;
32
33 var
34   Form2: TForm2;
35
36 implementation
37
38 {$R *.fmx}
39
40 uses Unit1;
41
42 procedure TForm2.Button1Click(Sender: TObject);
43 var
44   i: Integer;
45 begin
46   for i := ListBox1.Count - 1 downto 0 do
47     if ListBox1.ListItems[i].IsSelected = true then
48     begin
49       ListBox2.Items.Add(ListBox1.Items[i]);
50       ListBox1.Items.Delete(i);
51     end;
52 end;
53
54 procedure TForm2.Button2Click(Sender: TObject);
55 var
56   i: Integer;
57 begin
58   for i := ListBox2.Count - 1 downto 0 do
59     if ListBox2.ListItems[i].IsSelected = true then
60     begin
61       ListBox1.Items.Add(ListBox2.Items[i]);
62       ListBox2.Items.Delete(i);
63     end;
64 end;
65
66 procedure TForm2.Button3Click(Sender: TObject);
67 begin
68   ListBox2.Items.AddStrings(ListBox1.Items);
69   ListBox1.Items.Clear;
70 end;
71
72 procedure TForm2.Button4Click(Sender: TObject);
73 begin
74   ListBox1.Items.AddStrings(ListBox2.Items);
75   ListBox2.Items.Clear;
76 end;
77
78 procedure TForm2.FormShow(Sender: TObject);
79 var
80   i: Integer;
81   s: string;
82 begin
83   ListBox1.Items.Clear;
84   ListBox2.Items.Assign(Form1.ComboBox1.Items);
85   for i := 0 to Form1.Image1.ChildrenCount - 1 do
86   begin
87     s := Form1.Image1.Children[i].ClassName;
88     if ListBox2.Items.IndexOf(s) = -1 then
89       ListBox1.Items.Add(s);
90   end;
91 end;
92
93 end.