Information générale
Catégorie:
The Mere Mortals .NET Framework
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
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement