This repository has been archived by the owner on Jun 5, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathfrmTaskBar.pas
123 lines (112 loc) · 3.58 KB
/
frmTaskBar.pas
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
unit frmTaskBar;
// DISCLAIMER!
// ==================================================================
// This source code has been automatically generated.
// It still requires extensive manual fixing, debugging and testing.
// IT IS NOT GUARANTEED TO COMPILE
// AND MUCH LESS TO BEHAVE EXACTLY LIKE THE ORIGINAL SOURCE CODE.
// Use it at your sole risk and discretion.
//
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs;
type
TfrmTaskBar =
class( TForm )
frmTaskBar : TForm;
private
minimized : boolean;
procedure Form_GotFocus;
procedure Form_Load;
procedure Form_Resize;
procedure Form_Unload( var Cancel : smallint );
public
end;
implementation
{$R *.DFM}
procedure TfrmTaskBar.Form_GotFocus;
begin
if frmSoldatMapEditor.Visible
then
begin
frmSoldatMapEditor.RegainFocus;
end;
end;
procedure TfrmTaskBar.Form_Load;
begin
self.Left := 2000 * Screen.TwipsPerPixelX;
self.Top := 2000 * Screen.TwipsPerPixelY;
end;
procedure TfrmTaskBar.Form_Resize;
begin
if not frmSoldatMapEditor.Visible and ( self.WindowState = vbNormal ) //show when it gets restored
then
begin
frmSoldatMapEditor.Show;
if frmSoldatMapEditor.mnuDisplay.Checked
then
begin
frmDisplay.Show;
end;
if frmSoldatMapEditor.mnuWaypoints.Checked
then
begin
frmWaypoints.Show;
end;
if frmSoldatMapEditor.mnuTools.Checked
then
begin
frmTools.Show;
end;
if frmSoldatMapEditor.mnuPalette.Checked
then
begin
frmPalette.Show;
end;
if frmSoldatMapEditor.mnuScenery.Checked
then
begin
frmScenery.Show;
end;
if frmSoldatMapEditor.mnuInfo.Checked
then
begin
frmInfo.Show;
end;
if frmSoldatMapEditor.mnuTexture.Checked
then
begin
frmTexture.Show;
end;
if ( frmSoldatMapEditor.WindowState = vbNormal )
then
begin
frmSoldatMapEditor.left := frmSoldatMapEditor.formLeft * Screen.TwipsPerPixelX;
frmSoldatMapEditor.Top := frmSoldatMapEditor.formTop * Screen.TwipsPerPixelY;
frmSoldatMapEditor.ScaleWidth := frmSoldatMapEditor.formWidth;
frmSoldatMapEditor.ScaleHeight := frmSoldatMapEditor.formHeight;
end;
frmSoldatMapEditor.RegainFocus;
end
else
if not frmSoldatMapEditor.Visible and ( self.WindowState = vbMinimized )
then
else
if frmSoldatMapEditor.Visible and ( self.WindowState = vbNormal )
then
begin
frmSoldatMapEditor.RegainFocus;
end
else
if frmSoldatMapEditor.Visible and ( self.WindowState = vbMinimized )
then
begin
frmSoldatMapEditor.RegainFocus;
end;
end;
procedure TfrmTaskBar.Form_Unload( var Cancel : smallint );
begin
frmSoldatMapEditor.Terminate;
end;
end.