Browse Source

增加PropertyChanged.Fody

master
applelon 2 years ago
parent
commit
37589231e9
4 changed files with 9 additions and 1 deletions
  1. +3
    -0
      HBLConsole.Debug/FodyWeavers.xml
  2. +1
    -0
      HBLConsole.Debug/HBLConsole.Debug.csproj
  3. +4
    -1
      HBLConsole.Debug/ViewModel/ViewModel_MORKIC.cs
  4. +1
    -0
      HBLConsole.Factory/SimpleFactory.cs

+ 3
- 0
HBLConsole.Debug/FodyWeavers.xml View File

@@ -0,0 +1,3 @@
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd">
<PropertyChanged />
</Weavers>

+ 1
- 0
HBLConsole.Debug/HBLConsole.Debug.csproj View File

@@ -9,6 +9,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="PropertyChanged.Fody" Version="3.4.0" />
<PackageReference Include="Stylet" Version="1.3.6.0" />
</ItemGroup>



+ 4
- 1
HBLConsole.Debug/ViewModel/ViewModel_MORKIC.cs View File

@@ -2,6 +2,7 @@
using HBLConsole.Service;
using HBLDevice.Coffee;
using HBLDevice.IceCream;
using PropertyChanged;
using System;
using System.Collections.Generic;
using System.Linq;
@@ -11,6 +12,7 @@ using System.Threading.Tasks;

namespace HBLConsole.Debug
{
[AddINotifyPropertyChangedInterface]
internal class ViewModel_MORKIC
{
#region 咖啡机
@@ -102,7 +104,7 @@ namespace HBLConsole.Debug

ThreadOperate.GetInstance.StartLong(new Action(() =>
{
CoffeeStatus = MorkCStatus.GetInstance().CoffeeStatus;
//CoffeeStatus = MorkCStatus.GetInstance().CoffeeStatus;
AppStatus = MorkCStatus.GetInstance().AppStatus;
Warning = MorkCStatus.GetInstance().Warning;
CaffeeFault = MorkCStatus.GetInstance().Fault;
@@ -115,6 +117,7 @@ namespace HBLConsole.Debug
CurrentMode = MorkIStatus.GetInstance().CurrentMode;
IceCreamFault = MorkIStatus.GetInstance().Fault;
CXB = MorkIStatus.GetInstance().CXB;

Thread.Sleep(500);
}), "MORK IC-状态刷新");
}


+ 1
- 0
HBLConsole.Factory/SimpleFactory.cs View File

@@ -74,6 +74,7 @@ namespace HBLConsole.Factory
/// </summary>
public void DeviceInit()
{
return;
string NameSpace = $"HBLConsole.{DeviceType}";//Load 加载的是dll的名称,GetType获取的是全命名空间下的类
Type type = Assembly.Load(NameSpace).GetType($"{NameSpace}.Control_{DeviceType}");
control = Activator.CreateInstance(type) as IControl;


Loading…
Cancel
Save