2024-02-26 10:12:21 +04:00
|
|
|
|
using FurnitureAssemblyListImplement.Models;
|
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
|
|
|
|
namespace FurnitureAssemblyListImplement
|
|
|
|
|
{
|
|
|
|
|
// Класс для списков, в которых будет храниться информация при работе приложения
|
|
|
|
|
public class DataListSingleton
|
|
|
|
|
{
|
|
|
|
|
private static DataListSingleton? _instance;
|
|
|
|
|
|
|
|
|
|
// Список для хранения заготовок
|
|
|
|
|
public List<WorkPiece> WorkPiece { get; set; }
|
|
|
|
|
|
|
|
|
|
// Список для хранения изделий
|
|
|
|
|
public List<Furniture> Furnitures { get; set; }
|
|
|
|
|
|
|
|
|
|
// Список для хранения заказов
|
|
|
|
|
public List<Order> Orders { get; set; }
|
|
|
|
|
|
2024-05-10 22:00:13 +04:00
|
|
|
|
// Список для хранения клиентов
|
|
|
|
|
public List<Client> Clients { get; set; }
|
|
|
|
|
|
2024-05-11 02:30:02 +04:00
|
|
|
|
// Список для хранения исполнителей
|
|
|
|
|
public List<Implementer> Implementers { get; set; }
|
|
|
|
|
|
2024-02-26 10:12:21 +04:00
|
|
|
|
public DataListSingleton()
|
|
|
|
|
{
|
|
|
|
|
WorkPiece = new List<WorkPiece>();
|
|
|
|
|
Furnitures = new List<Furniture>();
|
|
|
|
|
Orders = new List<Order>();
|
2024-05-10 22:00:13 +04:00
|
|
|
|
Clients = new List<Client>();
|
2024-05-11 02:30:02 +04:00
|
|
|
|
Implementers = new List<Implementer>();
|
2024-02-26 10:12:21 +04:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public static DataListSingleton GetInstance()
|
|
|
|
|
{
|
2024-05-11 23:36:23 +04:00
|
|
|
|
if (_instance == null)
|
2024-02-26 10:12:21 +04:00
|
|
|
|
{
|
|
|
|
|
_instance = new DataListSingleton();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return _instance;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|