Procedure

TfrmRemCoverSheet.sbCopyLeftClick

Module

fRemCoverSheet

Last Modified

7/15/2014 3:26:38 PM

Visibility

Public/Published

Owner

TfrmRemCoverSheet

Declaration

procedure sbCopyLeftClick(Sender: TObject);

Calls Hierarchy


TfrmRemCoverSheet.sbCopyLeftClick
 ├TfrmRemCoverSheet.GetCurrent
 │ └TfrmRemCoverSheet.GetCoverSheetLvlData
 │   └GetCoverSheetLevelData
 ├TfrmRemCoverSheet.GetIndex
 ├TfrmRemCoverSheet.MarkListAsChanged
 │ └TfrmRemCoverSheet.UpdateView
 │   └TfrmRemCoverSheet.GetCurrent...
 └TfrmRemCoverSheet.UpdateMasterListView
   ├TfrmRemCoverSheet.GetCurrent...
   └TfrmRemCoverSheet.UpdateButtons
     ├TfrmRemCoverSheet.GetCurrent...
     ├TfrmRemCoverSheet.GetIndex
     └TfrmRemCoverSheet.LockButtonUpdate
       ├TfrmRemCoverSheet.btnLockClick
       │ └TfrmRemCoverSheet.ChangeStatus
       │   ├TfrmRemCoverSheet.GetCurrent...
       │   ├TfrmRemCoverSheet.GetIndex
       │   ├TfrmRemCoverSheet.MarkListAsChanged...
       │   ├TfrmRemCoverSheet.SetupItem
       │   └TfrmRemCoverSheet.LockButtonUpdate...
       └TfrmRemCoverSheet.btnAddClick
         └TfrmRemCoverSheet.ChangeStatus...

Calls

Name Declaration Comments
TfrmRemCoverSheet.GetCurrent function GetCurrent(IEN: Int64; Level: TRemCoverDataLevel; Show: boolean; Add: boolean = FALSE): TORStringList; -
TfrmRemCoverSheet.GetIndex function GetIndex(List: TORStringList; Item: TListItem): integer; -
TfrmRemCoverSheet.MarkListAsChanged procedure MarkListAsChanged; -
TfrmRemCoverSheet.UpdateMasterListView procedure UpdateMasterListView; -


Source

1486  procedure TfrmRemCoverSheet.sbCopyLeftClick(Sender: TObject);
1487  var
1488    idx, Index, i: integer;
1489    tmpSL: TORStringList;
1490  
1491  begin
1492    if assigned(lvCover.Selected) then
1493    begin
1494      tmpSL := GetCurrent(FEditingIEN, FEditingLevel, FALSE);
1495      if assigned(tmpSL) then
1496      begin
1497        Idx := GetIndex(tmpSL, lvCover.Selected);
1498        Index := lvCover.Selected.Index;
1499        if Idx >= 0 then
1500        begin
1501          tmpSL.Delete(Idx);
1502          MarkListAsChanged;
1503          UpdateMasterListView;
1504          if lvCover.Items.Count > 0 then
1505          begin
1506            if Index > 0 then
1507              dec(Index);
1508            for i := 0 to lvCover.Items.Count-1 do
1509              if lvCover.Items[i].Index = Index then
1510              begin
1511                lvCover.Selected := lvCover.Items[i];
1512                break;
1513              end;
1514          end;
1515          if ScreenReaderSystemActive then
1516            GetScreenReader.Speak('Reminder Removed from ' + DataName[FEditingLevel] + ' Level Reminders List');
1517        end;
1518      end;
1519      if sbCopyLeft.Enabled and (not sbCopyLeft.Focused) then
1520        sbCopyLeft.SetFocus;    
1521    end;
1522  end;