1 { KOL MCK } // Do not remove this line!
\r
3 procedure NewForm1( var Result: PForm1; AParent: PControl );
\r
6 New( Result, Create );
\r
7 Result.Form := NewForm( AParent, 'KOL FTP client' ).SetPosition( 195, 127 ).SetSize( 652, 371 );
\r
8 Result.Form.Add2AutoFree( Result );
\r
9 Result.Form.DoubleBuffered := True;
\r
10 Result.Form.Font.FontStyle := [ fsBold ];
\r
11 Result.Form.Font.FontHeight := 16;
\r
12 Result.Form.Font.FontName := 'Arial';
\r
13 Result.Form.Font.FontCharset := 0;
\r
14 Result.Form.StatusText[ 0 ] := ' ';
\r
15 Result.Form.StatusText[ 1 ] := ' ';
\r
16 Result.Form.StatusText[ 2 ] := ' ';
\r
17 Result.Form.StatusText[ 3 ] := ' ';
\r
18 Result.Form.OnMessage := Result.KFMessage;
\r
19 Result.Form.OnClose := Result.KFClose;
\r
20 Result.Form.OnResize := Result.KFResize;
\r
21 NewMenu( Result.Form, 0, [ '' ], nil );
\r
23 Result.PL := NewMenu( Result.Form, 0, [ 'Select All'
\r
24 , 'Deselect All', '-', 'Add to transfer list'
\r
25 , 'Delete selected', '' ], nil );
\r
26 Result.PL.AssignEvents( 0, [ Result.PLN1Menu ] );
\r
27 Result.PL.AssignEvents( 1, [ Result.PLN2Menu ] );
\r
28 Result.PL.AssignEvents( 2, [ Result.PLN4Menu ] );
\r
29 Result.PL.AssignEvents( 3, [ Result.PLN9Menu ] );
\r
31 Result.PT := NewMenu( Result.Form, 0, [ 'Select All'
\r
32 , 'Deselect All', '-', 'Delete from list', '' ], nil );
\r
33 Result.PT.AssignEvents( 0, [ Result.PTN5Menu ] );
\r
34 Result.PT.AssignEvents( 1, [ Result.PTN6Menu ] );
\r
35 Result.PT.AssignEvents( 2, [ Result.PTN8Menu ] );
\r
37 Result.TM := NewTimer( 1000 );
\r
38 Result.Form.Add2AutoFree( Result.TM );
\r
39 Result.TM.OnTimer := Result.TMTimer;
\r
41 Result.FC := NewKOLFtpClient;
\r
42 Result.Form.Add2AutoFree( Result.FC );
\r
43 Result.FC.OnFTPStatus := Result.FCFTPStatus;
\r
44 Result.FC.OnFTPLogger := Result.FTPLogger;
\r
45 Result.FC.OnFTPConnect := Result.FTPConnect;
\r
46 Result.FC.OnFTPLogin := Result.FTPLogin;
\r
47 Result.FC.OnFTPError := Result.FTPError;
\r
48 Result.FC.OnFTPData := Result.FTPData;
\r
49 Result.FC.OnProgress := Result.FTPProgress;
\r
50 Result.FC.OnGetExist := Result.FTPExist;
\r
51 Result.FC.OnPutExist := Result.FTPExist;
\r
52 Result.FC.OnFileDone := Result.FTPFileDone;
\r
53 Result.FC.OnFTPClose := Result.FTPClose;
\r
55 Result.TI := NewTrayIcon( Applet, LoadIcon( hInstance, 'ZFORM1_TI' ) );
\r
56 Result.TI.Tooltip := 'KOLFtpClient';
\r
58 Result.Form.Add2AutoFree( Result.TI );
\r
59 Result.TI.OnMouse := Result.TIMouse;
\r
61 Result.PM := NewMenu( Result.Form, 0, [ 'Restore', '-'
\r
62 , 'Exit', '' ], nil );
\r
63 Result.PM.AssignEvents( 0, [ Result.PMN10Menu ] );
\r
64 Result.PM.AssignEvents( 1, [ Result.PMN12Menu ] );
\r
65 // Result.P3.TabOrder = 0
\r
66 Result.P3 := NewPanel( Result.Form, esRaised ).SetAlign ( caTop ).SetSize( 0, 37 );
\r
67 Result.P3.Border := 4;
\r
68 // Result.DB.TabOrder = 0
\r
69 Result.DB := NewComboBox( Result.P3, [ coReadOnly, coNoIntegralHeight ] ).SetAlign ( caLeft ).SetSize( 46, 0 );
\r
70 Result.DB.OnChange := Result.DBChange;
\r
71 Result.DB.CurIndex := 0;
\r
72 // Result.P5.TabOrder = 2
\r
73 Result.P5 := NewPanel( Result.P3, esRaised ).SetAlign ( caClient );
\r
74 Result.P5.Border := 2;
\r
75 // Result.TB.TabOrder = 0
\r
77 Result.TB := NewToolbar( Result.P5, caClient, [], LoadMappedBitmap( hInstance, 5000, [ clFuchsia, Color2RGB( clBtnFace ) ] ), [ ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ' ], [ 0 ] ).SetAlign ( caClient );
\r
78 Result.TB.OnClick := Result.TBClick;
\r
79 Result.TB.OnMouseDblClk := Result.TBMouseDblClk;
\r
80 Result.TB.TBSetTooltips( Result.TB.TBIndex2Item( 0 ), [ 'Connect', 'Disconnect', 'Download', 'Upload', 'Delete', 'Up one level', 'Stop', 'Make folder', 'Refresh', 'Edit Updater' ] );
\r
81 // Result.TC.TabOrder = 3
\r
82 Result.TC := NewTabControl( Result.Form, [ 'FTP' ], [ tcoButtons, tcoFixedWidth ], nil, 0 ).SetAlign ( caClient );
\r
83 Result.TC.TabStop := FALSE;
\r
84 Result.TC.OnSelChange := Result.TCSelChange;
\r
85 // Result.TC.Pages[ 0 ].TabOrder = 0
\r
86 // Result.P1.TabOrder = 1
\r
87 Result.P1 := NewPanel( Result.TC.Pages[ 0 ], esRaised ).SetAlign ( caTop ).SetSize( 0, 186 );
\r
88 Result.P1.VerticalAlign := vaCenter;
\r
89 Result.P1.Border := 4;
\r
90 // Result.LV.TabOrder = 0
\r
91 Result.LV := NewListView( Result.P1, lvsDetail, [ lvoAutoArrange, lvoMultiselect, lvoRowSelect ], nil, nil, nil ).SetAlign ( caLeft ).SetSize( 300, 0 );
\r
92 Result.LV.OnMouseDblClk := Result.LVMouseDblClk;
\r
93 Result.LV.LVBkColor := clBtnFace;
\r
94 Result.LV.SetAutoPopupMenu( Result.PL );
\r
95 // Result.S1.TabOrder = 1
\r
96 Result.S1 := NewSplitter( Result.P1, 0, 0 ).SetAlign ( caLeft );
\r
97 // Result.RV.TabOrder = 2
\r
98 Result.RV := NewListView( Result.P1, lvsDetail, [ lvoMultiselect, lvoRowSelect, lvoRegional ], nil, nil, nil ).SetAlign ( caClient );
\r
99 Result.RV.OnMouseDblClk := Result.RVMouseDblClk;
\r
100 Result.RV.LVBkColor := clBtnFace;
\r
101 Result.RV.SetAutoPopupMenu( Result.PL );
\r
102 // Result.S2.TabOrder = 2
\r
103 Result.S2 := NewSplitter( Result.TC.Pages[ 0 ], 0, 0 ).SetAlign ( caTop ).SetSize( 0, 1 );
\r
104 // Result.P2.TabOrder = 3
\r
105 Result.P2 := NewPanel( Result.TC.Pages[ 0 ], esRaised ).SetAlign ( caClient );
\r
106 Result.P2.Border := 4;
\r
107 // Result.TV.TabOrder = 0
\r
108 Result.TV := NewListView( Result.P2, lvsDetail, [ lvoMultiselect, lvoRowSelect, lvoRegional ], nil, nil, nil ).SetAlign ( caClient );
\r
109 Result.TV.LVBkColor := clBtnFace;
\r
110 Result.TV.SetAutoPopupMenu( Result.PT );
\r
111 Result.TM.Enabled := True;
\r
112 Result.KFFormCreate( Result );
\r