}

Delphi.int.ru — Портал программистов

Вход Регистрация | Забыли пароль?

Просмотр кода

Идентификатор: 37e46b58 Описание: Код загружен: 13 июля 2011, 14:59 (Моисеев Евгений Леонидович)

  1. unit Unit12;
  2.  
  3. interface
  4.  
  5. uses
  6. Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  7. Dialogs, Menus, StdCtrls, ScktComp, IdFTP, IdBaseComponent, IdComponent,
  8. IdTCPConnection, IdTCPClient, IdHTTP;
  9.  
  10. type
  11. TForm12 = class(TForm)
  12. MainMenu1: TMainMenu;
  13. OpenDialog1: TOpenDialog;
  14. SaveDialog1: TSaveDialog;
  15. FontDialog1: TFontDialog;
  16. ColorDialog1: TColorDialog;
  17. PrintDialog1: TPrintDialog;
  18. PrinterSetupDialog1: TPrinterSetupDialog;
  19. PopupMenu1: TPopupMenu;
  20. IdHTTP1: TIdHTTP;
  21. IdFTP1: TIdFTP;
  22. ClientSocket1: TClientSocket;
  23. Label1: TLabel;
  24. Edit1: TEdit;
  25. Button1: TButton;
  26. Button2: TButton;
  27. Button3: TButton;
  28. Button4: TButton;
  29. Memo1: TMemo;
  30. N1: TMenuItem;
  31. N2: TMenuItem;
  32. N3: TMenuItem;
  33. N4: TMenuItem;
  34. N5: TMenuItem;
  35. N6: TMenuItem;
  36. N7: TMenuItem;
  37. N8: TMenuItem;
  38. N9: TMenuItem;
  39. N10: TMenuItem;
  40. N11: TMenuItem;
  41. N12: TMenuItem;
  42. N13: TMenuItem;
  43. Whois1: TMenuItem;
  44. N14: TMenuItem;
  45. N15: TMenuItem;
  46. N16: TMenuItem;
  47. N17: TMenuItem;
  48. N18: TMenuItem;
  49. N19: TMenuItem;
  50. N20: TMenuItem;
  51. N21: TMenuItem;
  52. N22: TMenuItem;
  53. N23: TMenuItem;
  54. N24: TMenuItem;
  55. N25: TMenuItem;
  56. N26: TMenuItem;
  57. N27: TMenuItem;
  58. N28: TMenuItem;
  59. N29: TMenuItem;
  60. N30: TMenuItem;
  61. N31: TMenuItem;
  62. N32: TMenuItem;
  63. N33: TMenuItem;
  64. N34: TMenuItem;
  65. N35: TMenuItem;
  66. N36: TMenuItem;
  67. N37: TMenuItem;
  68. N38: TMenuItem;
  69. N39: TMenuItem;
  70. N40: TMenuItem;
  71. N41: TMenuItem;
  72. N42: TMenuItem;
  73. N43: TMenuItem;
  74. procedure Button1Click(Sender: TObject);
  75. procedure Button2Click(Sender: TObject);
  76. procedure N21Click(Sender: TObject);
  77. procedure N24Click(Sender: TObject);
  78. private
  79. { Private declarations }
  80. public
  81. { Public declarations }
  82. end;
  83.  
  84. var
  85. Form12: TForm12;
  86.  
  87. implementation
  88.  
  89. {$R *.dfm}
  90.  
  91. procedure TForm12.Button1Click(Sender: TObject);
  92. begin
  93. ClientSocket1.Host:=Edit1.Text;
  94. ClientSocket1.Active:=true;
  95. ClientSocket1.Socket.SendText('R');
  96. ClientSocket1.Active:=false;
  97. end;
  98.  
  99. procedure TForm12.Button2Click(Sender: TObject);
  100. begin
  101. Form11.Close;
  102. end;
  103.  
  104. procedure TForm12.N21Click(Sender: TObject);
  105. var
  106. s:string;
  107. begin
  108. if opendialog1.Execute then
  109. begin
  110. s:=ExtractFileExt(opendialog1.FileName);
  111. end;
  112. end;
  113.  
  114. procedure TForm12.N24Click(Sender: TObject);
  115. begin
  116. if savedialog1.Execute then
  117. begin
  118. memo1.Lines.SaveToFile(savedialog1.FileName);
  119. end;
  120. end;
  121.  
  122. end.

Ссылка на данный код:

На главную страницу сервиса обмена кодом »