else if (x > (2 * materialLaserHigh + clapboardLaserHigh) && x <= (3 * materialLaserHigh + 2 * clapboardLaserHigh))
else if (x > MaterialCoordinate.GetInstance().dicNoMaterialCoordinate["10"].X && x <= MaterialCoordinate.GetInstance().dicNoMaterialCoordinate["19"].X)
public Laser2CoordinateState LaserDistance2Coordinate(int distance,out int x)
public Laser2CoordinateState LaserDistance2Coordinate(int distance,int x,out int x_high)
{
{
x = 0;
x_high = 0;
try
try
{
{
//菜盒放多了
if (distance<6)
{
return Laser2CoordinateState.MaterialOverdo;
}
else if (distance >= 6 && distance < 10)
{
x = 24882;
return Laser2CoordinateState.MaterialNormal;
}
else if(distance>=10 && distance < 14)
{
x = 18661;
return Laser2CoordinateState.MaterialNormal;
}
else if(distance >= 14 && distance < 19)
if (x > 0 && x <= MaterialCoordinate.GetInstance().dicNoMaterialCoordinate["1"].X)
{
{
x = 12441;
return Laser2CoordinateState.MaterialNormal;
//菜盒放多了
if (distance < 10)
{
return Laser2CoordinateState.MaterialOverdo;
}
else if (distance >= 10 && distance < 15)
{
x_high = 11441;
return Laser2CoordinateState.MaterialNormal;
}
else if (distance >= 15 && distance < 19)
{
x_high = 5720;
return Laser2CoordinateState.MaterialNormal;
}
else if (distance >= 19 && distance < 23)
{
x_high = 0;
return Laser2CoordinateState.MaterialNormal;
}
else
{
return Laser2CoordinateState.MaterialEmpty;
}
}
}
else if (distance >= 19 && distance < 23)
else if (x <= MaterialCoordinate.GetInstance().dicNoMaterialCoordinate["10"].X && x > MaterialCoordinate.GetInstance().dicNoMaterialCoordinate["1"].X)
{
{
x = 6220;
return Laser2CoordinateState.MaterialNormal;
//菜盒放多了
if (distance < 6)
{
return Laser2CoordinateState.MaterialOverdo;
}
else if (distance >= 6 && distance < 10)
{
x_high = 24882;
return Laser2CoordinateState.MaterialNormal;
}
else if (distance >= 10 && distance < 15)
{
x_high = 18661;
return Laser2CoordinateState.MaterialNormal;
}
else if (distance >= 15 && distance < 19)
{
x_high = 12441;
return Laser2CoordinateState.MaterialNormal;
}
else if (distance >= 19 && distance < 23)
{
x_high = 6220;
return Laser2CoordinateState.MaterialNormal;
}
else if (distance >= 23 && distance < 28)
{
x_high = 0;
return Laser2CoordinateState.MaterialNormal;
}
else
{
return Laser2CoordinateState.MaterialEmpty;
}
}
}
else if (distance >= 23 && distance < 28)
else if (x > MaterialCoordinate.GetInstance().dicNoMaterialCoordinate["10"].X && x <= MaterialCoordinate.GetInstance().dicNoMaterialCoordinate["20"].X)
statsModels.Add(new StatsModel() { Name = "帝王蟹", Count = 666 });
//int i = new Random().Next(0, 100);
//List<ProcessModel> processModels= new List<ProcessModel>();
//switch ((i / 5) % 6)
//{
// case 0:
// processModels = new List<ProcessModel>() { new ProcessModel() { Id = 1, Name = "启动", Status = ProcessStatus.正在执行 }, new ProcessModel() { Id = 1, Name = "热油", Status = ProcessStatus.未执行 }, new ProcessModel() { Id = 1, Name = "炒制", Status = ProcessStatus.未执行 }, new ProcessModel() { Id = 1, Name = "出餐", Status = ProcessStatus.未执行 }, new ProcessModel() { Id = 1, Name = "结束", Status = ProcessStatus.未执行 } };
// break;
// case 1:
// processModels = new List<ProcessModel>() { new ProcessModel() { Id = 1, Name = "启动", Status = ProcessStatus.执行完成 }, new ProcessModel() { Id = 1, Name = "热油", Status = ProcessStatus.正在执行 }, new ProcessModel() { Id = 1, Name = "炒制", Status = ProcessStatus.未执行 }, new ProcessModel() { Id = 1, Name = "出餐", Status = ProcessStatus.未执行 }, new ProcessModel() { Id = 1, Name = "结束", Status = ProcessStatus.未执行 } };
// break;
// case 2:
// processModels = new List<ProcessModel>() { new ProcessModel() { Id = 1, Name = "启动", Status = ProcessStatus.执行完成 }, new ProcessModel() { Id = 1, Name = "热油", Status = ProcessStatus.执行完成 }, new ProcessModel() { Id = 1, Name = "炒制", Status = ProcessStatus.正在执行 }, new ProcessModel() { Id = 1, Name = "出餐", Status = ProcessStatus.未执行 }, new ProcessModel() { Id = 1, Name = "结束", Status = ProcessStatus.未执行 } };
// break;
// case 3:
// processModels = new List<ProcessModel>() { new ProcessModel() { Id = 1, Name = "启动", Status = ProcessStatus.执行完成 }, new ProcessModel() { Id = 1, Name = "热油", Status = ProcessStatus.执行完成 }, new ProcessModel() { Id = 1, Name = "炒制", Status = ProcessStatus.执行完成 }, new ProcessModel() { Id = 1, Name = "出餐", Status = ProcessStatus.正在执行 }, new ProcessModel() { Id = 1, Name = "结束", Status = ProcessStatus.未执行 } };
// break;
// case 4:
// processModels = new List<ProcessModel>() { new ProcessModel() { Id = 1, Name = "启动", Status = ProcessStatus.执行完成 }, new ProcessModel() { Id = 1, Name = "热油", Status = ProcessStatus.执行完成 }, new ProcessModel() { Id = 1, Name = "炒制", Status = ProcessStatus.执行完成 }, new ProcessModel() { Id = 1, Name = "出餐", Status = ProcessStatus.执行完成 }, new ProcessModel() { Id = 1, Name = "结束", Status = ProcessStatus.正在执行 } };
// break;
// case 5:
// processModels = new List<ProcessModel>() { new ProcessModel() { Id = 1, Name = "启动", Status = ProcessStatus.执行完成 }, new ProcessModel() { Id = 1, Name = "热油", Status = ProcessStatus.执行完成 }, new ProcessModel() { Id = 1, Name = "炒制", Status = ProcessStatus.执行完成 }, new ProcessModel() { Id = 1, Name = "出餐", Status = ProcessStatus.执行完成 }, new ProcessModel() { Id = 1, Name = "结束", Status = ProcessStatus.执行完成 } };
// break;
// default: break;
//}
//statsModels.Add(new StatsModel() { Name = "帝王蟹", Count = 666 });