Ignore:
Timestamp:
Dec 24, 2017, 11:13:05 AM (7 years ago)
Author:
chronos
Message:
  • Modified: Show rules list docked directly to main form.
Location:
branches/generator
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/generator

    • Property svn:ignore
      •  

        old new  
         1generator
        12generator.exe
        23generator.lps
        34lib
        45heaptrclog.trc
         6Generated
  • branches/generator/Forms

    • Property svn:ignore set to
      *.lrj
  • branches/generator/Forms/UFormRules.pas

    r129 r130  
    189189  I: Integer;
    190190begin
    191   ListViewSort1.List.Count := Rules.Count;
    192   for I := 0 to Rules.Count - 1 do
    193     ListViewSort1.List[I] := Rules[I];
    194   //FilterList(ListViewSort1.List);
     191  if Assigned(Rules) then begin
     192    ListViewSort1.List.Count := Rules.Count;
     193    for I := 0 to Rules.Count - 1 do
     194      ListViewSort1.List[I] := Rules[I];
     195    //FilterList(ListViewSort1.List);
     196  end else ListViewSort1.List.Count := 0;
    195197end;
    196198
    197199procedure TFormRules.UpdateInterface;
    198200begin
    199   AModify.Enabled := Assigned(ListView1.Selected);
    200   ARemove.Enabled := Assigned(ListView1.Selected);
     201  AAdd.Enabled := Assigned(Rules);
     202  AModify.Enabled := Assigned(Rules) and Assigned(ListView1.Selected);
     203  ARemove.Enabled := Assigned(Rules) and Assigned(ListView1.Selected);
    201204end;
    202205
    203206procedure TFormRules.ReloadList;
    204207begin
    205   if Assigned(Rules) then ListViewSort1.Refresh
    206     else ListViewSort1.List.Count := 0;
     208  ListViewSort1.Refresh;
    207209  ListView1.Refresh;
    208210end;
Note: See TracChangeset for help on using the changeset viewer.