Develop and Download Open Source Software

Browse Subversion Repository

Diff of /Unit4.pas

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 6 by yamat0jp, Tue Jul 28 08:41:38 2015 UTC revision 7 by yamat0jp, Sat Aug 15 03:06:09 2015 UTC
# Line 52  uses Unit2, Unit1, Unit3; Line 52  uses Unit2, Unit1, Unit3;
52    
53  procedure TSearchMP3.Execute;  procedure TSearchMP3.Execute;
54  var  var
   list: TStringList;  
55    depth: integer;    depth: integer;
56    i, k: integer;    i, k: integer;
57      s: string;
58      temp: TStringList;
59    procedure Add(const Dir: string);    procedure Add(const Dir: string);
60    var    var
61      s1, s2: TSearchRec;      s1, s2: TSearchRec;
# Line 71  var Line 72  var
72        while i = 0 do        while i = 0 do
73        begin        begin
74          if (s1.Name <> '.') and (s1.Name <> '..') then          if (s1.Name <> '.') and (s1.Name <> '..') then
75            list.Add(st + s1.Name + '|' + (depth + 1).ToString);            temp.Add(st + s1.Name + '|' + (depth + 1).ToString);
76          i := FindNext(s1);          i := FindNext(s1);
77        end;        end;
78        while j = 0 do        while j = 0 do
79        begin        begin
80          Synchronize(          Form1.list.Add(st+s2.Name);
           procedure  
           begin  
             with Form1.ListView1.Items.Add do  
             begin  
               Text := s2.Name;  
               Detail := st + s2.Name;  
             end;  
           end);  
81          j := FindNext(s2);          j := FindNext(s2);
82        end;        end;
83      finally      finally
# Line 95  var Line 88  var
88    
89  begin  begin
90    { スレッドとして実行したいコードをここに記述してください }    { スレッドとして実行したいコードをここに記述してください }
91    list := TStringList.Create;    temp:=TStringList.Create;
92    try    try
93      list.NameValueSeparator := '|';      temp.NameValueSeparator := '|';
94      list.Add('|0');      temp.Add('e:|0');
95      i := Form2.PopupBox1.Text.ToInteger;      i := Form2.PopupBox1.Text.ToInteger;
96      k := 0;      k := 0;
97      while (Terminated = false) and (k < list.Count) do      while (Terminated = false) and (k < temp.Count) do
98      begin      begin
99        depth := list.ValueFromIndex[k].ToInteger;        depth := temp.ValueFromIndex[k].ToInteger;
100        if depth < i then        if depth < i then
101          Add(list.Names[k]);          Add(temp.Names[k]);
102        inc(k);        inc(k);
103      end;      end;
104        Synchronize(Form1.Id3Tag);
105    finally    finally
106      list.Free;      temp.Free;
107    end;    end;
   Synchronize(  
     procedure  
     begin  
       Form3.Hide;  
       Form1.Action2Execute(Self);  
     end);  
108  end;  end;
109    
110  end.  end.

Legend:
Removed from v.6  
changed lines
  Added in v.7

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26