Procedure

TfrmGraphSettings.SetSources

Module

fGraphSettings

Last Modified

7/15/2014 3:26:36 PM

Visibility

Public

Owner

TfrmGraphSettings

Declaration

procedure SetSources(aList, DisplaySource: TStrings);

Called-By Hierarchy


           TfrmGraphSettings.SetSources
                  DialogGraphSettings┘ 
         DialogOptionsGraphSettings┤   
TfrmOptions.btnGraphSettingsClick┘ │   
  TfrmGraphs.btnChangeSettingsClick┘   
   TfrmReports.btnChangeViewClick┘     

Called-By

Name Declaration Comments
DialogGraphSettings procedure DialogGraphSettings(fontsize: integer; var okbutton: boolean; aGraphSetting: TGraphSetting; DisplaySource: TStrings; var conv: integer; var aSettings: string); -


Source

365   procedure TfrmGraphSettings.SetSources(aList, DisplaySource: TStrings);
366   var
367     i, j : integer;
368     dsdisplay, dsitem, dsnum, filename, filenum, listitem: string;
369   begin
370     with lstSources.Items do
371     begin
372       Clear;
373       lstSourcesCopy.Items.Clear;
374       for i := 0 to aList.Count - 1 do
375       begin
376         listitem := aList[i];
377         filenum := Piece(listitem, '^', 1);
378         filename := Piece(listitem, '^', 2);
379         Add(filename);
380         lstSourcesCopy.Items.Add(filename + '^' + filenum);
381       end;
382       with lstSourcesCopy do
383       for i := 0 to Items.Count - 1 do
384       begin
385         listitem := Items[i];
386         filenum := Piece(listitem, '^', 2);
387         for j := 0 to DisplaySource.Count - 1 do
388         begin
389           dsitem := DisplaySource[j];
390           dsnum := Piece(dsitem, '^', 1);
391           dsdisplay := Piece(dsitem, '^', 3);
392           if filenum = dsnum then
393           begin
394             if dsdisplay = '1' then
395               lstSources.Checked[i] := true;
396             break;
397           end;
398         end;
399       end;
400     end;
401   end;