|
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using BPA.Helper;
- using BPA.Helper;
- using System.Collections.ObjectModel;
- using Microsoft.Toolkit.Mvvm.Input;
-
- namespace WPFDemo
- {
- public class Class1 : NotifyBase
- {
- public Class1()
- {
- AddCommand = new BPARelayCommand(() =>
- {
- dataTests.Add(new DataTest()
- {
- data1 = new Random().Next(0, 100),
- data2 = new Random().Next(200, 300),
- data3 = new Random().Next(400, 500).ToString(),
- data4 = Convert.ToBoolean(new Random().Next(0, 1)),
- data5 = new Random().Next(600, 700)
- });
- });
- }
- public ObservableCollection<DataTest> dataTests { get; set; } = new ObservableCollection<DataTest>();
-
- public BPARelayCommand AddCommand { get; set; }
-
- }
- }
|