using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

namespace TSA_Beadandó
{
    /// <summary>
    /// Interaction logic for rombusz.xaml
    /// </summary>
    public partial class rombusz : Window
    {
        public rombusz()
        {
            InitializeComponent();
        }

        private void b_romb_Click(object sender, RoutedEventArgs e)
        {
            double k, t = 0;
            int a = int.Parse(tb_a_romb.Text);
            int m = int.Parse(tb_ma_romb.Text);
            int g = int.Parse(tb_e_romb.Text);
            int f = int.Parse(tb_f_romb.Text);
            k = 4*a;
            if (m == 0)
                t = (g * f) / 2;
            else
                t = a * m;
            l_K_romb.Content = k;
            l_T_romb.Content = t;
        }
    }
}
