示例#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].GetName().Equals(i.Content.ToString()))
                        {
                            flag = true;
                            list.Remove(list[j]);
                        }
                    }
                }
            }
            db.Serialize(list);
            if (flag == true)
            {
                MessageBox.Show("Видалено!");
            }
            this.Close();
            DeleteStadiumWindow deleteStadiumWindow = new DeleteStadiumWindow();

            deleteStadiumWindow.Show();
        }
示例#2
0
        private void DeleteStadium(object sender, RoutedEventArgs e)
        {
            DeleteStadiumWindow deleteStadiumWindow = new DeleteStadiumWindow()
            {
                Owner = this
            };

            deleteStadiumWindow.Show();
        }