using System;
using System.Windows;

namespace TerminalKFC.Windows
{
    /// <summary>
    /// Логика взаимодействия для OrderWindow.xaml
    /// </summary>
    public partial class OrderWindow : Window
    {
        public string bracket = "";
        public int sum = 0;
        public OrderWindow()
        {
            InitializeComponent();
        }

        private void Button_Click(object sender, RoutedEventArgs e)
        {
            menu.Visibility = Visibility.Hidden;
        }

        public void Update()
        {
            //itog.Content = "Итог: " + sum;
        }
        private void Button_Click_1(object sender, RoutedEventArgs e)
        {
            sum = GetNewSum(sum, 150);
            //tbfin.AppendText(Environment.NewLine + "Шефбургер\t\t\t150 p.");
            Update();
        }

        private void Button_Click_2(object sender, RoutedEventArgs e)
        {
            sum = GetNewSum(sum, 175);
            //tbfin.AppendText(Environment.NewLine + "Шефбургер Делюкс\t\t175 p.");
            Update();
        }

        private void Button_Click_3(object sender, RoutedEventArgs e)
        {
            sum = GetNewSum(sum, 100);
            //tbfin.AppendText(Environment.NewLine + "Чизкейк\t\t\t\t100 p.");
            Update();
        }

        private void Button_Click_4(object sender, RoutedEventArgs e)
        {
            sum = GetNewSum(sum, 300);
            //tbfin.AppendText(Environment.NewLine + "Два твистера\t\t\t300 p.");
            Update();
        }

        private void Button_Click_5(object sender, RoutedEventArgs e)
        {
            sum = GetNewSum(sum, 70);
            //tbfin.AppendText(Environment.NewLine + "Твистер\t\t\t\t70 p.");
            Update();
        }

        private void Button_Click_6(object sender, RoutedEventArgs e)
        {
            sum = GetNewSum(sum, 70);
            //tbfin.AppendText(Environment.NewLine + "Стандартный\t\t\t70 p.");
            Update();
        }

        private void Button_Click_7(object sender, RoutedEventArgs e)
        {
            sum = GetNewSum(sum, 100);
            //tbfin.AppendText(Environment.NewLine + "Стандартный\t\t\t100 p.");
            Update();
        }

        private void Button_Click_8(object sender, RoutedEventArgs e)
        {
            sum = GetNewSum(sum, 350);
            //tbfin.AppendText(Environment.NewLine + "Шефбургер острый\t\t350 p.");
            Update();
        }

        private void Button_Click_9(object sender, RoutedEventArgs e)
        {
            sum = GetNewSum(sum, 150);
            //tbfin.AppendText(Environment.NewLine + "Шефбургер средний\t\t150 p.");
            Update();
        }

        private void Button_Click_10(object sender, RoutedEventArgs e)
        {
            sum = GetNewSum(sum, 100);
            //tbfin.AppendText(Environment.NewLine + "Мороженое\t\t\t\t100 p.");
            Update();
        }

        private void Button_Click_11(object sender, RoutedEventArgs e)
        {
            sum = GetNewSum(sum, 145);
            //tbfin.AppendText(Environment.NewLine + "Твистер\t\t\t\t145 p.");
            Update();
        }

        private void Button_Click_12(object sender, RoutedEventArgs e)
        {
            sum = GetNewSum(sum, 150);
            //tbfin.AppendText(Environment.NewLine + "Картошка для двоих\t\t\t\t150 p.");
            Update();
        }

        public int GetNewSum(int sum, int price)
        {
            return (sum + price);
        }
        public void AddNewProduct(string ProductName)
        {
            bracket += Environment.NewLine + ProductName;
        }
    }
}
