namespace IStation.Win
|
{
|
/// <summary>
|
///
|
/// </summary>
|
public partial class Scada
|
{
|
private IStation.Model.Scada _station = null;
|
|
/// <summary>
|
/// 获取
|
/// </summary>
|
public Model.Scada Get()
|
{
|
if (_station == null)
|
{
|
var filePath = Path.Combine(
|
Settings.ParasHelper.LocalFile.DataFolderDirectory,
|
Settings.ParasHelper.LocalFile.ScadaFile);
|
if (!File.Exists(filePath))
|
return default;
|
var json = File.ReadAllText(filePath);
|
_station = JsonHelper.Json2Object<Model.Scada>(json);
|
}
|
return _station;
|
}
|
|
|
}
|
}
|