Exemple #1
0
        private void Delete()
        {
            list = db.Deserialize();
            bool flag = false;

            foreach (var i in checkBoxes)
            {
                if (i.IsChecked == true)
                {
                    for (int j = 0; j < list.Count; j++)
                    {
                        if (list[j].GetGameDate().Equals(i.Content.ToString()))
                        {
                            flag = true;
                            list.Remove(list[j]);
                        }
                    }
                }
            }
            db.Serialize(list);
            if (flag == true)
            {
                MessageBox.Show("Видалено!");
            }
            this.Close();
            DeleteGameWindow deleteStadiumWindow = new DeleteGameWindow();

            deleteStadiumWindow.Show();
        }
Exemple #2
0
        private void Delete_Click(object sender, RoutedEventArgs e)
        {
            DeleteGameWindow deleteGameWindow = new DeleteGameWindow()
            {
                Owner = this
            };

            deleteGameWindow.Show();
        }