添加 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,52 @@
using MainShell.Hardware;
using MainShell.Models;
using Stylet;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
namespace MainShell.ToolBox.ViewModel
{
public class DownCamLightViewModel : PropertyChangedBase
{
private DownCamLightConfig _downCamLightConfig = new DownCamLightConfig();
public DownCamLightConfig DownCamLightConfig
{
get { return _downCamLightConfig; }
set { SetAndNotify(ref _downCamLightConfig, value); }
}
private readonly HardwareManager _hardwareManager;
public DownCamLightViewModel(HardwareManager hardwareManager)
{
this._hardwareManager = hardwareManager;
_downCamLightConfig.PropertyChanged -= _downCamLightConfig_PropertyChanged;
_downCamLightConfig.PropertyChanged += _downCamLightConfig_PropertyChanged;
}
private void _downCamLightConfig_PropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e)
{
if(e.PropertyName == nameof(DownCamLightConfig.RingBlueLight))
{
Debug.WriteLine("RingBlueLight changed to: " + DownCamLightConfig.RingBlueLight);
_hardwareManager.Down_RingBlueLight.SetIntensity(DownCamLightConfig.RingBlueLight);
}
else if(e.PropertyName == nameof(DownCamLightConfig.RingRedLight))
{
_hardwareManager.Down_RingRedLight.SetIntensity(DownCamLightConfig.RingRedLight);
}
else if(e.PropertyName == nameof(DownCamLightConfig.PointBlueLight))
{
_hardwareManager.Down_PointBlueLight.SetIntensity(DownCamLightConfig.PointBlueLight);
}
else if(e.PropertyName == nameof(DownCamLightConfig.PointRedLight))
{
_hardwareManager.Down_PointRedLight.SetIntensity(DownCamLightConfig.PointRedLight);
}
}
}
}