-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3a7fe49
commit 944dd6b
Showing
39 changed files
with
499,209 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
<?xml version="1.0"?> | ||
<TgConfig Version="3" SubLevelDisabled="False" /> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
Oops, something went wrong.