RhSolutions-AddIn/RhSolutions.AddIn/Services/AddInConfiguration.cs
Sergey Chebotar 6555d6343f nameof fix
2023-03-28 07:33:32 +03:00

40 lines
1019 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[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();
}
}