CSharp_ClassLib.Classes.PreferencesFile Class Reference

Preferences file class. More...

List of all members.

Public Member Functions

 PreferencesFile ()
 Class constructor that inits all nesessary stuff.
 PreferencesFile (string Preferences_File)
 Class constructor that inits all nesessary stuff and opens a preference file.
void LoadFromFile (string Preferences_File)
 Loads a preferences file.
string GetValue (string ID, string Category, string Default)
 Returns an value of a preferences entry.
string GetValue (string ID, string Category)
 Returns an value of a preferences entry.
string GetValue (string ID)
 Returns an value of a preferences entry that has no category.
void UpdateEntry (string ID, string Category, string NewValue)
 Updates an entry.
void UpdateEntry (string ID, string Category, string NewValue, bool AutoAdd)
 Updates an entry.


Detailed Description

Preferences file class.

Class that contains routines to handle preferences files in XML format

Author:
generalpd
Version:
Revision
1.1
Date:
2005-04-18

Bug:
none

Todo:
none
Remarks:
Last changed by:
Author
generalpd
in revision
Revision
1.1
on
Date
2005/05/03 12:59:55
Note:
Log
clsPreferencesFile.cs,v
Revision 1.1 2005/05/03 12:59:55 generalpd first import

Definition at line 51 of file clsPreferencesFile.cs.


Constructor & Destructor Documentation

CSharp_ClassLib::Classes.PreferencesFile::PreferencesFile  ) 
 

Class constructor that inits all nesessary stuff.

  // Code example
 
  CSharp_ClassLib.Classes.PreferencesFile m_oPreferencesFile = new CSharp_ClassLib.Classes.PreferencesFile();

Definition at line 84 of file clsPreferencesFile.cs.

CSharp_ClassLib::Classes.PreferencesFile::PreferencesFile string  Preferences_File  ) 
 

Class constructor that inits all nesessary stuff and opens a preference file.

Parameters:
Preferences_File The full path of the preferences file
  // Code example
 
  CSharp_ClassLib.Classes.PreferencesFile m_oPreferencesFile = new CSharp_ClassLib.Classes.PreferencesFile("C:\\preferences.xml");

Exceptions:
System.IO.FileNotFoundException The preference file was not found!

Definition at line 106 of file clsPreferencesFile.cs.


Member Function Documentation

string CSharp_ClassLib::Classes.PreferencesFile::GetValue string  ID  ) 
 

Returns an value of a preferences entry that has no category.

Parameters:
ID The ID of the entry
Returns:
The value (empty string if the entry was not found)

Definition at line 348 of file clsPreferencesFile.cs.

string CSharp_ClassLib::Classes.PreferencesFile::GetValue string  ID,
string  Category
 

Returns an value of a preferences entry.

Parameters:
ID The ID of the entry
Category The category of the entry
Default Value that is return if the entry was not found
Returns:
The value (empty string if the entry was not found)

Definition at line 335 of file clsPreferencesFile.cs.

string CSharp_ClassLib::Classes.PreferencesFile::GetValue string  ID,
string  Category,
string  Default
 

Returns an value of a preferences entry.

Parameters:
ID The ID of the entry
Category The category of the entry
ThrowException Throw an exception if the entry was not found (true) or not and return an empty string (false)
Returns:
The value
Exceptions:
System.ArgumentOutOfRangeException Entry was not found!

Definition at line 310 of file clsPreferencesFile.cs.

string CSharp_ClassLib::Classes.PreferencesFile::LoadFromFile string  Preferences_File  ) 
 

Loads a preferences file.

Parameters:
Preferences_File The full path of the preferences file
  // Code example
 
  m_oPreferencesFile.LoadFromFile("C:\\preferences.xml");

Exceptions:
System.IO.FileNotFoundException The preferences file was not found!

Definition at line 173 of file clsPreferencesFile.cs.

void string CSharp_ClassLib::Classes.PreferencesFile::UpdateEntry string  ID,
string  Category,
string  NewValue,
bool  AutoAdd
 

Updates an entry.

Parameters:
Category Name of the category
ID The ID
NewValue The NewValue
AutoAdd True if the entry should be created if not exists; otherwise false
Exceptions:
System.ArgumentOutOfRangeException Entry not found!

Definition at line 381 of file clsPreferencesFile.cs.

void CSharp_ClassLib::Classes.PreferencesFile::UpdateEntry string  ID,
string  Category,
string  NewValue
 

Updates an entry.

Parameters:
Category Name of the category
ID The ID
NewValue The NewValue
Exceptions:
System.ArgumentOutOfRangeException Entry not found!

Definition at line 363 of file clsPreferencesFile.cs.


The documentation for this class was generated from the following file:
Generated on Thu Jun 2 08:41:50 2005 for C# ClassLib by  doxygen 1.4.1