Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- unit View.Pages.Menu.Principal001;
- interface
- uses
- Winapi.Windows,
- Winapi.Messages,
- System.SysUtils,
- System.Variants,
- System.Classes,
- Vcl.Graphics,
- Vcl.Controls,
- Vcl.Forms,
- Vcl.Dialogs,
- Vcl.ExtCtrls,
- View.Pages.Menu.Favoritos001,
- View.Pages.Menu.Generic001,
- View.Components.Helpers,
- View.Styles.Colors;
- type
- TPageMenuPrincipal001 = class(TForm)
- Panel1: TPanel;
- Panel2: TPanel;
- Panel3: TPanel;
- private
- { Private declarations }
- FOnMenuShow : TProc;
- FOnMenuHide : TProc;
- FPanelMenu : TPanel;
- FPanelSubMenu : TPanel;
- public
- { Public declarations }
- function Component : TWinControl;
- function PanelMenu(aValue : TPanel) : TPageMenuPrincipal001;
- function PanelSubMenu(aValue : TPanel) : TPageMenuPrincipal001;
- function OnMenuShow (aValue : TProc) : TPageMenuPrincipal001;
- function OnMenuHide (aValue : TProc) : TPageMenuPrincipal001;
- procedure BuildSubMenuFinanceiro;
- procedure BuildSubMenuNotasFiscais;
- end;
- var
- PageMenuPrincipal001: TPageMenuPrincipal001;
- implementation
- {$R *.dfm}
- procedure TPageMenuPrincipal001.BuildSubMenuFinanceiro;
- begin
- TPageMenuGeneric001.Create(Self)
- .PanelSubMenu(FPanelSubMenu)
- .Title('FINANCEIRO')
- .OnMenuShow(FOnMenuShow)
- .OnMenuHide(FOnMenuHide)
- .BackGround(SECONDARY)
- .FontColor(LIGHT)
- .AddButton(
- Components.Buttons.Button006(Self)
- .Attributes
- .BackGround(SECONDARY)
- .DestBackGround(PRIMARY)
- .FontColor(LIGHT)
- .Title('Recebimento')
- .Image('ico_control')
- .Align(alTop)
- .TitleAlignment(taCenter)
- .Onclick(
- procedure (Sender : TObject)
- begin
- if Assigned(FOnMenuShow) then
- FOnMenuShow;
- end
- )
- .&End
- .Component
- )
- .AddButton(
- Components.Buttons.Button006(Self)
- .Attributes
- .BackGround(SECONDARY)
- .DestBackGround(PRIMARY)
- .FontColor(LIGHT)
- .Title('Pagamento')
- .Image('ico_control')
- .Align(alTop)
- .TitleAlignment(taCenter)
- .Onclick(
- procedure (Sender : TObject)
- begin
- if Assigned(FOnMenuShow) then
- FOnMenuShow;
- end
- )
- .&End
- .Component
- )
- .AddButton(
- Components.Buttons.Button006(Self)
- .Attributes
- .BackGround(SECONDARY)
- .DestBackGround(PRIMARY)
- .FontColor(LIGHT)
- .Title('Movimento Financeiro')
- .Image('ico_control')
- .Align(alTop)
- .TitleAlignment(taCenter)
- .Onclick(
- procedure (Sender : TObject)
- begin
- if Assigned(FOnMenuShow) then
- FOnMenuShow;
- end
- )
- .&End
- .Component
- )
- .AddButton(
- Components.Buttons.Button006(Self)
- .Attributes
- .BackGround(SECONDARY)
- .DestBackGround(PRIMARY)
- .FontColor(LIGHT)
- .Title('Contas a Pagar')
- .Image('ico_control')
- .Align(alTop)
- .TitleAlignment(taCenter)
- .Onclick(
- procedure (Sender : TObject)
- begin
- if Assigned(FOnMenuShow) then
- FOnMenuShow;
- end
- )
- .&End
- .Component
- )
- .AddButton(
- Components.Buttons.Button006(Self)
- .Attributes
- .BackGround(SECONDARY)
- .DestBackGround(PRIMARY)
- .FontColor(LIGHT)
- .Title('Contas a Receber')
- .Image('ico_control')
- .Align(alTop)
- .TitleAlignment(taCenter)
- .Onclick(
- procedure (Sender : TObject)
- begin
- if Assigned(FOnMenuShow) then
- FOnMenuShow;
- end
- )
- .&End
- .Component
- )
- .AddButton(
- Components.Buttons.Button006(Self)
- .Attributes
- .BackGround(SECONDARY)
- .DestBackGround(PRIMARY)
- .FontColor(LIGHT)
- .Title('Recibos Simples')
- .Image('ico_control')
- .Align(alTop)
- .TitleAlignment(taCenter)
- .Onclick(
- procedure (Sender : TObject)
- begin
- if Assigned(FOnMenuShow) then
- FOnMenuShow;
- end
- )
- .&End
- .Component
- )
- .Component;
- end;
- procedure TPageMenuPrincipal001.BuildSubMenuNotasFiscais;
- begin
- TPageMenuGeneric001.Create(Self)
- .PanelSubMenu(FPanelSubMenu)
- .Title('INVOICES')
- .OnMenuShow(FOnMenuShow)
- .OnMenuHide(FOnMenuHide)
- .BackGround(SECONDARY)
- .FontColor(LIGHT)
- .AddButton(
- Components.Buttons.Button006(Self)
- .Attributes
- .BackGround(SECONDARY)
- .DestBackGround(PRIMARY)
- .FontColor(LIGHT)
- .Title('Issue Invoices')
- .Image('ico_control')
- .Align(alTop)
- .TitleAlignment(taCenter)
- .Onclick(
- procedure (Sender : TObject)
- begin
- if Assigned(FOnMenuShow) then
- FOnMenuShow;
- end
- )
- .&End
- .Component
- )
- .AddButton(
- Components.Buttons.Button006(Self)
- .Attributes
- .BackGround(SECONDARY)
- .DestBackGround(PRIMARY)
- .FontColor(LIGHT)
- .Title('Table of NCM')
- .Image('ico_control')
- .Align(alTop)
- .TitleAlignment(taCenter)
- .Onclick(
- procedure (Sender : TObject)
- begin
- if Assigned(FOnMenuShow) then
- FOnMenuShow;
- end
- )
- .&End
- .Component
- )
- .AddButton(
- Components.Buttons.Button006(Self)
- .Attributes
- .BackGround(SECONDARY)
- .DestBackGround(PRIMARY)
- .FontColor(LIGHT)
- .Title('Tabble of IBPT')
- .Image('ico_control')
- .Align(alTop)
- .TitleAlignment(taCenter)
- .Onclick(
- procedure (Sender : TObject)
- begin
- if Assigned(FOnMenuShow) then
- FOnMenuShow;
- end
- )
- .&End
- .Component
- )
- .AddButton(
- Components.Accordions.Accordion001(Self)
- .Attributes
- .BackGround(SECONDARY)
- .DestBackGround(PRIMARY)
- .FontColor(LIGHT)
- .Title('Assessment')
- .Image('ico_control')
- .Align(alTop)
- .TitleAlignment(taCenter)
- .&End
- .AddSubMenu(
- Components.Accordions.Accordion001(Self)
- .Attributes
- .BackGround(SECONDARY)
- .DestBackGround(PRIMARY)
- .FontColor(LIGHT)
- .Title('Tributação ICMS')
- .Image('ico_control')
- .Align(alTop)
- .TitleAlignment(taCenter)
- .Onclick(
- procedure (Sender : TObject)
- begin
- if Assigned(FOnMenuShow) then
- FOnMenuShow;
- end
- )
- .&End
- .Component
- )
- .AddSubMenu(
- Components.Accordions.Accordion001(Self)
- .Attributes
- .BackGround(SECONDARY)
- .DestBackGround(PRIMARY)
- .FontColor(LIGHT)
- .Title('Tributação IPI')
- .Image('ico_control')
- .Align(alTop)
- .TitleAlignment(taCenter)
- .Onclick(
- procedure (Sender : TObject)
- begin
- if Assigned(FOnMenuShow) then
- FOnMenuShow;
- end
- )
- .&End
- .Component
- )
- .AddSubMenu(
- Components.Accordions.Accordion001(Self)
- .Attributes
- .BackGround(SECONDARY)
- .DestBackGround(PRIMARY)
- .FontColor(LIGHT)
- .Title('Tributação PIS/Cofins')
- .Image('ico_control')
- .Align(alTop)
- .TitleAlignment(taCenter)
- .Onclick(
- procedure (Sender : TObject)
- begin
- if Assigned(FOnMenuShow) then
- FOnMenuShow;
- end
- )
- .&End
- .Component
- )
- .Component
- )
- .AddButton(
- Components.Accordions.Accordion001(Self)
- .Attributes
- .BackGround(SECONDARY)
- .DestBackGround(PRIMARY)
- .FontColor(LIGHT)
- .Title('Tax Tables')
- .Image('ico_control')
- .Align(alTop)
- .TitleAlignment(taCenter)
- .&End
- .AddSubMenu(
- Components.Accordions.Accordion001(Self)
- .Attributes
- .BackGround(SECONDARY)
- .DestBackGround(PRIMARY)
- .FontColor(LIGHT)
- .Title('Operações Fiscais')
- .Image('ico_control')
- .Align(alTop)
- .TitleAlignment(taCenter)
- .Onclick(
- procedure (Sender : TObject)
- begin
- if Assigned(FOnMenuShow) then
- FOnMenuShow;
- end
- )
- .&End
- .Component
- )
- .AddSubMenu(
- Components.Accordions.Accordion001(Self)
- .Attributes
- .BackGround(SECONDARY)
- .DestBackGround(PRIMARY)
- .FontColor(LIGHT)
- .Title('Tabela de CRT')
- .Image('ico_control')
- .Align(alTop)
- .TitleAlignment(taCenter)
- .Onclick(
- procedure (Sender : TObject)
- begin
- if Assigned(FOnMenuShow) then
- FOnMenuShow;
- end
- )
- .&End
- .Component
- )
- .AddSubMenu(
- Components.Accordions.Accordion001(Self)
- .Attributes
- .BackGround(SECONDARY)
- .DestBackGround(PRIMARY)
- .FontColor(LIGHT)
- .Title('Tabela de CST')
- .Image('ico_control')
- .Align(alTop)
- .TitleAlignment(taCenter)
- .Onclick(
- procedure (Sender : TObject)
- begin
- if Assigned(FOnMenuShow) then
- FOnMenuShow;
- end
- )
- .&End
- .Component
- )
- .AddSubMenu(
- Components.Accordions.Accordion001(Self)
- .Attributes
- .BackGround(SECONDARY)
- .DestBackGround(PRIMARY)
- .FontColor(LIGHT)
- .Title('Tabela de CFOP')
- .Image('ico_control')
- .Align(alTop)
- .TitleAlignment(taCenter)
- .Onclick(
- procedure (Sender : TObject)
- begin
- if Assigned(FOnMenuShow) then
- FOnMenuShow;
- end
- )
- .&End
- .Component
- )
- .Component
- )
- .Component;
- end;
- function TPageMenuPrincipal001.Component: TWinControl;
- begin
- Result := Panel1;
- Panel1.Align:=alClient;
- Panel1.Parent:=FPanelMenu;
- Panel1.Visible:=True;
- Panel1.Components
- .Buttons.Button003(Self)
- .Attributes
- .BackGround(PRIMARY)
- .FontColor(LIGHT)
- .Title('Dashboard')
- .Image('ico_assessment')
- .Align(alTop)
- .TitleAlignment(taCenter)
- .Onclick(
- procedure (Sender : TObject)
- begin
- if Assigned(FOnMenuShow) then
- FOnMenuShow;
- if (FPanelSubMenu.ControlCount>0) then
- FPanelSubMenu.Controls[0].Free;
- TPageMenuGeneric001.Create(Self)
- .PanelSubMenu(FPanelSubMenu)
- .Title('DASHBOARD')
- .OnMenuShow(FOnMenuShow)
- .OnMenuHide(FOnMenuHide)
- .BackGround(SECONDARY)
- .FontColor(LIGHT)
- .Component;
- end
- )
- .&End
- .Component;
- Panel1.Components
- .Buttons.Button003(Self)
- .Attributes
- .BackGround(PRIMARY)
- .FontColor(LIGHT)
- .Title('Favorites')
- .Image('ico_star')
- .Align(alTop)
- .TitleAlignment(taCenter)
- .OnClick(
- procedure (Sender : TObject)
- begin
- if Assigned(FOnMenuShow) then
- FOnMenuShow;
- if (FPanelSubMenu.ControlCount>0) then
- FPanelSubMenu.Controls[0].Free;
- TPageMenuFavoritos001.Create(Self)
- .PanelSubMenu(FPanelSubMenu)
- .OnMenuShow(FOnMenuShow)
- .OnMenuHide(FOnMenuHide)
- .BackGround(SECONDARY)
- .FontColor(LIGHT)
- .Component;
- end )
- .&End
- .Component;
- Panel1.Components
- .Buttons.Button003(Self)
- .Attributes
- .BackGround(PRIMARY)
- .FontColor(LIGHT)
- .Title('Sales')
- .Image('ico_store')
- .Align(alTop)
- .TitleAlignment(taCenter)
- .Onclick(
- procedure (Sender : TObject)
- begin
- if Assigned(FOnMenuShow) then FOnMenuShow;
- end)
- .&End
- .Component;
- Panel1.Components
- .Buttons.Button003(Self)
- .Attributes
- .BackGround(PRIMARY)
- .FontColor(LIGHT)
- .Title('Financial')
- .Image('ico_atm')
- .Align(alTop)
- .TitleAlignment(taCenter)
- .Onclick(
- procedure (Sender : TObject)
- begin
- if Assigned(FOnMenuShow) then
- FOnMenuShow;
- if (FPanelSubMenu.ControlCount>0) then
- FPanelSubMenu.Controls[0].Free;
- BuildSubMenuFinanceiro;
- end)
- .&End
- .Component;
- Panel1.Components
- .Buttons.Button003(Self)
- .Attributes
- .BackGround(PRIMARY)
- .FontColor(LIGHT)
- .Title('Invoices')
- .Image('ico_insert')
- .Align(alTop)
- .TitleAlignment(taCenter)
- .Onclick(
- procedure (Sender : TObject)
- begin
- if Assigned(FOnMenuShow) then
- FOnMenuShow;
- if (FPanelSubMenu.ControlCount>0) then
- FPanelSubMenu.Controls[0].Free;
- BuildSubMenuNotasFiscais;
- end
- )
- .&End
- .Component;
- Panel1.Components
- .Buttons.Button003(Self)
- .Attributes
- .BackGround(PRIMARY)
- .FontColor(LIGHT)
- .Title('Reports')
- .Image('ico_import')
- .Align(alTop)
- .TitleAlignment(taCenter)
- .Onclick(
- procedure (Sender : TObject)
- begin
- if Assigned(FOnMenuShow) then
- FOnMenuShow;
- end
- )
- .&End
- .Component;
- Panel1.Components
- .Buttons.Button003(Self)
- .Attributes
- .BackGround(PRIMARY)
- .FontColor(LIGHT)
- .Title('Other Entries')
- .Image('ico_person')
- .Align(alTop)
- .TitleAlignment(taCenter)
- .Onclick(
- procedure (Sender : TObject)
- begin
- if Assigned(FOnMenuShow) then
- FOnMenuShow;
- end
- )
- .&End
- .Component;
- Panel1.Components
- .Buttons.Button003(Self)
- .Attributes
- .BackGround(PRIMARY)
- .FontColor(LIGHT)
- .Title('Setup')
- .Image('ico_settings')
- .Align(alBottom)
- .TitleAlignment(taCenter)
- .Onclick(
- procedure (Sender : TObject)
- begin
- Application.Terminate;
- end
- )
- .&End
- .Component;
- Panel1.Components
- .Buttons.Button003(Self)
- .Attributes
- .BackGround(PRIMARY)
- .FontColor(LIGHT)
- .Title('Change User')
- .Image('ico_swap')
- .Align(alBottom)
- .TitleAlignment(taCenter)
- .Onclick(
- procedure (Sender : TObject)
- begin
- Application.Terminate;
- end
- )
- .&End
- .Component;
- Panel1.Components
- .Buttons.Button003(Self)
- .Attributes
- .BackGround(PRIMARY)
- .FontColor(LIGHT)
- .Title('Exit')
- .Image('ico_exit')
- .Align(alBottom)
- .TitleAlignment(taCenter)
- .Onclick(
- procedure (Sender : TObject)
- begin
- Application.Terminate;
- end
- )
- .&End
- .Component;
- end;
- function TPageMenuPrincipal001.PanelMenu(aValue: TPanel): TPageMenuPrincipal001;
- begin
- Result := Self;
- FPanelMenu:=aValue;
- end;
- function TPageMenuPrincipal001.PanelSubMenu(
- aValue: TPanel): TPageMenuPrincipal001;
- begin
- Result := Self;
- FPanelSubMenu:=aValue;
- end;
- function TPageMenuPrincipal001.OnMenuHide(aValue: TProc): TPageMenuPrincipal001;
- begin
- Result := Self;
- FOnMenuHide := aValue;
- end;
- function TPageMenuPrincipal001.OnMenuShow(aValue: TProc): TPageMenuPrincipal001;
- begin
- Result := Self;
- FOnMenuShow := aValue;
- end;
- end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement