Skip to content

Commit

Permalink
Fine tuning
Browse files Browse the repository at this point in the history
  • Loading branch information
[email protected] committed Aug 29, 2021
1 parent 3a7fe49 commit 944dd6b
Show file tree
Hide file tree
Showing 39 changed files with 499,209 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Code/RobinHood_project.tvsconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<?xml version="1.0"?>
<TgConfig Version="3" SubLevelDisabled="False" />
Binary file added Code/Win32/Debug/accounts/test.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
57 changes: 57 additions & 0 deletions Code/__history/RobinHood.dpr.~1~
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
program RobinHood;

uses
System.StartUpCopy,
FMX.Forms,
Winapi.TlHelp32,
Winapi.Windows,
uMain in 'uMain.pas' {Form1},
uNaviPanel in 'uNaviPanel.pas',
uDashPanel in 'uDashPanel.pas',
uLogin in 'uLogin.pas' {Form2},
Datamodule in 'Datamodule.pas' {DataModule1: TDataModule},
uDonationsThread in 'uDonationsThread.pas',
uSplashscreen in 'uSplashscreen.pas' {Splashscreen},
FMX.GIFImage in 'FMX.GIFImage.pas',
uPreferences in 'uPreferences.pas' {frmPreferences},
uSettingsTab in 'uSettingsTab.pas';

{$R *.res}

var
Semafor: THandle;

procedure RestoreWindow(aFormName: string);
var
Wnd, App: HWND;
begin
Wnd := FindWindow(PChar(aFormName), nil);
if (Wnd <> 0) then
begin { Set Window to foreground }
App := GetWindowLong(Wnd, GWL_HWNDPARENT);
// if IsIconic(App) then
ShowWindow(App, SW_RESTORE);

SetForegroundwindow(App);
end;
end;

begin
Semafor := CreateSemaphore(nil, 0, 1, 'MY_APPLICATION_IS_RUNNING');
if ((Semafor <> 0) and { application is already running }
(GetLastError = ERROR_ALREADY_EXISTS)) then
begin
RestoreWindow('TForm2');
CloseHandle(Semafor);
Halt;
end;

Application.CreateForm(TDataModule1, DataModule1);
if TForm2.Execute then
begin
Application.Initialize;
Application.CreateForm(TForm1, Form1);
Application.Run;
end;

end.
59 changes: 59 additions & 0 deletions Code/__history/RobinHood.dpr.~2~
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
program RobinHood;

uses
System.StartUpCopy,
FMX.Forms,
Winapi.TlHelp32,
Winapi.Windows,
uMain in 'uMain.pas' {Form1} ,
uNaviPanel in 'uNaviPanel.pas',
uDashPanel in 'uDashPanel.pas',
uLogin in 'uLogin.pas' {Form2} ,
Datamodule in 'Datamodule.pas' {DataModule1: TDataModule} ,
uDonationsThread in 'uDonationsThread.pas',
uSplashscreen in 'uSplashscreen.pas' {Splashscreen} ,
FMX.GIFImage in 'FMX.GIFImage.pas',
uPreferences in 'uPreferences.pas' {frmPreferences} ,
uSettingsTab in 'uSettingsTab.pas';

{$R *.res}

var
Semafor: THandle; { Identifier for processes running in windows }

// Brings the window back into users view if it has been minimised
// and user tries to open application
procedure RestoreWindow(aFormName: string);
var
Wnd, App: HWND;
begin
Wnd := FindWindow(PChar(aFormName), nil);
if (Wnd <> 0) then
begin { Set Window to foreground }
App := GetWindowLong(Wnd, GWL_HWNDPARENT);
// if IsIconic(App) then
ShowWindow(App, SW_RESTORE);

SetForegroundwindow(App);
end;
end;

begin
Semafor := CreateSemaphore(nil, 0, 1, 'MY_APPLICATION_IS_RUNNING');
if ((Semafor <> 0) and { application is already running }
(GetLastError = ERROR_ALREADY_EXISTS)) then
begin
RestoreWindow('RobinHood');
CloseHandle(Semafor);
Halt;
end;

Application.CreateForm(TDataModule1, DataModule1);
if TForm2.Execute then
begin
Application.Initialize;
Application.CreateForm(TForm1, Form1);
Application.Run;
end;

end.
61 changes: 61 additions & 0 deletions Code/__history/RobinHood.dpr.~3~
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
program RobinHood;

uses
System.StartUpCopy,
FMX.Forms,
Winapi.TlHelp32,
Winapi.Windows,
uMain in 'uMain.pas' {Form1} ,
uNaviPanel in 'uNaviPanel.pas',
uDashPanel in 'uDashPanel.pas',
uLogin in 'uLogin.pas' {Form2} ,
Datamodule in 'Datamodule.pas' {DataModule1: TDataModule} ,
uDonationsThread in 'uDonationsThread.pas',
uSplashscreen in 'uSplashscreen.pas' {Splashscreen} ,
FMX.GIFImage in 'FMX.GIFImage.pas',
uPreferences in 'uPreferences.pas' {frmPreferences} ,
uSettingsTab in 'uSettingsTab.pas';

{$R *.res}

var
Semafor: THandle; { Identifier for processes running in windows }

// Brings the window back into users view if it has been minimised
// and user tries to open application
procedure RestoreWindow(aFormName: string);
var
Wnd, App: HWND;
begin
Wnd := FindWindow(PChar(aFormName), nil);
if (Wnd <> 0) then
begin { Set Window to foreground }
App := GetWindowLong(Wnd, GWL_HWNDPARENT);
// if IsIconic(App) then
ShowWindow(App, SW_RESTORE);

SetForegroundwindow(App);
end;
end;

begin
// Creates semaphore with default security attributes (nil).
// Sets the initial semaphore count and the maximum (0, 1)
Semafor := CreateSemaphore(nil, 0, 1, 'MY_APPLICATION_IS_RUNNING');
if ((Semafor <> 0) and { application is already running }
(GetLastError = ERROR_ALREADY_EXISTS)) then
begin
RestoreWindow('RobinHood');
CloseHandle(Semafor);
Halt;
end;

Application.CreateForm(TDataModule1, DataModule1);
if TForm2.Execute then
begin
Application.Initialize;
Application.CreateForm(TForm1, Form1);
Application.Run;
end;

end.
61 changes: 61 additions & 0 deletions Code/__history/RobinHood.dpr.~4~
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
program RobinHood;

uses
System.StartUpCopy,
FMX.Forms,
Winapi.TlHelp32,
Winapi.Windows,
uMain in 'uMain.pas' {Form1},
uNaviPanel in 'uNaviPanel.pas',
uDashPanel in 'uDashPanel.pas',
uLogin in 'uLogin.pas' {frmLogin},
Datamodule in 'Datamodule.pas' {DataModule1: TDataModule},
uDonationsThread in 'uDonationsThread.pas',
uSplashscreen in 'uSplashscreen.pas' {Splashscreen},
FMX.GIFImage in 'FMX.GIFImage.pas',
uPreferences in 'uPreferences.pas' {frmPreferences},
uSettingsTab in 'uSettingsTab.pas';

{$R *.res}

var
Semafor: THandle; { Identifier for processes running in windows }

// Brings the window back into users view if it has been minimised
// and user tries to open application
procedure RestoreWindow(aFormName: string);
var
Wnd, App: HWND;
begin
Wnd := FindWindow(PChar(aFormName), nil);
if (Wnd <> 0) then
begin { Set Window to foreground }
App := GetWindowLong(Wnd, GWL_HWNDPARENT);
// if IsIconic(App) then
ShowWindow(App, SW_RESTORE);

SetForegroundwindow(App);
end;
end;

begin
// Creates semaphore with default security attributes (nil).
// Sets the initial semaphore count and the maximum (0, 1)
Semafor := CreateSemaphore(nil, 0, 1, 'MY_APPLICATION_IS_RUNNING');
if ((Semafor <> 0) and { application is already running }
(GetLastError = ERROR_ALREADY_EXISTS)) then
begin
RestoreWindow('RobinHood');
CloseHandle(Semafor);
Halt;
end;

Application.CreateForm(TDataModule1, DataModule1);
if TForm2.Execute then
begin
Application.Initialize;
Application.CreateForm(TForm1, Form1);
Application.Run;
end;

end.
Loading

0 comments on commit 944dd6b

Please sign in to comment.