jpfassis

Menu.Principal002 - Delphi

Jul 19th, 2022 (edited)
222
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Delphi 7.03 KB | None | 0 0
  1. unit View.Pages.Menu.Principal002;
  2.  
  3. interface
  4.  
  5. uses
  6.   Winapi.Windows,
  7.   Winapi.Messages,
  8.   System.SysUtils,
  9.   System.Variants,
  10.   System.Classes,
  11.   Vcl.Graphics,
  12.   Vcl.Controls,
  13.   Vcl.Forms,
  14.   Vcl.Dialogs,
  15.   Vcl.ExtCtrls,
  16.   View.Components.Helpers,
  17.   View.Styles.Colors;
  18.  
  19.  
  20. type
  21.   TPageMenuPrincipal002 = class(TForm)
  22.     Panel1: TPanel;
  23.     Panel2: TPanel;
  24.     Panel3: TPanel;
  25.   private
  26.     { Private declarations }
  27.     FOnMenuShow : TProc;
  28.     FOnMenuHide : TProc;
  29.     FPanelMenu : TPanel;
  30.     FPanelSubMenu : TPanel;
  31.   public
  32.     { Public declarations }
  33.     function Component : TWinControl;
  34.     function PanelMenu(aValue : TPanel) : TPageMenuPrincipal002;
  35.     function PanelSubMenu(aValue : TPanel) : TPageMenuPrincipal002;
  36.     function OnMenuShow (aValue : TProc) : TPageMenuPrincipal002;
  37.     function OnMenuHide (aValue : TProc) : TPageMenuPrincipal002;
  38.   end;
  39.  
  40. var
  41.   PageMenuPrincipal002: TPageMenuPrincipal002;
  42.  
  43. implementation
  44.  
  45. {$R *.dfm}
  46.  
  47. { TPageMenuPrincipal002 }
  48.  
  49. function TPageMenuPrincipal002.Component: TWinControl;
  50. begin
  51.  Result := Panel1;
  52.  
  53.  Panel1.Align:=alClient;
  54.  Panel1.Parent:=FPanelMenu;
  55.  Panel1.Visible:=True;
  56.  
  57.  Panel1.Components
  58.    .Buttons.Button003(Self)
  59.    .Attributes
  60.       .BackGround(PRIMARY)
  61.       .FontColor(LIGHT)
  62. //      .Title('Arquivos')
  63.       .Title('Files')
  64.       .Image('ico_assessment')
  65.       .Align(alTop)
  66.       .TitleAlignment(taCenter)
  67.       .Onclick(
  68.         procedure (Sender : TObject)
  69.         begin
  70.            if Assigned(FOnMenuShow) then
  71.             FOnMenuShow;
  72.            if (FPanelSubMenu.ControlCount>0) then
  73.             FPanelSubMenu.Controls[0].Free;
  74.           end
  75.       )
  76.    .&End
  77.    .Component;
  78.  
  79.  Panel1.Components
  80.    .Buttons.Button003(Self)
  81.    .Attributes
  82.       .BackGround(PRIMARY)
  83.       .FontColor(LIGHT)
  84. //      .Title('Fianceiro')
  85.       .Title('Tools')
  86.       .Image('ico_assessment')
  87.       .Align(alTop)
  88.       .TitleAlignment(taCenter)
  89.       .Onclick(
  90.         procedure (Sender : TObject)
  91.         begin
  92.            if Assigned(FOnMenuShow) then
  93.             FOnMenuShow;
  94.            if (FPanelSubMenu.ControlCount>0) then
  95.             FPanelSubMenu.Controls[0].Free;
  96.           end
  97.       )
  98.    .&End
  99.    .Component;
  100.  
  101.  Panel1.Components
  102.    .Buttons.Button003(Self)
  103.    .Attributes
  104.       .BackGround(PRIMARY)
  105.       .FontColor(LIGHT)
  106. //      .Title('Doação')
  107.       .Title('Tasks')
  108.       .Image('ico_assessment')
  109.       .Align(alTop)
  110.       .TitleAlignment(taCenter)
  111.       .Onclick(
  112.         procedure (Sender : TObject)
  113.         begin
  114.            if Assigned(FOnMenuShow) then
  115.             FOnMenuShow;
  116.            if (FPanelSubMenu.ControlCount>0) then
  117.             FPanelSubMenu.Controls[0].Free;
  118.           end
  119.       )
  120.    .&End
  121.    .Component;
  122.  
  123.  Panel1.Components
  124.    .Buttons.Button003(Self)
  125.    .Attributes
  126.       .BackGround(PRIMARY)
  127.       .FontColor(LIGHT)
  128. //      .Title('Laboratório')
  129.       .Title('Transactions')
  130.       .Image('ico_assessment')
  131.       .Align(alTop)
  132.       .TitleAlignment(taCenter)
  133.       .Onclick(
  134.         procedure (Sender : TObject)
  135.         begin
  136.            if Assigned(FOnMenuShow) then
  137.             FOnMenuShow;
  138.            if (FPanelSubMenu.ControlCount>0) then
  139.             FPanelSubMenu.Controls[0].Free;
  140.           end
  141.       )
  142.    .&End
  143.    .Component;
  144.  
  145.  Panel1.Components
  146.    .Buttons.Button003(Self)
  147.    .Attributes
  148.       .BackGround(PRIMARY)
  149.       .FontColor(LIGHT)
  150. //      .Title('Conformidade')
  151.       .Title('Connection')
  152.       .Image('ico_assessment')
  153.       .Align(alTop)
  154.       .TitleAlignment(taCenter)
  155.       .Onclick(
  156.         procedure (Sender : TObject)
  157.         begin
  158.            if Assigned(FOnMenuShow) then
  159.             FOnMenuShow;
  160.            if (FPanelSubMenu.ControlCount>0) then
  161.             FPanelSubMenu.Controls[0].Free;
  162.           end
  163.       )
  164.    .&End
  165.    .Component;
  166.  
  167.  Panel1.Components
  168.    .Buttons.Button003(Self)
  169.    .Attributes
  170.       .BackGround(PRIMARY)
  171.       .FontColor(LIGHT)
  172. //      .Title('Agenda')
  173.       .Title('Driver')
  174.       .Image('ico_assessment')
  175.       .Align(alTop)
  176.       .TitleAlignment(taCenter)
  177.       .Onclick(
  178.         procedure (Sender : TObject)
  179.         begin
  180.            if Assigned(FOnMenuShow) then
  181.             FOnMenuShow;
  182.            if (FPanelSubMenu.ControlCount>0) then
  183.             FPanelSubMenu.Controls[0].Free;
  184.           end
  185.       )
  186.    .&End
  187.    .Component;
  188.  
  189.  Panel1.Components
  190.    .Buttons.Button003(Self)
  191.    .Attributes
  192.       .BackGround(PRIMARY)
  193.       .FontColor(LIGHT)
  194. //      .Title('PCMSO')
  195.       .Title('Log')
  196.       .Image('ico_assessment')
  197.       .Align(alTop)
  198.       .TitleAlignment(taCenter)
  199.       .Onclick(
  200.         procedure (Sender : TObject)
  201.         begin
  202.            if Assigned(FOnMenuShow) then
  203.             FOnMenuShow;
  204.            if (FPanelSubMenu.ControlCount>0) then
  205.             FPanelSubMenu.Controls[0].Free;
  206.           end
  207.       )
  208.    .&End
  209.    .Component;
  210.  
  211.  Panel1.Components
  212.    .Buttons.Button003(Self)
  213.    .Attributes
  214.       .BackGround(PRIMARY)
  215.       .FontColor(LIGHT)
  216. //      .Title('Utilitáios')
  217.       .Title('Dashboard')
  218.       .Image('ico_assessment')
  219.       .Align(alTop)
  220.       .TitleAlignment(taCenter)
  221.       .Onclick(
  222.         procedure (Sender : TObject)
  223.         begin
  224.            if Assigned(FOnMenuShow) then
  225.             FOnMenuShow;
  226.            if (FPanelSubMenu.ControlCount>0) then
  227.             FPanelSubMenu.Controls[0].Free;
  228.           end
  229.       )
  230.    .&End
  231.    .Component;
  232.  
  233.  Panel1.Components
  234.    .Buttons.Button003(Self)
  235.    .Attributes
  236.       .BackGround(PRIMARY)
  237.       .FontColor(LIGHT)
  238. //      .Title('Auditoria')
  239.       .Title('Commit')
  240.       .Image('ico_assessment')
  241.       .Align(alTop)
  242.       .TitleAlignment(taCenter)
  243.       .Onclick(
  244.         procedure (Sender : TObject)
  245.         begin
  246.            if Assigned(FOnMenuShow) then
  247.             FOnMenuShow;
  248.            if (FPanelSubMenu.ControlCount>0) then
  249.             FPanelSubMenu.Controls[0].Free;
  250.           end
  251.       )
  252.    .&End
  253.    .Component;
  254.  
  255.  Panel1.Components
  256.    .Buttons.Button003(Self)
  257.    .Attributes
  258.       .BackGround(PRIMARY)
  259.       .FontColor(LIGHT)
  260. //      .Title('Ajuda')
  261.       .Title('Help')
  262.       .Image('ico_assessment')
  263.       .Align(alTop)
  264.       .TitleAlignment(taCenter)
  265.       .Onclick(
  266.         procedure (Sender : TObject)
  267.         begin
  268.            if Assigned(FOnMenuShow) then
  269.             FOnMenuShow;
  270.            if (FPanelSubMenu.ControlCount>0) then
  271.             FPanelSubMenu.Controls[0].Free;
  272.           end
  273.       )
  274.    .&End
  275.    .Component;
  276.  
  277.  
  278. end;
  279.  
  280. function TPageMenuPrincipal002.OnMenuHide(aValue: TProc): TPageMenuPrincipal002;
  281. begin
  282.   Result := Self;
  283.   FOnMenuHide := aValue;
  284. end;
  285.  
  286. function TPageMenuPrincipal002.OnMenuShow(aValue: TProc): TPageMenuPrincipal002;
  287. begin
  288.   Result := Self;
  289.   FOnMenuShow := aValue;
  290. end;
  291.  
  292. function TPageMenuPrincipal002.PanelMenu(aValue: TPanel): TPageMenuPrincipal002;
  293. begin
  294.  Result := Self;
  295.  FPanelMenu:=aValue;
  296. end;
  297.  
  298. function TPageMenuPrincipal002.PanelSubMenu(
  299.   aValue: TPanel): TPageMenuPrincipal002;
  300. begin
  301.   Result := Self;
  302.   FPanelSubMenu:=aValue;
  303. end;
  304.  
  305. end.
Add Comment
Please, Sign In to add comment