Exemple #1
0
        private void btOrder_Click(object sender, RoutedEventArgs e)
        {
            EndWindow endWindow = new EndWindow(orderList, imageList, factoryList);

            PlayWithLists.CreateOrderList(endWindow, orderList, imageList);
            Close();
            endWindow.Show();
        }
Exemple #2
0
 private void ChangeOrderList(List <OOP_Lab_1.MenuItem> order)
 {
     imageList.Clear();
     orderList.Clear();
     for (Int32 i = 0; i < order.Count; i++)
     {
         imageList.Add(order[i].Image);
         orderList.Add(order[i]);
     }
     PlayWithLists.CreateOrderList(this, orderList, imageList);
 }
        private void GetAnswers()
        {
            object[] answers = new object[3];
            answers[0] = AboutMenu1.SelectedIndex;
            answers[1] = Choose1.IsChecked;
            answers[2] = AboutMenu2.SelectedIndex == 0 ? true : false;

            foreach (Factory factory in factoryList)
            {
                if (factory.Name.IsEqual(orderItem[selectedIndex].Name))
                {
                    factory.answers          = answers;
                    orderItem[selectedIndex] = factory.Create(answers);
                }
            }

            PlayWithLists.CreateOrderList(window, orderItem, imageList);
        }
Exemple #4
0
 private void btDelete_Click(object sender, RoutedEventArgs e)
 {
     imageList.RemoveAt(listBox.SelectedIndex);
     orderList.RemoveAt(listBox.SelectedIndex);
     PlayWithLists.CreateOrderList(this, orderList, imageList);
 }