|
123456789101112131415161718192021222324252627282930 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using BPA.Helper;
- using System.Collections.ObjectModel;
- namespace WPFDemo.Bb
- {
- public class ViewModel : NotifyBase
- {
- public ViewModel()
- {
- for (int i = 0; i < 30; i++)
- {
- class1s.Add(new Class1()
- {
- data1 = new Random().Next(1000, 2000),
- data2 = (byte)new Random().Next(0, 240),
- data3 = Convert.ToBoolean(new Random().Next(0, 1)),
- data4 = new Random().Next(3000, 4000).ToString(),
- data5 = (float)new Random().NextDouble() * 100,
- data6 = (ushort)new Random().Next(5000, 6000)
- });
- }
- }
-
- public ObservableCollection<Class1> class1s { get; set; } = new ObservableCollection<Class1>();
- }
- }
|