using BPA.Helper; using Org.BouncyCastle.Asn1.X509; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace BPASmartClient.MorkF.Model { internal class MaterialCoordinate : Singleton { public List MLNumberList { get; set; } = new List() { "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" }; public List MLCoordinateList { get;set;} = new List() { new Coordinate() { X = 34500, Y = 0 }, new Coordinate() { X = 34500, Y = 9000 } , new Coordinate() { X = 34500, Y = 0 } , //第1层 new Coordinate(){ X = 34500,Y=0} , new Coordinate() { X = 34500, Y = 83000 }, new Coordinate(){ X = 34500,Y=0}, //第1层 new Coordinate(){ X = 34500,Y=0} , new Coordinate() { X = 34500, Y = 0 }, new Coordinate(){ X = 34500,Y=0}, //第1层 new Coordinate(){ X = 0,Y=0} , new Coordinate() { X = 0, Y = 0 }, new Coordinate(){ X = 0,Y=0}, //第2层 new Coordinate(){ X = 0,Y=0} , new Coordinate() { X = 0, Y = 0 }, new Coordinate(){ X = 0,Y=0}, //第2层 new Coordinate(){ X = 0,Y=0} , new Coordinate() { X = 0, Y = 0 }, new Coordinate(){ X = 0,Y=0}, //第2层 new Coordinate(){ X = 0,Y=0} , new Coordinate() { X = 0, Y = 0 }, new Coordinate(){ X = 0,Y=0}, //第3层 new Coordinate(){ X = 0,Y=0} , new Coordinate() { X = 0, Y = 0 }, new Coordinate(){ X = 0,Y=0}, //第3层 new Coordinate(){ X = 0,Y=0} , new Coordinate() { X = 0, Y = 0 }, new Coordinate(){ X = 0,Y=0} //第3层 }; public MaterialCoordinate() { if(MLNumberList.Count == MLCoordinateList.Count && MLNumberList.Count == 27) { for(int i = 0;i /// 更新键值对 /// /// /// /// public bool UpdateMLCoordinateList(string mlNumber,Coordinate coordinate) { if(dicNoMaterialCoordinate.ContainsKey(mlNumber)) { dicNoMaterialCoordinate[mlNumber] = coordinate; return true; } else { return false; } } /// /// 每个取菜点的编号与坐标字典 /// public Dictionary dicNoMaterialCoordinate { get; set; } = new Dictionary(); /// /// 每个取菜点的编号与坐标字典 /// //public Dictionary dicSpecificMaterialCoordinate { get; set; } = new Dictionary(); //{ // {"A1",new Coordinate(){ X = 34500,Y=0} }, // {"A2",new Coordinate(){ X = 34500,Y=9000} }, // {"A3",new Coordinate(){ X = 34500,Y=0} }, // {"B1",new Coordinate(){ X = 34500,Y=0} }, // {"B2",new Coordinate(){ X = 34500,Y=83000} }, // {"B3",new Coordinate(){ X = 34500,Y=0} }, // {"C1",new Coordinate(){ X = 34500,Y=0} }, // {"C2",new Coordinate(){ X = 34500,Y=0} }, // {"C3",new Coordinate(){ X = 34500,Y=0} }, // {"D1",new Coordinate(){ X = 0,Y=0} }, // {"D2",new Coordinate(){ X = 0,Y=0} }, // {"D3",new Coordinate(){ X = 0,Y=0} }, // {"E1",new Coordinate(){ X = 0,Y=0} }, // {"E2",new Coordinate(){ X = 0,Y=0} }, // {"E3",new Coordinate(){ X = 0,Y=0} }, // {"F1",new Coordinate(){ X = 0,Y=0} }, // {"F2",new Coordinate(){ X = 0,Y=0} }, // {"F3",new Coordinate(){ X = 0,Y=0} }, // {"G1",new Coordinate(){ X = 0,Y=0} }, // {"G2",new Coordinate(){ X = 0,Y=0} }, // {"G3",new Coordinate(){ X = 0,Y=0} }, // {"H1",new Coordinate(){ X = 0,Y=0} }, // {"H2",new Coordinate(){ X = 0,Y=0} }, // {"H3",new Coordinate(){ X = 0,Y=0} }, // {"I1",new Coordinate(){ X = 0,Y=0} }, // {"I2",new Coordinate(){ X = 0,Y=0} }, // {"I3",new Coordinate(){ X = 0,Y=0} }, // {"J1",new Coordinate(){ X = 0,Y=0} }, // {"J2",new Coordinate(){ X = 0,Y=0} }, // {"J3",new Coordinate(){ X = 0,Y=0} }, //}; } }