Skip to content

Commit

Permalink
v0.4.4
Browse files Browse the repository at this point in the history
  • Loading branch information
FeroxGraxaim committed Nov 7, 2024
1 parent 52b3e27 commit 69e4996
Show file tree
Hide file tree
Showing 29 changed files with 8,121 additions and 1,213 deletions.
12 changes: 10 additions & 2 deletions GraxaimBanca.lpi
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
<VersionInfo>
<UseVersionInfo Value="True"/>
<MinorVersionNr Value="4"/>
<RevisionNr Value="3"/>
<BuildNr Value="23"/>
<RevisionNr Value="4"/>
<BuildNr Value="24"/>
<Language Value="0416"/>
<StringTable CompanyName="Ferox Graxaim" ProductVersion="0.4"/>
</VersionInfo>
Expand Down Expand Up @@ -207,6 +207,14 @@
<ResourceBaseClass Value="Form"/>
<UnitName Value="untSalvarDados"/>
</Unit>
<Unit>
<Filename Value="include/untboasvindas.pas"/>
<IsPartOfProject Value="True"/>
<ComponentName Value="formBoasVindas"/>
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/>
<UnitName Value="untBoasVindas"/>
</Unit>
</Units>
</ProjectOptions>
<CompilerOptions>
Expand Down
3 changes: 2 additions & 1 deletion GraxaimBanca.lpr
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
Forms, tachartlazaruspkg, lazdbexport, untMain, untApostas, untDatabase,
untNA, untPainel, untSobre, untSplash, untUpdate, untControleMetodos,
untControleTimes, untPaises, untContrComp, untEditSimples, untEditMult,
untSalvarDados;
untSalvarDados, untBoasVindas;

{$R *.res}

Expand All @@ -29,6 +29,7 @@
Application.CreateForm(TformEditSimples, formEditSimples);
Application.CreateForm(TformEditMult, formEditMult);
Application.CreateForm(TformSalvarDados, formSalvarDados);
Application.CreateForm(TformBoasVindas, formBoasVindas);
Application.Run;
end.

6 changes: 4 additions & 2 deletions datafiles/atualizarbd.sql
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
ALTER TABLE "Selecionar Perfil" ADD GestaoPcent BOOLEAN DEFAULT 0;
CREATE TABLE "ConfigPrograma" (
"ExibirTelaBoasVindas" BOOLEAN DEFAULT 1
);

UPDATE ControleVersao SET Versao = 16;
UPDATE ControleVersao SET Versao = 17;
10 changes: 7 additions & 3 deletions datafiles/criarbd.sql
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@ CREATE TABLE IF NOT EXISTS "Perfis" (
"Perfil" VARCHAR,
PRIMARY KEY("Perfil")
);
CREATE TABLE IF NOT EXISTS "Selecionar Perfil" (
"Perfil Selecionado" VARCHAR NOT NULL DEFAULT 'Conservador'
CREATE TABLE "Selecionar Perfil" (
"Perfil Selecionado" VARCHAR NOT NULL DEFAULT 'Conservador',
"GestaoPcent" BOOLEAN DEFAULT (0)
);
CREATE TABLE IF NOT EXISTS "Selecionar Mês e Ano" (
"Mês" INTEGER,
Expand Down Expand Up @@ -115,6 +116,9 @@ CREATE TABLE IF NOT EXISTS "Selecaoionar Mês e Ano" (
"Mês" INTEGER,
"Ano" INTEGER
);
CREATE TABLE "ConfigPrograma" (
"ExibirTelaBoasVindas" BOOLEAN DEFAULT 1
);
INSERT INTO "Unidades" ("Unidade") VALUES ('0,25 Un'),
('0,5 Un'),
('0,75 Un'),
Expand Down Expand Up @@ -521,7 +525,7 @@ INSERT INTO "Times" ("Selecao","Time","País","Mandante","Visitante","Greens","P
(0,'Botafogo SP','Brasil',0,0,0,0,0),
(0,'LDU Quito','Equador',0,0,0,0,0),
(0,'Avaí','Brasil',0,0,0,0,0);
INSERT INTO "ControleVersao" ("Versao") VALUES (15);
INSERT INTO "ControleVersao" ("Versao") VALUES (17);
INSERT INTO "Competicoes" ("Cod_Comp","Selecao","Competicao","País","Mercados","Green","Red","P/L","Total") VALUES (1,'False','Brasileirão Série A','Brasil',32,0,0,0,0),
(2,'False','Brasileirão Série B','Brasil',5,0,0,0,0),
(3,'False','Eurocopa','Europa',2,0,0,0,0),
Expand Down
1 change: 0 additions & 1 deletion include/backup/untNA.pas
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,6 @@ procedure TformNovaAposta.FormShow(Sender: TObject);
tsMultipla.OnClick := @LimparControle;
tsMultipla.OnHide := @LimparControle;
pcApostas.OnClick := @LimparControle;
Application.OnException := @ExcecaoNaoTratada;

HabilitarBotaoOk;
writeln('Criando aposta');
Expand Down
2 changes: 1 addition & 1 deletion include/backup/untUpdate.pas
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ function VerificarAtualizacoes(currentVersion: string): string;
Fim;
begin
writeln('Verificando atualizações...');
currentVersion := '0.4.2.22';
currentVersion := '0.4.3.23';
Result := '';
apiUrl := 'https://api.github.com/repos/FeroxGraxaim/graxaimgestaodebanca/releases/latest';
response := TStringStream.Create('');
Expand Down
95 changes: 95 additions & 0 deletions include/backup/untboasvindas.pas
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
unit untBoasVindas;

{$mode ObjFPC}{$H+}

interface

uses
Classes, SysUtils, SQLDB, IBConnection, PQConnection, MSSQLConn, SQLite3Conn,
DB, Forms, Controls, Graphics, Dialogs, StdCtrls, ComCtrls, DBGrids, DBCtrls,
Menus, ActnList, Buttons, ExtCtrls, TAGraph, TARadialSeries, TASeries, TADbSource,
TACustomSeries, TAMultiSeries, DateUtils, contnrs, fgl, untMain;

type

{ TformBoasVindas }

TformBoasVindas = class(TForm)
btnGitHub: TBitBtn;
btnDoacao: TBitBtn;
chbExibirNovamente: TDBCheckBox;
dsExibirJanela: TDataSource;
Image1: TImage;
lbAtencao: TLabel;
lbBemVindo: TLabel;
mmIntro: TMemo;
mmAtencao: TMemo;
qrExibirJanela: TSQLQuery;
qrExibirJanelaExibirTelaBoasVindas: TBooleanField;
procedure btnDoacaoClick(Sender: TObject);
procedure btnGitHubClick(Sender: TObject);
procedure chbExibirNovamenteClick(Sender: TObject);
procedure FormShow(Sender: TObject);
private

public

end;

var
formBoasVindas: TformBoasVindas;
LocalArquivo: string;
Arquivo: TStringList;

implementation
uses
fpjson, HTTPDefs, fphttpclient, jsonparser, LCLIntf;

{$R *.lfm}

{ TformBoasVindas }

procedure TformBoasVindas.FormShow(Sender: TObject);
begin
writeln('Exibindo tela de boas-vindas');
with qrExibirJanela do
if not Active then Open;
end;

procedure TformBoasVindas.chbExibirNovamenteClick(Sender: TObject);
begin
with formPrincipal do
with qrExibirJanela do
with transactionBancoDados do
with chbExibirNovamente do
try
if not Active then Open;
Edit;
if FieldByName('ExibirTelaBoasVindas').AsBoolean = true then
Checked := true
else Checked := false;
Post;
ApplyUpdates;
CommitRetaining;
except
on E: Exception do
begin
Cancel;
RollbackRetaining;
raise Exception.Create('Não foi possível salvar configurações da tela ' +
'de boas-vindas, ' + E.Message);
end;
end;
end;

procedure TformBoasVindas.btnGitHubClick(Sender: TObject);
begin
OpenURL('https://github.com/FeroxGraxaim/graxaimgestaodebanca');
end;

procedure TformBoasVindas.btnDoacaoClick(Sender: TObject);
begin
openurl('https://link.mercadopago.com.br/graxaimgestaodebanca');
end;

end.
2 changes: 1 addition & 1 deletion include/backup/untdatabase.pas
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ implementation
procedure TBancoDados.DefinirVariaveis;
begin
writeln('Definindo variáveis');
versaoBDEsperada := 15;
versaoBDEsperada := 16;

{$IFDEF MSWINDOWS}
if FileExists(GetEnvironmentVariable('PROGRAMFILES') +
Expand Down
Loading

0 comments on commit 69e4996

Please sign in to comment.