Non puoi selezionare più di 25 argomenti
Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.
|
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using Microsoft.Toolkit.Mvvm.ComponentModel;
- using System.Collections.Concurrent;
- using System.Collections.ObjectModel;
- using System.Windows;
- using BPASmartClient.Helper;
- using Microsoft.Toolkit.Mvvm.Input;
- using BPASmartClient.DosingHKProject.View;
- using BPASmartClient.DosingHKProject.Model;
-
- namespace BPASmartClient.DosingHKProject.ViewModel
- {
- public class DeviceListViewModel : ObservableObject
- {
- public DeviceListViewModel()
- {
- ChangeNameCommand = new RelayCommand<object>((o) =>
- {
- if (o != null && o is string str)
- {
- ChangeDeviceNameView cdn = new ChangeDeviceNameView();
- ActionManage.GetInstance.Send("ChangeDeviceNameViewOpen", str);
- cdn.ShowDialog();
- }
- });
- devices = DeviceInquire.GetInstance.devices;
- }
-
- public RelayCommand<object> ChangeNameCommand { get; set; }
-
- //public static ObservableCollection<Devices> devices { get; set; } = new ObservableCollection<Devices>();
- public ObservableCollection<Devices> devices { get; set; }
- }
-
- public class Devices : ObservableObject
- {
- public string IpAddress { get { return _mIpAddress; } set { _mIpAddress = value; OnPropertyChanged(); } }
- private string _mIpAddress;
-
- public string DeviceName { get { return _mDeviceName; } set { _mDeviceName = value; OnPropertyChanged(); } }
- private string _mDeviceName;
-
- }
- }
|