Switched to CoolTrayIcon. Did some other stuff.
This commit is contained in:
parent
c26a635603
commit
b266dea53f
@ -11,7 +11,6 @@ begin
|
||||
Application.Initialize;
|
||||
Application.Title := 'SETI@home Statistics';
|
||||
Application.CreateForm(TMainForm, MainForm);
|
||||
Application.CreateForm(TSkymap, Skymap);
|
||||
Application.ShowMainForm := false;
|
||||
Application.Run;
|
||||
end.
|
||||
|
@ -326,6 +326,7 @@ object MainForm: TMainForm
|
||||
'tion of the current workunit'
|
||||
Caption = 'Start position only'
|
||||
TabOrder = 1
|
||||
OnClick = CWUwhatClick
|
||||
end
|
||||
object CWUwhat2: TRadioButton
|
||||
Left = 32
|
||||
@ -340,6 +341,7 @@ object MainForm: TMainForm
|
||||
Checked = True
|
||||
TabOrder = 2
|
||||
TabStop = True
|
||||
OnClick = CWUwhatClick
|
||||
end
|
||||
object CWUwhat3: TRadioButton
|
||||
Left = 32
|
||||
@ -351,6 +353,7 @@ object MainForm: TMainForm
|
||||
't workunit'
|
||||
Caption = 'Complete track'
|
||||
TabOrder = 3
|
||||
OnClick = CWUwhatClick
|
||||
end
|
||||
object Crosses: TCheckBox
|
||||
Left = 8
|
||||
|
@ -4,7 +4,7 @@ interface
|
||||
|
||||
uses
|
||||
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||
Dialogs, StdCtrls, IniFiles, ComCtrls, ExtCtrls, DateUtils, CoolTrayIcon,
|
||||
Dialogs, StdCtrls, IniFiles, ComCtrls, ExtCtrls, DateUtils, TrayIcon,
|
||||
Menus, Math, jpeg;
|
||||
|
||||
type
|
||||
@ -65,6 +65,7 @@ type
|
||||
Label11: TLabel;
|
||||
Label12: TLabel;
|
||||
PrefsSheet: TTabSheet;
|
||||
TrayIcon: TTrayIcon;
|
||||
PopupMenu: TPopupMenu;
|
||||
ShowHideItem: TMenuItem;
|
||||
ExitItem: TMenuItem;
|
||||
@ -114,7 +115,6 @@ type
|
||||
HistShow2: TRadioButton;
|
||||
HistShow3: TRadioButton;
|
||||
Crosses: TCheckBox;
|
||||
TrayIcon: TCoolTrayIcon;
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
procedure ShowemailClick(Sender: TObject);
|
||||
|
30
SkymapU.pas
30
SkymapU.pas
@ -66,6 +66,20 @@ begin
|
||||
DMout;
|
||||
end;
|
||||
|
||||
procedure MakeCross(x,y: integer; c: TColor);
|
||||
begin
|
||||
DMin(Format('MakeCross(%d,%d)',[x,y]));
|
||||
with Skymap.Map.Canvas do begin
|
||||
Pen.Color := c;
|
||||
Pen.Width := 1;
|
||||
MoveTo(x,0);
|
||||
LineTo(x,MapHeightPx);
|
||||
MoveTo(0,y);
|
||||
LineTo(MapWidthPx,y);
|
||||
end;
|
||||
DMout;
|
||||
end;
|
||||
|
||||
procedure TSkymap.MapMouseMove(Sender: TObject; Shift: TShiftState; X,
|
||||
Y: Integer);
|
||||
var r,d: double;
|
||||
@ -115,11 +129,11 @@ begin
|
||||
Replace(x,'.',',');
|
||||
j := 0;
|
||||
for i:=3 to Length(x)-1 do begin
|
||||
if (x[i]=' ') AND (x[i+1]=' ') AND (j>0) then begin
|
||||
if (x[i]=' ') AND (x[i+1]<>' ') AND (j>0) then begin
|
||||
r := StrToFloat(Copy(x,j,i-j));
|
||||
j := i;
|
||||
end;
|
||||
if (x[i]=' ') AND (x[i+1]=' ') AND (j=0) then j:=i;
|
||||
if (x[i]=' ') AND (x[i+1]<>' ') AND (j=0) then j:=i;
|
||||
end;
|
||||
d := StrToFloat(Copy(x,j,Length(x)-j));
|
||||
DM(Format('Result: %f, %f', [r,d]));
|
||||
@ -143,19 +157,17 @@ begin
|
||||
if MainForm.CWUwhat.Checked then begin
|
||||
ExtractRD(MainForm.SkyCoord.Text,r,d);
|
||||
SkyToXY(r,d,x,y);
|
||||
MakeCircle(x,y,clLime);
|
||||
if MainForm.Crosses.Checked then MakeCross(x,y,clYellow) else MakeCircle(x,y,clLime);
|
||||
end else if MainForm.CWUwhat2.Checked then begin
|
||||
ExtractRD(MainForm.SkyCoord.Text,r,d);
|
||||
SkyToXY(r,d,x,y);
|
||||
MakeCircle(x,y,clLime);
|
||||
ExtractRD(MainForm.SkyCoord2.Text,r,d);
|
||||
SkyToXY(r,d,x,y);
|
||||
MakeCircle(x,y,clRed);
|
||||
if MainForm.Crosses.Checked then MakeCross(x,y,clRed) else MakeCircle(x,y,clRed);
|
||||
ExtractRD(MainForm.SkyCoord.Text,r,d);
|
||||
SkyToXY(r,d,x,y);
|
||||
if MainForm.Crosses.Checked then MakeCross(x,y,clLime) else MakeCircle(x,y,clLime);
|
||||
end else if MainForm.CWUwhat3.Checked then begin
|
||||
with Skymap.Map.Canvas do begin
|
||||
Pen.Color := clYellow;
|
||||
Pen.Style := psSolid;
|
||||
Pen.Mode := pmCopy;
|
||||
Pen.Width := 2;
|
||||
end;
|
||||
for i:=1 to MainForm.positions.Items.Count-1 do begin
|
||||
|
Reference in New Issue
Block a user