private void MenuItem_Click_Add_Default_V1DataOnGrid(object sender, RoutedEventArgs e) { string info = "info"; DateTime date = DateTime.Now; DataLibrary.Grid grid = new DataLibrary.Grid { t_begin = 0f, t_step = 5f, count = 2 }; V1DataOnGrid tmp = new V1DataOnGrid(info, date, grid); tmp.InitRandom(-10, 10); collection.Add(tmp); }
private void menu_Add_Default_V1DataOnGrid(object sender, RoutedEventArgs e) { // element_collection.change_after_save = false; Random rnd = new Random(); DataLibrary.Grid new_grid = new DataLibrary.Grid(rnd.Next(100), rnd.Next(5), 4); V1DataOnGrid value1 = new V1DataOnGrid("ID1", new DateTime(5, 5, 5), new_grid); value1.InitRandom(3, 7); element_collection.Add(value1); // ListBox_DataCollection.ItemsSource = from item in element_collection where item is V1DataCollection select (V1DataCollection)item; // ListBox_DataOnGrid.ItemsSource = from item in element_collection where item is V1DataOnGrid select (V1DataOnGrid)item; }