public static List <DataSample> GetTasks(int count)
        {
            Random            rnd  = new Random();
            List <DataSample> data = new List <DataSample>();

            for (int i = 0; i < count; i++)
            {
                DataSample ts = new DataSample();
                ts.Id          = i;
                ts.Name        = "Name-" + i;
                ts.StartDate   = DateTime.Now;
                ts.FinishDate  = DateTime.Now.AddDays((double)i);
                ts.IsCompleted = rnd.Next(1, 3) == 1 ? true : false;
                data.Add(ts);
            }
            return(data);
        }
Ejemplo n.º 2
0
 public MainWindow()
 {
     InitializeComponent();
     this.dxGrid.ItemsSource = DataSample.GetTasks(10000);
 }