1 { KOL MCK } // Do not remove this line!
\r
5 const nSecondsTray = 3;
\r
10 const nLanguage = 1;
\r
12 const nLangEdit = 3;
\r
14 const nPluginEnd = 5;
\r
16 const nSecondsFace = 7;
\r
20 const nColorSilver = 11;
\r
21 const nColorBlue = 12;
\r
22 const nColorRed = 13;
\r
23 const nColorGreen = 14;
\r
24 const nColorYellow = 15;
\r
25 const nColorMagenta = 16;
\r
26 const nColorWhite = 17;
\r
27 const nColorBlack = 18;
\r
28 const nTransparent = 19;
\r
33 procedure NewForm1( var Result: PForm1; AParent: PControl );
\r
37 Result := PForm1.Create;
\r
39 New( Result, Create );
\r
40 {$ENDIF KOL CLASSES/OBJECTS}
\r
41 Result.Form := NewForm( AParent, 'Round Watch' );
\r
42 Result.Form.Add2AutoFree( Result );
\r
43 Result.Form.ExStyle := Result.Form.ExStyle or WS_EX_TOOLWINDOW;
\r
44 Result.Form.AlphaBlend := 154;
\r
45 Result.Form.StayOnTop := True;
\r
46 Result.Form.Icon := THandle(-1);
\r
47 Result.Form.Border := 0;
\r
48 Result.Form.OnMessage := Result.KOLForm1Message;
\r
49 Result.Form.OnClose := Result.KOLForm1Close;
\r
50 Result.Form.OnMouseDown := Result.PaintBox1MouseDown;
\r
51 Result.Form.OnMouseMove := Result.PaintBox1MouseMove;
\r
52 Result.Form.OnMouseUp := Result.PaintBox1MouseUp;
\r
53 Result.Form.OnResize := Result.KOLForm1Resize;
\r
54 Result.Form.OnShow := Result.KOLForm1Show;
\r
55 Result.Form.OnPaint := Result.PaintBox1Paint;
\r
56 Result.Form.OnEraseBkgnd := Result.KOLForm1EraseBkgnd;
\r
57 Result.Form.OnDestroy := Result.KOLForm1Destroy;
\r
58 Result.Form.MinWidth := 64;
\r
59 Result.Form.MinHeight := 64;
\r
60 Result.Form.MaxWidth := 256;
\r
61 Result.Form.MaxHeight := 256;
\r
62 NewMenu( Result.Form, 0, [ '' ], nil );
\r
64 Result.TrayIcon3 := NewTrayIcon( Applet, 0 );
\r
65 Result.TrayIcon3.Active := FALSE;
\r
66 Result.TrayIcon3.AutoRecreate := TRUE;
\r
67 Result.Form.Add2AutoFree( Result.TrayIcon3 );
\r
68 Result.TrayIcon3.OnMouse := Result.TrayIcon1Mouse;
\r
70 Result.TrayIcon1 := NewTrayIcon( Applet, 0 );
\r
71 Result.TrayIcon1.Active := FALSE;
\r
72 Result.TrayIcon1.AutoRecreate := TRUE;
\r
73 Result.Form.Add2AutoFree( Result.TrayIcon1 );
\r
74 Result.TrayIcon1.OnMouse := Result.TrayIcon1Mouse;
\r
76 Result.TrayIcon2 := NewTrayIcon( Applet, 0 );
\r
77 Result.TrayIcon2.Active := FALSE;
\r
78 Result.TrayIcon2.AutoRecreate := TRUE;
\r
79 Result.Form.Add2AutoFree( Result.TrayIcon2 );
\r
80 Result.TrayIcon2.OnMouse := Result.TrayIcon1Mouse;
\r
82 Result.Timer1 := NewTimer( 100 );
\r
83 Result.Form.Add2AutoFree( Result.Timer1 );
\r
84 Result.Timer1.OnTimer := Result.Timer1Timer;
\r
86 Result.PopupMenu1 := NewMenu( Result.Form, 0, [ '&Date Time'
\r
87 , '&Restore', '&View', '(', '+' + '&Seconds'
\r
88 , '+' + '&Colored', ')', '-' + '', 'E&xit', '' ], nil );
\r
89 Result.PopupMenu1.AssignEvents( 0, [ Result.PopupMenu1nDateTimeMenu ] );
\r
90 Result.PopupMenu1.AssignEvents( 1, [ Result.PopupMenu1n1RestoreMenu ] );
\r
91 Result.PopupMenu1.AssignEvents( 3, [ Result.PopupMenu1nSecondsTray1Menu ] );
\r
92 Result.PopupMenu1.AssignEvents( 4, [ Result.PopupMenu1nColoredMenu ] );
\r
93 Result.PopupMenu1.AssignEvents( 6, [ Result.PopupMenu1n1ExitMenu ] );
\r
95 Result.PopupMenu2 := NewMenu( Result.Form, 0, [ '&About'
\r
96 , '&Language', '(', '-' + '', 'Edit', ')', '&Plugins', '('
\r
97 , '-' + '', ')', '&View', '(', '+' + '&Seconds'
\r
98 , '+' + '&Keep Ratio', '+' + '&Border', '&Color', '('
\r
99 , 'Silver', 'Blue', 'Red', 'Green', 'Yellow', 'Magenta'
\r
100 , 'White', 'Black', ')', '+' + '&Transparent', ')'
\r
101 , '-' + '', 'E&xit', '' ], nil );
\r
102 Result.PopupMenu2.AssignEvents( 0, [ Result.PopupMenu2nAboutMenu ] );
\r
103 Result.PopupMenu2.AssignEvents( 3, [ Result.PopupMenu2nLangEditMenu ] );
\r
104 Result.PopupMenu2.ItemVisible[ 5 ] := False;
\r
105 Result.PopupMenu2.AssignEvents( 7, [ Result.PopupMenu2nSecondsFaceMenu ] );
\r
106 Result.PopupMenu2.AssignEvents( 8, [ Result.PopupMenu2nKeepMenu ] );
\r
107 Result.PopupMenu2.AssignEvents( 9, [ Result.PopupMenu2nBorderMenu ] );
\r
108 Result.PopupMenu2.AssignEvents( 11, [ Result.PopupMenu2nColorSilverMenu ] );
\r
109 Result.PopupMenu2.AssignEvents( 12, [ Result.PopupMenu2ncolorBlueMenu ] );
\r
110 Result.PopupMenu2.AssignEvents( 13, [ Result.PopupMenu2nColorRedMenu ] );
\r
111 Result.PopupMenu2.AssignEvents( 14, [ Result.PopupMenu2ncolorGreenMenu ] );
\r
112 Result.PopupMenu2.AssignEvents( 15, [ Result.PopupMenu2nColorYellowMenu ] );
\r
113 Result.PopupMenu2.AssignEvents( 16, [ Result.PopupMenu2nColorMagentaMenu ] );
\r
114 Result.PopupMenu2.AssignEvents( 17, [ Result.PopupMenu2nColorWhiteMenu ] );
\r
115 Result.PopupMenu2.AssignEvents( 18, [ Result.PopupMenu2nColorBlackMenu ] );
\r
116 Result.PopupMenu2.AssignEvents( 19, [ Result.PopupMenu2nTransparentMenu ] );
\r
117 Result.PopupMenu2.AssignEvents( 21, [ Result.PopupMenu2nExitMenu ] );
\r
118 Result.PopupMenu2.OnPopup := Result.PopupMenu2Popup;
\r
119 Result.Timer1.Enabled := True;
\r
120 Result.Form.SetAutoPopupMenu( Result.PopupMenu2 );
\r
121 Result.KOLForm1FormCreate( Result );
\r