Changeset 228 for branches/xpascal/Forms


Ignore:
Timestamp:
Jun 24, 2023, 12:33:35 PM (17 months ago)
Author:
chronos
Message:
  • Modified: Use TFormEx for all forms.
  • Modified: Test forms moved into Common package.
Location:
branches/xpascal/Forms
Files:
6 deleted
2 edited

Legend:

Unmodified
Added
Removed
  • branches/xpascal/Forms/FormMain.lfm

    r227 r228  
    11object FormMain: TFormMain
    2   Left = 515
     2  Left = 482
    33  Height = 993
    4   Top = 67
     4  Top = 205
    55  Width = 1491
    66  Caption = 'Interpreter'
     
    1010  Menu = MainMenu1
    1111  OnActivate = FormActivate
    12   OnClose = FormClose
    1312  OnCreate = FormCreate
    1413  OnDestroy = FormDestroy
  • branches/xpascal/Forms/FormMain.pas

    r227 r228  
    66  Classes, SysUtils, Forms, Controls, Graphics, Dialogs, Menus,
    77  ActnList, ExtCtrls, SynHighlighterPas, SynEdit, Source, Optimizer,
    8   Generator, FormSource, FormMessages, FormOutput;
     8  Generator, FormSource, FormMessages, FormOutput, FormEx;
    99
    1010type
     
    1212  { TFormMain }
    1313
    14   TFormMain = class(TForm)
     14  TFormMain = class(TFormEx)
    1515    ACompile: TAction;
    1616    ATest: TAction;
     
    4646    procedure AGenerateXmlExecute(Sender: TObject);
    4747    procedure ATestExecute(Sender: TObject);
    48     procedure FormCreate(Sender: TObject);
    4948    procedure Optimize(Features: TOptimizeFeatures);
    5049    procedure ARunExecute(Sender: TObject);
    5150    procedure FormActivate(Sender: TObject);
    52     procedure FormClose(Sender: TObject; var CloseAction: TCloseAction);
     51    procedure FormCreate(Sender: TObject);
    5352    procedure FormDestroy(Sender: TObject);
    5453    procedure FormShow(Sender: TObject);
     
    7574
    7675uses
    77   Parser, Executor, GeneratorPascal, GeneratorPhp, FormTests,
     76  Parser, Executor, GeneratorPascal, GeneratorPhp, FormTests, Translator,
    7877  GeneratorCSharp, GeneratorXml, ParserPascal;
    7978
     
    8988end;
    9089
    91 procedure TFormMain.FormClose(Sender: TObject; var CloseAction: TCloseAction);
    92 begin
    93 end;
    94 
    9590procedure TFormMain.FormDestroy(Sender: TObject);
    9691begin
    9792  if Assigned(Prog) then FreeAndNil(Prog);
    98   FreeAndNil(FormSource);
    99   FreeAndNil(FormMessages);
    100   FreeAndNil(FormOutput);
     93  if Assigned(FormSource) then FreeAndNil(FormSource);
     94  if Assigned(FormMessages) then FreeAndNil(FormMessages);
     95  if Assigned(FormOutput) then FreeAndNil(FormOutput);
    10196end;
    10297
     
    211206procedure TFormMain.FormCreate(Sender: TObject);
    212207begin
     208  Translator.POFilesFolder := 'Languages;Packages/Common/Languages';
     209  Translator.Language := Translator.Languages.SearchByCode('');
    213210end;
    214211
Note: See TracChangeset for help on using the changeset viewer.