Графический интерфейс в aria2c RPC http://blindage.org/?p=5385
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

unitservers.pas 1002B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. unit unitservers;
  2. {$mode objfpc}{$H+}
  3. interface
  4. uses
  5. Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls,
  6. Buttons;
  7. type
  8. { TformServers }
  9. TformServers = class(TForm)
  10. btnSave: TBitBtn;
  11. btnAdd: TBitBtn;
  12. btnDel: TBitBtn;
  13. ListBox1: TListBox;
  14. procedure btnAddClick(Sender: TObject);
  15. procedure btnDelClick(Sender: TObject);
  16. procedure btnSaveClick(Sender: TObject);
  17. private
  18. { private declarations }
  19. public
  20. { public declarations }
  21. end;
  22. var
  23. formServers: TformServers;
  24. implementation
  25. {$R *.lfm}
  26. { TformServers }
  27. procedure TformServers.btnAddClick(Sender: TObject);
  28. var new_server: string;
  29. begin
  30. if InputQuery('Add remote server', 'Example: http://myfileserver.com:6800', FALSE, new_server)
  31. then ListBox1.Items.Add(new_server);
  32. end;
  33. procedure TformServers.btnDelClick(Sender: TObject);
  34. begin
  35. ListBox1.Items.Delete(ListBox1.ItemIndex);
  36. end;
  37. procedure TformServers.btnSaveClick(Sender: TObject);
  38. begin
  39. close;
  40. end;
  41. end.