Browse Source

成都旅游学院项目修改所在文件夹名称。

JXJAgvReake
ZhaoGang 1 year ago
parent
commit
70e6844d9e
94 changed files with 567 additions and 735 deletions
  1. +0
    -0
      BPASmartClient.MorkCL/Alarm.cs
  2. +0
    -0
      BPASmartClient.MorkCL/BPASmartClient.MorkCL.csproj
  3. +171
    -0
      BPASmartClient.MorkCL/Control_MorkCL.cs
  4. +0
    -0
      BPASmartClient.MorkCL/Converter/EFuncToTextConverter.cs
  5. +0
    -0
      BPASmartClient.MorkCL/CustomStyle/CustomStyle.xaml
  6. +0
    -0
      BPASmartClient.MorkCL/ExtensionMethod.cs
  7. +0
    -0
      BPASmartClient.MorkCL/GVL_MorkCL.cs
  8. +0
    -0
      BPASmartClient.MorkCL/GlobalUsing.cs
  9. +0
    -0
      BPASmartClient.MorkCL/HelpClass/FuncSet.cs
  10. +0
    -0
      BPASmartClient.MorkCL/Model/ConnectPar.cs
  11. +0
    -0
      BPASmartClient.MorkCL/Model/Control/FryingPanGet.cs
  12. +0
    -0
      BPASmartClient.MorkCL/Model/Control/FryingPanSet.cs
  13. +0
    -0
      BPASmartClient.MorkCL/Model/Control/IModbus.cs
  14. +0
    -0
      BPASmartClient.MorkCL/Model/Control/ModbusBase.cs
  15. +0
    -0
      BPASmartClient.MorkCL/Model/Control/OtherDeviceGet.cs
  16. +0
    -0
      BPASmartClient.MorkCL/Model/Control/OtherDeviceSet.cs
  17. +0
    -0
      BPASmartClient.MorkCL/Model/Control/PressureCookerGet.cs
  18. +0
    -0
      BPASmartClient.MorkCL/Model/Control/PressureCookerSet.cs
  19. +0
    -0
      BPASmartClient.MorkCL/Model/Control/RobotGet.cs
  20. +0
    -0
      BPASmartClient.MorkCL/Model/Control/RobotMainTask.cs
  21. +0
    -0
      BPASmartClient.MorkCL/Model/Control/RobotSet.cs
  22. +0
    -0
      BPASmartClient.MorkCL/Model/Control/RobotSubTask.cs
  23. +0
    -0
      BPASmartClient.MorkCL/Model/ControlData.cs
  24. +0
    -0
      BPASmartClient.MorkCL/Model/DB/AccessoriesTB.cs
  25. +0
    -0
      BPASmartClient.MorkCL/Model/DB/IngredientsTB.cs
  26. +1
    -0
      BPASmartClient.MorkCL/Model/DB/MaterialBase.cs
  27. +0
    -0
      BPASmartClient.MorkCL/Model/DB/SeasoningTB.cs
  28. +0
    -0
      BPASmartClient.MorkCL/Model/DataInfo/AccessoriesInfo.cs
  29. +0
    -0
      BPASmartClient.MorkCL/Model/DataInfo/IngredientsInfo.cs
  30. +0
    -0
      BPASmartClient.MorkCL/Model/DataInfo/RawMaterial.cs
  31. +0
    -0
      BPASmartClient.MorkCL/Model/DataInfo/SeasoningInfo.cs
  32. +0
    -0
      BPASmartClient.MorkCL/Model/EDeviceType.cs
  33. +0
    -0
      BPASmartClient.MorkCL/Model/Func/EFunc.cs
  34. +0
    -0
      BPASmartClient.MorkCL/Model/Func/FuncPar.cs
  35. +0
    -0
      BPASmartClient.MorkCL/Model/Func/InitData.cs
  36. +59
    -0
      BPASmartClient.MorkCL/Model/ItemStroage.cs
  37. +21
    -0
      BPASmartClient.MorkCL/Model/Json/ItemStroageInfo.cs
  38. +0
    -0
      BPASmartClient.MorkCL/Model/Json/RecipesInfo.cs
  39. +0
    -0
      BPASmartClient.MorkCL/Model/NotifyTopic.cs
  40. +0
    -0
      BPASmartClient.MorkCL/Model/Recipe/EDishType.cs
  41. +0
    -0
      BPASmartClient.MorkCL/Model/Recipe/LocalRecipeData.cs
  42. +0
    -0
      BPASmartClient.MorkCL/Model/Result.cs
  43. +0
    -0
      BPASmartClient.MorkCL/Server/DeviceControl.cs
  44. +0
    -0
      BPASmartClient.MorkCL/Server/FryingPanServer.cs
  45. +0
    -0
      BPASmartClient.MorkCL/Server/IServer.cs
  46. +0
    -0
      BPASmartClient.MorkCL/Server/ISqlite.cs
  47. +0
    -0
      BPASmartClient.MorkCL/Server/OtherServer.cs
  48. +0
    -0
      BPASmartClient.MorkCL/Server/PressureCookerServer.cs
  49. +0
    -0
      BPASmartClient.MorkCL/Server/RobotServer.cs
  50. +31
    -0
      BPASmartClient.MorkCL/Server/SqliteHelper.cs
  51. +0
    -0
      BPASmartClient.MorkCL/Server/TaskServer.cs
  52. +31
    -42
      BPASmartClient.MorkCL/View/AddRawMaterialView.xaml
  53. +0
    -0
      BPASmartClient.MorkCL/View/AddRawMaterialView.xaml.cs
  54. +0
    -0
      BPASmartClient.MorkCL/View/Debug.xaml
  55. +0
    -0
      BPASmartClient.MorkCL/View/Debug.xaml.cs
  56. +0
    -0
      BPASmartClient.MorkCL/View/EditFunctionParamView.xaml
  57. +0
    -0
      BPASmartClient.MorkCL/View/EditFunctionParamView.xaml.cs
  58. +6
    -3
      BPASmartClient.MorkCL/View/EditRawMaterialView.xaml
  59. +0
    -0
      BPASmartClient.MorkCL/View/EditRawMaterialView.xaml.cs
  60. +0
    -0
      BPASmartClient.MorkCL/View/EditRecipeView.xaml
  61. +0
    -0
      BPASmartClient.MorkCL/View/EditRecipeView.xaml.cs
  62. +29
    -17
      BPASmartClient.MorkCL/View/ItemStorageView.xaml
  63. +0
    -0
      BPASmartClient.MorkCL/View/ItemStorageView.xaml.cs
  64. +0
    -0
      BPASmartClient.MorkCL/View/Monitor.xaml
  65. +0
    -0
      BPASmartClient.MorkCL/View/Monitor.xaml.cs
  66. +0
    -0
      BPASmartClient.MorkCL/View/ParSet.xaml
  67. +0
    -0
      BPASmartClient.MorkCL/View/ParSet.xaml.cs
  68. +6
    -4
      BPASmartClient.MorkCL/View/RecipeManageView.xaml
  69. +0
    -0
      BPASmartClient.MorkCL/View/RecipeManageView.xaml.cs
  70. +0
    -0
      BPASmartClient.MorkCL/View/Test.xaml
  71. +0
    -0
      BPASmartClient.MorkCL/View/Test.xaml.cs
  72. +5
    -18
      BPASmartClient.MorkCL/ViewModel/AddRawMaterialViewModel.cs
  73. +0
    -0
      BPASmartClient.MorkCL/ViewModel/EditFunctionParamViewModel.cs
  74. +49
    -2
      BPASmartClient.MorkCL/ViewModel/EditRawMaterialViewModel.cs
  75. +0
    -0
      BPASmartClient.MorkCL/ViewModel/EditRecipeViewModel.cs
  76. +135
    -0
      BPASmartClient.MorkCL/ViewModel/ItemStorageViewModel.cs
  77. +0
    -0
      BPASmartClient.MorkCL/ViewModel/MonitorViewModel.cs
  78. +0
    -0
      BPASmartClient.MorkCL/ViewModel/RecipeManageViewModel.cs
  79. +0
    -0
      BPASmartClient.MorkCL/ViewModel/testViewModel.cs
  80. +0
    -62
      BPASmartClient.Tourism/ViewModel/ItemStorageViewModel.cs
  81. +0
    -46
      BPASmartClient.TourismCollege/App.xaml
  82. +0
    -296
      BPASmartClient.TourismCollege/App.xaml.cs
  83. +0
    -10
      BPASmartClient.TourismCollege/AssemblyInfo.cs
  84. +0
    -35
      BPASmartClient.TourismCollege/BPASmartClient.TourismCollege.csproj
  85. +0
    -21
      BPASmartClient.TourismCollege/GlobalUsing.cs
  86. +0
    -12
      BPASmartClient.TourismCollege/Viewmodels/ItemStorageViewModel.cs
  87. +0
    -12
      BPASmartClient.TourismCollege/Viewmodels/RecipeManageViewModel.cs
  88. +0
    -57
      BPASmartClient.TourismCollege/Views/ItemStorageView.xaml
  89. +0
    -28
      BPASmartClient.TourismCollege/Views/ItemStorageView.xaml.cs
  90. +0
    -18
      BPASmartClient.TourismCollege/Views/RecipeManageView.xaml
  91. +0
    -29
      BPASmartClient.TourismCollege/Views/RecipeManageView.xaml.cs
  92. BIN
     
  93. +1
    -1
      BPASmartClient/BPASmartClient.csproj
  94. +22
    -22
      SmartClient.sln

BPASmartClient.Tourism/Alarm.cs → BPASmartClient.MorkCL/Alarm.cs View File


BPASmartClient.Tourism/BPASmartClient.MorkCL.csproj → BPASmartClient.MorkCL/BPASmartClient.MorkCL.csproj View File


+ 171
- 0
BPASmartClient.MorkCL/Control_MorkCL.cs View File

@@ -0,0 +1,171 @@
using BPA.Message.Enum;
using BPASmartClient.Device;
using BPASmartClient.MorkCL.Model.Json;
using BPASmartClient.MorkCL.Server;
using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BPASmartClient.MorkCL
{
public class Control_MorkCL : BaseDevice
{
public override DeviceClientType DeviceType => DeviceClientType.MORKCL;

GVL_MorkCL morkCL = new GVL_MorkCL();
Alarm alarm = new Alarm();
/// <summary>
/// 设备信息集合
/// </summary>
ConcurrentDictionary<EDeviceType, IModbus> devices { get; set; } = new();

/// <summary>
/// 任务集合
/// </summary>
ConcurrentDictionary<EDeviceType, TaskServer> TaskList { get; set; } = new();

public override void DoMain()
{
MonitorViewModel.DeviceId = DeviceId;

//注册本地配方接收
ActionManage.GetInstance.Register(new Action<object>(o =>
{
if (o != null && o is ControlData cd) morkCL.cds.Enqueue(cd);
}), NotifyTopic.FormulaDistribution);

//初始化通讯对象
devices.TryAdd(EDeviceType.炒锅1, new FryingPanServer());
devices.TryAdd(EDeviceType.炒锅2, new FryingPanServer());
devices.TryAdd(EDeviceType.机器人, new RobotServer());
devices.TryAdd(EDeviceType.压力锅, new PressureCookerServer());
devices.TryAdd(EDeviceType.外部设备, new OtherServer());

devices[EDeviceType.炒锅1].Init(ConnectPar.FryingPanIP1);
devices[EDeviceType.炒锅2].Init(ConnectPar.FryingPanIP2);
devices[EDeviceType.机器人].Init(ConnectPar.RobotIP);
devices[EDeviceType.压力锅].Init(ConnectPar.PressureCookerIP);
devices[EDeviceType.外部设备].Init(ConnectPar.PPortName);

#region 读取本地文件数据
Json<RecipesInfo>.Read();
Json<ItemStroageInfo>.Read();
#endregion
}

public override void MainTask()
{
if (morkCL.cds.Count > 0 && !TaskList.ContainsKey(morkCL.cds.ElementAt(0).DeviceType))
{
if (morkCL.cds.TryDequeue(out ControlData cd))
{
TaskList.TryAdd(cd.DeviceType, new TaskServer());
TaskList[cd.DeviceType].TaskName = $"{cd.DeviceType.ToString()}-{cd.Name}";
TaskList[cd.DeviceType].RunTask = new Task(new Action(() => { FryingPanControl(cd.DeviceType, cd); }));
TaskList[cd.DeviceType].RunTask.Start();
}
}
//检查到有任务完成后将对已完成的任务进行清理
var res = TaskList.FirstOrDefault(p => p.Value.IsComplete).Key;
if (TaskList.ContainsKey(res)) TaskList.TryRemove(res, out _);
}

private void FryingPanControl(EDeviceType et, ControlData cd)
{
DeviceProcessLogShow($"开始执行-{cd.Name} 任务");
if (TaskList.ContainsKey(et) && TaskList[et].Cts.IsCancellationRequested) return;
while (cd.ControlFuncs.Count > 0)
{
if (cd.ControlFuncs.TryDequeue(out FuncModel fm))
{
var device = (FryingPanServer)devices[et];
var robot = (RobotServer)devices[EDeviceType.机器人];
int index = (ushort)et - 1;
DeviceProcessLogShow($"{cd.Name}-任务执行-{fm.eFunc.ToString()}-步骤");
switch (fm.eFunc)
{
case EFunc.搅拌启动:
device.MixingFrequencySet(fm.funcPars.ElementAt(0).ParValue);
device.StirStartOrStop = true;
break;
case EFunc.搅拌停止:
device.StirStartOrStop = false;
break;
case EFunc.加热启动:
device.HeatingGearSet(fm.funcPars.ElementAt(0).ParValue);
device.HeatStartOrStop = true;
break;
case EFunc.加热停止:
device.HeatStartOrStop = false;
break;
case EFunc.添加调料:
var Seasoning = SqliteHelper.GetInstance.GetSeasoning().FirstOrDefault(p => p.Id == fm.funcPars.ElementAt(0).Id);
if (Seasoning != null)
{
device.CuttingControl(Seasoning.Loc.ToString(), fm.funcPars.ElementAt(1).ParValue);
}
break;
case EFunc.添加主料:
case EFunc.添加辅料:
MaterialBase mb = new MaterialBase();
if (fm.eFunc == EFunc.添加辅料)
mb = SqliteHelper.GetInstance.GetAccessories().FirstOrDefault(p => p.Id == fm.funcPars.ElementAt(0).Id);
else mb = SqliteHelper.GetInstance.GetIngredients().FirstOrDefault(p => p.Id == fm.funcPars.ElementAt(0).Id);
robot.RobotTaskControl(mb.Loc.ToString(), et);
device.FeedingLocFB.Wait(Cts: TaskList[et].Cts);//等待炒锅到投料位置
robot.MaterialPouringRequest[index].Wait(Cts: TaskList[et].Cts); //等待机器人到投料位置
robot.AllowPourVegetables(et);//允许机器人开始投料
robot.MaterialPouringComplete[index].Wait(Cts: TaskList[et].Cts); //等待机器人投料完成
break;
case EFunc.炒锅回原点位:
device.FryingPanHome = true;
break;
case EFunc.出餐启动:
robot.RobotTaskControl("1", et);//取空盆
robot.DiningOutRequest[index].Wait(Cts: TaskList[et].Cts);//等待机器人到出菜位置
device.DiningOutStart = true;
break;
case EFunc.炒锅清洗:
device.FryingPanClear = true;
break;
case EFunc.炒锅回投料位置:
device.FryingPanFeedingLoc = true;
break;
case EFunc.去指定炒制位:
device.SetStirFryingLoc(fm.funcPars.ElementAt(0).ParValue);
break;
case EFunc.炒制:
if (int.TryParse(fm.funcPars.ElementAt(0).ParValue, out int time))
Task.Delay(time * 1000).Wait(TaskList[et].Cts.Token);
break;
default:
break;
}
}
}

}

public override void ReadData()
{

}

public override void ResetProgram()
{
morkCL = null;
morkCL = new GVL_MorkCL();
}

public override void SimOrder()
{
}

public override void Stop()
{
}
}
}

BPASmartClient.Tourism/Converter/EFuncToTextConverter.cs → BPASmartClient.MorkCL/Converter/EFuncToTextConverter.cs View File


BPASmartClient.Tourism/CustomStyle/CustomStyle.xaml → BPASmartClient.MorkCL/CustomStyle/CustomStyle.xaml View File


BPASmartClient.Tourism/ExtensionMethod.cs → BPASmartClient.MorkCL/ExtensionMethod.cs View File


BPASmartClient.Tourism/GVL_MorkCL.cs → BPASmartClient.MorkCL/GVL_MorkCL.cs View File


BPASmartClient.Tourism/GlobalUsing.cs → BPASmartClient.MorkCL/GlobalUsing.cs View File


BPASmartClient.Tourism/HelpClass/FuncSet.cs → BPASmartClient.MorkCL/HelpClass/FuncSet.cs View File


BPASmartClient.Tourism/Model/ConnectPar.cs → BPASmartClient.MorkCL/Model/ConnectPar.cs View File


BPASmartClient.Tourism/Model/Control/FryingPanGet.cs → BPASmartClient.MorkCL/Model/Control/FryingPanGet.cs View File


BPASmartClient.Tourism/Model/Control/FryingPanSet.cs → BPASmartClient.MorkCL/Model/Control/FryingPanSet.cs View File


BPASmartClient.Tourism/Model/Control/IModbus.cs → BPASmartClient.MorkCL/Model/Control/IModbus.cs View File


BPASmartClient.Tourism/Model/Control/ModbusBase.cs → BPASmartClient.MorkCL/Model/Control/ModbusBase.cs View File


BPASmartClient.Tourism/Model/Control/OtherDeviceGet.cs → BPASmartClient.MorkCL/Model/Control/OtherDeviceGet.cs View File


BPASmartClient.Tourism/Model/Control/OtherDeviceSet.cs → BPASmartClient.MorkCL/Model/Control/OtherDeviceSet.cs View File


BPASmartClient.Tourism/Model/Control/PressureCookerGet.cs → BPASmartClient.MorkCL/Model/Control/PressureCookerGet.cs View File


BPASmartClient.Tourism/Model/Control/PressureCookerSet.cs → BPASmartClient.MorkCL/Model/Control/PressureCookerSet.cs View File


BPASmartClient.Tourism/Model/Control/RobotGet.cs → BPASmartClient.MorkCL/Model/Control/RobotGet.cs View File


BPASmartClient.Tourism/Model/Control/RobotMainTask.cs → BPASmartClient.MorkCL/Model/Control/RobotMainTask.cs View File


BPASmartClient.Tourism/Model/Control/RobotSet.cs → BPASmartClient.MorkCL/Model/Control/RobotSet.cs View File


BPASmartClient.Tourism/Model/Control/RobotSubTask.cs → BPASmartClient.MorkCL/Model/Control/RobotSubTask.cs View File


BPASmartClient.Tourism/Model/ControlData.cs → BPASmartClient.MorkCL/Model/ControlData.cs View File


BPASmartClient.Tourism/Model/DB/AccessoriesTB.cs → BPASmartClient.MorkCL/Model/DB/AccessoriesTB.cs View File


BPASmartClient.Tourism/Model/DB/IngredientsTB.cs → BPASmartClient.MorkCL/Model/DB/IngredientsTB.cs View File


BPASmartClient.Tourism/Model/DB/MaterialBase.cs → BPASmartClient.MorkCL/Model/DB/MaterialBase.cs View File

@@ -23,6 +23,7 @@ namespace BPASmartClient.MorkCL.Model
/// <summary>
/// 描述
/// </summary>
[SugarColumn(IsNullable =true)]
public string Description { get; set; }

/// <summary>

BPASmartClient.Tourism/Model/DB/SeasoningTB.cs → BPASmartClient.MorkCL/Model/DB/SeasoningTB.cs View File


BPASmartClient.Tourism/Model/DataInfo/AccessoriesInfo.cs → BPASmartClient.MorkCL/Model/DataInfo/AccessoriesInfo.cs View File


BPASmartClient.Tourism/Model/DataInfo/IngredientsInfo.cs → BPASmartClient.MorkCL/Model/DataInfo/IngredientsInfo.cs View File


BPASmartClient.Tourism/Model/DataInfo/RawMaterial.cs → BPASmartClient.MorkCL/Model/DataInfo/RawMaterial.cs View File


BPASmartClient.Tourism/Model/DataInfo/SeasoningInfo.cs → BPASmartClient.MorkCL/Model/DataInfo/SeasoningInfo.cs View File


BPASmartClient.Tourism/Model/EDeviceType.cs → BPASmartClient.MorkCL/Model/EDeviceType.cs View File


BPASmartClient.Tourism/Model/Func/EFunc.cs → BPASmartClient.MorkCL/Model/Func/EFunc.cs View File


BPASmartClient.Tourism/Model/Func/FuncPar.cs → BPASmartClient.MorkCL/Model/Func/FuncPar.cs View File


BPASmartClient.Tourism/Model/Func/InitData.cs → BPASmartClient.MorkCL/Model/Func/InitData.cs View File


+ 59
- 0
BPASmartClient.MorkCL/Model/ItemStroage.cs View File

@@ -0,0 +1,59 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BPASmartClient.MorkCL.Model
{
/// <summary>
/// 库位状态。
/// </summary>
public class ItemStroage : NotifyBase
{
private bool isEmploy;
private string materialID;
private string name;
private float weight;
private object lockobj=new object();
/// <summary>
/// 库位位置。
/// </summary>
//public string ID { get; set; }

/// <summary>
/// 物料ID
/// </summary>
public string MaterialID { get => materialID; set { materialID = value; OnPropertyChanged(); } }
/// <summary>
/// 物料名称
/// </summary>
public string Name { get => name; set { name = value;OnPropertyChanged(); } }
/// <summary>
/// 是否占用,有物体则为True。反之,为False。
/// </summary>
public bool IsEmploy
{
get => isEmploy;
set
{
//需要测试是否有问题。
lock (lockobj)
{
if (value == false)
{
Weight = 0.0f;
}
isEmploy = value;
OnPropertyChanged();
}
}
}

/// <summary>
/// 当前重量。
/// </summary>
public float Weight { get => weight; set { weight = value; OnPropertyChanged(); } }

}
}

+ 21
- 0
BPASmartClient.MorkCL/Model/Json/ItemStroageInfo.cs View File

@@ -0,0 +1,21 @@
namespace BPASmartClient.MorkCL.Model.Json
{
public class ItemStroageInfo
{
/// <summary>
/// 主料库库位信息。
/// </summary>
public ItemStroage[] IngredientsStorage { get; set; } = new ItemStroage[12] {
new ItemStroage(), new ItemStroage(), new ItemStroage(), new ItemStroage(),
new ItemStroage(), new ItemStroage(), new ItemStroage(), new ItemStroage(),
new ItemStroage(), new ItemStroage(), new ItemStroage(), new ItemStroage()
};

/// <summary>
/// 辅料库库位信息。
/// </summary>
public ItemStroage[] AccessoriesStorage { get; set; } = new ItemStroage[8] {
new ItemStroage(),new ItemStroage(),new ItemStroage(),new ItemStroage(),new ItemStroage(),new ItemStroage(),new ItemStroage(),new ItemStroage()
};
}
}

BPASmartClient.Tourism/Model/Json/RecipesInfo.cs → BPASmartClient.MorkCL/Model/Json/RecipesInfo.cs View File


BPASmartClient.Tourism/Model/NotifyTopic.cs → BPASmartClient.MorkCL/Model/NotifyTopic.cs View File


BPASmartClient.Tourism/Model/Recipe/EDishType.cs → BPASmartClient.MorkCL/Model/Recipe/EDishType.cs View File


BPASmartClient.Tourism/Model/Recipe/LocalRecipeData.cs → BPASmartClient.MorkCL/Model/Recipe/LocalRecipeData.cs View File


BPASmartClient.Tourism/Model/Result.cs → BPASmartClient.MorkCL/Model/Result.cs View File


BPASmartClient.Tourism/Server/DeviceControl.cs → BPASmartClient.MorkCL/Server/DeviceControl.cs View File


BPASmartClient.Tourism/Server/FryingPanServer.cs → BPASmartClient.MorkCL/Server/FryingPanServer.cs View File


BPASmartClient.Tourism/Server/IServer.cs → BPASmartClient.MorkCL/Server/IServer.cs View File


BPASmartClient.Tourism/Server/ISqlite.cs → BPASmartClient.MorkCL/Server/ISqlite.cs View File


BPASmartClient.Tourism/Server/OtherServer.cs → BPASmartClient.MorkCL/Server/OtherServer.cs View File


BPASmartClient.Tourism/Server/PressureCookerServer.cs → BPASmartClient.MorkCL/Server/PressureCookerServer.cs View File


BPASmartClient.Tourism/Server/RobotServer.cs → BPASmartClient.MorkCL/Server/RobotServer.cs View File


BPASmartClient.Tourism/Server/SqliteHelper.cs → BPASmartClient.MorkCL/Server/SqliteHelper.cs View File

@@ -120,6 +120,16 @@ namespace BPASmartClient.MorkCL.Server
return Db.Queryable<IngredientsTB>().First(p => p.Id == id);
}

/// <summary>
/// 查询指定位置是否占用。
/// </summary>
/// <param name="loc"></param>
/// <returns></returns>
public bool GetIngredientsInfoByLoc(int loc)
{
return Db.Queryable<IngredientsTB>().Any(p => p.Loc == loc);
}

#endregion


@@ -186,6 +196,16 @@ namespace BPASmartClient.MorkCL.Server
return Db.Queryable<AccessoriesTB>().First(p => p.Id == id);
}

/// <summary>
/// 查询指定位置是否占用。
/// </summary>
/// <param name="loc"></param>
/// <returns></returns>
public bool GetAccessoriesInfoByLoc(int loc)
{
return Db.Queryable<AccessoriesTB>().Any(p => p.Loc == loc);
}

#endregion

#region 调料数据操作
@@ -250,6 +270,17 @@ namespace BPASmartClient.MorkCL.Server
{
return Db.Queryable<SeasoningTB>().First(p => p.Id == id);
}

/// <summary>
/// 查询指定位置是否占用。
/// </summary>
/// <param name="loc"></param>
/// <returns></returns>
public bool GetSeasoningInfoByLoc(int loc)
{
return Db.Queryable<SeasoningTB>().Any(p => p.Loc == loc);
}

#endregion



BPASmartClient.Tourism/Server/TaskServer.cs → BPASmartClient.MorkCL/Server/TaskServer.cs View File


BPASmartClient.Tourism/View/AddRawMaterialView.xaml → BPASmartClient.MorkCL/View/AddRawMaterialView.xaml View File

@@ -52,12 +52,7 @@
Content="新增辅料数据"
DockPanel.Dock="Right" />

<Button
Margin="30,0"
Command="{Binding SaveMaterialInfoCommand}"
CommandParameter="辅料"
Content="保存数据"
DockPanel.Dock="Right" />
</DockPanel>
<!--#region 表格标题栏设置-->
<Grid
@@ -66,11 +61,11 @@
Background="#ff0C255F">

<Grid.ColumnDefinitions>
<ColumnDefinition Width="330"/>
<ColumnDefinition Width="330" />
<ColumnDefinition />
<ColumnDefinition />
<ColumnDefinition Width="80"/>
<ColumnDefinition Width="80"/>
<ColumnDefinition Width="80" />
<ColumnDefinition Width="80" />
</Grid.ColumnDefinitions>


@@ -124,11 +119,11 @@
<DataTemplate>
<Grid Name="gr" Height="30">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="330"/>
<ColumnDefinition Width="330" />
<ColumnDefinition />
<ColumnDefinition />
<ColumnDefinition Width="80"/>
<ColumnDefinition Width="80"/>
<ColumnDefinition Width="80" />
<ColumnDefinition Width="80" />
</Grid.ColumnDefinitions>

<TextBox
@@ -141,6 +136,7 @@
<Grid Grid.Column="1">
<TextBox
MinWidth="150"
IsReadOnly="True"
Style="{StaticResource DataShowTextBoxStyle}"
Text="{Binding Name}"
TextAlignment="Center" />
@@ -152,11 +148,13 @@

<TextBox
Grid.Column="2"
MinWidth="150" Height="30"
Height="30"
MinWidth="150"
IsReadOnly="True"
Style="{StaticResource DataShowTextBoxStyle}"
Text="{Binding Loc}"
TextAlignment="Center" />
<Grid Grid.Column="3">
<Button
Command="{Binding DataContext.EditCommand, RelativeSource={RelativeSource AncestorType=ItemsControl, Mode=FindAncestor}}"
@@ -169,7 +167,7 @@
BorderThickness="1,0,1,0"
Cursor="SizeWE" />
</Grid>
<Grid Grid.Column="4">
<Button
Command="{Binding DataContext.RemoveAccessoryCommand, RelativeSource={RelativeSource AncestorType=ItemsControl, Mode=FindAncestor}}"
@@ -225,13 +223,6 @@
CommandParameter="调料"
Content="新增调料数据"
DockPanel.Dock="Right" />

<Button
Margin="30,0"
Command="{Binding SaveMaterialInfoCommand}"
CommandParameter="调料"
Content="保存数据"
DockPanel.Dock="Right" />
</DockPanel>
<!--#region 表格标题栏设置-->
<Grid
@@ -240,11 +231,11 @@
Background="#ff0C255F">

<Grid.ColumnDefinitions>
<ColumnDefinition Width="330"/>
<ColumnDefinition Width="330" />
<ColumnDefinition />
<ColumnDefinition />
<ColumnDefinition Width="80"/>
<ColumnDefinition Width="80"/>
<ColumnDefinition Width="80" />
<ColumnDefinition Width="80" />
</Grid.ColumnDefinitions>


@@ -296,11 +287,11 @@
<DataTemplate>
<Grid Name="gr" Height="30">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="330"/>
<ColumnDefinition Width="330" />
<ColumnDefinition />
<ColumnDefinition />
<ColumnDefinition Width="80"/>
<ColumnDefinition Width="80"/>
<ColumnDefinition Width="80" />
<ColumnDefinition Width="80" />
</Grid.ColumnDefinitions>

<TextBox
@@ -313,6 +304,7 @@
<Grid Grid.Column="1">
<TextBox
MinWidth="150"
IsReadOnly="True"
Style="{StaticResource DataShowTextBoxStyle}"
Text="{Binding Name}"
TextAlignment="Center" />
@@ -324,7 +316,9 @@

<TextBox
Grid.Column="2"
MinWidth="150" Height="30"
Height="30"
MinWidth="150"
IsReadOnly="True"
Style="{StaticResource DataShowTextBoxStyle}"
Text="{Binding Loc}"
TextAlignment="Center" />
@@ -341,7 +335,7 @@
BorderThickness="1,0,1,0"
Cursor="SizeWE" />
</Grid>

<Grid Grid.Column="4">
<Button
@@ -405,12 +399,6 @@
Content="新增主料数据"
DockPanel.Dock="Right" />

<Button
Margin="30,0"
Command="{Binding SaveMaterialInfoCommand}"
CommandParameter="主料"
Content="保存数据"
DockPanel.Dock="Right" />
</DockPanel>
<!--#region 表格标题栏设置-->
<Grid
@@ -419,10 +407,10 @@
Background="#ff0C255F">

<Grid.ColumnDefinitions>
<ColumnDefinition Width="330"/>
<ColumnDefinition Width="330" />
<ColumnDefinition />
<ColumnDefinition Width="80"/>
<ColumnDefinition Width="80"/>
<ColumnDefinition Width="80" />
<ColumnDefinition Width="80" />
</Grid.ColumnDefinitions>


@@ -473,10 +461,10 @@
<DataTemplate>
<Grid Name="gr" Height="30">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="330"/>
<ColumnDefinition Width="330" />
<ColumnDefinition />
<ColumnDefinition Width="80"/>
<ColumnDefinition Width="80"/>
<ColumnDefinition Width="80" />
<ColumnDefinition Width="80" />
</Grid.ColumnDefinitions>

<TextBox
@@ -489,6 +477,7 @@
<Grid Grid.Column="1">
<TextBox
MinWidth="100"
IsReadOnly="True"
Style="{StaticResource DataShowTextBoxStyle}"
Text="{Binding Name}"
TextAlignment="Center" />

BPASmartClient.Tourism/View/AddRawMaterialView.xaml.cs → BPASmartClient.MorkCL/View/AddRawMaterialView.xaml.cs View File


BPASmartClient.Tourism/View/Debug.xaml → BPASmartClient.MorkCL/View/Debug.xaml View File


BPASmartClient.Tourism/View/Debug.xaml.cs → BPASmartClient.MorkCL/View/Debug.xaml.cs View File


BPASmartClient.Tourism/View/EditFunctionParamView.xaml → BPASmartClient.MorkCL/View/EditFunctionParamView.xaml View File


BPASmartClient.Tourism/View/EditFunctionParamView.xaml.cs → BPASmartClient.MorkCL/View/EditFunctionParamView.xaml.cs View File


BPASmartClient.Tourism/View/EditRawMaterialView.xaml → BPASmartClient.MorkCL/View/EditRawMaterialView.xaml View File

@@ -75,6 +75,8 @@
<TextBlock Text="物料类型:" />
<ComboBox
Width="200"
Height="40"
FontSize="18"
IsEditable="False"
ItemsSource="{Binding MaterialType}"
SelectedItem="{Binding CurrentMaterialType}" />
@@ -83,6 +85,7 @@
<TextBlock Text="物料名称:" />
<TextBox
Width="200"
Height="40"
FontSize="18"
Text="{Binding MaterialName}" />
</StackPanel>
@@ -93,15 +96,15 @@
<TextBlock Text="物料位置:" />
<TextBox
Width="200"
Height="40"
FontSize="18"
Text="{Binding MaterialLoc}" />
</StackPanel>
<StackPanel
Margin="0,5"
Orientation="Horizontal">
<StackPanel Margin="0,5" Orientation="Horizontal">
<TextBlock Text="物料描述:" />
<TextBox
Width="200"
Height="40"
FontSize="18"
Text="{Binding MaterialDescription}" />
</StackPanel>

BPASmartClient.Tourism/View/EditRawMaterialView.xaml.cs → BPASmartClient.MorkCL/View/EditRawMaterialView.xaml.cs View File


BPASmartClient.Tourism/View/EditRecipeView.xaml → BPASmartClient.MorkCL/View/EditRecipeView.xaml View File


BPASmartClient.Tourism/View/EditRecipeView.xaml.cs → BPASmartClient.MorkCL/View/EditRecipeView.xaml.cs View File


BPASmartClient.Tourism/View/ItemStorageView.xaml → BPASmartClient.MorkCL/View/ItemStorageView.xaml View File

@@ -33,30 +33,40 @@


<!--#region 入库电子称状态-->
<pry:ImageBorder Margin="5,15"/>
<pry:ImageBorder Margin="5,15" />
<StackPanel Margin="15,20">
<TextBlock Width="200" Text="{Binding ScaleCurrentWeight, StringFormat=当前重量:{0} g}" />
</StackPanel>
<!--#endregion-->

<!--#region 入库操作-->
<pry:ImageBorder Margin="5,15" Grid.Row="1"/>
<pry:ImageBorder Grid.Row="1" Margin="5,15" />
<StackPanel Grid.Row="1" Margin="15,20">
<TextBlock Text="入库名称:" />
<ComboBox IsEditable="False" Margin="0,5"/>
<ComboBox
x:Name="cmbSelectName"
Height="50"
Margin="0,5"
DisplayMemberPath="Name"
FontSize="26"
IsEditable="False"
ItemsSource="{Binding Ingredients}" />

<Button Margin="0,10" Content="入库" />
<Button
Margin="0,10"
Command="{Binding InStorageCommand}"
CommandParameter="{Binding ElementName=cmbSelectName, Path=SelectedItem}"
Content="入库" />
</StackPanel>
<!--#endregion-->
<!--#region 辅料仓-->
<pry:ImageBorder Margin="15"
Grid.Column="1"/>
<pry:ImageBorder Grid.Column="1" Margin="15" />
<ItemsControl
Grid.Column="1"
Margin="3"
Background="Transparent"
BorderThickness="1"
ItemsSource="{Binding Seasonings}"
ItemsSource="{Binding AccessoriesItorage}"
ScrollViewer.HorizontalScrollBarVisibility="Disabled">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
@@ -86,11 +96,11 @@

<TextBlock
Grid.Row="1"
Margin="0,0,0,35"
Margin="0,0,0,35"
HorizontalAlignment="Center"
FontSize="20"
Foreground="#FF0084FF"
Text="{Binding Weight,StringFormat={}{0} g}" />
Text="{Binding Weight, StringFormat={}{0} g}" />


<StackPanel
@@ -101,7 +111,7 @@
<TextBlock
FontSize="20"
Foreground="#FF0084FF"
Text="{Binding ID,StringFormat={}{0} 号仓}" />
Text="{Binding ID, StringFormat={}{0} 号仓}" />
</StackPanel>
<Image
Grid.RowSpan="2"
@@ -114,14 +124,16 @@
</ItemsControl>
<!--#endregion-->
<!--#region 原料仓-->
<pry:ImageBorder Margin="15"
Grid.Column="1" Grid.Row="1"/>
<pry:ImageBorder
Grid.Row="1"
Grid.Column="1"
Margin="15" />
<ItemsControl
Grid.Row="1"
Grid.Column="1"
Margin="3"
Background="Transparent"
ItemsSource="{Binding Materials}"
ItemsSource="{Binding IngredientsItorage}"
ScrollViewer.HorizontalScrollBarVisibility="Disabled">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
@@ -149,14 +161,14 @@
FontSize="25"
Foreground="#ffccd61f"
Text="{Binding Name}" />
<TextBlock
Grid.Row="1"
Margin="0,0,0,35"
Margin="0,0,0,35"
HorizontalAlignment="Center"
FontSize="20"
Foreground="#FF0084FF"
Text="{Binding Weight,StringFormat={}{0} g}" />
Text="{Binding Weight, StringFormat={}{0} g}" />


<StackPanel
@@ -167,7 +179,7 @@
<TextBlock
FontSize="20"
Foreground="#FF0084FF"
Text="{Binding ID,StringFormat={}{0} 号仓}" />
Text="{Binding ID, StringFormat={}{0} 号仓}" />
</StackPanel>
<Image
Grid.RowSpan="2"

BPASmartClient.Tourism/View/ItemStorageView.xaml.cs → BPASmartClient.MorkCL/View/ItemStorageView.xaml.cs View File


BPASmartClient.Tourism/View/Monitor.xaml → BPASmartClient.MorkCL/View/Monitor.xaml View File


BPASmartClient.Tourism/View/Monitor.xaml.cs → BPASmartClient.MorkCL/View/Monitor.xaml.cs View File


BPASmartClient.Tourism/View/ParSet.xaml → BPASmartClient.MorkCL/View/ParSet.xaml View File


BPASmartClient.Tourism/View/ParSet.xaml.cs → BPASmartClient.MorkCL/View/ParSet.xaml.cs View File


BPASmartClient.Tourism/View/RecipeManageView.xaml → BPASmartClient.MorkCL/View/RecipeManageView.xaml View File

@@ -183,16 +183,17 @@

<TextBlock
Grid.Column="0"
Style="{StaticResource TextBlockStyle}"
HorizontalAlignment="Center"
Style="{StaticResource TextBlockStyle}"
Text="{Binding Name}"
TextAlignment="Center" />

<Grid Grid.Column="1">
<TextBox
MinWidth="400"
Style="{StaticResource DataShowTextBoxStyle}"
Text="{Binding DishType}"
TextAlignment="Center" MinWidth="400"/>
TextAlignment="Center" />
<Border
BorderBrush="{StaticResource bordColor}"
BorderThickness="1,0,1,0"
@@ -201,9 +202,10 @@

<Grid Grid.Column="2">
<TextBox
MinWidth="400"
Style="{StaticResource DataShowTextBoxStyle}"
Text="{Binding Remark}"
TextAlignment="Center" MinWidth="400"/>
TextAlignment="Center" />
<Border
BorderBrush="{StaticResource bordColor}"
BorderThickness="1,0,1,0"
@@ -239,7 +241,7 @@
<Grid Grid.Column="5">
<Button
Command="{Binding DataContext.RemoveCommand, RelativeSource={RelativeSource AncestorType=ItemsControl, Mode=FindAncestor}}"
CommandParameter="{Binding ID}"
CommandParameter="{Binding Id}"
Content="删除"
FontSize="16"
Style="{StaticResource ControlButtonStyle}" />

BPASmartClient.Tourism/View/RecipeManageView.xaml.cs → BPASmartClient.MorkCL/View/RecipeManageView.xaml.cs View File


BPASmartClient.Tourism/View/Test.xaml → BPASmartClient.MorkCL/View/Test.xaml View File


BPASmartClient.Tourism/View/Test.xaml.cs → BPASmartClient.MorkCL/View/Test.xaml.cs View File


BPASmartClient.Tourism/ViewModel/AddRawMaterialViewModel.cs → BPASmartClient.MorkCL/ViewModel/AddRawMaterialViewModel.cs View File

@@ -58,24 +58,13 @@ namespace BPASmartClient.MorkCL.ViewModel
{
EditRawMaterialView editRawMaterialView = new EditRawMaterialView();
ActionManage.GetInstance.Send("OpenEditRawMaterialView",new MaterialBase());
ActionManage.GetInstance.Send("ChangeMaterialType", materialType);
if (editRawMaterialView.ShowDialog() == true)
{
RefreshData();
}
});
SaveMaterialInfoCommand = new BPARelayCommand<string>((materialType) =>
{
//TODO:暂时不写 可能使用数据库保存。
switch (materialType)
{
case "主料":
break;
case "辅料":
break;
case "调料":
break;
}
});
EditCommand = new BPARelayCommand<object>((o) =>
{
EditRawMaterialView editRawMaterialView = new EditRawMaterialView();
@@ -109,8 +98,8 @@ namespace BPASmartClient.MorkCL.ViewModel
private void RefreshData()
{
Ingredients = new ObservableCollection<IngredientsTB>(SqliteHelper.GetInstance.GetIngredients());
Accessories = new ObservableCollection<AccessoriesTB>(SqliteHelper.GetInstance.GetAccessories());
Seasonings = new ObservableCollection<SeasoningTB>(SqliteHelper.GetInstance.GetSeasoning());
Accessories = new ObservableCollection<AccessoriesTB>(SqliteHelper.GetInstance.GetAccessories().OrderBy(tb => tb.Loc));
Seasonings = new ObservableCollection<SeasoningTB>(SqliteHelper.GetInstance.GetSeasoning().OrderBy(tb => tb.Loc));
}
/// <summary>
/// 辅料信息集合
@@ -145,10 +134,8 @@ namespace BPASmartClient.MorkCL.ViewModel
/// </summary>
public BPARelayCommand<string> AddMaterialCommand { get; set; }
/// <summary>
/// 保存物料信息。
/// 编辑物料信息。
/// </summary>
public BPARelayCommand<string> SaveMaterialInfoCommand { get; set; }

public BPARelayCommand<object> EditCommand { get; set; }
}
}

BPASmartClient.Tourism/ViewModel/EditFunctionParamViewModel.cs → BPASmartClient.MorkCL/ViewModel/EditFunctionParamViewModel.cs View File


BPASmartClient.Tourism/ViewModel/EditRawMaterialViewModel.cs → BPASmartClient.MorkCL/ViewModel/EditRawMaterialViewModel.cs View File

@@ -51,10 +51,26 @@ namespace BPASmartClient.MorkCL.ViewModel
}
}
}, "OpenEditRawMaterialView", true);
ActionManage.GetInstance.Register((object o) =>
{
string materialType=o is String ? (String)o : null;
CurrentMaterialType = materialType!;
}, "ChangeMaterialType", true);

SaveParamCommand=new BPARelayCommand(() => {
#region 数据验证
if (string.IsNullOrEmpty(MaterialName) || MaterialName.Length<=0)
{
NoticeDemoViewModel.OpenMsg(EnumPromptType.Error, Application.Current.MainWindow, "提示", $"失败,物料名称不正确!");
return;
}
if (MaterialLoc<=0)
{
NoticeDemoViewModel.OpenMsg(EnumPromptType.Error, Application.Current.MainWindow, "提示", $"失败,物料位置应大于0!");
return;
}

SaveParamCommand=new BPARelayCommand(() => {
#endregion
//新增
if (IsNewAdd)
{
@@ -63,14 +79,30 @@ namespace BPASmartClient.MorkCL.ViewModel
switch (CurrentMaterialType)
{
case "主料":
//if (SqliteHelper.GetInstance.GetIngredientsInfoByLoc(MaterialLoc))
//{
// NoticeDemoViewModel.OpenMsg(EnumPromptType.Error, Application.Current.MainWindow, "提示", $"添加失败,该位置已有物料!");
// return;
//}
IngredientsTB ingredients = new IngredientsTB() { Name = MaterialName, Loc = MaterialLoc, Id = _materialID, Description = MaterialDescription };
SqliteHelper.GetInstance.AddIngredients(ingredients);
ActionManage.GetInstance.Send("RefreshIngredients");
break;
case "辅料":
if (SqliteHelper.GetInstance.GetAccessoriesInfoByLoc(MaterialLoc))
{
NoticeDemoViewModel.OpenMsg(EnumPromptType.Error, Application.Current.MainWindow, "提示", $"添加失败,该位置已有物料!");
return;
}
AccessoriesTB accessories = new AccessoriesTB() { Name = MaterialName, Loc = MaterialLoc, Id = _materialID, Description = MaterialDescription };
SqliteHelper.GetInstance.AddAccessories(accessories);
break;
case "调料":
if (SqliteHelper.GetInstance.GetSeasoningInfoByLoc(MaterialLoc))
{
NoticeDemoViewModel.OpenMsg(EnumPromptType.Error, Application.Current.MainWindow, "提示", $"添加失败,该位置已有物料!");
return;
}
SeasoningTB seasoning = new SeasoningTB() { Name = MaterialName, Loc = MaterialLoc, Id = _materialID, Description = MaterialDescription };
SqliteHelper.GetInstance.AddSeasoning(seasoning);
break;
@@ -90,14 +122,29 @@ namespace BPASmartClient.MorkCL.ViewModel
switch (CurrentMaterialType)
{
case "主料":
if (SqliteHelper.GetInstance.GetIngredientsInfoByLoc(MaterialLoc))
{
NoticeDemoViewModel.OpenMsg(EnumPromptType.Error, Application.Current.MainWindow, "提示", $"修改失败,该位置已有物料!");
return;
}
IngredientsTB ingredients = new IngredientsTB() { Name = MaterialName, Loc = MaterialLoc, Id = _materialID, Description = MaterialDescription };
SqliteHelper.GetInstance.EditIngredients(ingredients);
break;
case "辅料":
if (SqliteHelper.GetInstance.GetAccessoriesInfoByLoc(MaterialLoc))
{
NoticeDemoViewModel.OpenMsg(EnumPromptType.Error, Application.Current.MainWindow, "提示", $"修改失败,该位置已有物料!");
return;
}
AccessoriesTB accessories = new AccessoriesTB() { Name = MaterialName, Loc = MaterialLoc, Id = _materialID, Description = MaterialDescription };
SqliteHelper.GetInstance.EditAccessories(accessories);
break;
case "调料":
if (SqliteHelper.GetInstance.GetSeasoningInfoByLoc(MaterialLoc))
{
NoticeDemoViewModel.OpenMsg(EnumPromptType.Error, Application.Current.MainWindow, "提示", $"修改失败,该位置已有物料!");
return;
}
SeasoningTB seasoning = new SeasoningTB() { Name = MaterialName, Loc = MaterialLoc, Id = _materialID, Description = MaterialDescription };
SqliteHelper.GetInstance.EditSeasoning(seasoning);
break;

BPASmartClient.Tourism/ViewModel/EditRecipeViewModel.cs → BPASmartClient.MorkCL/ViewModel/EditRecipeViewModel.cs View File


+ 135
- 0
BPASmartClient.MorkCL/ViewModel/ItemStorageViewModel.cs View File

@@ -0,0 +1,135 @@
using BPASmartClient.CustomResource.UserControls.MessageShow;
using BPASmartClient.MorkCL.Model.DB;
using BPASmartClient.MorkCL.Model.Json;
using BPASmartClient.MorkCL.Server;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BPASmartClient.MorkCL.ViewModel
{
public class ItemStorageViewModel:NotifyBase
{
public ItemStorageViewModel()
{
//加载读取数据。
AddTestData();

//IngredientsItorage =new ObservableCollection<ItemStroage> ( Json<ItemStroageInfo>.Data.IngredientsStorage);
//AccessoriesItorage =new ObservableCollection<ItemStroage> (Json<ItemStroageInfo>.Data.AccessoriesStorage);

IngredientsItorage = new ObservableCollection<ItemStroage>(new ItemStroage[12]);
AccessoriesItorage = new ObservableCollection<ItemStroage>(new ItemStroage[8]);

ActionManage.GetInstance.Register((() =>
{
Ingredients = new ObservableCollection<IngredientsTB>(SqliteHelper.GetInstance.GetIngredients());

}),"RefreshIngredients",true);
Ingredients = new ObservableCollection<IngredientsTB>(SqliteHelper.GetInstance.GetIngredients());


for (int i = 0; i < IngredientsItorage.Count; i++)
{
IngredientsItorage[i]=new ItemStroage();
}

for (int i = 0; i < AccessoriesItorage.Count; i++)
{
AccessoriesItorage[i] = new ItemStroage();
}


InStorageCommand = new BPARelayCommand<object>((o) =>
{
if (o != null && o is IngredientsTB ingredients)
{
foreach (ItemStroage item in IngredientsItorage)
{
if (item.IsEmploy == false)
{
item.MaterialID = ingredients.Id;
item.Name = ingredients.Name;
item.IsEmploy = true;
item.Weight = ScaleCurrentWeight;

Json<ItemStroageInfo>.Save();
NoticeDemoViewModel.OpenMsg(EnumPromptType.Success, Application.Current.MainWindow, "入库成功", $"物料{ingredients.Name}入库成功。");
return;
}
}
NoticeDemoViewModel.OpenMsg(EnumPromptType.Error, Application.Current.MainWindow, "入库失败", $"物料库已满。");
}
else
{
NoticeDemoViewModel.OpenMsg(EnumPromptType.Error, Application.Current.MainWindow, "入库失败", $"物料入库失败。");
}
});
}

void AddTestData()
{
ScaleCurrentWeight = 1.23f;
//Materials.Clear();
//for (int i = 1; i < 13; i++)
//{
// Materials.Add(new TempMaterial() { ID = 10000 + i, Loc = i.ToString(), Name = $"第{i}库位", Weight = new Random().NextSingle()*10000 });
//}

//Seasonings.Clear();
//for (int i = 1; i < 9; i++)
//{
// Seasonings.Add(new TempMaterial() { ID = 10000 + i, Loc = i.ToString(), Name = $"第{i}库位", Weight = new Random().NextSingle()*10000 });
//}
}


public BPARelayCommand<object> InStorageCommand { get; set; }

private float _ScaleCurrentWeight;
public float ScaleCurrentWeight { get { return _ScaleCurrentWeight; } set { _ScaleCurrentWeight = value; OnPropertyChanged(); } }

private IngredientsTB _SelectIngreditent;

public IngredientsTB SelectIngreditent
{
get { return _SelectIngreditent; }
set { _SelectIngreditent = value; OnPropertyChanged(); }
}


private ObservableCollection<ItemStroage> _IngredientsItorage;
/// <summary>
/// 主料库位。
/// </summary>
public ObservableCollection<ItemStroage> IngredientsItorage
{
get { return _IngredientsItorage; }
set { _IngredientsItorage = value; OnPropertyChanged(); }
}

private ObservableCollection<ItemStroage> _AccessoriesItorage;
/// <summary>
/// 辅料库位
/// </summary>
public ObservableCollection<ItemStroage> AccessoriesItorage
{
get { return _AccessoriesItorage; }
set { _AccessoriesItorage = value; OnPropertyChanged(); }
}
private ObservableCollection<IngredientsTB> _Ingredients ;
/// <summary>
/// 所有的主料数据。作为ComboBox的数据源。
/// </summary>
public ObservableCollection<IngredientsTB> Ingredients
{
get { return _Ingredients; }
set { _Ingredients = value; OnPropertyChanged(); }
}

}
}

BPASmartClient.Tourism/ViewModel/MonitorViewModel.cs → BPASmartClient.MorkCL/ViewModel/MonitorViewModel.cs View File


BPASmartClient.Tourism/ViewModel/RecipeManageViewModel.cs → BPASmartClient.MorkCL/ViewModel/RecipeManageViewModel.cs View File


BPASmartClient.Tourism/ViewModel/testViewModel.cs → BPASmartClient.MorkCL/ViewModel/testViewModel.cs View File


+ 0
- 62
BPASmartClient.Tourism/ViewModel/ItemStorageViewModel.cs View File

@@ -1,62 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BPASmartClient.MorkCL.ViewModel
{
public class ItemStorageViewModel:NotifyBase
{
public ItemStorageViewModel()
{
Materials = new ObservableCollection<TempMaterial>();
Seasonings = new ObservableCollection<TempMaterial>();
AddTestData();
}

void AddTestData()
{
ScaleCurrentWeight = 1.23f;
Materials.Clear();
for (int i = 1; i < 13; i++)
{
Materials.Add(new TempMaterial() { ID = 10000 + i, Loc = i.ToString(), Name = $"第{i}库位", Weight = new Random().NextSingle()*10000 });
}

Seasonings.Clear();
for (int i = 1; i < 9; i++)
{
Seasonings.Add(new TempMaterial() { ID = 10000 + i, Loc = i.ToString(), Name = $"第{i}库位", Weight = new Random().NextSingle()*10000 });
}
}

private float _ScaleCurrentWeight;
public float ScaleCurrentWeight { get { return _ScaleCurrentWeight; } set { _ScaleCurrentWeight = value; OnPropertyChanged(); } }

private ObservableCollection<TempMaterial> _Materials;

public ObservableCollection<TempMaterial> Materials
{
get { return _Materials; }
set { _Materials = value; OnPropertyChanged(); }
}

private ObservableCollection<TempMaterial> _Seasonings;

public ObservableCollection<TempMaterial> Seasonings
{
get { return _Seasonings; }
set { _Seasonings = value; OnPropertyChanged(); }
}

}
public class TempMaterial
{
public int ID { get; set; }
public string Name { get; set; }
public float Weight { get; set; }
public string Loc { get; set; }
}
}

+ 0
- 46
BPASmartClient.TourismCollege/App.xaml View File

@@ -1,46 +0,0 @@
<Application
x:Class="BPASmartClient.TourismCollege.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:con="clr-namespace:BPASmartClient.CustomResource.Converters;assembly=BPASmartClient.CustomResource"
xmlns:local="clr-namespace:BPASmartClient.TourismCollege">
<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>

<ResourceDictionary Source="/BPASmartClient.CustomResource;component/RecDictionarys/RecCheckBox.xaml" />
<ResourceDictionary Source="/BPASmartClient.CustomResource;component/RecDictionarys/RecTitleBarButton.xaml" />
<ResourceDictionary Source="/BPASmartClient.CustomResource;component/RecDictionarys/GlobalStyle.xaml" />
<ResourceDictionary Source="/BPASmartClient.CustomResource;component/RecDictionarys/RecComboBox.xaml" />
<ResourceDictionary Source="/BPASmartClient.CustomResource;component/RecDictionarys/RecIcoButtonStyle.xaml" />
<ResourceDictionary Source="/BPASmartClient.CustomResource;component/RecDictionarys/RecToggleButton.xaml" />
<ResourceDictionary Source="/BPASmartClient.CustomResource;component/RecDictionarys/BeveledRadioButtonStyle.xaml" />
<ResourceDictionary Source="/BPASmartClient.CustomResource;component/RecDictionarys/DatePickeerDictionary.xaml" />
<ResourceDictionary Source="/BPASmartClient.CustomResource;component/RecDictionarys/RecButtonStyle.xaml" />
<ResourceDictionary Source="/BPASmartClient.CustomResource;component/RecDictionarys/TextBoxStyle.xaml" />


<ResourceDictionary Source="/BPASmartClient.CustomResource;component/Themes/GenricStyle.xaml" />
<ResourceDictionary Source="/BPASmartClient.CustomResource;component/Themes/MyStyle.xaml" />

<ResourceDictionary>
<con:ColorConverter x:Key="ColorConverter" />
<con:TextConverter x:Key="TextConverter" />
<con:VisibleTypeConverter x:Key="VisibleTypeConverter" />
<con:StatusConverter x:Key="StatusConverter" />
<con:StringToIconConverter x:Key="StringToIconConverter" />
<con:BoolToVisibilityConvert x:Key="BoolToVisibilityConvert" />
<con:CountIsVisiableConvert x:Key="CountIsVisiableConvert" />
<con:BoolToFillColorConverter x:Key="BoolToFillColorConverter" />
<con:RecipeStatusConvert x:Key="RecipeStatusConvert" />
</ResourceDictionary>

<ResourceDictionary>
<ImageBrush x:Key="hbl" ImageSource="/BPASmartClient.CustomResource;component/Image/HBL.png" />
<ImageBrush x:Key="dbxt" ImageSource="/BPASmartClient.CustomResource;component/Image/顶部线条.png" />
</ResourceDictionary>

</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Application.Resources>
</Application>

+ 0
- 296
BPASmartClient.TourismCollege/App.xaml.cs View File

@@ -1,296 +0,0 @@
using BPASmartClient.CustomResource.Pages.ViewModel;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using System.Windows;

namespace BPASmartClient.TourismCollege
{
/// <summary>
/// Interaction logic for App.xaml
/// </summary>
public partial class App : Application
{
public static Window MainWindow;
protected override void OnStartup(StartupEventArgs e)
{
bool createNew;
MessageLog.GetInstance.NotifyShow = new Action<string>(o =>
{
DebugLogViewModel.MessageModels.Add(new MessageModel()
{
LogInfo = o,
Forground = System.Windows.Media.Brushes.DeepSkyBlue
});
});
MessageLog.GetInstance.NotifyShowEx = new Action<string>(o =>
{
DebugLogViewModel.MessageModels.Add(new MessageModel()
{
LogInfo = o,
Forground = System.Windows.Media.Brushes.Red
});
});
new EventWaitHandle(false, EventResetMode.AutoReset, "BPASmartClient.TourismCollege", out createNew);
if (!createNew)
{
MessageBox.Show("程序已启动");
App.Current.Shutdown();
Environment.Exit(0);
}
base.OnStartup(e);
SystemHelper.GetInstance.CreateDesktopShortcut();
MenuInit();
DataInit();
MainView mv = new MainView();
mv.TitleName = $"智能炒锅控制系统";
LoginView lv = new LoginView();
var res = lv.ShowDialog();
if (res != null && res == true)
{
BPASmartClient.CustomResource.Pages.Model.MessageNotify.GetInstance.ShowUserLog("用户登录");
mv.Show();
}
else
mv.Close();
MainWindow = mv;
}

protected override void OnExit(ExitEventArgs e)
{
base.OnExit(e);
BPASmartClient.CustomResource.Pages.Model.MessageNotify.GetInstance.LogSave();
TaskManage.GetInstance.Dispose();
}

private void MenuInit()
{
NfcServer.GetInstance.Init();

#region 配方管理菜单
ObservableCollection<SubMenumodel> RecipeManage = new ObservableCollection<SubMenumodel>();
RecipeManage.Add(new SubMenumodel()
{
SubMenuName = "配方管理",
SubMenuPermission = new Permission[] { Permission.管理员, Permission.操作员, Permission.观察员, Permission.技术员 },
AssemblyName = "BPASmartClient.DosingSystem",
ToggleWindowPath = "View.RecipeSettingsView"
});

RecipeManage.Add(new SubMenumodel()
{
SubMenuName = "配方下发",
SubMenuPermission = new Permission[] { Permission.管理员, Permission.操作员, Permission.观察员, Permission.技术员 },
AssemblyName = "BPASmartClient.DosingSystem",
ToggleWindowPath = "View.RecipeControlView"
});

MenuManage.GetInstance.menuModels.Add(new MenuModel()
{
MainMenuIcon = "&#xe683;",
MainMenuPermission = new Permission[] { Permission.管理员, Permission.操作员, Permission.观察员, Permission.技术员 },
MainMenuName = "配方管理",
Alias = "Recipe Management",
subMenumodels = RecipeManage,
});
#endregion

#region 参数设置
ObservableCollection<SubMenumodel> ParSet = new ObservableCollection<SubMenumodel>();
ParSet.Add(new SubMenumodel()
{
SubMenuName = "原料参数设置",
SubMenuPermission = new Permission[] { Permission.管理员, Permission.操作员, Permission.观察员, Permission.技术员 },
AssemblyName = "BPASmartClient.DosingSystem",
ToggleWindowPath = "View.DeviceMaterialParView"
});

ParSet.Add(new SubMenumodel()
{
SubMenuName = "设备参数设置",
SubMenuPermission = new Permission[] { Permission.管理员, Permission.操作员, Permission.观察员, Permission.技术员 },
AssemblyName = "BPASmartClient.DosingSystem",
ToggleWindowPath = "View.CommParSetView"
});

//ParSet.Add(new SubMenumodel()
//{
// SubMenuName = "出料口管理设置",
// SubMenuPermission = new Permission[] { Permission.管理员 },
// AssemblyName = "BPASmartClient.DosingSystem",
// ToggleWindowPath = "View.OutletManagementView"
//});

MenuManage.GetInstance.menuModels.Add(new MenuModel()
{
MainMenuIcon = "&#xe62d;",
MainMenuPermission = new Permission[] { Permission.管理员, Permission.操作员, Permission.观察员, Permission.技术员 },
MainMenuName = "参数设置",
Alias = "Parameter Set",
subMenumodels = ParSet,
});
#endregion

#region 手动控制
ObservableCollection<SubMenumodel> ManualControl = new ObservableCollection<SubMenumodel>();
ManualControl.Add(new SubMenumodel()
{
SubMenuName = "气缸手动控制",
SubMenuPermission = new Permission[] { Permission.管理员, Permission.操作员, Permission.观察员, Permission.技术员 },
AssemblyName = "BPASmartClient.DosingSystem",
ToggleWindowPath = "View.ManualControlView"
});

ManualControl.Add(new SubMenumodel()
{
SubMenuName = "输送带手动控制",
SubMenuPermission = new Permission[] { Permission.管理员, Permission.操作员, Permission.观察员, Permission.技术员 },
AssemblyName = "BPASmartClient.DosingSystem",
ToggleWindowPath = "View.ConveyerBeltManualView"
});

ManualControl.Add(new SubMenumodel()
{
SubMenuName = "配料输送带控制",
SubMenuPermission = new Permission[] { Permission.管理员, Permission.操作员, Permission.观察员, Permission.技术员 },
AssemblyName = "BPASmartClient.DosingSystem",
ToggleWindowPath = "View.TempManageControlView"
});

//ManualControl.Add(new SubMenumodel()
//{
// SubMenuName = "料仓控制",
// SubMenuPermission = new Permission[] { Permission.管理员, Permission.操作员, Permission.技术员 },
// AssemblyName = "BPASmartClient.DosingSystem",
// ToggleWindowPath = "View.StockControlView"
//});
MenuManage.GetInstance.menuModels.Add(new MenuModel()
{
MainMenuIcon = "&#xe622;",
MainMenuName = "手动控制",
MainMenuPermission = new Permission[] { Permission.管理员, Permission.操作员, Permission.观察员, Permission.技术员 },
Alias = "Parameter Set",
subMenumodels = ManualControl,
});
#endregion

#region 消息日志
ObservableCollection<SubMenumodel> InfoLog = new ObservableCollection<SubMenumodel>();
InfoLog.Add(new SubMenumodel()
{
SubMenuName = "操作日志",
SubMenuPermission = new Permission[] { Permission.管理员, Permission.操作员, Permission.观察员, Permission.技术员 },
AssemblyName = "BPASmartClient.CustomResource",
ToggleWindowPath = "Pages.View.UserLogView"
});

InfoLog.Add(new SubMenumodel()
{
SubMenuName = "运行日志",
SubMenuPermission = new Permission[] { Permission.管理员, Permission.操作员, Permission.观察员, Permission.技术员 },
AssemblyName = "BPASmartClient.CustomResource",
ToggleWindowPath = "Pages.View.RunLogView"
});

InfoLog.Add(new SubMenumodel()
{
SubMenuName = "报警记录",
SubMenuPermission = new Permission[] { Permission.管理员, Permission.操作员, Permission.观察员, Permission.技术员 },
AssemblyName = "BPASmartClient.CustomResource",
ToggleWindowPath = "Pages.View.AlarmView"
});

InfoLog.Add(new SubMenumodel()
{
SubMenuName = "调试日志",
SubMenuPermission = new Permission[] { Permission.管理员, Permission.操作员, Permission.观察员, Permission.技术员 },
AssemblyName = "BPASmartClient.CustomResource",
ToggleWindowPath = "Pages.View.DebugLogView"
});

MenuManage.GetInstance.menuModels.Add(new MenuModel()
{
MainMenuIcon = "&#xe668;",
MainMenuName = "消息日志",
MainMenuPermission = new Permission[] { Permission.管理员, Permission.操作员, Permission.观察员, Permission.技术员 },
Alias = "Message Log",
subMenumodels = InfoLog,
});
#endregion

#region 硬件设备监控
ObservableCollection<SubMenumodel> DeviceMonitor = new ObservableCollection<SubMenumodel>();
DeviceMonitor.Add(new SubMenumodel()
{
SubMenuName = "原料设备列表",
SubMenuPermission = new Permission[] { Permission.管理员, Permission.操作员, Permission.观察员, Permission.技术员 },
AssemblyName = "BPASmartClient.DosingSystem",
ToggleWindowPath = "View.DeviceListView"
});

DeviceMonitor.Add(new SubMenumodel()
{
SubMenuName = "设备状态",
SubMenuPermission = new Permission[] { Permission.管理员, Permission.操作员, Permission.观察员, Permission.技术员 },
AssemblyName = "BPASmartClient.DosingSystem",
ToggleWindowPath = "View.HardwareStatusView"
});

MenuManage.GetInstance.menuModels.Add(new MenuModel()
{
MainMenuIcon = "&#xe603;",
MainMenuName = "设备监控",
MainMenuPermission = new Permission[] { Permission.管理员, Permission.操作员, Permission.观察员, Permission.技术员 },
Alias = "Device Monitor",
subMenumodels = DeviceMonitor,
});
#endregion

#region 用户管理
ObservableCollection<SubMenumodel> UserManager = new ObservableCollection<SubMenumodel>();
UserManager.Add(new SubMenumodel()
{
SubMenuName = "用户登录",
SubMenuPermission = new Permission[] { Permission.管理员, Permission.操作员, Permission.观察员, Permission.技术员 },
AssemblyName = "BPASmartClient.CustomResource",
ToggleWindowPath = "Pages.View.SubPagLoginView"
});

UserManager.Add(new SubMenumodel()
{
SubMenuName = "密码修改",
SubMenuPermission = new Permission[] { Permission.管理员, Permission.操作员, Permission.观察员, Permission.技术员 },
AssemblyName = "BPASmartClient.CustomResource",
ToggleWindowPath = "Pages.View.PasswordChangeView"
});
UserManager.Add(new SubMenumodel()
{
SubMenuName = "用户管理",
SubMenuPermission = new Permission[] { Permission.管理员, Permission.操作员, Permission.观察员, Permission.技术员 },
AssemblyName = "BPASmartClient.CustomResource",
ToggleWindowPath = "Pages.View.UserManagerView"
});

MenuManage.GetInstance.menuModels.Add(new MenuModel()
{
MainMenuIcon = "&#xe66d;",
MainMenuName = "用户管理",
MainMenuPermission = new Permission[] { Permission.管理员, Permission.操作员, Permission.观察员, Permission.技术员 },
Alias = "User Management",
subMenumodels = UserManager,
});
#endregion
}

private void DataInit()
{

}

}
}

+ 0
- 10
BPASmartClient.TourismCollege/AssemblyInfo.cs View File

@@ -1,10 +0,0 @@
using System.Windows;

[assembly: ThemeInfo(
ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
//(used if a resource is not found in the page,
// or application resource dictionaries)
ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
//(used if a resource is not found in the page,
// app, or any theme specific resource dictionaries)
)]

+ 0
- 35
BPASmartClient.TourismCollege/BPASmartClient.TourismCollege.csproj View File

@@ -1,35 +0,0 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net6.0-windows</TargetFramework>
<Nullable>enable</Nullable>
<UseWPF>true</UseWPF>
<ApplicationIcon>hbl.ico</ApplicationIcon>
</PropertyGroup>

<ItemGroup>
<Content Include="hbl.ico" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\BPASmartClient.CustomResource\BPASmartClient.CustomResource.csproj" />
<Compile Remove="Views\View\**" />
<EmbeddedResource Remove="Views\View\**" />
<None Remove="Views\View\**" />
<Page Remove="Views\View\**" />
</ItemGroup>

<ItemGroup>
<Folder Include="Views\" />
<Folder Include="ViewModels\" />
<Folder Include="Server\" />
<Folder Include="Model\" />
<ProjectReference Include="..\BPASmartClient.CustomResource\BPASmartClient.CustomResource.csproj" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="BPA.Communication" Version="1.0.107" />
</ItemGroup>

</Project>

+ 0
- 21
BPASmartClient.TourismCollege/GlobalUsing.cs View File

@@ -1,21 +0,0 @@
global using System;
global using System.Collections.Generic;
global using System.Collections.ObjectModel;
global using System.Configuration;
global using System.Data;
global using System.Linq;
global using System.Threading;
global using System.Threading.Tasks;
global using System.Windows;
global using System.Diagnostics;
global using System.IO;
global using System.Drawing;
global using System.Windows.Media;
global using BPA.Helper;
global using BPA.Communication;
global using BPASmartClient.CustomResource.Pages.Enums;
global using BPASmartClient.CustomResource.Pages.Model;
global using BPASmartClient.CustomResource.Pages.View;
global using BPASmartClient.CustomResource.Pages.ViewModel;



+ 0
- 12
BPASmartClient.TourismCollege/Viewmodels/ItemStorageViewModel.cs View File

@@ -1,12 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BPASmartClient.TourismCollege.Viewmodels
{
internal class ItemStorageViewModel
{
}
}

+ 0
- 12
BPASmartClient.TourismCollege/Viewmodels/RecipeManageViewModel.cs View File

@@ -1,12 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BPASmartClient.TourismCollege.ViewModels
{
public class RecipeManageViewModel
{
}
}

+ 0
- 57
BPASmartClient.TourismCollege/Views/ItemStorageView.xaml View File

@@ -1,57 +0,0 @@
<UserControl x:Class="BPASmartClient.TourismCollege.Views.ItemStorageView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:BPASmartClient.TourismCollege.Views"
mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="800">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="200" />
<ColumnDefinition Width="1*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="0.3*" />
<RowDefinition Height="0.7*" />
</Grid.RowDefinitions>


<!--#region 入库电子称状态 -->
<StackPanel>
<TextBlock Text="{Binding Weight,StringFormat=当前重量:{0}g}" Width="200"/>
</StackPanel>
<!--#endregion-->

<!--#region 入库操作 -->
<StackPanel Grid.Row="1" Margin="5">
<TextBlock Text="入库名称:"/>
<ComboBox />

<Button Content="入库" Margin="0,10"/>
</StackPanel>
<!--#endregion-->
<!--#region 辅料仓 -->
<UniformGrid Columns="8" Grid.Column="1" Margin="3" Background="ForestGreen">
</UniformGrid>
<!--#endregion-->
<!--#region 原料仓 -->
<ListView Grid.Row="1" Grid.Column="1" Margin="3" BorderThickness="1" >
<ListView.ItemsPanel>
<ItemsPanelTemplate>
<UniformGrid Columns="4" Rows="3" HorizontalAlignment="Left" VerticalAlignment="Top"/>
</ItemsPanelTemplate>
</ListView.ItemsPanel>

<ListView.ItemTemplate>
<DataTemplate>
<Border Background="Black"/>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
<!--#endregion-->
</Grid>
</UserControl>

+ 0
- 28
BPASmartClient.TourismCollege/Views/ItemStorageView.xaml.cs View File

@@ -1,28 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace BPASmartClient.TourismCollege.Views
{
/// <summary>
/// ItemStorageView.xaml 的交互逻辑
/// </summary>
public partial class ItemStorageView : UserControl
{
public ItemStorageView()
{
InitializeComponent();
}
}
}

+ 0
- 18
BPASmartClient.TourismCollege/Views/RecipeManageView.xaml View File

@@ -1,18 +0,0 @@
<UserControl x:Class="BPASmartClient.TourismCollege.Views.RecipeManageView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:BPASmartClient.TourismCollege.Views"
mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="800">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="50" />
<RowDefinition Height="1*" />
</Grid.RowDefinitions>
<!--#region 操作栏 -->
<!--#endregion-->
</Grid>
</UserControl>

+ 0
- 29
BPASmartClient.TourismCollege/Views/RecipeManageView.xaml.cs View File

@@ -1,29 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace BPASmartClient.TourismCollege.Views
{
/// <summary>
/// RecipeManageView.xaml 的交互逻辑
/// </summary>
public partial class RecipeManageView : UserControl
{
public RecipeManageView()
{
InitializeComponent();
}
}
}

BIN
View File


+ 1
- 1
BPASmartClient/BPASmartClient.csproj View File

@@ -45,7 +45,7 @@
<ProjectReference Include="..\BPASmartClient.MorkT_Container\BPASmartClient.MorkT_Container.csproj" />
<ProjectReference Include="..\BPASmartClient.MorkT_HQ\BPASmartClient.MorkTHQ.csproj" />
<ProjectReference Include="..\BPASmartClient.SCChip\BPASmartClient.SCChip.csproj" />
<ProjectReference Include="..\BPASmartClient.Tourism\BPASmartClient.MorkCL.csproj" />
<ProjectReference Include="..\BPASmartClient.MorkCL\BPASmartClient.MorkCL.csproj" />
<ProjectReference Include="..\BPASmartClient.ViewModel\BPASmartClient.ViewModel.csproj" />
</ItemGroup>



+ 22
- 22
SmartClient.sln View File

@@ -162,7 +162,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BPASmartClient.MorkMV1", "B
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BPASmartClient.FoodStationTest", "BPASmartClient.FoodStationTest\BPASmartClient.FoodStationTest.csproj", "{82D5C479-7C38-41D6-8B42-24D4EC32D94F}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BPASmartClient.MorkCL", "BPASmartClient.Tourism\BPASmartClient.MorkCL.csproj", "{52F2D7ED-6520-45EF-BCC4-565E5267973B}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BPASmartClient.MorkCL", "BPASmartClient.MorkCL\BPASmartClient.MorkCL.csproj", "{918B73A6-B6FF-46FE-8C96-8474A5BD648B}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -1518,26 +1518,26 @@ Global
{82D5C479-7C38-41D6-8B42-24D4EC32D94F}.Release|x64.Build.0 = Release|Any CPU
{82D5C479-7C38-41D6-8B42-24D4EC32D94F}.Release|x86.ActiveCfg = Release|Any CPU
{82D5C479-7C38-41D6-8B42-24D4EC32D94F}.Release|x86.Build.0 = Release|Any CPU
{52F2D7ED-6520-45EF-BCC4-565E5267973B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{52F2D7ED-6520-45EF-BCC4-565E5267973B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{52F2D7ED-6520-45EF-BCC4-565E5267973B}.Debug|ARM.ActiveCfg = Debug|Any CPU
{52F2D7ED-6520-45EF-BCC4-565E5267973B}.Debug|ARM.Build.0 = Debug|Any CPU
{52F2D7ED-6520-45EF-BCC4-565E5267973B}.Debug|ARM64.ActiveCfg = Debug|Any CPU
{52F2D7ED-6520-45EF-BCC4-565E5267973B}.Debug|ARM64.Build.0 = Debug|Any CPU
{52F2D7ED-6520-45EF-BCC4-565E5267973B}.Debug|x64.ActiveCfg = Debug|Any CPU
{52F2D7ED-6520-45EF-BCC4-565E5267973B}.Debug|x64.Build.0 = Debug|Any CPU
{52F2D7ED-6520-45EF-BCC4-565E5267973B}.Debug|x86.ActiveCfg = Debug|Any CPU
{52F2D7ED-6520-45EF-BCC4-565E5267973B}.Debug|x86.Build.0 = Debug|Any CPU
{52F2D7ED-6520-45EF-BCC4-565E5267973B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{52F2D7ED-6520-45EF-BCC4-565E5267973B}.Release|Any CPU.Build.0 = Release|Any CPU
{52F2D7ED-6520-45EF-BCC4-565E5267973B}.Release|ARM.ActiveCfg = Release|Any CPU
{52F2D7ED-6520-45EF-BCC4-565E5267973B}.Release|ARM.Build.0 = Release|Any CPU
{52F2D7ED-6520-45EF-BCC4-565E5267973B}.Release|ARM64.ActiveCfg = Release|Any CPU
{52F2D7ED-6520-45EF-BCC4-565E5267973B}.Release|ARM64.Build.0 = Release|Any CPU
{52F2D7ED-6520-45EF-BCC4-565E5267973B}.Release|x64.ActiveCfg = Release|Any CPU
{52F2D7ED-6520-45EF-BCC4-565E5267973B}.Release|x64.Build.0 = Release|Any CPU
{52F2D7ED-6520-45EF-BCC4-565E5267973B}.Release|x86.ActiveCfg = Release|Any CPU
{52F2D7ED-6520-45EF-BCC4-565E5267973B}.Release|x86.Build.0 = Release|Any CPU
{918B73A6-B6FF-46FE-8C96-8474A5BD648B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{918B73A6-B6FF-46FE-8C96-8474A5BD648B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{918B73A6-B6FF-46FE-8C96-8474A5BD648B}.Debug|ARM.ActiveCfg = Debug|Any CPU
{918B73A6-B6FF-46FE-8C96-8474A5BD648B}.Debug|ARM.Build.0 = Debug|Any CPU
{918B73A6-B6FF-46FE-8C96-8474A5BD648B}.Debug|ARM64.ActiveCfg = Debug|Any CPU
{918B73A6-B6FF-46FE-8C96-8474A5BD648B}.Debug|ARM64.Build.0 = Debug|Any CPU
{918B73A6-B6FF-46FE-8C96-8474A5BD648B}.Debug|x64.ActiveCfg = Debug|Any CPU
{918B73A6-B6FF-46FE-8C96-8474A5BD648B}.Debug|x64.Build.0 = Debug|Any CPU
{918B73A6-B6FF-46FE-8C96-8474A5BD648B}.Debug|x86.ActiveCfg = Debug|Any CPU
{918B73A6-B6FF-46FE-8C96-8474A5BD648B}.Debug|x86.Build.0 = Debug|Any CPU
{918B73A6-B6FF-46FE-8C96-8474A5BD648B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{918B73A6-B6FF-46FE-8C96-8474A5BD648B}.Release|Any CPU.Build.0 = Release|Any CPU
{918B73A6-B6FF-46FE-8C96-8474A5BD648B}.Release|ARM.ActiveCfg = Release|Any CPU
{918B73A6-B6FF-46FE-8C96-8474A5BD648B}.Release|ARM.Build.0 = Release|Any CPU
{918B73A6-B6FF-46FE-8C96-8474A5BD648B}.Release|ARM64.ActiveCfg = Release|Any CPU
{918B73A6-B6FF-46FE-8C96-8474A5BD648B}.Release|ARM64.Build.0 = Release|Any CPU
{918B73A6-B6FF-46FE-8C96-8474A5BD648B}.Release|x64.ActiveCfg = Release|Any CPU
{918B73A6-B6FF-46FE-8C96-8474A5BD648B}.Release|x64.Build.0 = Release|Any CPU
{918B73A6-B6FF-46FE-8C96-8474A5BD648B}.Release|x86.ActiveCfg = Release|Any CPU
{918B73A6-B6FF-46FE-8C96-8474A5BD648B}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -1613,7 +1613,7 @@ Global
{CB3E9835-2FF2-4A76-A0EE-0819EEC8CAE7} = {8712125E-14CD-4E1B-A1CE-4BDE03805942}
{2D2200CF-7A66-40EA-998A-F0CE9BC2B3BB} = {9FB27073-61A0-4FE3-94DB-5FDDE062332F}
{82D5C479-7C38-41D6-8B42-24D4EC32D94F} = {8712125E-14CD-4E1B-A1CE-4BDE03805942}
{52F2D7ED-6520-45EF-BCC4-565E5267973B} = {9FB27073-61A0-4FE3-94DB-5FDDE062332F}
{918B73A6-B6FF-46FE-8C96-8474A5BD648B} = {9FB27073-61A0-4FE3-94DB-5FDDE062332F}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {9AEC9B81-0222-4DE9-B642-D915C29222AC}


Loading…
Cancel
Save