Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Writing with Application Settings Manager
Message
De
11/02/2008 11:01:41
Tegron Tegron
Platinum Technologies
Ohio, États-Unis
 
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Divers
Thread ID:
01278973
Message ID:
01291455
Vues:
22
I followed the dev guide section section by section, although I could have missed something. I use a property setting to establish the file name preceded by the app startup path. The application is a windows forms app.

SUBCLASS:

using System;
using System.Collections.Generic;
using System.Text;
using System.Configuration;

using OakLeaf.MM.Main;
using System.Windows.Forms;

namespace HEB.QIS.InspectionManager
{
///
/// Application Settings Class
///

public class AppSettings : mmAppConfiguration
{
private string _appID = "11";

public string AppID
{
get { return _appID; }
set { _appID = value; }
}

private string _locationID = "29";

public string LocationID
{
get { return _locationID; }
set { _locationID = value; }
}


public AppSettings() : base(true)
{
//Use a custom config file
this.ReadKeysFromConfig(Application.StartupPath.Trim() + "\\" + ApplicationData.Instance.AppSettingsFileName.Trim());
}

}
}


PROPERTY:
private string _appSettingsFileName = "Settings.config";

public string AppSettingsFileName
{
get { return _appSettingsFileName; }
set { _appSettingsFileName = value; }
}
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform