private void Add() { Console.WriteLine("add"); Train train = new Train(); train.Time = 0; ListTrain.Add(train); Select(); }
public MainWindowViewModel() { _listTrain = new ObservableCollection <Train>(); SelectCommand = new SimpleCommand(Select); AddCommand = new SimpleCommand(Add); UpdateCommand = new SimpleCommand(Update); DeleteCommand = new SimpleCommand(Delete); MainTabCommand = new SimpleCommand(MainTab); ConfigTabCommand = new SimpleCommand(ConfigTab); // 28개 리스트에 추가 for (int i = 0; i < 28; i++) { Train train1to28 = new Train(); train1to28.Time = i; ListTrain.Add(train1to28); } Thread thread = new Thread(Count10); thread.Start(); //Select(); }