irectory: = 'C: ';: = now; StatusBar1 TObject); StatusBar1 TObject; var Key: Char); Key of
'0 '.. '9':;
# 46:;
# 8:;: = chr (0);;; TForm4.LabeledEdit2KeyPress (Sender: TObject; var Key: Char); Key of
'0 '.. '9':;
# 8:;: = chr (0);;; TForm4.LabeledEdit3KeyPress (Sender: TObject; var Key: Char); Key of
'0 '.. '9':;
# 46:;
# 8:;: = chr (0);;; TForm4.LabeledEdit4KeyPress (Sender: TObject; var Key: Char); Key of
'0 '.. '9':;
# 8:;: = chr (0);;; TForm4.FormCloseQuery (Sender: TObject; var CanClose: Boolean);
if MessageDlg ('Âûéòè Гà ãëà âГГіГѕ ñòðà Гèöó?', mtConfirmation, [mbYes, mbNo], 0) = mrYes then : = true; else: = false;; TForm4.N3Click (Sender: TObject);. Close;; TForm4.N2Click (Sender: TObject);. show;; end.
// Сервер (Відправник даних) server;
interface, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,, IdBaseComponent, IdComponent, IdTCPServer, StdCtrls, Buttons,, ExtCtrls, XPMan, ComCtrls, Menus, jpeg; = class (TForm ): TIdTCPServer;: TOpenDialog;: TBitBtn;: TLabeledEdit;: TXPManifest;: TButton;: TButton;: TMemo;: TButton;: TStatusBar;: TImage;: TBitBtn;: TLabel; IdTCPServer1Connect (AThread: TIdPeerThread); Memo1Enter (Sender : TObject); Button1Click (Sender: TObject); Button3Click (Sender: TObject); Button2Click (Sender: TObject); FormCreate (Sender: TObject); LabeledEdit2KeyPress (Sender: TObject; var Key: Char); LabeledEdit1KeyPress (Sender: TObject; var Key: Char); BitBtn1Click (Sender: TObject); BitBtn3Click (Sender: TObject); FormCloseQuery (Sender: TObject; var CanClose: Boolean);
{Private declarations}
{Public declarations};: TForm5;: String;: Cardinal;: Pointer;: string;: TDateTime;, compare: string;, port: integer; oproge, Glavnaya, client;
{$ R *. dfm} TForm5.IdTCPServer1Connect (AThread: TIdPeerThread);
{var: String;: Cardinal;: Pointer;}: = now;
// FileToSend: = ExtractFilePath (Application.ExeName) + 'test.txt';
// FileToSend: = 'c: 1.jpg'; // òóò ôà éë, êîòîðûé ìû ðà ññûëà åì ëþáîìó ïîïðîñèâøåìó. TFileStream.Create (FileToSend, fmOpenRead) do: = ExtractFileName (FileToSend) + # 00; (p, 256); (p, @ FileToSend [1], Length (FileToSend));. Connection.Socket.Send ( p ^, 256); (p);;: = Size;. Connection.Socket.Send (FileSize, SizeOf (FileSize)); (p, Size); (p ^, Size);. Connection.Socket.Send ( p ^, Size...