Index: VerpakkingsDefinitie/UI/LogInScherm.dfm =================================================================== diff -u -r546 -r547 --- VerpakkingsDefinitie/UI/LogInScherm.dfm (.../LogInScherm.dfm) (revision 546) +++ VerpakkingsDefinitie/UI/LogInScherm.dfm (.../LogInScherm.dfm) (revision 547) @@ -1,7 +1,7 @@ -object fmLogin: TfmLogin +object FormLogin: TFormLogin Left = 0 Top = 0 - BorderStyle = bsSingle + BorderStyle = bsNone Caption = 'Log In' ClientHeight = 443 ClientWidth = 972 FishEye: Tag 547 refers to a dead (removed) revision in file `VerpakkingsDefinitie/VerpakkingsDefinitie.dproj.local'. FishEye: No comparison available. Pass `N' to diff? Index: VerpakkingsDefinitie/UI/UIContext.pas =================================================================== diff -u --- VerpakkingsDefinitie/UI/UIContext.pas (revision 0) +++ VerpakkingsDefinitie/UI/UIContext.pas (revision 547) @@ -0,0 +1,15 @@ +unit UIContext; + +interface + +implementation + +type + TUiContext = class + private + + public + + end; + +end. Index: VerpakkingsDefinitie/Main.pas =================================================================== diff -u -r546 -r547 --- VerpakkingsDefinitie/Main.pas (.../Main.pas) (revision 546) +++ VerpakkingsDefinitie/Main.pas (.../Main.pas) (revision 547) @@ -3,22 +3,66 @@ interface uses - Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics, - Vcl.Controls, Vcl.Forms, Vcl.Dialogs; + Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, + System.Classes, Vcl.Graphics, + Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.ExtCtrls, + Subscherm, LoginScherm, + ApplicationContext; +const + FORMLOGINID = 1; + type - TfrmMain = class(TForm) + TFormMain = class(TForm) + PanelMain: TPanel; + + procedure FormCreate(Sender: TObject); + procedure NavigeerNaar(schermId: Integer); private - { Private declarations } + fAppContext: TApplicationContext; + fHuidigScherm: TForm; public { Public declarations } end; var - frmMain: TfrmMain; + FormMain: TFormMain; implementation {$R *.dfm} +procedure TFormMain.FormCreate(Sender: TObject); +begin + fAppContext := TApplicationContext.Create(); + // TODO Wat doet dit in de originele applicatie?: fUiContext.ImagesScherm := TImagesScherm.Create(self); + // TODO kijken of "VerwerkParamStrings;" nodig is + + PanelMain := TPanel.Create(Self); + PanelMain.Parent := Self; + PanelMain.Align := alClient; + + Self.NavigeerNaar(FORMLOGINID); +end; + + // TODO afmeld optie toevoegen + +procedure TFormMain.NavigeerNaar(schermId: Integer); +begin + Application.ProcessMessages; // Interrupts the execution of an application so that it can process the message queue. + + // Volgende subscherm laden in panel + begin + fHuidigScherm.Free; + case schermId of + FORMLOGINID: + fHuidigScherm := TFormLogin.Create(PanelMain, fAppContext); + end; + + fHuidigScherm.Parent := PanelMain; + fHuidigScherm.Align := alClient; + fHuidigScherm.Show; + end; +end; + end. Index: VerpakkingsDefinitie/ApplicationContext.pas =================================================================== diff -u --- VerpakkingsDefinitie/ApplicationContext.pas (revision 0) +++ VerpakkingsDefinitie/ApplicationContext.pas (revision 547) @@ -0,0 +1,15 @@ +unit ApplicationContext; + +// Dit is een klasse bedoeld om data te delen over de applicatie heen. +// Dit kan bijvoorbeeld usernaam, login token, computernaam, ... +// Informatie die elk component/klasse kan gebruiken. + +interface + +type + TApplicationContext = class + end; + +implementation + +end. Index: VerpakkingsDefinitie/Main.dfm =================================================================== diff -u -r546 -r547 --- VerpakkingsDefinitie/Main.dfm (.../Main.dfm) (revision 546) +++ VerpakkingsDefinitie/Main.dfm (.../Main.dfm) (revision 547) @@ -1,16 +1,28 @@ -object frmMain: TfrmMain +object FormMain: TFormMain Left = 0 Top = 0 Caption = 'Verpakkings Definitie' - ClientHeight = 299 - ClientWidth = 635 + ClientHeight = 453 + ClientWidth = 474 Color = clBtnFace Font.Charset = DEFAULT_CHARSET Font.Color = clWindowText Font.Height = -11 Font.Name = 'Tahoma' Font.Style = [] OldCreateOrder = False + OnCreate = FormCreate + DesignSize = ( + 474 + 453) PixelsPerInch = 96 TextHeight = 13 + object PanelMain: TPanel + Left = 0 + Top = 0 + Width = 476 + Height = 456 + Anchors = [akLeft, akTop, akRight, akBottom] + TabOrder = 0 + end end Index: VerpakkingsDefinitie/VerpakkingsDefinitie.dproj =================================================================== diff -u -r533 -r547 --- VerpakkingsDefinitie/VerpakkingsDefinitie.dproj (.../VerpakkingsDefinitie.dproj) (revision 533) +++ VerpakkingsDefinitie/VerpakkingsDefinitie.dproj (.../VerpakkingsDefinitie.dproj) (revision 547) @@ -70,6 +70,8 @@ true + true + 1033 false @@ -82,17 +84,21 @@ MainSource - + +
FormMain
+
+ +
Form1
- dfm
- - -
fmLogin
- dfm + + +
FormLogin
- - + + + + Cfg_2 Base @@ -140,6 +146,10 @@ VerpakkingsDefinitie.dpr + + Microsoft Office 2000 Sample Automation Server Wrapper Components + Microsoft Office XP Sample Automation Server Wrapper Components + Index: VerpakkingsDefinitie/VerpakkingsDefinitie.dpr =================================================================== diff -u -r546 -r547 --- VerpakkingsDefinitie/VerpakkingsDefinitie.dpr (.../VerpakkingsDefinitie.dpr) (revision 546) +++ VerpakkingsDefinitie/VerpakkingsDefinitie.dpr (.../VerpakkingsDefinitie.dpr) (revision 547) @@ -2,17 +2,22 @@ uses Vcl.Forms, - Unit1 in 'UI\Unit1.pas' {Form1}, + Main in 'Main.pas' {FormMain} , + ApplicationContext in 'ApplicationContext.pas', + Unit1 in 'UI\Unit1.pas' {Form1} , GebruikerService in 'WS\GebruikerService.pas', - LogInScherm in 'UI\LogInScherm.pas' {fmLogin}, + LoginScherm in 'UI\LoginScherm.pas' {FormLogin} , UserServerService in 'WS\UserServerService.pas', - Agent in 'WS\Agent.pas'; + Agent in 'WS\Agent.pas', + UIContext in 'UI\UIContext.pas', + Subscherm in 'UI\Subscherm.pas'; {$R *.res} begin Application.Initialize; + Application.Title := 'PlanScan'; Application.MainFormOnTaskbar := True; - Application.CreateForm(TfmLogin, fmLogin); + Application.CreateForm(TFormMain, FormMain); Application.Run; end. Index: VerpakkingsDefinitie/UI/LogInScherm.pas =================================================================== diff -u -r546 -r547 --- VerpakkingsDefinitie/UI/LogInScherm.pas (.../LogInScherm.pas) (revision 546) +++ VerpakkingsDefinitie/UI/LogInScherm.pas (.../LogInScherm.pas) (revision 547) @@ -1,42 +1,41 @@ -unit LogInScherm; +unit LoginScherm; interface uses - Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics, - Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls, Vcl.ExtCtrls; + Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, + System.Classes, Vcl.Graphics, + Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls, Vcl.ExtCtrls, + Subscherm, + UserServerService, Agent; type - TfmLogin = class(TForm) + TFormLogin = class(TFormSubscherm) Label1: TLabel; Label2: TLabel; edtGebruikersnaam: TEdit; Label3: TLabel; edtWachtwoord: TEdit; Panel1: TPanel; + procedure Panel1Click(Sender: TObject); private { Private declarations } public { Public declarations } end; -var - fmLogin: TfmLogin; - implementation - uses - UserServerService, Agent; {$R *.dfm} -procedure TfmLogin.Panel1Click(Sender: TObject); +procedure TFormLogin.Panel1Click(Sender: TObject); var Response: PxStatus; fAgent: TAgent; begin fAgent := TAgent.Create(); - Response := fAgent.GebruikerAanmelden(edtGebruikersnaam.Text, edtWachtwoord.Text); + Response := fAgent.GebruikerAanmelden(edtGebruikersnaam.Text,edtWachtwoord.Text); edtGebruikersnaam.Text := Response.ToString end; Index: VerpakkingsDefinitie/UI/Subscherm.pas =================================================================== diff -u --- VerpakkingsDefinitie/UI/Subscherm.pas (revision 0) +++ VerpakkingsDefinitie/UI/Subscherm.pas (revision 547) @@ -0,0 +1,33 @@ +unit Subscherm; + +interface + +uses + Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, + System.Classes, Vcl.Graphics, + Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls, Vcl.ActnList, + Vcl.ImgList, Vcl.ExtCtrls, Soap.InvokeRegistry, Soap.Rio, + Soap.SOAPHTTPClient, Data.DB, Datasnap.DBClient, Soap.SOAPConn, Agent, + ApplicationContext; + +type + TFormSubscherm = class(TForm) + private + fApplicationContext: TApplicationContext; + public + property ApplicationContext: TApplicationContext Read fApplicationContext + write fApplicationContext; + + Constructor Create(AOwner: TComponent; ApplicationContext: TApplicationContext); overload; + end; + +implementation + +constructor TFormSubscherm.Create(AOwner: TComponent; ApplicationContext: TApplicationContext); +begin + inherited Create(AOwner); + + Self.ApplicationContext := ApplicationContext; +end; + +end. FishEye: Tag 547 refers to a dead (removed) revision in file `VerpakkingsDefinitie/UI/Unit1.pas'. FishEye: No comparison available. Pass `N' to diff? FishEye: Tag 547 refers to a dead (removed) revision in file `VerpakkingsDefinitie/UI/Unit1.dfm'. FishEye: No comparison available. Pass `N' to diff?