49 lines
1.2 KiB
C#
49 lines
1.2 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using System.Windows.Input;
|
|
using Aurora.Api;
|
|
using Aurora.View;
|
|
|
|
namespace AuroraMotionBoard.Ajin.Views
|
|
{
|
|
public class UCAJINDeviceViewModel
|
|
{
|
|
public ICommand CMD_RescanLegacy { get; }
|
|
public ICommand CMD_Rescan { get; }
|
|
public ICommand CMD_MotFileLoad { get; }
|
|
public ICommand CMD_ReInit { get; }
|
|
public AJINDevice _dev;
|
|
public UCAJINDeviceViewModel(Device dev)
|
|
{
|
|
_dev = dev as AJINDevice;
|
|
CMD_RescanLegacy = new DelegateCommand(OnRescanLegacy);
|
|
CMD_Rescan = new DelegateCommand(OnRescan);
|
|
CMD_MotFileLoad = new DelegateCommand(OnMotFileLoad);
|
|
CMD_ReInit = new DelegateCommand(OnReInit);
|
|
}
|
|
|
|
private void OnReInit(object obj)
|
|
{
|
|
_dev.ReInitialize();
|
|
}
|
|
|
|
private void OnMotFileLoad(object obj)
|
|
{
|
|
_dev.LoadMotFile();
|
|
}
|
|
|
|
private void OnRescanLegacy(object obj)
|
|
{
|
|
_dev.SSCNET_DeviceRescan();
|
|
}
|
|
|
|
private void OnRescan(object obj)
|
|
{
|
|
_dev.Rescan();
|
|
}
|
|
}
|
|
}
|