diff --git a/applications/foobot/monitor/foobotmonitor.lpi b/applications/foobot/monitor/foobotmonitor.lpi
index b1650a7f5..faafbbb2b 100644
--- a/applications/foobot/monitor/foobotmonitor.lpi
+++ b/applications/foobot/monitor/foobotmonitor.lpi
@@ -16,11 +16,14 @@
+
+
+
-
+
@@ -209,7 +212,7 @@
-
+
@@ -248,6 +251,12 @@
+
+
+
+
+
+
diff --git a/applications/foobot/monitor/foobotmonitor.lpr b/applications/foobot/monitor/foobotmonitor.lpr
index 8b5b2c389..8b8daca27 100644
--- a/applications/foobot/monitor/foobotmonitor.lpr
+++ b/applications/foobot/monitor/foobotmonitor.lpr
@@ -15,7 +15,7 @@ uses
cthreads,
{$ENDIF}{$ENDIF}
Interfaces, // this includes the LCL widgetset
- Forms, tachartlazaruspkg, umainform, uconfigform, foobot_sensors
+ Forms, usplash, tachartlazaruspkg, umainform, uconfigform, foobot_sensors
{ you can add units after this };
{$R *.res}
@@ -24,6 +24,9 @@ begin
Application.Title:='Foobot monitor';
RequireDerivedFormResource:=True;
Application.Initialize;
+ SplashForm := TSplashForm.Create(Application);
+ SplashForm.Show;
+ Application.ProcessMessages; // process splash paint message
Application.CreateForm(Tmainform, mainform);
Application.CreateForm(Tconfigform, configform);
Application.Run;
diff --git a/applications/foobot/monitor/foobotmonitor.lps b/applications/foobot/monitor/foobotmonitor.lps
index 101a9889f..5a2357b35 100644
--- a/applications/foobot/monitor/foobotmonitor.lps
+++ b/applications/foobot/monitor/foobotmonitor.lps
@@ -3,14 +3,14 @@
-
-
+
+
-
-
-
+
+
+
@@ -19,10 +19,9 @@
-
-
-
-
+
+
+
@@ -32,9 +31,10 @@
-
-
-
+
+
+
+
@@ -44,7 +44,7 @@
-
+
@@ -53,15 +53,15 @@
-
+
-
+
-
+
@@ -71,30 +71,30 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -127,10 +127,10 @@
-
+
-
+
@@ -163,10 +163,10 @@
-
+
-
+
@@ -192,25 +192,25 @@
-
+
-
+
-
+
-
+
-
+
-
+
@@ -226,6 +226,43 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -233,123 +270,122 @@
-
+
-
-
+
+
-
+
-
+
-
+
-
-
+
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
-
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
diff --git a/applications/foobot/monitor/foobotmonitor.res b/applications/foobot/monitor/foobotmonitor.res
index 9ff97299c..0ba78697d 100644
Binary files a/applications/foobot/monitor/foobotmonitor.res and b/applications/foobot/monitor/foobotmonitor.res differ
diff --git a/applications/foobot/monitor/innosetup/foobotmonitor.iss b/applications/foobot/monitor/innosetup/foobotmonitor.iss
index 2c4632709..9d37d967b 100644
--- a/applications/foobot/monitor/innosetup/foobotmonitor.iss
+++ b/applications/foobot/monitor/innosetup/foobotmonitor.iss
@@ -9,7 +9,7 @@
[Setup]
AppName=Foobot Monitor
-AppVersion=0.1.2.0
+AppVersion=0.1.3.0
DefaultDirName={pf}\foobotmonitor
DefaultGroupName=Foobot
UninstallDisplayIcon={app}\foobotmonitor.exe
diff --git a/applications/foobot/monitor/innosetup/setup_foobotmonitor.exe b/applications/foobot/monitor/innosetup/setup_foobotmonitor.exe
index 6a2eb41ae..aa5936d33 100644
Binary files a/applications/foobot/monitor/innosetup/setup_foobotmonitor.exe and b/applications/foobot/monitor/innosetup/setup_foobotmonitor.exe differ
diff --git a/applications/foobot/monitor/umainform.lfm b/applications/foobot/monitor/umainform.lfm
index d3a050bb0..fe77e55b5 100644
--- a/applications/foobot/monitor/umainform.lfm
+++ b/applications/foobot/monitor/umainform.lfm
@@ -1,7 +1,7 @@
object mainform: Tmainform
- Left = 583
+ Left = 1072
Height = 451
- Top = 174
+ Top = 245
Width = 784
BorderIcons = [biSystemMenu, biMinimize]
BorderStyle = bsSingle
@@ -14,6 +14,7 @@ object mainform: Tmainform
OnClose = FormClose
OnCreate = FormCreate
OnDestroy = FormDestroy
+ OnShow = FormShow
OnWindowStateChange = FormWindowStateChange
Position = poWorkAreaCenter
ShowInTaskBar = stNever
diff --git a/applications/foobot/monitor/umainform.pas b/applications/foobot/monitor/umainform.pas
index e82340658..eab99688e 100644
--- a/applications/foobot/monitor/umainform.pas
+++ b/applications/foobot/monitor/umainform.pas
@@ -38,9 +38,9 @@ V0.1.2.0: ??
interface
uses
- SysUtils, TAGraph, TAIntervalSources, TASeries,
- foobot_sensors, Forms, Controls, Graphics, Dialogs, ExtCtrls, StdCtrls, Menus,
- lclIntf, foobot_utility, uCryptIni, dateutils, uconfigform, Classes;
+ SysUtils, TAGraph, TAIntervalSources, TASeries, foobot_sensors,
+ Forms, Controls, Graphics, Dialogs, ExtCtrls, StdCtrls, Menus, lclIntf,
+ foobot_utility, uCryptIni, dateutils, uconfigform, Classes;
const
// Timer milliseconds
@@ -150,10 +150,12 @@ type
traypopup: TPopupMenu;
tmr_foobot: TTimer;
TrayIcon1: TTrayIcon;
+ procedure ApplicationProperties1IdleEnd(Sender: TObject);
procedure FormActivate(Sender: TObject);
procedure FormClose(Sender: TObject; var CloseAction: TCloseAction);
procedure FormCreate(Sender: TObject);
procedure FormDestroy(Sender: TObject);
+ procedure FormShow(Sender: TObject);
procedure FormWindowStateChange(Sender: TObject);
procedure mnupopup_fileRestoreClick(Sender: TObject);
procedure mnu_fileExitClick(Sender: TObject);
@@ -196,7 +198,7 @@ var
mainform: Tmainform;
implementation
-
+Uses uSplash;
{$R *.lfm}
{ Tmainform }
@@ -240,7 +242,7 @@ var
begin
ClientHeight := grp_sensorDisplay.Height + grp_highlow.Height + grp_chart.Height;
-
+ Application.ProcessMessages;
// Allow user to enter values in INIFile
sTempFoobotUserName := INI.ReadUnencryptedString('Config', 'Foobot User', 'unknown');
sTempSecretKey := INI.ReadUnencryptedString('Config', 'Secret Key', 'unknown');
@@ -256,7 +258,7 @@ begin
sSecretKey := INI.ReadString('Foobot', 'Secret Key', 'unknown');
if ((sFoobotUserName <> 'unknown') and (sSecretKey <> 'unknown')) then
begin
- Hide;
+ //Show;
if FetchFoobotIdentity(sFoobotUserName, sSecretKey) then
begin
if FoobotIdentityObject.FoobotIdentityList.Count > 0 then
@@ -275,16 +277,30 @@ begin
{$IFNDEF DEBUGMODE}
tmr_foobot.Enabled := True;
{$ENDIF}
+ // Everything OK - lets go!
Show;
+ grp_sensorDisplay.Refresh;
+ grp_highlow.Refresh;
+ Update;
+ Application.Processmessages;
+ splashform.hide;
+ Application.Processmessages;
+ end
+ else
+ begin
+ // Identity.Count = 0
end;
end
else
+ begin // Unable to fetch foobot identity
Close;
+ end;
end
else
begin
// No valid cfg. Show config form
Hide;
+ splashform.Hide;
Application.ProcessMessages;
configform.ShowModal;
// If user quit without data, then bail out
@@ -301,6 +317,12 @@ begin
LineEnding + 'New settings are applied on resart.');
Close;
end;
+
+end;
+
+procedure Tmainform.ApplicationProperties1IdleEnd(Sender: TObject);
+begin
+
end;
procedure Tmainform.FormClose(Sender: TObject; var CloseAction: TCloseAction);
@@ -311,9 +333,15 @@ end;
procedure Tmainform.FormDestroy(Sender: TObject);
begin
+ FreeAndNil(splashform);
FreeAndNil(INI);
end;
+procedure Tmainform.FormShow(Sender: TObject);
+begin
+
+end;
+
procedure Tmainform.SaveConfig;
begin
INI.PlainTextMode := True;