/
agontar
/
TOROS
Обзор
Документация
Войти
/
agontar
/
TOROS
Код
Запросы
0
Задачи
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
Webapplication_new/Models/Singleton1.cs
50 строк
2 KB
gav
initial upload
17 сен 2024, 16:04
17 сен 2024, 16:04
356ccc9
Код
Авторство
О чём код?
namespace WebApplication1.Models { public class Singleton1 { private Singleton1() { } private static Singleton1? instance; private static object syncRoot = new Object(); public static Singleton1 Instance { get { lock (syncRoot) { if (instance == null) { instance = new Singleton1(); } return instance; } } } public string Name { get; set; } = string.Empty; public string IDS { get; set; } = string.Empty; public string IP { get; set; } = ""; public string DisplInfo { get; set; } = string.Empty; public string Alarms { get; set; } = string.Empty; public bool Monitor { get; set; } = false; public bool Refresh { get; set; } = false; public string ImgFileName { get; set; } = ""; public string selectedItems { get; set; } = string.Empty; public int NodeLevel { get; set; } public string NodeId { get; set; } = string.Empty; public Sensor sensor { get; set; } = new Sensor(); public List<TreeViewNode> TreeNodes { get; set; } = new List<TreeViewNode>(); public string MasterType { get; set; } = "БС211"; public string Error { get; set; } = string.Empty; public void Reset() { Name = string.Empty; IDS = string.Empty; IP = ""; DisplInfo = string.Empty; ImgFileName = ""; selectedItems = string.Empty; NodeLevel = 1; } } }