unit Main;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, TntForms, Translate, mdhTranslate, StdCtrls, TntStdCtrls, TntSysUtils,
  mdhSpin;

type
  TufrmMain = class(TTntForm)
    ubnTranslate: TTntButton;
    ubnLoadTranslation: TTntButton;
    mseTest: TMdhSpinEdit;
    procedure ubnLoadTranslationClick(Sender: TObject);
    procedure ubnTranslateClick(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  ufrmMain: TufrmMain;

implementation

{$R *.DFM}

procedure TufrmMain.ubnTranslateClick(Sender: TObject);
begin
  ufrmTranslate.ShowModal;
end;

procedure TufrmMain.ubnLoadTranslationClick(Sender: TObject);
var
TransFile: WideString;
AppRef: TAppReflection;

begin
  TransFile := WideExtractFilePath(Application.ExeName) + 'test.gui.xml';
  if WideFileExists(TransFile) then
    begin
      AppRef := TAppReflection.Create;
      try
        AppRef.ReadFromXMLFile(TransFile);
        AppRef.WriteToGUI;
      finally
        FreeAndNil(AppRef);
      end;
    end;
end;

end.