Autor Beitrag
Ivy
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 228



BeitragVerfasst: Di 13.10.09 08:26 
Hallo zusammen,
ich möchte die Eingaben bzw Einstellungen die ein Benutzer in meinem Programm macht speichern, sodass sie beim nächsten Programmstart immernoch vorhanden sind.
Hat jemand eine Ahnung wie ich das lösen könnte?

lg Ivy


Zuletzt bearbeitet von Ivy am Di 20.10.09 08:22, insgesamt 2-mal bearbeitet
Gabe
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 39



BeitragVerfasst: Fr 16.10.09 07:48 
Hi Ivy,

du kannst z.B. eine Einstellungsdatei verwenden, das ist ganz einfach.
Edit: ich verwende VS 2008 Pro, weiß nicht ob das bei anderen IDEs auch so geht)
Im Projekt hinzufügen --> neues Element --> Einstellungsdatei (*.settings).
Hier kannst du dann deine ganzen benötigten Variablen anlegen und dann im Programm entsprechend setzen. Beim Neustart kannst die Variablen dann aus der Settingsdatei wieder herauslesen.

Andere Möglichkeit über xml. Da sollltest du dich dann mit dem Stichwort Serialisierung beschäftigen.
openbook.galileocomp...ng.de/visual_csharp/ --> Kapitel 11

Gruß Gabe
Ivy Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 228



BeitragVerfasst: Di 20.10.09 07:30 
aha danke, ich habs jetz mit Hilfe einer Textdati versucht:
support.microsoft.com/kb/816149/de


Hab aber jetz noch ne Frage, wie bekomme ich das was ich in die Txt Datei eingelesen hab, in meiner Textbox/Checkbox oder ComboBox wieder ausgegeben??? In einer MessageBox funktioniert es dass es mir alle Werte ausliest, aber wie ich das automatisch in die Felder eingetragen bekomm weiß ich nicht xD
Thu#
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 19



BeitragVerfasst: Di 20.10.09 19:37 
txtbox.Text = textdatei_inhalt
Ivy Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 228



BeitragVerfasst: Mi 21.10.09 09:14 
okay danke, bei der Textbox geht es damit, aber bei meiner ComboBox und meiner Checkbox nicht :-/
Thu#
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 19



BeitragVerfasst: Mi 21.10.09 19:17 
meinst du die items oder den text?
wenn text sollte es mit .text klappen
Bei den Items ist es eben ein Array vom Typ Object ; )
chip777
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 127

Win 7 Prof
C# VS 2008
BeitragVerfasst: Do 25.03.10 14:35 
ich hatte eine idee, aber während des schreibens vom beitrag hab ich gemerkt das das doch nicht so funktioniert wie ich mir das gedacht habe.