kazelee
2025-05-23 e2ec31cc0062b3c1af621437554aa9a3505d2a56
util/Settings.cs
@@ -13,9 +13,9 @@
        public static string SqlServer { get; set; }
        public static string TcpServerIp { get; set; }
        public static int TcpServerPort { get; set; }
        public static List<Config.Area> Areas { get; set; }
        public static List<Config.Task> Tasks { get; set; }
        public static List<Config.ProductionLine> ProductionLines { get; set; }
        public static List<Config.Area> Areas { get; set; } = new List<Config.Area>();
        public static List<Config.Task> Tasks { get; set; } = new List<Config.Task>();
        public static List<Config.ProductionLine> ProductionLines { get; set; } = new List<Config.ProductionLine>();
        /// <summary>
        /// 库区字典(加载后就不变)
@@ -26,6 +26,8 @@
        /// 任务字典(加载后就不变)
        /// </summary>
        public static Dictionary<string, Config.Task> TaskMap { get; set; } = new Dictionary<string, Config.Task>();
        public static Dictionary<string, int> AgvSite_ProdLineCodeMap { get; set; } = new Dictionary<string, int>();
        public static void Init() {
            // 加载配置文件
@@ -83,6 +85,13 @@
                TaskMap.Add(task.Name, task);
            }
        }
        private static void LoadProdLines() {
            foreach (var prod in ProductionLines) {
            }
        }
    }
    public class Config {