403Webshell
Server IP : 127.0.0.1  /  Your IP : 216.73.216.48
Web Server : Apache/2.4.58 (Win64) OpenSSL/3.1.3 PHP/8.2.12
System : Windows NT DESKTOP-3H4FHQJ 10.0 build 19045 (Windows 10) AMD64
User : win 10 ( 0)
PHP Version : 8.2.12
Disable Function : NONE
MySQL : OFF |  cURL : ON |  WGET : OFF |  Perl : OFF |  Python : OFF |  Sudo : OFF |  Pkexec : OFF
Directory :  D:/xampp/src/xampp-control-panel/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : D:/xampp/src/xampp-control-panel/uLogOptions.pas
unit uLogOptions;

interface

uses
  Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
  Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls, GnuGettext, uTools, uMain,
  Vcl.Buttons;

type
  TfLogOptions = class(TForm)
    FontDialog: TFontDialog;
    lblLogFont: TLabel;
    tLogFont: TEdit;
    lblLogFontSize: TLabel;
    bSelect: TButton;
    tLogFontSize: TEdit;
    bSave: TBitBtn;
    bCancel: TBitBtn;
    procedure bSelectClick(Sender: TObject);
    procedure FontDialogApply(Sender: TObject; Wnd: HWND);
    procedure FontDialogClose(Sender: TObject);
    procedure FormShow(Sender: TObject);
    procedure FormCreate(Sender: TObject);
    procedure bCancelClick(Sender: TObject);
    procedure bSaveClick(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  fLogOptions: TfLogOptions;

implementation

{$R *.dfm}

procedure TfLogOptions.bCancelClick(Sender: TObject);
begin
  Close;
end;

procedure TfLogOptions.bSaveClick(Sender: TObject);
begin
  Config.LogSettings.Font := FontDialog.Font.Name;
  Config.LogSettings.FontSize := FontDialog.Font.Size;
  fMain.AdjustLogFont(FontDialog.Font.Name, FontDialog.Font.Size);
  SaveSettings;
  Close;
end;

procedure TfLogOptions.bSelectClick(Sender: TObject);
begin
  FontDialog.Execute();
end;

procedure TfLogOptions.FontDialogApply(Sender: TObject; Wnd: HWND);
begin
  tLogFont.Text := FontDialog.Font.Name;
  tLogFontSize.Text := IntToStr(FontDialog.Font.Size);
end;

procedure TfLogOptions.FontDialogClose(Sender: TObject);
begin
  tLogFont.Text := FontDialog.Font.Name;
  tLogFontSize.Text := IntToStr(FontDialog.Font.Size);
end;

procedure TfLogOptions.FormCreate(Sender: TObject);
begin
  TranslateComponent(Self);
end;

procedure TfLogOptions.FormShow(Sender: TObject);
begin
  tLogFont.Text := Config.LogSettings.Font;
  tLogFontSize.Text := IntToStr(Config.LogSettings.FontSize);
  FontDialog.Font.Name := Config.LogSettings.Font;
  FontDialog.Font.Size := Config.LogSettings.FontSize;
end;

end.

Youez - 2016 - github.com/yon3zu
LinuXploit