添加 MX-PD-盘古 项目文件

将 MX-PD-盘古 - new 目录下的所有文件添加到主仓库
This commit is contained in:
Shi.Ji
2026-05-18 11:43:09 +08:00
parent 03632a379d
commit e31d3560bb
739 changed files with 99783 additions and 0 deletions

View File

@@ -0,0 +1,42 @@
using MainShell.Hardware;
using MainShell.Models;
using Stylet;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace MainShell.ToolBox.ViewModel
{
public class MapCamLightViewModel : PropertyChangedBase
{
private MapCamLightConfig _mapCamLightConfig = new MapCamLightConfig();
public MapCamLightConfig MapCamLightConfig
{
get { return _mapCamLightConfig; }
set { SetAndNotify(ref _mapCamLightConfig, value); }
}
private readonly HardwareManager _hardwareManager;
public MapCamLightViewModel(HardwareManager hardwareManager)
{
this._hardwareManager = hardwareManager;
_mapCamLightConfig.PropertyChanged -= MapCamLightConfig_PropertyChanged;
_mapCamLightConfig.PropertyChanged += MapCamLightConfig_PropertyChanged;
}
private void MapCamLightConfig_PropertyChanged(object sender, PropertyChangedEventArgs e)
{
if(e.PropertyName==nameof(MapCamLightConfig.BlueLight))
{
_hardwareManager.Map_BlueLight.SetIntensity(MapCamLightConfig.BlueLight);
}
else if(e.PropertyName==nameof(MapCamLightConfig.RedLight))
{
_hardwareManager.Map_RedLight.SetIntensity(MapCamLightConfig.RedLight);
}
}
}
}