|
294 | 294 | exit; |
295 | 295 | End; |
296 | 296 | UpdatePanelInfo; |
297 | | - |
298 | 297 | End; |
299 | 298 |
|
300 | 299 | Procedure TForm3.MenuItem1Click(Sender: TObject); |
|
325 | 324 | End; |
326 | 325 |
|
327 | 326 | Procedure TForm3.MenuItem4Click(Sender: TObject); |
| 327 | +Var |
| 328 | + j, i, k: Integer; |
| 329 | + sel: TGridRect; |
| 330 | + fn: String; |
328 | 331 | Begin |
329 | 332 | // Del Left |
330 | | - // TODO: Implementieren |
331 | | - showmessage('Todo'); |
| 333 | + For i := StringGrid1.SelectedRangeCount - 1 Downto 0 Do Begin |
| 334 | + sel := StringGrid1.SelectedRange[i]; |
| 335 | + For j := sel.Bottom Downto sel.Top Do Begin |
| 336 | + fn := fLeftRootDirectory + fListViewData[j - 1].Left; |
| 337 | + If DeleteFileUTF8(fn) Then Begin |
| 338 | + fListViewData[j - 1].Left := ''; |
| 339 | + // Rechts ists auch Leer -> Die Zeile kann Weg |
| 340 | + If fListViewData[j - 1].Right = '' Then Begin |
| 341 | + StringGrid1.DeleteRow(j); |
| 342 | + For k := j - 1 To high(fListViewData) - 1 Do Begin |
| 343 | + fListViewData[k] := fListViewData[k + 1]; |
| 344 | + End; |
| 345 | + setlength(fListViewData, high(fListViewData)); |
| 346 | + End |
| 347 | + Else Begin |
| 348 | + // Rechts gibt es -> die Zeile bleibt da |
| 349 | + StringGrid1.Cells[0, j] := ''; |
| 350 | + StringGrid1.Cells[1, j] := inttostr(IndexRightToLeft); |
| 351 | + End; |
| 352 | + End; |
| 353 | + End; |
| 354 | + End; |
| 355 | + StringGrid1.ClearSelections; |
| 356 | + UpdatePanelInfo; |
332 | 357 | End; |
333 | 358 |
|
334 | 359 | Procedure TForm3.MenuItem5Click(Sender: TObject); |
| 360 | +Var |
| 361 | + j, i, k: Integer; |
| 362 | + sel: TGridRect; |
| 363 | + fn: String; |
335 | 364 | Begin |
336 | 365 | // Del Right |
337 | | - // TODO: Implementieren |
338 | | - showmessage('Todo'); |
| 366 | + For i := StringGrid1.SelectedRangeCount - 1 Downto 0 Do Begin |
| 367 | + sel := StringGrid1.SelectedRange[i]; |
| 368 | + For j := sel.Bottom Downto sel.Top Do Begin |
| 369 | + fn := fRightRootDirectory + fListViewData[j - 1].Right; |
| 370 | + If DeleteFileUTF8(fn) Then Begin |
| 371 | + fListViewData[j - 1].Right := ''; |
| 372 | + // Links ists auch Leer -> Die Zeile kann Weg |
| 373 | + If fListViewData[j - 1].Left = '' Then Begin |
| 374 | + StringGrid1.DeleteRow(j); |
| 375 | + For k := j - 1 To high(fListViewData) - 1 Do Begin |
| 376 | + fListViewData[k] := fListViewData[k + 1]; |
| 377 | + End; |
| 378 | + setlength(fListViewData, high(fListViewData)); |
| 379 | + End |
| 380 | + Else Begin |
| 381 | + // Links gibt es -> die Zeile bleibt da |
| 382 | + StringGrid1.Cells[2, j] := ''; |
| 383 | + StringGrid1.Cells[1, j] := inttostr(IndexLeftToRight); |
| 384 | + End; |
| 385 | + End; |
| 386 | + End; |
| 387 | + End; |
| 388 | + StringGrid1.ClearSelections; |
| 389 | + UpdatePanelInfo; |
339 | 390 | End; |
340 | 391 |
|
341 | 392 | Procedure TForm3.MenuItem7Click(Sender: TObject); |
|
0 commit comments