1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27:
| procedure TForm1.sgrid1Click(Sender: TObject); var dir: Integer; begin if rw.Checked then dir := 0 else dir := 1; case schiffanz of 0: if SetzeSchiff(sgrid1, schiffe[1][1], 1, sgrid1.Selection.Left, sgrid1.Selection.Top, dir) then schiffanz := schiffanz + 1; 1: if SetzeSchiff(sgrid1, schiffe[1][2], 1, sgrid1.Selection.Left, sgrid1.Selection.Top, dir) then schiffanz := schiffanz + 1; 2: if SetzeSchiff(sgrid1, schiffe[1][3], 1, sgrid1.Selection.Left, sgrid1.Selection.Top, dir) then schiffanz := schiffanz + 1; 3: if SetzeSchiff(sgrid1, schiffe[1][4], 1, sgrid1.Selection.Left, sgrid1.Selection.Top, dir) then schiffanz := schiffanz + 1; 4: if SetzeSchiff(sgrid1, schiffe[2][1], 2, sgrid1.Selection.Left, sgrid1.Selection.Top, dir) then schiffanz := schiffanz + 1; 5: if SetzeSchiff(sgrid1, schiffe[2][2], 2, sgrid1.Selection.Left, sgrid1.Selection.Top, dir) then schiffanz := schiffanz + 1; 6: if SetzeSchiff(sgrid1, schiffe[2][3], 2, sgrid1.Selection.Left, sgrid1.Selection.Top, dir) then schiffanz := schiffanz + 1; 7: if SetzeSchiff(sgrid1, schiffe[3][1], 3, sgrid1.Selection.Left, sgrid1.Selection.Top, dir) then schiffanz := schiffanz + 1; 8: if SetzeSchiff(sgrid1, schiffe[3][2], 3, sgrid1.Selection.Left, sgrid1.Selection.Top, dir) then schiffanz := schiffanz + 1; 9: if SetzeSchiff(sgrid1, schiffe[4][1], 4, sgrid1.Selection.Left, sgrid1.Selection.Top, dir) then begin schiffanz := schiffanz + 1; ShowText('',0); //sgrid1.Selection.Left := 0; //sgrid1.Selection.Top := 0; sgrid1.Enabled := False; end; end; end; |