unit UDaten;
interface
uses
System.Drawing, System.Collections, System.ComponentModel,
System.Windows.Forms, System.Data, Borland.Vcl.SysUtils,
borland.Vcl.Classes, System.Globalization,
System.Data.SqlClient, Borland.Vcl.Dialogs;
type
DatenBox =
class(System.Windows.Forms.Form)
{$REGION 'Vom Designer verwalteter Code'}
strict private
/// <summary>
/// Erforderliche Designervariable.
/// </summary>
Components: System.ComponentModel.Container;
bar: System.Windows.Forms.Panel;
StatusBar1: System.Windows.Forms.StatusBar;
ToolBar1: System.Windows.Forms.ToolBar;
Button1: System.Windows.Forms.Button;
Button2: System.Windows.Forms.Button;
Button3: System.Windows.Forms.Button;
Panel1: System.Windows.Forms.Panel;
Panel2: System.Windows.Forms.Panel;
Panel3: System.Windows.Forms.Panel;
ListBox1: System.Windows.Forms.ListBox;
TextBox1: System.Windows.Forms.TextBox;
TextBox2: System.Windows.Forms.TextBox;
TextBox3: System.Windows.Forms.TextBox;
TextBox5: System.Windows.Forms.TextBox;
TextBox4: System.Windows.Forms.TextBox;
Button4: System.Windows.Forms.Button;
Panel4: System.Windows.Forms.Panel;
Button5: System.Windows.Forms.Button;
Panel5: System.Windows.Forms.Panel;
Button6: System.Windows.Forms.Button;
Panel6: System.Windows.Forms.Panel;
Button7: System.Windows.Forms.Button;
/// <summary>
/// Erforderliche Methode zur Unterstützung des Designers -
/// ändern Sie die Methode nicht mit dem Quelltext-Editor
/// </summary>
procedure InitializeComponent;
procedure Button1_Click(sender: System.
Object; e: System.EventArgs);
procedure DatenBox_Load(sender: System.
Object; e: System.EventArgs);
procedure Button2_Click(sender: System.
Object; e: System.EventArgs);
procedure Button3_Click(sender: System.
Object; e: System.EventArgs);
procedure Button4_Click(sender: System.
Object; e: System.EventArgs);
procedure Button5_Click(sender: System.
Object; e: System.EventArgs);
procedure Button6_Click(sender: System.
Object; e: System.EventArgs);
procedure DatenBox_Load1(sender: System.
Object; e: System.EventArgs);
procedure Button7_Click(sender: System.
Object; e: System.EventArgs);
{$ENDREGION}
strict protected
/// <summary>
/// Ressourcen nach der Verwendung bereinigen
/// </summary>
procedure Dispose(Disposing: Boolean);
override;
private
{ Private-Deklarationen }
procedure ClickBar(Nr : Integer);
function get_MainForm : Form;
property Mainform : Form
read get_MainForm;
public
constructor Create;
end;
[assembly: RuntimeRequiredAttribute(TypeOf(DatenBox))]
implementation
uses uhauptfenster;
{$AUTOBOX ON}
{$REGION 'Vom Windows Form-Designer erzeugter Code'}
/// <summary>
/// Erforderliche Methode zur Unterstützung des Designers --
/// ändern Sie die Methode nicht mit dem Quelltext-Editor
/// </summary>
procedure DatenBox.InitializeComponent;
begin
Self.StatusBar1 := System.Windows.Forms.StatusBar.Create;
Self.ToolBar1 := System.Windows.Forms.ToolBar.Create;
Self.bar := System.Windows.Forms.Panel.Create;
Self.Panel6 := System.Windows.Forms.Panel.Create;
Self.Button6 := System.Windows.Forms.Button.Create;
Self.Panel5 := System.Windows.Forms.Panel.Create;
Self.Button5 := System.Windows.Forms.Button.Create;
Self.Panel4 := System.Windows.Forms.Panel.Create;
Self.Button4 := System.Windows.Forms.Button.Create;
Self.Panel3 := System.Windows.Forms.Panel.Create;
Self.Button3 := System.Windows.Forms.Button.Create;
Self.Panel2 := System.Windows.Forms.Panel.Create;
Self.Button2 := System.Windows.Forms.Button.Create;
Self.Panel1 := System.Windows.Forms.Panel.Create;
Self.Button1 := System.Windows.Forms.Button.Create;
Self.ListBox1 := System.Windows.Forms.ListBox.Create;
Self.TextBox1 := System.Windows.Forms.TextBox.Create;
Self.TextBox2 := System.Windows.Forms.TextBox.Create;
Self.TextBox3 := System.Windows.Forms.TextBox.Create;
Self.TextBox5 := System.Windows.Forms.TextBox.Create;
Self.TextBox4 := System.Windows.Forms.TextBox.Create;
Self.Button7 := System.Windows.Forms.Button.Create;
Self.bar.SuspendLayout;
Self.SuspendLayout;
//
// StatusBar1
//
Self.StatusBar1.Location := System.Drawing.Point.Create(0, 384);
Self.StatusBar1.
Name := '
StatusBar1';
Self.StatusBar1.Size := System.Drawing.Size.Create(592, 22);
Self.StatusBar1.TabIndex := 0;
Self.StatusBar1.Text := '
StatusBar1';
//
// ToolBar1
//
Self.ToolBar1.Dock := System.Windows.Forms.DockStyle.None;
Self.ToolBar1.DropDownArrows := True;
Self.ToolBar1.Location := System.Drawing.Point.Create(136, 336);
Self.ToolBar1.
Name := '
ToolBar1';
Self.ToolBar1.ShowToolTips := True;
Self.ToolBar1.Size := System.Drawing.Size.Create(456, 42);
Self.ToolBar1.TabIndex := 2;
//
// bar
//
Self.bar.Controls.Add(Self.Panel6);
Self.bar.Controls.Add(Self.Button6);
Self.bar.Controls.Add(Self.Panel5);
Self.bar.Controls.Add(Self.Button5);
Self.bar.Controls.Add(Self.Panel4);
Self.bar.Controls.Add(Self.Button4);
Self.bar.Controls.Add(Self.Panel3);
Self.bar.Controls.Add(Self.Button3);
Self.bar.Controls.Add(Self.Panel2);
Self.bar.Controls.Add(Self.Button2);
Self.bar.Controls.Add(Self.Panel1);
Self.bar.Controls.Add(Self.Button1);
Self.bar.Dock := System.Windows.Forms.DockStyle.Left;
Self.bar.Location := System.Drawing.Point.Create(0, 0);
Self.bar.
Name := '
bar';
Self.bar.Size := System.Drawing.Size.Create(136, 384);
Self.bar.TabIndex := 3;
//
// Panel6
//
Self.Panel6.Dock := System.Windows.Forms.DockStyle.Top;
Self.Panel6.Location := System.Drawing.Point.Create(0, 189);
Self.Panel6.
Name := '
Panel6';
Self.Panel6.Size := System.Drawing.Size.Create(136, 11);
Self.Panel6.TabIndex := 12;
//
// Button6
//
Self.Button6.Dock := System.Windows.Forms.DockStyle.Top;
Self.Button6.Location := System.Drawing.Point.Create(0, 166);
Self.Button6.
Name := '
Button6';
Self.Button6.Size := System.Drawing.Size.Create(136, 23);
Self.Button6.TabIndex := 11;
Self.Button6.Text := '
Button6';
Include(Self.Button6.Click, Self.Button6_Click);
//
// Panel5
//
Self.Panel5.Dock := System.Windows.Forms.DockStyle.Top;
Self.Panel5.Location := System.Drawing.Point.Create(0, 158);
Self.Panel5.
Name := '
Panel5';
Self.Panel5.Size := System.Drawing.Size.Create(136, 8);
Self.Panel5.TabIndex := 10;
//
// Button5
//
Self.Button5.Dock := System.Windows.Forms.DockStyle.Top;
Self.Button5.Location := System.Drawing.Point.Create(0, 135);
Self.Button5.
Name := '
Button5';
Self.Button5.Size := System.Drawing.Size.Create(136, 23);
Self.Button5.TabIndex := 9;
Self.Button5.Text := '
Button5';
Include(Self.Button5.Click, Self.Button5_Click);
//
// Panel4
//
Self.Panel4.Dock := System.Windows.Forms.DockStyle.Top;
Self.Panel4.Location := System.Drawing.Point.Create(0, 127);
Self.Panel4.
Name := '
Panel4';
Self.Panel4.Size := System.Drawing.Size.Create(136, 8);
Self.Panel4.TabIndex := 8;
//
// Button4
//
Self.Button4.Dock := System.Windows.Forms.DockStyle.Top;
Self.Button4.Location := System.Drawing.Point.Create(0, 104);
Self.Button4.
Name := '
Button4';
Self.Button4.Size := System.Drawing.Size.Create(136, 23);
Self.Button4.TabIndex := 7;
Self.Button4.Text := '
Button4';
Include(Self.Button4.Click, Self.Button4_Click);
//
// Panel3
//
Self.Panel3.Dock := System.Windows.Forms.DockStyle.Top;
Self.Panel3.Location := System.Drawing.Point.Create(0, 95);
Self.Panel3.
Name := '
Panel3';
Self.Panel3.Size := System.Drawing.Size.Create(136, 9);
Self.Panel3.TabIndex := 6;
//
// Button3
//
Self.Button3.Dock := System.Windows.Forms.DockStyle.Top;
Self.Button3.Location := System.Drawing.Point.Create(0, 72);
Self.Button3.
Name := '
Button3';
Self.Button3.Size := System.Drawing.Size.Create(136, 23);
Self.Button3.TabIndex := 5;
Self.Button3.Text := '
Button3';
Include(Self.Button3.Click, Self.Button3_Click);
//
// Panel2
//
Self.Panel2.BackColor := System.Drawing.SystemColors.ControlDarkDark;
Self.Panel2.Dock := System.Windows.Forms.DockStyle.Top;
Self.Panel2.Location := System.Drawing.Point.Create(0, 55);
Self.Panel2.
Name := '
Panel2';
Self.Panel2.Size := System.Drawing.Size.Create(136, 17);
Self.Panel2.TabIndex := 4;
//
// Button2
//
Self.Button2.Dock := System.Windows.Forms.DockStyle.Top;
Self.Button2.Location := System.Drawing.Point.Create(0, 32);
Self.Button2.
Name := '
Button2';
Self.Button2.Size := System.Drawing.Size.Create(136, 23);
Self.Button2.TabIndex := 3;
Self.Button2.Text := '
Button2';
Include(Self.Button2.Click, Self.Button2_Click);
//
// Panel1
//
Self.Panel1.BackColor := System.Drawing.SystemColors.ActiveCaption;
Self.Panel1.Dock := System.Windows.Forms.DockStyle.Top;
Self.Panel1.ForeColor := System.Drawing.SystemColors.ActiveCaption;
Self.Panel1.Location := System.Drawing.Point.Create(0, 23);
Self.Panel1.
Name := '
Panel1';
Self.Panel1.Size := System.Drawing.Size.Create(136, 9);
Self.Panel1.TabIndex := 2;
//
// Button1
//
Self.Button1.Dock := System.Windows.Forms.DockStyle.Top;
Self.Button1.Location := System.Drawing.Point.Create(0, 0);
Self.Button1.
Name := '
Button1';
Self.Button1.Size := System.Drawing.Size.Create(136, 23);
Self.Button1.TabIndex := 0;
Self.Button1.Text := '
Button1';
Include(Self.Button1.Click, Self.Button1_Click);
//
// ListBox1
//
Self.ListBox1.BackColor := System.Drawing.Color.Cornsilk;
Self.ListBox1.Location := System.Drawing.Point.Create(456, 8);
Self.ListBox1.
Name := '
ListBox1';
Self.ListBox1.Size := System.Drawing.Size.Create(128, 316);
Self.ListBox1.TabIndex := 4;
//
// TextBox1
//
Self.TextBox1.BorderStyle := System.Windows.Forms.BorderStyle.FixedSingle;
Self.TextBox1.Location := System.Drawing.Point.Create(280, 24);
Self.TextBox1.
Name := '
TextBox1';
Self.TextBox1.TabIndex := 5;
Self.TextBox1.Text := '
TextBox1';
//
// TextBox2
//
Self.TextBox2.BorderStyle := System.Windows.Forms.BorderStyle.FixedSingle;
Self.TextBox2.Cursor := System.Windows.Forms.Cursors.IBeam;
Self.TextBox2.Location := System.Drawing.Point.Create(280, 56);
Self.TextBox2.
Name := '
TextBox2';
Self.TextBox2.TabIndex := 6;
Self.TextBox2.Text := '
TextBox2';
//
// TextBox3
//
Self.TextBox3.BorderStyle := System.Windows.Forms.BorderStyle.FixedSingle;
Self.TextBox3.Cursor := System.Windows.Forms.Cursors.IBeam;
Self.TextBox3.Location := System.Drawing.Point.Create(280, 88);
Self.TextBox3.
Name := '
TextBox3';
Self.TextBox3.TabIndex := 7;
Self.TextBox3.Text := '
TextBox3';
//
// TextBox5
//
Self.TextBox5.BorderStyle := System.Windows.Forms.BorderStyle.FixedSingle;
Self.TextBox5.Cursor := System.Windows.Forms.Cursors.IBeam;
Self.TextBox5.Location := System.Drawing.Point.Create(280, 152);
Self.TextBox5.
Name := '
TextBox5';
Self.TextBox5.TabIndex := 9;
Self.TextBox5.Text := '
TextBox5';
//
// TextBox4
//
Self.TextBox4.BorderStyle := System.Windows.Forms.BorderStyle.FixedSingle;
Self.TextBox4.Cursor := System.Windows.Forms.Cursors.IBeam;
Self.TextBox4.Location := System.Drawing.Point.Create(280, 120);
Self.TextBox4.
Name := '
TextBox4';
Self.TextBox4.TabIndex := 10;
Self.TextBox4.Text := '
TextBox4';
//
// Button7
//
Self.Button7.Location := System.Drawing.Point.Create(216, 232);
Self.Button7.
Name := '
Button7';
Self.Button7.TabIndex := 11;
Self.Button7.Text := '
Button7';
Include(Self.Button7.Click, Self.Button7_Click);
//
// DatenBox
//
Self.AutoScaleBaseSize := System.Drawing.Size.Create(5, 13);
Self.ClientSize := System.Drawing.Size.Create(592, 406);
Self.Controls.Add(Self.Button7);
Self.Controls.Add(Self.TextBox4);
Self.Controls.Add(Self.TextBox5);
Self.Controls.Add(Self.TextBox3);
Self.Controls.Add(Self.TextBox2);
Self.Controls.Add(Self.TextBox1);
Self.Controls.Add(Self.ListBox1);
Self.Controls.Add(Self.bar);
Self.Controls.Add(Self.ToolBar1);
Self.Controls.Add(Self.StatusBar1);
Self.FormBorderStyle := System.Windows.Forms.FormBorderStyle.FixedToolWindow;
Self.
Name := '
DatenBox';
Self.StartPosition := System.Windows.Forms.FormStartPosition.CenterScreen;
Self.Text := '
Daten editieren';
Self.TopMost := True;
Include(Self.Load, Self.DatenBox_Load1);
Self.bar.ResumeLayout(False);
Self.ResumeLayout(False);
end;
{$ENDREGION}
function DatenBox.get_MainForm : Form;
begin
result := MDIParent
as Hauptfenster;
end;
procedure DatenBox.Dispose(Disposing: Boolean);
begin
if Disposing
then
begin
if Components <>
nil then
Components.Dispose();
end;
inherited Dispose(Disposing);
end;
constructor DatenBox.Create;
begin
inherited Create;
//
// Erforderlich für die Unterstützung des Windows Forms-Designers
//
InitializeComponent;
//
// TODO: Fügen Sie nach dem Aufruf von InitializeComponent Konstruktorcode hinzu.
//
end;
procedure DatenBox.Button7_Click(sender: System.
Object; e: System.EventArgs);
begin
// (Mainform as Hauptfenster)
Mainform.Labeltext := '
Test';
end;
procedure DatenBox.DatenBox_Load1(sender: System.
Object; e: System.EventArgs);
begin
// Mainform.LabelText
end;
procedure DatenBox.Button6_Click(sender: System.
Object; e: System.EventArgs);
begin
Clickbar(6);
end;
procedure DatenBox.Button5_Click(sender: System.
Object; e: System.EventArgs);
begin
Clickbar(5);
end;
procedure DatenBox.Button4_Click(sender: System.
Object; e: System.EventArgs);
begin
clickbar(4);
end;
procedure DatenBox.Button3_Click(sender: System.
Object; e: System.EventArgs);
begin
ClickBar(3);
end;
procedure DatenBox.Button2_Click(sender: System.
Object; e: System.EventArgs);
begin
Clickbar(2);
end;
procedure DatenBox.DatenBox_Load(sender: System.
Object; e: System.EventArgs);
begin
end;
procedure DatenBox.Button1_Click(sender: System.
Object; e: System.EventArgs);
begin
Clickbar(1);
end;
procedure DatenBox.ClickBar(Nr : Integer);
//var i : integer;
begin
// hauptfenster.label1.text;
//for i := 0 to 5 do begin
// button[i].visible := false;
// panel[i].visible := false:
// end;
Button1.Dock := DockStyle.None;
Button2.Dock := DockStyle.None;
Button3.Dock := DockStyle.None;
Button4.Dock := DockStyle.None;
Button5.Dock := DockStyle.None;
Button6.Dock := DockStyle.None;
Panel1.Visible := false;
Panel2.Visible := false;
Panel3.Visible := false;
Panel4.Visible := false;
Panel5.Visible := false;
Panel6.Visible := false;
case nr
of
1:
Begin
Button1.Dock := DockStyle.Top;
Button6.Dock := Dockstyle.Bottom;
Button5.Dock := Dockstyle.Bottom;
Button4.Dock := Dockstyle.Bottom;
Button3.Dock := Dockstyle.Bottom;
Button2.Dock := Dockstyle.Bottom;
Panel1.Visible := true;
Panel1.Dock := Dockstyle.Fill;
end;
2:
Begin
Button1.Dock := DockStyle.Top;
Button2.Dock := Dockstyle.Top;
Button6.Dock := Dockstyle.Bottom;
Button5.Dock := Dockstyle.Bottom;
Button4.Dock := Dockstyle.Bottom;
Button3.Dock := Dockstyle.Bottom;
Panel2.Visible := true;
Panel2.Dock := Dockstyle.Fill;
end;
3:
Begin
Button1.Dock := DockStyle.Top;
Button2.Dock := Dockstyle.Top;
Button3.Dock := Dockstyle.Top;
Button6.Dock := Dockstyle.Bottom;
Button5.Dock := Dockstyle.Bottom;
Button4.Dock := Dockstyle.Bottom;
Panel3.Visible := True;
Panel3.Dock := Dockstyle.Fill;
end;
4:
Begin
Button1.Dock := DockStyle.Top;
Button2.Dock := Dockstyle.Top;
Button3.Dock := Dockstyle.Top;
Button4.Dock := Dockstyle.Top;
Button6.Dock := Dockstyle.Bottom;
Button5.Dock := Dockstyle.Bottom;
Panel4.Visible := true;
Panel4.Dock := Dockstyle.Fill;
End;
5:
Begin
Button1.Dock := DockStyle.Top;
Button2.Dock := Dockstyle.Top;
Button3.Dock := Dockstyle.Top;
Button4.Dock := Dockstyle.Top;
Button5.Dock := Dockstyle.Top;
Button6.Dock := Dockstyle.Bottom;
Panel5.Visible := True;
Panel5.Dock := Dockstyle.Fill;
End;
6:
Begin
Button1.Dock := DockStyle.Top;
Button2.Dock := Dockstyle.Top;
Button3.Dock := Dockstyle.Top;
Button4.Dock := Dockstyle.Top;
Button5.Dock := Dockstyle.Top;
Button6.Dock := Dockstyle.Top;
Panel6.Visible := True;
Panel6.Dock := Dockstyle.Fill;
end;
end;
end;
end.