Develop and Download Open Source Software

Browse Subversion Repository

Diff of /Unit1.pas

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

revision 3 by yamat0jp, Sat Dec 26 07:30:17 2015 UTC revision 4 by yamat0jp, Sun Dec 27 07:05:56 2015 UTC
# Line 91  begin Line 91  begin
91    IWLabel2.BGColor := s;    IWLabel2.BGColor := s;
92    IWLabel3.BGColor := s;    IWLabel3.BGColor := s;
93    IWLabel5.BGColor := s;    IWLabel5.BGColor := s;
94      IWLabel7.BGColor := s;
95      IWLabel8.BGColor := s;
96    IWRegion1.Width := i;    IWRegion1.Width := i;
97    IWRegion2.Width := i;    IWRegion2.Width := i;
98    IWRegion4.Width := i;    IWRegion4.Width := i;
# Line 172  begin Line 174  begin
174        while Eof = false do        while Eof = false do
175        begin        begin
176          s := Fields.Fields[0].AsString + 'x' + Fields.Fields[1].AsString;          s := Fields.Fields[0].AsString + 'x' + Fields.Fields[1].AsString;
177          i := i + Fields.Fields[2].AsInteger;          i := i + Fields.Fields[0].AsInteger * Fields.Fields[2].AsInteger;
178          IWList2.Items.Add(s);          IWList2.Items.Add(s);
179          Next;          Next;
180        end;        end;
# Line 195  begin Line 197  begin
197      end;      end;
198    end;    end;
199    LoadImage;    LoadImage;
200      IWLabel6.Visible:=DM.FDTable2.Filtered;
201  end;  end;
202    
203  procedure TIWForm1.IWButton1Click(Sender: TObject);  procedure TIWForm1.IWButton1Click(Sender: TObject);
# Line 202  begin Line 205  begin
205    DM.FDTable2.Filtered := false;    DM.FDTable2.Filtered := false;
206    if IWEdit1.Text <> '' then    if IWEdit1.Text <> '' then
207    begin    begin
208      DM.FDTable2.Filter := 'NAME like ' + QuotedStr('%'+IWEdit1.Text+'%');      DM.FDTable2.Filter := 'NAME like ' + QuotedStr('%' + IWEdit1.Text + '%');
209      DM.FDTable2.Filtered := true;      DM.FDTable2.Filtered := true;
210      IWLabel6.Caption := IWEdit1.Text + 'を検索しています';      IWLabel6.Caption := IWEdit1.Text + 'を検索しています';
211    end;    end;
# Line 249  var Line 252  var
252  label label1;  label label1;
253  begin  begin
254    ClearImage;    ClearImage;
255    exit;    png := TPngImage.Create;
   png:=TPngImage.Create;  
256    try    try
257      IWGrid1.RowCount := DM.FDTable2.RecordCount div IWGrid1.ColumnCount;      IWGrid1.RowCount := DM.FDTable2.RecordCount div IWGrid1.ColumnCount;
258      k := 1;      k := 1;
259      for i := 0 to IWGrid1.RowCount - 1 do      for i := 0 to IWGrid1.RowCount - 1 do
260        for j := 0 to IWGrid1.ColumnCount - 1 do        for j := 0 to IWGrid1.ColumnCount - 1 do
261        begin        begin
262            if DM.FDTable2.FieldByName('THUMBNAIL') = nil then
263              continue;
264          s := DM.FDTable2.CreateBlobStream          s := DM.FDTable2.CreateBlobStream
265            (DM.FDTable2.FieldByName('THUMBNAIL'), bmRead);            (DM.FDTable2.FieldByName('THUMBNAIL'), bmRead);
266          try          try
# Line 281  begin Line 285  begin
285    Randomize;    Randomize;
286    DM.FDTable2.Last;    DM.FDTable2.Last;
287    DM.FDTable2.MoveBy(-Random(DM.FDTable2.RecordCount div 5));    DM.FDTable2.MoveBy(-Random(DM.FDTable2.RecordCount div 5));
288    s := DM.FDTable2.CreateBlobStream    if DM.FDTable2.FieldByName('THUMBNAIL') <> nil then
289      (DM.FDTable2.FieldByName('THUMBNAIL'), bmRead);    begin
290    png := TPngImage.Create;      s := DM.FDTable2.CreateBlobStream
291    try        (DM.FDTable2.FieldByName('THUMBNAIL'), bmRead);
292      png.LoadFromStream(s);      png := TPngImage.Create;
293      IWImageFile1.Picture.Assign(png);      try
294    finally        png.LoadFromStream(s);
295      png.Free;        IWImageFile1.Picture.Assign(png);
296      s.Free;      finally
297          png.Free;
298          s.Free;
299        end;
300    end;    end;
301    IWLabel4.Caption := DM.FDTable2.FieldByName('NAME').AsString;    IWLabel4.Caption := DM.FDTable2.FieldByName('NAME').AsString;
302  end;  end;
# Line 301  begin Line 308  begin
308    UserSession.FPage := Value;    UserSession.FPage := Value;
309    x := Value = Info;    x := Value = Info;
310    IWRegion7.Visible := x;    IWRegion7.Visible := x;
   IWLabel6.Visible := x;  
311    IWDBLabel1.Visible := x;    IWDBLabel1.Visible := x;
312    IWLink1.Visible := not x;    IWLink1.Visible := not x;
313    IWText1.Visible := not x;    IWText1.Visible := not x;

Legend:
Removed from v.3  
changed lines
  Added in v.4

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