ningshuxia
2024-05-31 39dba502601913973a73bb5c733dd98897f8bdae
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
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;
        }
 
 
    }
}