2025-07-09 13:06:21 +08:00
|
|
|
using System.Windows;
|
2025-07-09 19:38:36 +08:00
|
|
|
using System.Windows.Controls;
|
2025-07-19 11:11:01 +08:00
|
|
|
using DMS.WPF.ViewModels.Dialogs;
|
2025-07-09 13:06:21 +08:00
|
|
|
using iNKORE.UI.WPF.Modern.Controls;
|
|
|
|
|
|
2025-07-26 10:05:43 +08:00
|
|
|
namespace DMS.WPF.Views.Dialogs;
|
2025-07-09 13:06:21 +08:00
|
|
|
|
|
|
|
|
/// <summary>
|
2025-08-25 20:16:57 +08:00
|
|
|
/// ImportOpcUaDialog.xaml 的交互逻辑
|
2025-07-09 13:06:21 +08:00
|
|
|
/// </summary>
|
2025-08-25 20:16:57 +08:00
|
|
|
public partial class ImportOpcUaDialog : ContentDialog
|
2025-07-09 13:06:21 +08:00
|
|
|
{
|
|
|
|
|
|
2025-08-25 21:26:18 +08:00
|
|
|
public ImportOpcUaDialog()
|
2025-07-09 13:06:21 +08:00
|
|
|
{
|
|
|
|
|
InitializeComponent();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void ContentDialog_PrimaryButtonClick(ContentDialog sender, ContentDialogButtonClickEventArgs args)
|
|
|
|
|
{
|
|
|
|
|
// 在这里处理导入逻辑,例如获取选中的变量
|
|
|
|
|
// ViewModel.ImportSelectedVariables();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void ContentDialog_SecondaryButtonClick(ContentDialog sender, ContentDialogButtonClickEventArgs args)
|
|
|
|
|
{
|
|
|
|
|
// 处理取消逻辑
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private async void TreeView_SelectedItemChanged(object sender, RoutedPropertyChangedEventArgs<object> e)
|
|
|
|
|
{
|
2025-07-26 10:05:43 +08:00
|
|
|
// if (e.NewValue is OpcUaNode selectedNode)
|
|
|
|
|
// {
|
|
|
|
|
// await ViewModel.LoadNodeVariables(selectedNode);
|
|
|
|
|
// }
|
2025-07-09 13:06:21 +08:00
|
|
|
}
|
2025-07-09 19:38:36 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
private void Selector_OnSelectionChanged(object sender, SelectionChangedEventArgs args)
|
|
|
|
|
{
|
2025-07-26 10:05:43 +08:00
|
|
|
// if (args.AddedItems!=null && args.AddedItems.Count>0)
|
|
|
|
|
// {
|
|
|
|
|
// foreach (var item in args.AddedItems)
|
|
|
|
|
// {
|
|
|
|
|
// ViewModel.SelectedVariables.Add((Variable)item);
|
|
|
|
|
// }
|
|
|
|
|
//
|
|
|
|
|
// }
|
2025-07-09 19:38:36 +08:00
|
|
|
}
|
2025-07-09 13:06:21 +08:00
|
|
|
}
|