40 lines
1007 B
C#
40 lines
1007 B
C#
using System;
|
|
using System.Configuration;
|
|
using System.IO;
|
|
|
|
namespace RhSolutions.Services
|
|
{
|
|
public class AddInConfiguration : ApplicationSettingsBase, IAddInConfiguration
|
|
{
|
|
[UserScopedSetting]
|
|
public string PriceListPath
|
|
{
|
|
get
|
|
{
|
|
return (string)this["PriceListPath"];
|
|
}
|
|
set
|
|
{
|
|
this["PriceListPath"] = value;
|
|
}
|
|
}
|
|
|
|
public event SettingChangingEventHandler OnSettingsChange
|
|
{
|
|
add
|
|
{
|
|
base.SettingChanging += value;
|
|
}
|
|
remove
|
|
{
|
|
base.SettingChanging -= value;
|
|
}
|
|
}
|
|
|
|
public string GetPriceListFileName() => Path.GetFileName(PriceListPath);
|
|
public string GetPriceListPath() => PriceListPath;
|
|
public void SetPriceListPath(string value) => PriceListPath = value;
|
|
public void SaveSettings() => base.Save();
|
|
}
|
|
}
|