RobotConfigAddOrEditView.xaml.cs
916 Bytes
using HHECS.RobotTool.ViewModel.RobotConfigVM;
using Microsoft.Extensions.DependencyInjection;
using RobotTool;
using System.Windows;
namespace HHECS.RobotTool.View.RobotConfigView
{
/// <summary>
/// RobotConfigAddOrEditView.xaml 的交互逻辑
/// </summary>
public partial class RobotConfigAddOrEditView : Window
{
public RobotConfigAddOrEditView()
{
InitializeComponent();
var vm = App.Current.Services.GetService<RobotConfigAddOrEditVM>()!;
vm.Owner = this;
vm.InitialData();
DataContext = vm;
}
public RobotConfigAddOrEditView(int robotConfigId)
{
InitializeComponent();
var vm = App.Current.Services.GetService<RobotConfigAddOrEditVM>()!;
vm.Owner = this;
vm.InitialData(robotConfigId);
DataContext = vm;
}
}
}