using System; using System.Configuration; using System.IO; namespace RhSolutions.Services { public class AddInConfiguration : ApplicationSettingsBase, IAddInConfiguration { [UserScopedSetting] public string PriceListPath { get { return (string)this[nameof(PriceListPath)]; } set { this[nameof(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(); } }