cdar
view unit_Editor_tutorial.pas @ 0:ef71164288c1
begin of using hg for cdar
author | "Meillo r e t u r n s <meillo@marmaro.de>" |
---|---|
date | Sun, 03 Dec 2006 21:54:43 +0100 |
parents | |
children |
line source
1 unit unit_Editor_tutorial;
3 interface//####################################################################################
5 uses
6 Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
7 Dialogs, StdCtrls, ComCtrls;
9 type
10 Tform_editor_tutorial = class(TForm)
11 btn_close: TButton;
12 btn_Beginner: TButton;
13 btn_Advanced: TButton;
14 btn_Professional: TButton;
15 richtbx_Beginner: TRichEdit;
16 richtbx_Advanced: TRichEdit;
17 richtbx_Professional: TRichEdit;
18 richtbx_Anfaenger: TRichEdit;
19 richtbx_Fortgeschrittene: TRichEdit;
20 richtbx_Profis: TRichEdit;
21 procedure FormCreate(Sender: TObject);
22 procedure FormShow(Sender: TObject);
23 procedure FormClose(Sender: TObject; var Action: TCloseAction);
24 procedure btn_closeClick(Sender: TObject);
25 procedure btn_BeginnerClick(Sender: TObject);
26 procedure btn_AdvancedClick(Sender: TObject);
27 procedure btn_ProfessionalClick(Sender: TObject);
28 private
29 { Private declarations }
30 public
31 { Public declarations }
32 end;
34 var
35 form_editor_tutorial: Tform_editor_tutorial;
37 implementation//###############################################################################
38 uses unit_Editor;
39 {$R *.dfm}//###################################################################################
41 //------------------------------------------------------------------------------ form create
42 procedure Tform_editor_tutorial.FormCreate(Sender: TObject);
43 begin
44 // set language
45 if form_editor.englisch = true then
46 begin // English
47 form_Editor_Tutorial.Caption := 'Tutorial';
48 btn_close.Caption := 'Close';
49 btn_Beginner.Caption := 'Beginner';
50 btn_Advanced.Caption := 'Advanced';
51 btn_Professional.Caption := 'Professional';
52 richtbx_Beginner.BringToFront;
53 end
54 else
55 begin // German
56 form_Editor_Tutorial.Caption := 'Anleitung';
57 btn_close.Caption := 'Schließen';
58 btn_Beginner.Caption := 'Anfänger';
59 btn_Advanced.Caption := 'Fortgeschrittene';
60 btn_Professional.Caption := 'Profis';
61 richtbx_Anfaenger.BringToFront;
62 end;
63 end;//--------------------------------------------------------------------------
64 //------------------------------------------------------------------------------ form show
65 procedure Tform_editor_tutorial.FormShow(Sender: TObject);
66 begin
67 // disable drag'n'drop
68 form_editor.draggingstatus := 3;
69 // disable menu
70 form_editor.mnu_Tutorial.enabled := false;
71 form_editor.mnu_WelcomeScreen.Enabled := false;
72 form_editor.mnu_Autorun.Enabled := false;
73 form_editor.mnu_CreateAR.enabled := false;
74 form_editor.mnu_Sprache.enabled := false;
75 end;//--------------------------------------------------------------------------
76 //------------------------------------------------------------------------------ form close
77 procedure Tform_editor_tutorial.FormClose(Sender: TObject;
78 var Action: TCloseAction);
79 begin
80 // reenable drag'n'drop
81 form_editor.draggingstatus := 0;
82 // reenable menu
83 form_editor.mnu_Tutorial.enabled := true;
84 form_editor.mnu_WelcomeScreen.Enabled := true;
85 form_editor.mnu_Autorun.Enabled := true;
86 form_editor.mnu_CreateAR.enabled := true;
87 form_editor.mnu_Sprache.enabled := true;
88 end;//--------------------------------------------------------------------------
90 //#############################################################################################
92 //------------------------------------------------------------------------------ close
93 procedure Tform_editor_tutorial.btn_closeClick(Sender: TObject);
94 begin
95 form_editor_tutorial.Close;
96 end;//--------------------------------------------------------------------------
98 //------------------------------------------------------------------------------ beginner
99 procedure Tform_editor_tutorial.btn_BeginnerClick(Sender: TObject);
100 begin
101 if form_editor.englisch = true then
102 begin
103 richtbx_Beginner.BringToFront;
104 end
105 else
106 begin
107 richtbx_Anfaenger.BringToFront;
108 end;
110 btn_Beginner.Enabled := false;
111 btn_Advanced.Enabled := true;
112 btn_Professional.Enabled := true;
113 end;//--------------------------------------------------------------------------
114 //------------------------------------------------------------------------------ advanced
115 procedure Tform_editor_tutorial.btn_AdvancedClick(Sender: TObject);
116 begin
117 if form_editor.englisch = true then
118 begin
119 richtbx_Advanced.BringToFront;
120 end
121 else
122 begin
123 richtbx_Fortgeschrittene.BringToFront;
124 end;
127 btn_Beginner.Enabled := true;
128 btn_Advanced.Enabled := false;
129 btn_Professional.Enabled := true;
130 end;//--------------------------------------------------------------------------
131 //------------------------------------------------------------------------------ professional
132 procedure Tform_editor_tutorial.btn_ProfessionalClick(Sender: TObject);
133 begin
134 if form_editor.englisch = true then
135 begin
136 richtbx_Professional.BringToFront;
137 end
138 else
139 begin
140 richtbx_Profis.BringToFront;
141 end;
143 btn_Beginner.Enabled := true;
144 btn_Advanced.Enabled := true;
145 btn_Professional.Enabled := false;
146 end;//--------------------------------------------------------------------------
148 end.//#########################################################################################