1 { KOL MCK } // Do not remove this line!
\r
6 procedure NewfmEditFilter( var Result: PfmEditFilter; AParent: PControl );
\r
10 Result := PfmEditFilter.Create;
\r
12 New( Result, Create );
\r
13 {$ENDIF KOL CLASSES/OBJECTS}
\r
14 Result.Form := NewForm( AParent, 'Add/Edit Filter' ).SetPosition( 187, 482 ).SetClientSize( 632, 158 );
\r
15 Result.Form.Add2AutoFree( Result );
\r
16 Result.Form.ExStyle := Result.Form.ExStyle or WS_EX_DLGMODALFRAME or WS_EX_WINDOWEDGE;
\r
17 Result.Form.Style := Result.Form.Style and not (WS_MINIMIZEBOX or WS_MAXIMIZEBOX);
\r
18 Result.Form.Font.FontHeight := 16;
\r
19 Result.Form.Font.FontName := 'Arial';
\r
20 Result.Form.OnClose := Result.KOLForm1Close;
\r
21 Result.Form.OnShow := Result.KOLForm1Show;
\r
22 Result.Form.OnDestroy := Result.KOLForm1Destroy;
\r
24 Result.dSelDir := NewOpenDirDialog( 'Select directory to monitor', [ odOnlyFileSystemAncestors, odOnlySystemDirs ] );
\r
25 Result.Form.Add2AutoFree( Result.dSelDir );
\r
26 // Result.Label4.TabOrder = -1
\r
27 Result.Label4 := NewLabel( Result.Form, 'Time to wait changes (seconds):' ).SetPosition( 8, 132 ).AutoSize( TRUE );
\r
28 // Result.Label3.TabOrder = -1
\r
29 Result.Label3 := NewLabel( Result.Form, 'Action:' ).SetPosition( 368, 64 ).AutoSize( TRUE );
\r
30 // Result.Label2.TabOrder = -1
\r
31 Result.Label2 := NewLabel( Result.Form, 'Filter:' ).SetPosition( 8, 64 ).AutoSize( TRUE );
\r
32 // Result.Label1.TabOrder = -1
\r
33 Result.Label1 := NewLabel( Result.Form, 'Directory path:' ).SetPosition( 8, 8 ).AutoSize( TRUE );
\r
34 // Result.eDir.TabOrder = 0
\r
35 Result.eDir := NewEditBox( Result.Form, [ ] ).SetPosition( 8, 32 ).SetSize( 545, 0 );
\r
36 Result.eDir.Color := clWindow;
\r
37 // Result.bBrowse.TabOrder = 1
\r
38 Result.bBrowse := NewButton( Result.Form, 'Browse' ).SetPosition( 560, 32 );
\r
39 // Result.eFilter.TabOrder = 2
\r
40 Result.eFilter := NewComboBox( Result.Form, [ coNoIntegralHeight ] ).SetPosition( 8, 88 ).SetSize( 353, 0 );
\r
41 Result.eFilter.Color := clWindow;
\r
42 Result.eFilter.Items[ 0 ] := '';
\r
43 Result.eFilter.Items[ 1 ] := '*.txt;*.diz;*.doc';
\r
44 Result.eFilter.Items[ 2 ] := '*.pas;*.dpr;*.dfm;*.res;*.rc;*.inc;*.dcr;*.dof;*.cfg;*.asm';
\r
45 Result.eFilter.Items[ 3 ] := '*.cpp;*.c;*.hpp;*.h';
\r
46 Result.eFilter.Items[ 4 ] := '*.ico;*.bmp;*.jpg;*.jpeg;*.gif;*.png;*.psd;*.pcx;*.tif;*.tiff;*.tga';
\r
47 Result.eFilter.Items[ 5 ] := '*.*';
\r
48 Result.eFilter.CurIndex := 0;
\r
49 // Result.eAction.TabOrder = 3
\r
50 Result.eAction := NewComboBox( Result.Form, [ coReadOnly, coNoIntegralHeight ] ).SetPosition( 368, 88 ).SetSize( 225, 0 );
\r
51 Result.eAction.Color := clWindow;
\r
52 Result.eAction.Items[ 0 ] := 'Store entire HISTORY of changes';
\r
53 Result.eAction.Items[ 1 ] := 'Store LAST version only';
\r
54 Result.eAction.Items[ 2 ] := 'No store (skip filter)';
\r
55 Result.eAction.CurIndex := 0;
\r
56 // Result.eTime.TabOrder = 4
\r
57 Result.eTime := NewEditBox( Result.Form, [ ] ).SetPosition( 216, 128 ).SetSize( 41, 0 );
\r
58 Result.eTime.Color := clWindow;
\r
59 Result.eTime.Text := '30';
\r
60 // Result.Panel1.TabOrder = 5
\r
61 Result.Panel1 := NewPanel( Result.Form, esNone ).SetPosition( 256, 128 ).SetSize( 49, 25 );
\r
62 Result.Panel1.Border := 0;
\r
63 // Result.Toolbar1.TabOrder = 0
\r
64 Result.Toolbar1 := NewToolbar( Result.Panel1, caTop, [tboTextRight, tboFlat, tboNoDivider], 0, [ '<', '>' ], [ -2 ] ).SetAlign ( caTop );
\r
65 Result.Toolbar1.Border := 2;
\r
66 Result.Toolbar1.TBAssignEvents( 0, [ Result.Toolbar1TB1Click, Result.Toolbar1TB2Click ] );
\r
67 if WinVer >= wvXP then
\r
69 Result.Toolbar1.Style := Result.Toolbar1.Style or TBSTYLE_WRAPABLE;
\r
70 Result.Toolbar1.Transparent := TRUE;
\r
72 // Result.bAdd.TabOrder = 6
\r
73 Result.bAdd := NewButton( Result.Form, 'Add' ).SetPosition( 488, 128 );
\r
74 Result.bAdd.Enabled := False;
\r
75 // Result.bClose.TabOrder = 7
\r
76 Result.bClose := NewButton( Result.Form, 'Close' ).SetPosition( 560, 128 );
\r
77 // Result.cSubdirectories.TabOrder = 8
\r
78 Result.cSubdirectories := NewCheckBox( Result.Form, 'Subdirectories' ).SetPosition( 312, 128 ).AutoSize( TRUE );
\r
79 Result.cSubdirectories.Checked := TRUE;
\r
80 // Result.isSubdirs.TabOrder = 9
\r
81 Result.isSubdirs := NewImageShow( Result.Form, nil, 3 ).SetPosition( 424, 128 ).SetSize( 16, 16 );
\r
82 Result.isSubdirs.CurIndex := 3;
\r
83 // Result.isAction.TabOrder = 10
\r
84 Result.isAction := NewImageShow( Result.Form, nil, 0 ).SetPosition( 602, 90 ).SetSize( 16, 16 );
\r
85 Result.eDir.OnChange := Result.eDirChange;
\r
86 Result.bBrowse.OnClick := Result.bBrowseClick;
\r
87 Result.eFilter.OnChange := Result.eDirChange;
\r
88 Result.eAction.OnChange := Result.eActionChange;
\r
89 Result.eTime.OnChar := Result.eTimeChar;
\r
90 Result.bAdd.OnClick := Result.bAddClick;
\r
91 Result.bAdd.DefaultBtn := TRUE;
\r
92 Result.bClose.OnClick := Result.bCloseClick;
\r
93 Result.bClose.CancelBtn := TRUE;
\r
94 Result.cSubdirectories.OnClick := Result.cSubdirectoriesClick;
\r
95 Result.dSelDir.WndOwner := Result.Form.GetWindowHandle;
\r
96 Result.Form.CenterOnParent.CanResize := False;
\r
97 Result.Form.Icon := THandle(-1);
\r