diff --git a/applications/foobot/foobot_utility.pas b/applications/foobot/foobot_utility.pas index de6fe2af4..9ad816279 100644 --- a/applications/foobot/foobot_utility.pas +++ b/applications/foobot/foobot_utility.pas @@ -52,7 +52,7 @@ function FetchAuthenticationKey(aUsername, aUserPassword: string): boolean; // Populates FoobotIdentityObject.TFoobotIdentityList collection function FetchFoobotIdentity(aUsername, aSecretKey: string): boolean; -// Populates FoobotIdentityObject +// Populates FoobotDataObject function FetchFoobotData(DataFetchType: TDataFetchType = dfLast; iCurrentFoobot: integer = 0; iLastIntervalSeconds: integer = 3600; iLastAverageBySeconds: integer = 0; iStartTimeSeconds: int64 = 0; diff --git a/applications/foobot/monitor/foobotmonitor.lpi b/applications/foobot/monitor/foobotmonitor.lpi index 0c377c649..ecf886452 100644 --- a/applications/foobot/monitor/foobotmonitor.lpi +++ b/applications/foobot/monitor/foobotmonitor.lpi @@ -19,7 +19,7 @@ - + diff --git a/applications/foobot/monitor/foobotmonitor.lps b/applications/foobot/monitor/foobotmonitor.lps index b5c4d8e1b..59bc7cede 100644 --- a/applications/foobot/monitor/foobotmonitor.lps +++ b/applications/foobot/monitor/foobotmonitor.lps @@ -10,7 +10,7 @@ - + @@ -19,8 +19,10 @@ - - + + + + @@ -32,7 +34,7 @@ - + @@ -42,7 +44,7 @@ - + @@ -51,14 +53,14 @@ - + - + @@ -68,21 +70,21 @@ - + - + - + - + @@ -118,7 +120,7 @@ - + @@ -152,123 +154,123 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + diff --git a/applications/foobot/monitor/foobotmonitor.res b/applications/foobot/monitor/foobotmonitor.res index b10c4d151..7d4bce483 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 6527a8f5a..a191a8d9e 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.0.2.0 +AppVersion=0.0.3.0 DefaultDirName={pf}\foobotmonitor DefaultGroupName=Foobot UninstallDisplayIcon={app}\foobotmonitor.exe @@ -41,3 +41,6 @@ Source: "..\compiled\win32\foobotmonitor.exe"; DestDir: "{app}"; Flags: solidbre [Icons] Name: "{group}\Foobot"; Filename: "{app}\foobotmonitor.exe" + +[Run] +Filename: "{app}\foobotmonitor.exe"; WorkingDir: "{app}"; Flags: postinstall runascurrentuser; Description: "Start Foobot Monitor now"; StatusMsg: "Start Foobot Monitor now" diff --git a/applications/foobot/monitor/innosetup/setup_foobotmonitor.exe b/applications/foobot/monitor/innosetup/setup_foobotmonitor.exe index 5aa4c1137..112c7f6a7 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/linuxbinaries/foobotmonitor.zip b/applications/foobot/monitor/linuxbinaries/foobotmonitor.zip index ca156c684..9c6ed17c7 100644 Binary files a/applications/foobot/monitor/linuxbinaries/foobotmonitor.zip and b/applications/foobot/monitor/linuxbinaries/foobotmonitor.zip differ diff --git a/applications/foobot/monitor/umainform.lfm b/applications/foobot/monitor/umainform.lfm index 89a65e448..72657bbfa 100644 --- a/applications/foobot/monitor/umainform.lfm +++ b/applications/foobot/monitor/umainform.lfm @@ -1,7 +1,7 @@ object mainform: Tmainform - Left = 615 + Left = 614 Height = 262 - Top = 154 + Top = 109 Width = 782 BorderIcons = [biSystemMenu, biMinimize] BorderStyle = bsSingle @@ -145,7 +145,7 @@ object mainform: Tmainform Top = 120 Width = 782 Align = alTop - Caption = 'Highs and Lows' + Caption = 'All-time Highs and Lows' ChildSizing.EnlargeHorizontal = crsHomogenousChildResize ChildSizing.EnlargeVertical = crsScaleChilds ChildSizing.ControlsPerLine = 6 @@ -333,11 +333,9 @@ object mainform: Tmainform end object mnu_options: TMenuItem Caption = '&Options' - object mnu_optionsShowHighsAndLows: TMenuItem - AutoCheck = True - Caption = 'Show Highs and Lows' - Checked = True - OnClick = mnu_optionsShowHighsAndLowsClick + object mnu_optionsMinimiseToTray: TMenuItem + Caption = 'Minimise to tray' + OnClick = mnu_optionsMinimiseToTrayClick end object mnu_optionsTakeReadingNow: TMenuItem Caption = 'Take reading now' @@ -374,15 +372,31 @@ object mainform: Tmainform OnClick = mnu_SampleEvery24HoursClick end end + object mnu_optionsSeperator1: TMenuItem + Caption = '-' + end + object mnu_optionsShowHighsAndLows: TMenuItem + AutoCheck = True + Caption = 'Show All-time Highs and Lows' + Checked = True + OnClick = mnu_optionsShowHighsAndLowsClick + end object mnu_optionsSaveHighLows: TMenuItem AutoCheck = True - Caption = 'Save/Load High-Lows to disk' + Caption = 'Record All-time High/Lows' Checked = True OnClick = mnu_optionsSaveHighLowsClick end - object mnu_optionsMinimiseToTray: TMenuItem - Caption = 'Minimise to tray' - OnClick = mnu_optionsMinimiseToTrayClick + end + object mnu_help: TMenuItem + Caption = '&Help' + object mnu_optionsOnlineHelp: TMenuItem + Caption = 'Online Help' + OnClick = mnu_optionsOnlineHelpClick + end + object mnu_helpAbout: TMenuItem + Caption = 'A&bout..' + OnClick = mnu_helpAboutClick end end end diff --git a/applications/foobot/monitor/umainform.pas b/applications/foobot/monitor/umainform.pas index 36fdec070..4b652a49f 100644 --- a/applications/foobot/monitor/umainform.pas +++ b/applications/foobot/monitor/umainform.pas @@ -22,7 +22,8 @@ VERSION HISTORY =============== V0.0.1.0: Initial commit V0.0.2.0: Trayicon added -V0.0.3.0: ?? +V0.0.3.0: Added Help menu. Updated Options menu +V0.0.4.0: ?? } {$mode objfpc}{$H+} @@ -31,7 +32,7 @@ interface uses Classes, SysUtils, FileUtil, Sensors, Forms, Controls, Graphics, Dialogs, - ExtCtrls, StdCtrls, Menus, foobot_utility, uCryptIni, Variants, dateutils, + ExtCtrls, StdCtrls, Menus, lclIntf,foobot_utility, uCryptIni, Variants, dateutils, uconfigform; CONST @@ -75,6 +76,10 @@ type lbl_voclow: TLabel; lbl_allpollulow: TLabel; MainMenu1: TMainMenu; + mnu_optionsOnlineHelp: TMenuItem; + mnu_optionsSeperator1: TMenuItem; + mnu_helpAbout: TMenuItem; + mnu_help: TMenuItem; mnupopup_fileRestore: TMenuItem; mnu_pupupClose: TMenuItem; mnu_optionsMinimiseToTray: TMenuItem; @@ -100,7 +105,9 @@ type procedure FormWindowStateChange(Sender: TObject); procedure mnupopup_fileRestoreClick(Sender: TObject); procedure mnu_fileExitClick(Sender: TObject); + procedure mnu_helpAboutClick(Sender: TObject); procedure mnu_optionsMinimiseToTrayClick(Sender: TObject); + procedure mnu_optionsOnlineHelpClick(Sender: TObject); procedure mnu_optionsSaveHighLowsClick(Sender: TObject); procedure mnu_optionsShowHighsAndLowsClick(Sender: TObject); procedure mnu_optionsTakeReadingNowClick(Sender: TObject); @@ -245,12 +252,38 @@ begin Close; end; +procedure Tmainform.mnu_helpAboutClick(Sender: TObject); +var + s: string; +begin + s := Application.Title + LineEnding; + s += 'Version: ' + INI.ReadUnencryptedString('ProgramInfo', IDENT_APPVERSION, '') + + LineEnding + LineEnding; + s += INI.ReadUnencryptedString('ProgramInfo', IDENT_COPYRIGHT, ''); + s += ' by ' + INI.ReadUnencryptedString('ProgramInfo', IDENT_AUTHOR, '') + LineEnding; + s += 'Licence: ' + INI.ReadUnencryptedString('ProgramInfo', IDENT_LICENSE, '') + + LineEnding; + s += 'Made with LCL v ' + INI.ReadUnencryptedString('ProgramInfo', + IDENT_LCLVERSION, ''); + s += ' FPC v ' + INI.ReadUnencryptedString('ProgramInfo', IDENT_FPCVERSION, '') + + LineEnding; + s += 'Compiled ' + INI.ReadUnencryptedString('ProgramInfo', IDENT_LASTCOMPILED, '') + + LineEnding; + s += ' for ' + INI.ReadUnencryptedString('ProgramInfo', IDENT_TARGET, ''); + MessageDlg('About ' + Application.Title, s, + mtInformation, [mbOK], 0); +end; procedure Tmainform.mnu_optionsMinimiseToTrayClick(Sender: TObject); begin mainform.WindowState:=wsMinimized; mainform.FormWindowStateChange(Self); end; +procedure Tmainform.mnu_optionsOnlineHelpClick(Sender: TObject); +begin + OpenURL('http://wiki.freepascal.org/Foobot'); +end; + procedure Tmainform.mnu_optionsSaveHighLowsClick(Sender: TObject); begin SaveLoadHighLows:=mnu_optionsSaveHighLows.Checked; @@ -262,7 +295,7 @@ begin if mnu_optionsShowHighsAndLows.Checked then mainform.ClientHeight := grp_sensorDisplay.Height + grp_highlow.Height + iFudgeFactor else - mainform.ClientHeight := grp_sensorDisplay.Height + iFudgeFactor; + mainform.ClientHeight := grp_sensorDisplay.Height;// + iFudgeFactor; bShowHighsAndLows := mnu_optionsShowHighsAndLows.Checked; end;