private void btn1_Click(object sender, RoutedEventArgs e) { Keno keno = new Keno(); MyKeno myKeno = new MyKeno(); MyKeno myKeno1 = new MyKeno(); keno.ReadFile(); foreach (Keno k in keno.ArrayListKeno) { myKeno = new MyKeno(k.Num.ToString(), k.Date, k.Numberloto, k.Numberballs.ToString(), k.NumberToString(k.Number)); myKeno1.ListKeno.Add(myKeno); //myKeno.MyKenoAddList(myKeno); } Listview.Items.Clear(); ClassKeno.Clear(); foreach (MyKeno keno1 in myKeno1.ListKeno) { ClassKeno.Add(keno1); Listview.Items.Add(keno1); } //ClassKeno = new MyClass(myKeno1); //ListView listView = new ListView(); //GridView gridView = new GridView(); //gridView.AllowsColumnReorder = true; //gridView.ColumnHeaderToolTip = "Информация Кено"; //GridViewColumn gridViewColumn = new GridViewColumn(); //gridViewColumn.DisplayMemberBinding = new Binding("num"); //gridViewColumn.Header = "Номер тиража"; //gridViewColumn.Width = 100; //gridView.Columns.Add(gridViewColumn); //listView.ItemsSource = new MyClass(myKeno); //listView.View = gridView; //StackPanel1.Children.Add(listView); //Listviev.DataContext = Keno; }
private void btn1_Click(object sender, RoutedEventArgs e) { Keno keno = new Keno(); MyKeno myKeno = new MyKeno(); MyKeno myKeno1 = new MyKeno(); keno.ReadFile(); foreach (Keno k in keno.ArrayListKeno) { myKeno = new MyKeno(k.Num.ToString(),k.Date, k.Numberloto, k.Numberballs.ToString(), k.NumberToString(k.Number)); myKeno1.ListKeno.Add(myKeno); //myKeno.MyKenoAddList(myKeno); } Listview.Items.Clear(); ClassKeno.Clear(); foreach (MyKeno keno1 in myKeno1.ListKeno ) { ClassKeno.Add(keno1); Listview.Items.Add(keno1); } //ClassKeno = new MyClass(myKeno1); //ListView listView = new ListView(); //GridView gridView = new GridView(); //gridView.AllowsColumnReorder = true; //gridView.ColumnHeaderToolTip = "Информация Кено"; //GridViewColumn gridViewColumn = new GridViewColumn(); //gridViewColumn.DisplayMemberBinding = new Binding("num"); //gridViewColumn.Header = "Номер тиража"; //gridViewColumn.Width = 100; //gridView.Columns.Add(gridViewColumn); //listView.ItemsSource = new MyClass(myKeno); //listView.View = gridView; //StackPanel1.Children.Add(listView); //Listviev.DataContext = Keno; }
public void MyKenoAddList(MyKeno myKeno) { ListKeno.Add(myKeno); }