Updated for FPC 3.1.1/Laz 1.9

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@5996 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
gbamber
2017-08-14 08:54:26 +00:00
parent 27e490e99b
commit b16b1c63ba
9 changed files with 236 additions and 201 deletions

View File

@ -12,6 +12,7 @@
<UseXPManifest Value="True"/>
<XPManifest>
<DpiAware Value="True"/>
<UIAccess Value="True"/>
<TextName Value="Minesadorada.Lazarus.FoobotMonitor"/>
<TextDesc Value="Monitor app for the Foobot IoT Gadget"/>
</XPManifest>
@ -25,8 +26,7 @@
<UseVersionInfo Value="True"/>
<AutoIncrementBuild Value="True"/>
<MinorVersionNr Value="2"/>
<RevisionNr Value="4"/>
<BuildNr Value="2"/>
<RevisionNr Value="7"/>
<StringTable Comments="Uses Foobot public API to query Foobots" FileDescription="Monitor for Foobot" InternalName="foobotmonitor" LegalCopyright="(c)2016 minesadorada@charcodelvalle.com" LegalTrademarks="Foobot" ProductName="Foobot" ProductVersion="0.0.0.0"/>
</VersionInfo>
<BuildModes Count="6">
@ -45,6 +45,11 @@
</SearchPaths>
<CodeGeneration>
<SmartLinkUnit Value="True"/>
<Checks>
<IOChecks Value="True"/>
<RangeChecks Value="True"/>
<OverflowChecks Value="True"/>
</Checks>
<TargetCPU Value="i386"/>
<TargetOS Value="win32"/>
<Optimizations>
@ -62,11 +67,6 @@
</Win32>
</Options>
</Linking>
<Other>
<OtherDefines Count="1">
<Define0 Value="DEBUGMODE"/>
</OtherDefines>
</Other>
</CompilerOptions>
</Item2>
<Item3 Name="win64">
@ -221,16 +221,22 @@
<FormatVersion Value="1"/>
</local>
</RunParams>
<RequiredPackages Count="3">
<RequiredPackages Count="5">
<Item1>
<PackageName Value="TAChartLazarusPkg"/>
<PackageName Value="lazupdate"/>
</Item1>
<Item2>
<PackageName Value="cryptini"/>
<PackageName Value="industrial"/>
</Item2>
<Item3>
<PackageName Value="LCL"/>
<PackageName Value="TAChartLazarusPkg"/>
</Item3>
<Item4>
<PackageName Value="cryptini"/>
</Item4>
<Item5>
<PackageName Value="LCL"/>
</Item5>
</RequiredPackages>
<Units Count="10">
<Unit0>
@ -268,22 +274,22 @@
<IsPartOfProject Value="True"/>
</Unit6>
<Unit7>
<Filename Value="foobot_sensors.pas"/>
<IsPartOfProject Value="True"/>
</Unit7>
<Unit8>
<Filename Value="usplash.pas"/>
<IsPartOfProject Value="True"/>
<ComponentName Value="splashform"/>
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/>
</Unit8>
<Unit9>
</Unit7>
<Unit8>
<Filename Value="utriggersform.pas"/>
<IsPartOfProject Value="True"/>
<ComponentName Value="triggersform"/>
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/>
</Unit8>
<Unit9>
<Filename Value="foobot_sensors.pas"/>
<IsPartOfProject Value="True"/>
</Unit9>
</Units>
</ProjectOptions>

View File

@ -46,7 +46,7 @@ uses
cthreads,
{$ENDIF}{$ENDIF}
Interfaces, // this includes the LCL widgetset
Forms, usplash, tachartlazaruspkg, umainform, uconfigform, foobot_sensors,
Forms, usplash, tachartlazaruspkg, umainform, uconfigform,
utriggersform
{ you can add units after this };

View File

@ -4,15 +4,14 @@
<PathDelim Value="\"/>
<Version Value="10"/>
<BuildModes Active="win32"/>
<Units Count="36">
<Units Count="42">
<Unit0>
<Filename Value="foobotmonitor.lpr"/>
<IsPartOfProject Value="True"/>
<EditorIndex Value="8"/>
<TopLine Value="39"/>
<CursorPos Y="56"/>
<UsageCount Value="198"/>
<Loaded Value="True"/>
<EditorIndex Value="-1"/>
<TopLine Value="13"/>
<CursorPos Y="66"/>
<UsageCount Value="199"/>
</Unit0>
<Unit1>
<Filename Value="umainform.pas"/>
@ -20,11 +19,11 @@
<ComponentName Value="mainform"/>
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/>
<TopLine Value="28"/>
<CursorPos X="14" Y="190"/>
<UsageCount Value="198"/>
<IsVisibleTab Value="True"/>
<TopLine Value="728"/>
<CursorPos X="31" Y="739"/>
<UsageCount Value="199"/>
<Loaded Value="True"/>
<LoadedDesigner Value="True"/>
</Unit1>
<Unit2>
<Filename Value="uconfigform.pas"/>
@ -32,21 +31,18 @@
<ComponentName Value="configform"/>
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/>
<EditorIndex Value="5"/>
<EditorIndex Value="-1"/>
<TopLine Value="14"/>
<CursorPos X="65" Y="44"/>
<UsageCount Value="188"/>
<Loaded Value="True"/>
<LoadedDesigner Value="True"/>
<UsageCount Value="189"/>
</Unit2>
<Unit3>
<Filename Value="..\foobot_httpclient.pas"/>
<IsPartOfProject Value="True"/>
<EditorIndex Value="1"/>
<EditorIndex Value="-1"/>
<TopLine Value="13"/>
<CursorPos X="49" Y="20"/>
<UsageCount Value="180"/>
<Loaded Value="True"/>
<UsageCount Value="181"/>
</Unit3>
<Unit4>
<Filename Value="..\foobot_objects.pas"/>
@ -55,16 +51,15 @@
<WindowIndex Value="-1"/>
<TopLine Value="-1"/>
<CursorPos X="-1" Y="-1"/>
<UsageCount Value="180"/>
<UsageCount Value="181"/>
</Unit4>
<Unit5>
<Filename Value="..\foobot_utility.pas"/>
<IsPartOfProject Value="True"/>
<EditorIndex Value="6"/>
<EditorIndex Value="-1"/>
<TopLine Value="199"/>
<CursorPos X="22" Y="214"/>
<UsageCount Value="198"/>
<Loaded Value="True"/>
<UsageCount Value="199"/>
</Unit5>
<Unit6>
<Filename Value="..\ugenericcollection.pas"/>
@ -73,209 +68,199 @@
<WindowIndex Value="-1"/>
<TopLine Value="-1"/>
<CursorPos X="-1" Y="-1"/>
<UsageCount Value="180"/>
<UsageCount Value="181"/>
</Unit6>
<Unit7>
<Filename Value="foobot_sensors.pas"/>
<IsPartOfProject Value="True"/>
<IsVisibleTab Value="True"/>
<EditorIndex Value="9"/>
<TopLine Value="10"/>
<CursorPos X="44" Y="17"/>
<UsageCount Value="132"/>
<Loaded Value="True"/>
</Unit7>
<Unit8>
<Filename Value="usplash.pas"/>
<IsPartOfProject Value="True"/>
<ComponentName Value="splashform"/>
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/>
<EditorIndex Value="3"/>
<EditorIndex Value="-1"/>
<CursorPos X="48" Y="37"/>
<UsageCount Value="127"/>
<Loaded Value="True"/>
<LoadedDesigner Value="True"/>
</Unit8>
<Unit9>
<UsageCount Value="128"/>
</Unit7>
<Unit8>
<Filename Value="utriggersform.pas"/>
<IsPartOfProject Value="True"/>
<ComponentName Value="triggersform"/>
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/>
<EditorIndex Value="2"/>
<TopLine Value="382"/>
<EditorIndex Value="-1"/>
<TopLine Value="253"/>
<CursorPos X="26" Y="21"/>
<UsageCount Value="118"/>
<Loaded Value="True"/>
<LoadedDesigner Value="True"/>
<UsageCount Value="119"/>
</Unit8>
<Unit9>
<Filename Value="foobot_sensors.pas"/>
<IsPartOfProject Value="True"/>
<EditorIndex Value="-1"/>
<TopLine Value="237"/>
<CursorPos X="90" Y="81"/>
<UsageCount Value="20"/>
</Unit9>
<Unit10>
<Filename Value="..\..\..\components\industrialstuff\source\sensors.pas"/>
<EditorIndex Value="-1"/>
<UsageCount Value="10"/>
</Unit10>
<Unit11>
<Filename Value="..\latest_stable\foobot_httpclient.pas"/>
<EditorIndex Value="-1"/>
<TopLine Value="43"/>
<CursorPos X="47" Y="13"/>
<UsageCount Value="110"/>
</Unit10>
<Unit11>
<Filename Value="..\latest_stable\foobot_objects.pas"/>
<EditorIndex Value="7"/>
<TopLine Value="141"/>
<CursorPos X="31" Y="148"/>
<UsageCount Value="110"/>
<Loaded Value="True"/>
</Unit11>
<Unit12>
<Filename Value="..\latest_stable\foobot_objects.pas"/>
<EditorIndex Value="-1"/>
<CursorPos X="31" Y="148"/>
<UsageCount Value="110"/>
</Unit12>
<Unit13>
<Filename Value="..\latest_stable\ugenericcollection.pas"/>
<EditorIndex Value="-1"/>
<WindowIndex Value="-1"/>
<TopLine Value="-1"/>
<CursorPos X="-1" Y="-1"/>
<UsageCount Value="26"/>
</Unit12>
<Unit13>
</Unit13>
<Unit14>
<Filename Value="..\udataform.pas"/>
<EditorIndex Value="-1"/>
<TopLine Value="74"/>
<CursorPos Y="96"/>
<UsageCount Value="6"/>
</Unit13>
<Unit14>
</Unit14>
<Unit15>
<Filename Value="..\umainform.pas"/>
<EditorIndex Value="-1"/>
<TopLine Value="145"/>
<CursorPos X="81" Y="158"/>
<UsageCount Value="34"/>
</Unit14>
<Unit15>
</Unit15>
<Unit16>
<Filename Value="..\ulogin.pas"/>
<EditorIndex Value="-1"/>
<CursorPos Y="108"/>
<UsageCount Value="1"/>
</Unit15>
<Unit16>
</Unit16>
<Unit17>
<Filename Value="C:\trunklatest\lazarus\ide\lazarus.pp"/>
<UnitName Value="Lazarus"/>
<EditorIndex Value="-1"/>
<TopLine Value="101"/>
<CursorPos Y="154"/>
<UsageCount Value="64"/>
</Unit16>
<Unit17>
</Unit17>
<Unit18>
<Filename Value="C:\trunklatest\fpc\packages\rtl-objpas\src\inc\dateutil.inc"/>
<EditorIndex Value="-1"/>
<TopLine Value="381"/>
<CursorPos X="13" Y="384"/>
<UsageCount Value="82"/>
</Unit17>
<Unit18>
<Filename Value="..\latest_stable\udataform.pas"/>
<EditorIndex Value="4"/>
<TopLine Value="66"/>
<UsageCount Value="82"/>
<Loaded Value="True"/>
</Unit18>
<Unit19>
<Filename Value="..\latest_stable\udataform.pas"/>
<EditorIndex Value="-1"/>
<TopLine Value="45"/>
<UsageCount Value="83"/>
</Unit19>
<Unit20>
<Filename Value="D:\lazarustrunk\common_components\cryptini\ucryptini.pas"/>
<EditorIndex Value="-1"/>
<TopLine Value="781"/>
<CursorPos X="28" Y="795"/>
<UsageCount Value="13"/>
</Unit19>
<Unit20>
</Unit20>
<Unit21>
<Filename Value="C:\trunklatest\fpc\packages\fcl-base\src\fileinfo.pp"/>
<EditorIndex Value="-1"/>
<TopLine Value="43"/>
<CursorPos X="19" Y="51"/>
<UsageCount Value="2"/>
</Unit20>
<Unit21>
</Unit21>
<Unit22>
<Filename Value="..\..\..\components\poweredby\latest_stable\upoweredby.pas"/>
<UnitName Value="uPoweredby"/>
<EditorIndex Value="-1"/>
<TopLine Value="190"/>
<CursorPos X="33" Y="205"/>
<UsageCount Value="10"/>
</Unit21>
<Unit22>
</Unit22>
<Unit23>
<Filename Value="C:\trunklatest\lazarus\lcl\graphics.pp"/>
<UnitName Value="Graphics"/>
<EditorIndex Value="-1"/>
<TopLine Value="1811"/>
<CursorPos X="13" Y="1834"/>
<UsageCount Value="60"/>
</Unit22>
<Unit23>
<Filename Value="umainform.lfm"/>
<EditorIndex Value="11"/>
<CursorPos Y="151"/>
<UsageCount Value="10"/>
<Loaded Value="True"/>
<DefaultSyntaxHighlighter Value="LFM"/>
</Unit23>
<Unit24>
<Filename Value="umainform.lfm"/>
<EditorIndex Value="-1"/>
<TopLine Value="151"/>
<CursorPos Y="151"/>
<UsageCount Value="11"/>
<DefaultSyntaxHighlighter Value="LFM"/>
</Unit24>
<Unit25>
<Filename Value="..\..\json_packager\umain.pas"/>
<EditorIndex Value="-1"/>
<CursorPos X="29" Y="1445"/>
<UsageCount Value="30"/>
</Unit24>
<Unit25>
</Unit25>
<Unit26>
<Filename Value="C:\trunklatest\fpc\rtl\objpas\classes\classesh.inc"/>
<EditorIndex Value="-1"/>
<TopLine Value="664"/>
<CursorPos X="25" Y="697"/>
<UsageCount Value="29"/>
</Unit25>
<Unit26>
</Unit26>
<Unit27>
<Filename Value="C:\trunklatest\fpc\rtl\objpas\sysutils\osutilsh.inc"/>
<EditorIndex Value="-1"/>
<TopLine Value="16"/>
<CursorPos X="32" Y="55"/>
<UsageCount Value="29"/>
</Unit26>
<Unit27>
</Unit27>
<Unit28>
<Filename Value="C:\trunklatest\fpc\rtl\objpas\sysutils\osutil.inc"/>
<EditorIndex Value="-1"/>
<TopLine Value="70"/>
<CursorPos X="28" Y="102"/>
<UsageCount Value="27"/>
</Unit27>
<Unit28>
</Unit28>
<Unit29>
<Filename Value="C:\trunklatest\fpc\packages\fcl-base\src\inifiles.pp"/>
<UnitName Value="IniFiles"/>
<EditorIndex Value="-1"/>
<TopLine Value="1272"/>
<CursorPos X="23" Y="1276"/>
<UsageCount Value="13"/>
</Unit28>
<Unit29>
</Unit29>
<Unit30>
<Filename Value="C:\trunklatest\fpc\rtl\objpas\classes\stringl.inc"/>
<EditorIndex Value="-1"/>
<TopLine Value="1116"/>
<CursorPos X="3" Y="1121"/>
<UsageCount Value="13"/>
</Unit29>
<Unit30>
</Unit30>
<Unit31>
<Filename Value="C:\trunklatest\lazarus\components\lazutils\lazfileutils.pas"/>
<UnitName Value="LazFileUtils"/>
<EditorIndex Value="-1"/>
<TopLine Value="728"/>
<CursorPos X="3" Y="730"/>
<UsageCount Value="10"/>
</Unit30>
<Unit31>
</Unit31>
<Unit32>
<Filename Value="C:\trunklatest\lazarus\lcl\lclintf.pas"/>
<UnitName Value="LCLIntf"/>
<EditorIndex Value="-1"/>
<TopLine Value="194"/>
<CursorPos X="10" Y="81"/>
<UsageCount Value="11"/>
</Unit31>
<Unit32>
<Filename Value="..\..\..\components\industrialstuff\source\sensors.pas"/>
<UnitName Value="Sensors"/>
<EditorIndex Value="-1"/>
<UsageCount Value="10"/>
</Unit32>
<Unit33>
<Filename Value="..\..\..\components\industrialstuff\industrial.pas"/>
@ -293,73 +278,59 @@
<Unit35>
<Filename Value="foobot.pas"/>
<UnitName Value="FoobotSensors"/>
<EditorIndex Value="10"/>
<TopLine Value="3"/>
<EditorIndex Value="-1"/>
<CursorPos X="28" Y="16"/>
<UsageCount Value="11"/>
</Unit35>
<Unit36>
<Filename Value="D:\lazarustrunk\common_components\onlinepackagemanager\onlinepackagemanager\opkman_downloader.pas"/>
<EditorIndex Value="-1"/>
<TopLine Value="248"/>
<CursorPos X="17" Y="275"/>
<UsageCount Value="10"/>
</Unit36>
<Unit37>
<Filename Value="..\..\..\components\lazautoupdate\latest_stable\ulazautoupdate.pas"/>
<EditorIndex Value="-1"/>
<TopLine Value="1279"/>
<UsageCount Value="10"/>
</Unit37>
<Unit38>
<Filename Value="C:\laztrunk\lazarus\lcl\forms.pp"/>
<UnitName Value="Forms"/>
<EditorIndex Value="-1"/>
<TopLine Value="42"/>
<CursorPos X="3" Y="69"/>
<UsageCount Value="10"/>
</Unit38>
<Unit39>
<Filename Value="foobot_sensors.res"/>
<EditorIndex Value="-1"/>
<UsageCount Value="20"/>
<DefaultSyntaxHighlighter Value="None"/>
</Unit39>
<Unit40>
<Filename Value="C:\laztrunk\lazarus\components\onlinepackagemanager\opkman_downloader.pas"/>
<EditorIndex Value="-1"/>
<TopLine Value="248"/>
<CursorPos X="33" Y="261"/>
<UsageCount Value="10"/>
</Unit40>
<Unit41>
<Filename Value="D:\lazarustrunk\common_components\lazautoupdate\versionsupport.pas"/>
<UnitName Value="VersionSupport"/>
<EditorIndex Value="1"/>
<TopLine Value="36"/>
<CursorPos X="124" Y="67"/>
<UsageCount Value="10"/>
<Loaded Value="True"/>
</Unit35>
</Unit41>
</Units>
<JumpHistory Count="15" HistoryIndex="14">
<JumpHistory Count="1">
<Position1>
<Filename Value="umainform.pas"/>
<Caret Line="1341" TopLine="1299"/>
<Caret Line="739" Column="31" TopLine="728"/>
</Position1>
<Position2>
<Filename Value="umainform.pas"/>
<Caret Line="1332" Column="47" TopLine="1299"/>
</Position2>
<Position3>
<Filename Value="umainform.pas"/>
<Caret Line="1333" Column="44" TopLine="1298"/>
</Position3>
<Position4>
<Filename Value="umainform.pas"/>
<Caret Line="1341" Column="50" TopLine="1300"/>
</Position4>
<Position5>
<Filename Value="umainform.pas"/>
<Caret Line="1335" Column="31" TopLine="1301"/>
</Position5>
<Position6>
<Filename Value="uconfigform.pas"/>
<Caret Line="45" Column="41" TopLine="33"/>
</Position6>
<Position7>
<Filename Value="uconfigform.pas"/>
<Caret Line="47" Column="41" TopLine="33"/>
</Position7>
<Position8>
<Filename Value="umainform.pas"/>
<Caret Line="23"/>
</Position8>
<Position9>
<Filename Value="umainform.pas"/>
<Caret Line="791" Column="74" TopLine="34"/>
</Position9>
<Position10>
<Filename Value="umainform.pas"/>
<Caret Line="781" Column="12" TopLine="777"/>
</Position10>
<Position11>
<Filename Value="uconfigform.pas"/>
<Caret Line="44" Column="65" TopLine="14"/>
</Position11>
<Position12>
<Filename Value="umainform.pas"/>
<Caret Line="33" Column="4" TopLine="22"/>
</Position12>
<Position13>
<Filename Value="umainform.pas"/>
<Caret Line="40" Column="39" TopLine="22"/>
</Position13>
<Position14>
<Filename Value="foobotmonitor.lpr"/>
<Caret Line="37" Column="17" TopLine="13"/>
</Position14>
<Position15>
<Filename Value="foobotmonitor.lpr"/>
<Caret Line="21" Column="45" TopLine="37"/>
</Position15>
</JumpHistory>
</ProjectSession>
</CONFIG>

View File

@ -1,7 +1,7 @@
object configform: Tconfigform
Left = 654
Left = 1461
Height = 197
Top = 285
Top = 603
Width = 592
BorderIcons = []
BorderStyle = bsToolWindow

View File

@ -1,7 +1,7 @@
object mainform: Tmainform
Left = 673
Left = 455
Height = 504
Top = 270
Top = 180
Width = 784
BorderIcons = [biSystemMenu, biMinimize]
BorderStyle = bsSingle
@ -13,14 +13,15 @@ object mainform: Tmainform
Menu = MainMenu1
OnActivate = FormActivate
OnClose = FormClose
OnCloseQuery = FormCloseQuery
OnCreate = FormCreate
OnDestroy = FormDestroy
OnShow = FormShow
OnWindowStateChange = FormWindowStateChange
Position = poWorkAreaCenter
ShowHint = True
ShowInTaskBar = stNever
LCLVersion = '1.7'
Scaled = True
LCLVersion = '1.9.0.0'
object grp_sensorDisplay: TGroupBox
Left = 0
Height = 120
@ -864,6 +865,10 @@ object mainform: Tmainform
Caption = 'Help...'
OnClick = mnu_helpHelpHTMLClick
end
object mnu_helpCheckForUpdates: TMenuItem
Caption = 'Check for Updates'
OnClick = mnu_helpCheckForUpdatesClick
end
object mnu_optionsHomePage: TMenuItem
Caption = 'Home Page'
OnClick = mnu_optionsHomePageClick
@ -902,4 +907,32 @@ object mainform: Tmainform
Left = 174
Top = 325
end
object LazAutoUpdate1: TLazAutoUpdate
About.Description.Strings = (
'A component for updating your application'#13#10'Designed for projects hosted by SourceForge and GitHub'#13#10#13#10'Main methods:'#13#10'Procedure AutoUpdate'#13#10'Function NewVersionAvailable: Boolean'#13#10'Function DownloadNewVersion: Boolean'#13#10'Function UpdateToNewVersion: Boolean'#13#10'Procedure ShowWhatsNewIfAvailable'#13#10'For troubleshooting, set DebugMode=TRUE'
)
About.Title = 'About LazAutoUpdate'
About.Height = 450
About.Width = 400
About.Font.Color = clNavy
About.Font.Height = -13
About.BackGroundColor = clWindow
About.Version = '0.3.9.0'
About.Authorname = 'Gordon Bamber'
About.Organisation = 'Public Domain'
About.AuthorEmail = 'minesadorada@charcodelvalle.com'
About.ComponentName = 'Laz Auto-update v0.3.9.0'
About.LicenseType = abModifiedGPL
SFProjectName = 'lazautoupdate'
UpdatesFolder = 'updates'
VersionsININame = 'foobotmonitor.ini'
VersionCountLimit = 1000000
DownloadCountLimit = 10000000
ZipfileName = 'foobotmonitor.zip'
WorkingMode = lauUpdate
ShortCut.ShortcutName = 'MyShortcutName'
ShortCut.Category = scAudioVideo
Left = 232
Top = 8
end
end

View File

@ -54,8 +54,8 @@ interface
uses // If Lazarus auto-inserts 'sensors' in the clause then delete it
SysUtils, LazFileUtils, TAGraph, TAIntervalSources, TASeries, foobot_sensors,
Forms, Controls, Graphics, Dialogs, ExtCtrls, StdCtrls, Menus, lclIntf,
ComCtrls, foobot_utility, uCryptIni, dateutils, uconfigform, utriggersform,
Classes;
ComCtrls, foobot_utility, uCryptIni, ulazautoupdate, dateutils,
uconfigform, utriggersform, Classes;
const
// Timer milliseconds
@ -104,6 +104,7 @@ type
Chart1: TChart;
DateTimeIntervalChartSource1: TDateTimeIntervalChartSource;
grp_health: TGroupBox;
LazAutoUpdate1: TLazAutoUpdate;
lbl_greenlighttmp: TLabel;
lbl_greenlighthum: TLabel;
lbl_greenlightco2: TLabel;
@ -150,6 +151,7 @@ type
lbl_voclow: TLabel;
lbl_allpollulow: TLabel;
MainMenu1: TMainMenu;
mnu_helpCheckForUpdates: TMenuItem;
mnu_helpHelpHTML: TMenuItem;
mnu_helpFoobotAPIPage: TMenuItem;
mnu_options_triggersActivateTriggers: TMenuItem;
@ -198,12 +200,15 @@ type
TrayIcon1: TTrayIcon;
procedure FormActivate(Sender: TObject);
procedure FormClose(Sender: TObject; var CloseAction: TCloseAction);
procedure FormCloseQuery(Sender: TObject; var CanClose: boolean);
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);
procedure mnu_helpAboutClick(Sender: TObject);
procedure mnu_helpCheckForUpdatesClick(Sender: TObject);
procedure mnu_helpFoobotAPIPageClick(Sender: TObject);
procedure mnu_helpHelpHTMLClick(Sender: TObject);
procedure mnu_optionsDisplayGuagesOnlyClick(Sender: TObject);
@ -336,6 +341,7 @@ procedure Tmainform.FormCreate(Sender: TObject);
begin
Caption := Application.Title;
Icon := Application.Icon;
// Crypted INI used
INI := TCryptINIfile.Create(GetAppConfigFile(False));
if INI.IsVirgin then
begin
@ -350,23 +356,26 @@ begin
Application.Terminate;
end;
INI.SectionHashing := False;
ResetHighLows;
ResetHighLows; // Read from ini file later
iFudgeFactor := 20; // only needed if height set in form.create
bDisplayGuagesOnly := False;
INI.PlainTextMode := True;
INI.PlainTextMode := True; // Use CryptINI in legacy mode
// Set defaults
HighTriggerColor := clYellow;
LowTriggerColor := clAqua;
// Read config from INI file
bDisplayYellowLines := INI.ReadBool('Config', 'DisplayYellowLines', False);
mnu_optionsDisplayYellowLines.Checked := bDisplayYellowLines;
bDisplayRedLines := INI.ReadBool('Config', 'DisplayRedLines', False);
mnu_optionsDisplayRedLines.Checked := bDisplayRedLines;
INI.PlainTextMode := False;
INI.PlainTextMode := False; // Use CryptINI in Encrypted mode
SetYellowRecommendedLevels;
SetRedSessionMax;
// Set up System Tray
TrayIcon1.Icon := Application.Icon;
TrayIcon1.Hint := Application.Title;
DateTimeIntervalChartSource1.DateTimeFormat := 'hh:nn';
LoadConfig;
LoadConfig; // Load from INI file
{$IFDEF DEBUGMODE}
UseTriggers := False;
{$ENDIF}
@ -440,6 +449,7 @@ begin
Update;
Application.ProcessMessages;
splashform.hide;
FreeAndNil(SplashForm); // Free memory used by SplashForm
Application.ProcessMessages;
end
else
@ -458,6 +468,7 @@ begin
// No valid cfg. Show config form
Hide;
splashform.Hide;
FreeAndNil(SplashForm); // Free memory used by SplashForm
Application.ProcessMessages;
configform.ShowModal;
// If user quit without data, then bail out
@ -609,12 +620,22 @@ begin
CloseAction := caFree;
end;
procedure Tmainform.FormCloseQuery(Sender: TObject; var CanClose: boolean);
begin
If LazAutoUpdate1.DownloadInprogress then CanClose:=False;
end;
procedure Tmainform.FormDestroy(Sender: TObject);
begin
FreeAndNil(splashform);
If Assigned (splashform) then FreeAndNil(splashform);
FreeAndNil(INI);
end;
procedure Tmainform.FormShow(Sender: TObject);
begin
LazAutoUpdate1.ShowWhatsNewIfAvailable;
end;
procedure Tmainform.SaveConfig;
// For all Foobots
begin
@ -728,6 +749,7 @@ begin
end;
procedure Tmainform.FormWindowStateChange(Sender: TObject);
// Systray routine
begin
if mainform.WindowState = wsMinimized then
begin
@ -769,6 +791,11 @@ begin
mtInformation, [mbOK], 0);
end;
procedure Tmainform.mnu_helpCheckForUpdatesClick(Sender: TObject);
begin
LazAutoUpdate1.AutoUpdate;
end;
procedure Tmainform.mnu_helpFoobotAPIPageClick(Sender: TObject);
begin
OpenURL('http://api.foobot.io/apidoc/index.html');
@ -1349,7 +1376,7 @@ sHelpFilePath:=AppendPathDelim(GetAppConfigDir(false)) + 'foobotmonitorhelp.htm'
// This uses a resource file added via Project/Options (Laz 1.7+)
if not FileExistsUTF8(sHelpFilePath) then
begin
// create a resource stream which points to the po file
// create a resource stream which points to the help file
S := TResourceStream.Create(HInstance, 'FOOBOTMONITORHELP', MakeIntResource(10));
TRY
try

View File

@ -1,7 +1,7 @@
object splashform: Tsplashform
Left = 669
Left = 841
Height = 530
Top = 171
Top = 846
Width = 794
BorderStyle = bsNone
Caption = 'splashform'
@ -14,7 +14,6 @@ object splashform: Tsplashform
Position = poWorkAreaCenter
ShowInTaskBar = stNever
LCLVersion = '1.7'
Scaled = True
object img: TImage
Left = 0
Height = 530

View File

@ -1,7 +1,7 @@
object triggersform: Ttriggersform
Left = 2007
Left = 1248
Height = 565
Top = 405
Top = 568
Width = 794
ActiveControl = edt_newrec_pm
BorderIcons = [biSystemMenu]
@ -18,7 +18,6 @@ object triggersform: Ttriggersform
Position = poWorkAreaCenter
ShowInTaskBar = stNever
LCLVersion = '1.7'
Scaled = True
object grp_main: TGroupBox
Left = 0
Height = 506