Autor Beitrag
Calculon
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 676

Win XP Professional
Delphi 7 PE, Delphi 3 PRO
BeitragVerfasst: Mo 08.09.08 15:07 
Hi @all,

ich will bei einem komplexeren Programm ein "Projekt speichern" Feature einbauen. Die Projektdateien bestehen aus 3 Dateien:

(1) Initialsierungsdatei (für globale Variablen)
(2) die "eigentlichen wichtigen" Daten
(3) Control-properties

(1) und (2) stehen soweit. (3) ist ein wichtiger Punkt und ich weiß' noch nicht genau wie ich das angehen soll. Beim Laden dieser Datei sollen alle Controls auf dem Stand von vor der Speicherung sein: Also properties wie Enabled, Text, Caption, Value, PageIndex, etc. sollen genauso wiederhergestellt werden. Das ist wichtig, um Programmstabilität zu gewährleisten (v.a. bei den Enabled Geschichten). Das könnte ich jetzt für jedes Control einzeln machen, aber es sind sehr viele und ich müsste bei jedem neuen Control meine Save/Load Funktionen updaten. Deshalb frag' ich einfach mal: Gibt es einfache, schnelle Möglichkeiten Control-Status zu speichern und wiederherzustellen?

Gruß
--

_________________
Hallo Mutti
alias5000
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 2145

WinXP Prof SP2, Ubuntu 9.04
C/C++(Code::Blocks, VS.NET),A51(Keil),Object Pascal(D2005PE, Turbo Delphi Explorer) C# (VS 2008 Express)
BeitragVerfasst: Mo 08.09.08 15:52 
TStream.ReadComponent bzw. TStream.WriteComponent sind deine Freunde.

Vielleicht findest du aber auch was zu XML-Serialisation. Dort kenne ich mich selbst aber leider nur in C# aus.

Gruß
alias5000

_________________
Programmers never die, they just GOSUB without RETURN
Calculon Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 676

Win XP Professional
Delphi 7 PE, Delphi 3 PRO
BeitragVerfasst: Di 09.09.08 11:25 
Hi alias,

konnte es erst jetzt ausprobieren und es funktioniert wunderbar. Vielen Dank!

Gruß
--

_________________
Hallo Mutti
alias5000
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 2145

WinXP Prof SP2, Ubuntu 9.04
C/C++(Code::Blocks, VS.NET),A51(Keil),Object Pascal(D2005PE, Turbo Delphi Explorer) C# (VS 2008 Express)
BeitragVerfasst: Di 09.09.08 12:20 
Bitte :D

_________________
Programmers never die, they just GOSUB without RETURN
Boldar
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 1555
Erhaltene Danke: 70

Win7 Enterprise 64bit, Win XP SP2
Turbo Delphi
BeitragVerfasst: Di 09.09.08 14:07 
@alias:
Was macht man nicht alles um auf 2000 Beiträge zu kommen :wink: :wink: :rofl: :rofl: :rofl: :mahn: :mahn:
alias5000
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 2145

WinXP Prof SP2, Ubuntu 9.04
C/C++(Code::Blocks, VS.NET),A51(Keil),Object Pascal(D2005PE, Turbo Delphi Explorer) C# (VS 2008 Express)
BeitragVerfasst: Di 09.09.08 23:24 
Die hab ich doch schon längst !?

_________________
Programmers never die, they just GOSUB without RETURN
Boldar
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 1555
Erhaltene Danke: 70

Win7 Enterprise 64bit, Win XP SP2
Turbo Delphi
BeitragVerfasst: Mi 10.09.08 14:22 
STIMMT!