Advertisement
jpfassis

Pages.Main001 Delphi

Jul 14th, 2022
1,597
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Delphi 2.85 KB | None | 0 0
  1. unit View.Pages.Main001;
  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.   Vcl.WinXCtrls,
  17.   Vcl.Imaging.jpeg,
  18.   View.Components.Helpers,
  19.   View.Styles.Colors,
  20.   View.Pages.Menu.Principal001,
  21.   Router4D.Interfaces;
  22.  
  23. type
  24.   TPageMain001 = class(TForm, iRouter4DComponent)
  25.     Panel1: TPanel;
  26.     Panel2: TPanel;
  27.     Panel6: TPanel;
  28.     Panel7: TPanel;
  29.     Panel8: TPanel;
  30.     Panel3: TPanel;
  31.     Panel4: TPanel;
  32.     SplitView1: TSplitView;
  33.     Panel5: TPanel;
  34.     Panel9: TPanel;
  35.     Image1: TImage;
  36.     Panel10: TPanel;
  37.     procedure FormCreate(Sender: TObject);
  38.     procedure Panel3Click(Sender: TObject);
  39.     procedure Panel10Click(Sender: TObject);
  40.   private
  41.     { Private declarations }
  42.     procedure SplitViewShow;
  43.     procedure SplitViewHide;
  44.   public
  45.     { Public declarations }
  46.     function Render : TForm;
  47.     procedure UnRender;
  48.   end;
  49.  
  50. var
  51.   PageMain001: TPageMain001;
  52.  
  53. implementation
  54.  
  55. {$R *.dfm}
  56.  
  57. procedure TPageMain001.FormCreate(Sender: TObject);
  58. begin
  59.  Panel2.Color:=WHITE;
  60.  Panel3.Color:=LIGHT2;
  61.  Panel4.Color:=PRIMARY;
  62.  Panel6.Color:=HEADER;
  63.  SplitView1.Color:=SECONDARY;
  64.  
  65.  WindowState:=wsMaximized;
  66.  BorderStyle:=bsNone;
  67.  
  68.    Panel5.Components
  69.    .Buttons.Button004(Self)
  70.    .Attributes
  71.       .BackGround(LIGHT2)
  72.       .FontColor(LIGHT)
  73.       .Image('ico_menu')
  74.       .Align(alTop)
  75.       .TitleAlignment(taCenter)
  76.       .Onclick(
  77.         procedure (Sender : TObject)
  78.         begin
  79.           Panel4.Visible:= not Panel4.Visible;
  80.           SplitViewHide;
  81.         end
  82.       )
  83.    .&End
  84.    .Component;
  85.  
  86.  
  87.   Panel8.Components
  88.   .Cards.Card001(Self)
  89.     .Attributes
  90.        .Title('Financial System - Version Betha - VCL Application')
  91.        .FontColor(LIGHT2)
  92.        .SubTitle('Delphi Design Experience - Brazil - (Code Academy)')
  93.        .FontColorSubTitle(LIGHT2)
  94.        .Align(alLeft)
  95.     .&End
  96.   .Component;
  97.  
  98.  
  99.  Panel7.Components
  100.   .Clocks.Clock001(Self)
  101.     .Attributes
  102.        .FontColor(LIGHT2)
  103.        .Align(alRight)
  104.     .&End
  105.   .Component;
  106.  
  107.  
  108.      TPageMenuPrincipal001
  109.       .Create(Self)
  110.       .OnMenuShow(SplitViewShow)
  111.       .OnMenuHide(SplitViewHide)
  112.       .PanelMenu(Panel4)
  113.       .PanelSubMenu(Panel9)
  114.       .Component;
  115.  
  116. end;
  117.  
  118. procedure TPageMain001.Panel10Click(Sender: TObject);
  119. begin
  120.   SplitView1.Close;
  121. end;
  122.  
  123. procedure TPageMain001.Panel3Click(Sender: TObject);
  124. begin
  125.   SplitView1.Close;
  126. end;
  127.  
  128. function TPageMain001.Render: TForm;
  129. begin
  130.   Result := Self;
  131. end;
  132.  
  133. procedure TPageMain001.SplitViewHide;
  134. begin
  135.   SplitView1.Visible:=False;
  136.   SplitView1.Close;
  137. end;
  138.  
  139. procedure TPageMain001.SplitViewShow;
  140. begin
  141.   SplitView1.Visible:=True;
  142.   SplitView1.Open;
  143. end;
  144.  
  145. procedure TPageMain001.UnRender;
  146. begin
  147. //
  148. end;
  149.  
  150. end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement